don't click here

Project for fun: storing data on cassette tapes

Discussion in 'Technical Discussion' started by dust hill resident, Apr 21, 2016.

  1. I always thought it was cool how 80s home microcomputers used cassette tapes for data storage. So over the past month, I decided to try writing my own program that would convert data into sound suitable for storing data on and retrieving data from cassette tapes.
    So this is what I've come up with. I wrote a couple of BASIC programs and some bash scripts and it seems to work pretty well now. I can reliably store about 2MB of data on a 90 minute cassette.

    I've only got it working on Linux, but it should be able to work on any system that can run the Brandy Basic V interpreter.

    This is what the signal from the tape looks like:
    http://dusthillguy.ddns.net/folder/files/quickupload/waves.png

    Here's a youtube video of the system in action:
    https://www.youtube.com/watch?v=Yj2eUKC0uPs

    Here's a short clip of what the sound it makes is like: (be warned that the sound is loud and not fun to listen to, and it could hurt your ears. If you decide to listen, turn your volume down a bit.)
    dusthillguy.ddns.net/folder/files/quickupload/example_clip.mp3
    (copy paste the URL)

    Here's the program data if you use Linux and are interested in trying it out: http://dusthillguy.ddns.net/folder/files/quickupload/NutSystem_release1.tar.xz
    (If you do download this and look at the code, be aware that I only really started getting into in programming at around the beginning of this year. I don't claim to be good at it. I admit the code is probably not very well written, don't be cruel about it.)
     
  2. Covarr

    Covarr

    Sentient Cash Register Member
    4,233
    3
    18
    Trapped in my own thoughts.
    Two stageplays, a screenplay, and an album
    That's roughly 3Kb/s? I wonder how difficult/feasible it would be to achieve dial-up speeds of ~56K/s? I would almost think that hypothetically you could get even better speeds than that, as cassette audio is much higher quality than a phone line; it seems to me (WARNING: I AM POSSIBLY VERY UNINFORMED) that you could pack a lot more data in using dial-up internet transmission methods than you could actually transmit at that speed on an old dial-up modem.
     
  3. I see what you're saying. I think there could be some problems with that idea. (like you I'm not very informed either, so this is all still guessing, but -) as far as I know, modems communicating often use the ability to re-send data/packets/whatever that weren't received properly. But with the cassette tapes, you can't selectively re-send portions of the data that weren't successfully received, so you really need to get it right the first time. Another thing is that the quality of different cassette recorders/players and even different cassette tapes varies quite dramatically, so that could cause problems too.
     
  4. Herm the Germ

    Herm the Germ

    Hmm, not bad. Well done, doctor! Member
    1,482
    0
    0
    Dresden, Saxony, Germany
    MIDI-to-SMPS-conversions, mostly. Takin' requests, too.
    Oh man, this takes me back to the time we had a Commodore 64 with a tape drive. Some of those games were fun to play - till the tape reached it's end, then you had to switch sides and start over. Blah. xD
    Nice job, though :0