Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal
Roadcrosser

Computronics Tape Drive Looper.

Recommended Posts

TL;DR: http://pastebin.com/DG1wiRDc
 
I was messing around with tape drives and trying to make them loop, and it turns out that it's a bit more complicated than it would seem.
 
If the audio used is shorter than the tape, the tape doesn't automatically stop when the audio ends, instead playing silence for the rest of the unused tape length, before stopping.
 
This renders isEnd() and .getState() useless, because after the audio is over, the tape will still play, only actually ending (and stopping) several minutes later (audio and tape length assumed to differ by several minutes, your mileage may vary).
 
After doing lots of research and messing with the API, I found the command read(), which reads the current byte. It seems that even with the audio having quiet points (assuming you've written the audio starting from the beginning of the tape, but I did minimal testing), the read() command returns "0" when the audio of the tape ends, which I used to detect when to rewind and replay.
 
With an internet card, you can run

pastebin get DG1wiRDc Loop

to download the program, running it with

Loop

Unfortunately, I didn't have much luck adding a way to abort the program, so you might have to power cycle the computer to get it to stop.

 

 

BONUS:

 

http://pastebin.com/CZ1kJFMB

 

Here's another program I wrote, you might have to fiddle with it a bit for it to work for you, because I just bodged this together in an attempt to rickroll someone.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.