Slashdot is powered by your submissions, so send in your scoop


Forgot your password?
Data Storage Media Music Hardware

Encoding Data for Audio Tape? 81

Kris_J asks: "I've recently purchased and installed an audio cassette deck for my PC. It makes recording to and from tape particularly painless, but I'm looking for some funky other stuff to try. Along the lines of my new old SuperDisk FD32MB that can store 32MB on a normal 1.44MB floppy, and my Cuttle Cart that can load Atari 2600 games from encoded audio I'm wondering if there's any program that can encode a file as audio that can survive being recorded to audio tape or compressed as an MP3. I'll worry about 'why' later."
This discussion has been archived. No new comments can be posted.

Encoding Data for Audio Tape?

Comments Filter:
  • tape yes, mp3 no (Score:4, Interesting)

    by n9hmg ( 548792 ) <.n9hmg. .at.> on Tuesday December 30, 2003 @07:28PM (#7840464) Homepage
    MP3 is a lossy compression. If lossy recovery is OK with you, fine. For storage to tape - maybe cwpcm the file after uuencoding it. I can't remember if there's a morse code character for each character used by uuencode.
    on a more practical line - send it as straight ascii, using the ham radio interfaces in Linux, through the sound card. decode that with the same interfaces and you're done. Those tools are used to loss, but I'd expect 100% copy on and off tape.
    • Not necessarily. You lose some information when encoding to MP3, but that information you lose may not be important. Take an MP3 compressed so much that you lose 90% of the information, and you will still be able to understand human speech in the recording.

      Obviously binary data and human speech are incredibly different - heck, one is digital and the other is analog. That doesn't change the fact that it's theoretically possible. Of course I doubt it would be practical in any situation I can think of - y
      • Not (Score:3, Interesting)

        by fm6 ( 162816 )
        You lose some information when encoding to MP3, but that information you lose may not be important.
        But how do you know whether important information has been lost? You'd need a pretty thorough understanding of the theory behind the MP3 algorithm to know that. Which might well lead to a variation that can safely compress a data stream -- but that's an exercise in advanced computer science, not casual hardware hacking.
    • I posted this stuff from work, but I'm behind a proxy there so I couldn't create an account. So I think my zero score was keeping people from seeing it.

      >>I posted a question on a MiniDisc forum a few months back about using an MD to record data.
      >>I know there was an MDData drive back in the day that held 140MB. Course it was made by Sony
      >>so nothing was interchangeable; the disks were not standard MD disks.
      >>From what I know about MD, the data is converted into ATRAC
  • by NanoGator ( 522640 ) on Tuesday December 30, 2003 @07:33PM (#7840512) Homepage Journal
    On the "Fit 32 megs on a floppy" link to an old Slashdot story, I ran across this 'first post' comment:

    "The next version of Windows should fit on 5000 of these..."

    Just thought it was amusing that Windows XP is distributed on one CD, RedHat is distributed with 5.

    (Sorry, NFI how to answer this guy's question...)
    • by V. Mole ( 9567 )

      That's because the Windows XP CD doesn't include Office, or Exchange, or SQL Server, or Photoshop, or ... I think you know where I'm going with this. Still not a completely accurate comparison, but a lot closer.

      Not to mention the sourcecode.

      • Yep, you're right. However, spanning that many CDs is dangerous. I tried to install Redhat 7 or 8 (I forget which, but I can tell you it was only 3 CDs, not 5.) and on the third disc, I discovered the media was bad. Redhat's installer wasn't smart enough to deal with an error like that, and never gave me the opportunity to 'retry'. Instead it just stopped. So I had a partly installed Linux that'd only work in CLI mode, and root had a blank password. Heh. I had to start the entire install over with a
        • An interesting feature of Mandrake Linux is that when it asks for disk 2 or 3, you can select cancel to not install packages from that disk. Very nice in the above situation! The only way deadrat can do it is by starting the install all over again, and not selecting packages on the third disk.
          • I've had a bad file during a RH install. I noticed that Anaconda was retrying the rpm over and over, so I switched to the shell console, unmounted the CD, ejected it and replaced it with a good CD and remounted. The install continued as normal and I was left with a clean install. I'm not sure this will work every time and it's certainly not documented or supported, but it worked for me.


        • Someone already mentioned that current RH/Fedora versions let you verify your CDs first.

          Fedora also fails gracefully. I had some media problems and was able to make new CDs and continue without having to outsmart the installer (as another poster discribed.)

        • ...that's why you have the option to test the media before installing. It's also why they give you MDs of the ISOs.
          • "...that's why you have the option to test the media before installing"

            You should still have the option of being able to put another copy of the disc in. We have several laying around the office. If I could just have popped in another disk it would have saved hours.
    • Given the fact that two of those CDs are source, I'm not complaining.
    • If Windows included all the source to ALL the programs that it installed and/or recommended, I doubt 5 discs would even start.
      • "If Windows included all the source to ALL the programs that it installed and/or recommended, I doubt 5 discs would even start. " ...and?
        • Well the post I was replying to was somehow trying to state that Windows XP fits on one disk while Redhat takes 5. And it takes 5 because it has more than just a kernel and a window manager.
          • Okay, and?

            Not trying to be an ass here, but I'm not sure why you're pointing this out.
            • Try a little less harder then b/c u are doing too good of job.
              • I didn't attack or make fun of Linux, not sure why anybody feels the need to redundantly defend it.

                So yeah, whatever.
                • well saying that windows would take up a lot more space if its own source was included as well as the source for the few "applications" that come with it pretty much says that it would be more cds too if you actually got as much as you do when you buy linux. The original point was that linux was bloated, but linux itself is not and the distros just provide a ton of applications to with it to make it more useful OOB than windows.
                  • There was no need to defend Linux, I was not attacking it. I never said Linux was bloated, nor was that the point I was trying to make. Nobody modded me as funny because they thought I was saying Linux is bloated. Rather, I was modded up for pointing out how absurd it was to measure bloat by the size of the installation media.
          • And it takes 5 because it has more than just a kernel and a window manager.

            To be fair, Microsoft added Hearts, Spider Solitaire, Internet Hearts, Internet Backgammon and Internet Checkers to their already strong lineup of Freecell, Solitaire, Minesweeper and Pinball.

    • As is stands, a minimal RedHat install is about 500MB. My Windows directory alone consumes 1.6GB of disk space.

      When you install from the single WinXP disk, you get an OS, a bootloader, a browser, a graphics viewer, an e-mail client, and a file manager. Maybe some games, a calculator, and a text editor.

      RedHat, OTOH, comes with all of the above, in about 7 flavors of each. You get Evolution, The Gimp, Mozilla, 2 full desktop environments, tons of games (some quite good like FreeCiv and BZFlag), several m
      • When you install from the single WinXP disk, you get an OS, a bootloader, a browser, a graphics viewer, an e-mail client, and a file manager. Maybe some games, a calculator, and a text editor. RedHat, OTOH, comes with all of the above, in about 7 flavors of each. You get Evolution, The Gimp, Mozilla, 2 full desktop environments, tons of games (some quite good like FreeCiv and BZFlag), several media players/rippers, DVD and CD recording software, and a full featured Office package.

        Yes, but if Microsoft h

        • If MS bundled Norton Utilities, Star Office, Apache Server, MySQL, and Galactic Civ, no one would care. The problem is that MS finds the programs people need to make a PC productive and then buys those programs. If the copyright owner refuses to sell, then MS creates a clone. Then no one buys the original program.

          If RedHat bundled RH web server, RH desktop, RH e-mail, and RH web browser, then people would be pissed. Hell, people got pissed when RH tried to bundle a KDE/Gnome theme.
      • More isn't better.

        If people who wanted to use Linux for the first time were effectively TOLD what to use on that platform, it'd be a lot more standardized, rather than the mess of 7 flavors of text editors, office suits, boot loaders, desktop environments, etc.

        There's something to be said to unilateral dictation of the user experience -- every Windows XP machine in the world, save a few, is going to look and act the same, share a common interface, and have a few apps that are the same regardless of where
  • by Rxke ( 644923 ) on Tuesday December 30, 2003 @07:34PM (#7840520) Homepage
    of how i used to curse, as a kid, on my crappy cassettedeck not wanting to load my programs... Diskdrives too expensive, not to mention harddisks... And you want to do that VOLUNTARILY? Geez...
    • Ahh, the R Tape Loading Error, how I miss that !

      Actually, I had three computers with tape drives. One was the ZX81 with an elderly desk tape recorder. The ZX81 had to switch off the screen routine while it was handling the mo/dem to tape. I'm not making this up.

      Then there was the Sinclair ZX Spectrum. By the time I got this, I had some awful MIDI HiFi system that was about 50 times the size of the computer, but it did have good enough fidelity to retrieve iffy pirate copies of Elite every other attempt or
  • by mellon ( 7048 ) * on Tuesday December 30, 2003 @07:35PM (#7840525) Homepage
    Where did you get it? It looks like it's actually controlled over a serial port - is that right? Seems like it would be pretty easy, if that's true, to come up with a driver for it - you wouldn't even need a device driver, but just a control library that knows how to talk to the serial port. Are you using it from Windows or from Linux? If Windows, wouldn't getting it running on Linux be a fun hack job? :')

    This would be handy for me because it'd provide a way to master tapes for duplication without requiring me to put my hands on the machine all the time to cue up master tapes.

    Anyway, stop fooling with your silly tape writing project and get going on telling us how this thing works! You can always write the tape using by running a Z80 emulator and running Tarbell BASIC on it, can't you?
    • by Kris_J ( 10111 ) * on Tuesday December 30, 2003 @08:48PM (#7841098) Homepage Journal
      Okay, long story. It appeared on one of the Gadget blogs I frequent and I tried to get it directly and failed. However, my credit card's loyalty scheme includes something about "Rewards as broad as your imagination" where you can tell them what you want and they'll get it for you. After a month or so Citibank were able to get in contact and have the product shipped to me.

      The device itself is quite simple. It's a 5.25" device with a standard power connection. It also has a ribbon cable that runs to a simple adapter that fits in a slot in the case (thought it doesn't plug in like a card) -- from there you connect it to audio in/out and a serial port. Software is seriously basic and I think Windows only, but you can just set a few settings and press a button to have it convert an entire tape, both sides, to an MP3 file. I then cut it up using MP3DirectCut. Just converted an old Vangelis tape yesterday.

      So, yeah, it's basically a tape drive with Line In / Line Out and a serial port. However, I'm barely a programmer, just a bit of PHP and SQL, no C, no drivers, no comms, so I'm not up to the task of writing anything myself.

  • Geez (Score:3, Flamebait)

    by Otter ( 3800 ) on Tuesday December 30, 2003 @07:40PM (#7840575) Journal
    I got to "I've recently purchased and installed an audio cassette deck for my PC." and was thinking of a stupid comment to make about how he could save his 10 PRINT "I RULE!, 20 GOTO 10 program on it.

    And then it turns out that's actually what he wants to do!

    Suggestion -- here's your opportunity to learn a bit about file I/O. You know how to write to and read from the device? Hack at it a bit and write your own toy utility. That'll benefit you far more than finding something on Sourceforge and playing with it for 5 minutes.

    • For bonus points use the FUSE kernel module (File System User Space, .1/0803.html) to get your tape drive to fast forward / rewind and implement a full filesystem.

      Then, use tar to copy files to it. Then you'd be cool.

      --Robert :^)
  • If you really wanted to be geeky, you could encode the mp3s so it actually stores the mp3s themselves on the tape, then when you play the tape back it reads the mp3s and plays the music.
  • If you figure this out, let me know. I want to be able to save and load MP3-encoded audio files on an Atari 410 recorder so they play on an Atari 1200.
  • Why not? (Score:3, Funny)

    by fm6 ( 162816 ) on Tuesday December 30, 2003 @07:55PM (#7840697) Homepage Journal
    I'll worry about 'why' later.
    Spoken like a true hacker!
  • Just get an old 400 baud acoustic coupler-style modem. Put it right next to the condenser mike on your ghettoblaster, and you're good to go.

    Or maybe you can find a low-baud-rate emulator somewhere.
    • Just get an old 400 baud acoustic coupler-style modem.

      I think you mean 300. At least if you were in the U.S. I never encountered a 400 baud one.

      Ah, acoustic coupler goodness. (Insert flashback effects here...) First programming I ever did was in a summer program for "gifted" kids, in 1981, at Western Maryland College. They had a PDP-11. The only connection from the terminal room to the computer was dial-up over the campus phone system. With acoustic coupler modems. And, I can't be sure after all these

  • by IM6100 ( 692796 ) <> on Tuesday December 30, 2003 @09:06PM (#7841277)
    A more useful cassette tape oriented question that I have been thinking about is: Has anybody come up with a software package to emulate an audio cassette deck using a PC with a sound card? It seems like it would be a trivial task and it'd be cool for people with 'classic' hardware. The old TRS-80 or Sinclair 1000 would be more useful with a 100% reliable storage system like an old Pentium Machine that mimics a cassette. It would need audio in/out and possibly a digital input for 'motor control' that many old computers used.
    • I've played around with "MESS" and some TI 99/4A roms, and it is possible to "record" to .wav a tape program, and then load the .wav file into the "emulated computer." I've also used it to save some test programs and game saves, and it works like a charm (just dumps to a .wav file, that can load back in at a later date)

      Of course, you're looking for a little more than this, and I'm not sure (since I haven't played with any other machines on MESS) if it can do that exact functionality with others... works f
  • by hattmoward ( 695554 ) on Tuesday December 30, 2003 @09:26PM (#7841427)
    You'll probably want to grap the tech specs for that deck... I don't know what sort of interface this provides you, but if it's just an analog tape recorder with audio in/out connections, there are a few things you'll need to consider:
    • for both the tape and the recording heads:
      • Baseline noise level
      • Effective response time
    In other words, the quietest reliable volume and the shortest wavelength possible. You'll likely want to find or write an app that encodes ASCII data as 16-bit audio, choosing a high- and low-volume to record binary onto an analog medium. To counter your effective response, simply choose a good per-bit duration -- like cheap error correction. There are many, many ways to get this encoded, but your problem will be the low playback quality of the tapes. Another, more involved, solution would be to assign a specific frequency to each binary place-position, so you can assemble the completed byte-sound, record to tape, and disassemble into the component frequencies. This method will yield a higher density, but I'm afraid you'll probably encounter those quality issues I mentioned before... I'd say it's time to hit the google! Good Luck!
    • For the sake of argument lets assume he can record audio at the same quality level as a phoneline. (Probably can record higher than that actually...)

      So, per audio channel he can reliably encode 56Kbps. So, 112Kbps using both audio channels. That works out to 14000 Bytes per second, 840,000 bytes per minute and 50,400,000 bytes per hour.

      I'm dumbfounded. Thats 48Megabytes per hour of recordable tape.

      Amusingly enough that all cancels out and gets you aproximately 48 minutes of 128Kbps MP3...
  • You mention it in your post, so you must know what it does, which makes me wonder what why you're asking... like the page you linked says, you can get software that will convert Atari ROM files to WAVs, which you can then record onto CD or cassette tape. C source code is available []. Looks like it only works with certain file sizes in order to prevent you from encoding something that's not a cart ROM image, but it'd be trivial to remove that check.

    So there you go--software that will encode a file as audio th

    • Files for the Cuttle Cart do survive MP3ing, which is why I included reference to it and MP3s in the story. However, it's designed for very small files as you've noticed and it's based on some really old technology - the Starpath SuperCharger.

      In fact, the work done on converting SuperCharger tapes to files and subsquently back into clean audio is what inspired my question.

      Currently I'm trying to find a program that will process C64 tape recordings into .c64 files. However, the typical way to move C64 tape

  • my question (Score:5, Funny)

    by Zork the Almighty ( 599344 ) on Tuesday December 30, 2003 @10:51PM (#7842046) Journal
    Dear Slashdot: I'm looking for a way to store data so that the probability of recovering it is extremely low. I can't just delete the files since my company has a legal obligation to store them, so /dev/null is out of the question. Ideally I'd like some sort of crappy, hacked solution using media which is totally inappropriate and unreliable. I've already tried writing 32MB to 1.44MB floppy disks but that just wasn't bad enough. In your opinion, what is the shittiest data storage technology available ?
    • Good thing it's a quiet week between x-mas and new years and the boss is out of the office, cause I think I'll be laughing periodically for the rest of the day.

    • Yeah, but if I'd written it that way it wouldn't have been posted.
  • by Drunken_Jackass ( 325938 ) on Tuesday December 30, 2003 @11:01PM (#7842111) Homepage
    Geeze, i hope someone comes up with a solution to this dilemna. You see, i don't want to buy an iPod, because that would be too easy. Instead, i just bought a "Walkman" - it's this cool retro hardware that can play audio tapes while you walk...or sit, or stand even! So i need to find a way to convert my .mp3 collection to .wav files that i can then transfer to audio cassettes (or "tapes") so i can pop one of them into my Walkman and listen with reckless abandon while i park cars (i'm a valet).

    I hope this is possible. I want to see if i can induce some sort of ass-backwards, retro-technical vortex that will suck cars from one location to another.
  • Take a gander at how audio CDs store their data (google on "Reed-Solomon" and "CD"). With enough recovery bits, you'll be able to pull the data back off the audio tape even with a moderate amount of noise.

    As an alternative, you could write the data to tape with recovery blocks inter-spersed.

    e.g. chop the data file into smaller files, use PAR/PAR2 to create recovery files and dump the whole lot onto the audio tape. On the other end, pull the audio data back off, ignoring errors, and run the PAR/PAR2 t
  • For those of us that experimented with early home computers, being able to save data any method possible was wonderful .... until you started to do it on a regular basis. Then it got "old" real fast.

    The problems were numerous, and it was a BIG hassle to store more than one program on a tape.

    Atari, trash80, vic20, C64, TI, timex sinclair all had tape interfaces. But everybody was more than willing to dump it for a more expensive disk drive.
    • Uh yeah, my alternative was a huge old ASR-33 teletype / paper tape punch-reader.

      This thing was huge. And heavy. And noisy.

      But if I were to want to save any block of memory, it was either use the monitor proggy to print/punch it, write it down on a notepad and key it in again, or build me a cassette drive interface, which I did.

      I didn't have any other options. Remember, this was in the days before even the venerable Shugart-400. And how I longed for one of those 8" floppys, but the price was for me

  • As for controlling the actual hardware, others have suggested Linux drivers. I agree.

    For actually encoding the data into an audio stream, I would suggest googling for Amateur radio data protocols using modulation schemes like MFSK, QAM, Raised Cosine, etc. Hams have been battling the narrow bandwidth problem for a long time, and have come up with many encoding schemes to protect the data against fading, multipath, etc (many of which are also present on cassette recordings). this site [] gives examples of digit []

    • This looks very promising, thank you. However, I don't know enough about packet radio to workout what the assorted codes are referring to; protocols, devices, clubs, etc. All I really need to start with is a (Windows) program that can take a data file and turn it into a .wav file. Any chance you can point me more directly to something like this? Most of the software appears to want to interface live with a rig.
      • Humm...good question. You can probably modify any of the programs to write to an audio file instead of the sound card (which is what most ham software uses: radio <-> soundcard). Most ham software is GPL or better.

        There are a few constraints you need to look into.

        1. What is the available bandwidth of the tape deck?
        2. How likely is a dropout of audio (for a few mS)
        3. how much crosstalk is there between channels?

        Answers to these questions will help choose which encoding method is best for you.

        The absolutely si

        • I think I would stop at Manchester.

          The magnetic domains on tape are nonlinear and would probably be tricky to get to work on any protocol needing linearity. To get audio on the tape, the analog people mix a 100KHz or so "bias frequency" into the record circuit. And very carefully watch the record levels.

          The "flutter", or instantaneous speed variations of the tape - will wreak havoc with any phase-sensitive schemes. It will show up as a angular jitter ( rotation of the constellation ), otherwise known

  • by eap ( 91469 )
    I'm really glad this question came up. You see, I've got the opposite problem.

    Before Sun started making computers they manufactured personal stereos. These were the precursor to the early Walkman. However, there was one problem: they used the old Sun Model 411 style data cartridges (1/4"), which are large and never really caught on.

    Anyway, it's getting nearly impossible to find new releases on 1/4" cartridge, and I lost my 1/4" audio tape deck at Comdex '93, so I need to be able to record my mp3 colle
    • I'm afraid you can't use QIC audio tapes with a stock data drive, because the RIAA forced Sun to orient the magnetic domains 66% off-axis to prevent copying. Dead QICmans are pretty much the only source for the audio codec chip, and as I'm sure you already know, they sell for a small fortune on eBay.

      There was a Usenet post a few years ago from someone who modified a southern-hemisphere VCR (the heads spin the other way) to read them; he made four mercury delay lines of different lengths out of thermometers

  • I'd look in old microcomputer magazines (Dr. Dobbs, Kilobaud) from the 1970s for articles on recording data to cassette tapes. Many of these articles included schematics and source code in assembly language. The problem with tape is that schemes that work on narrowband audio channels, like AFSK (audio frequency shift keying), are often unusable because of poor speed regulation, wow and flutter on analog tape transports. If you can scrounge up a manual for the original Apple II, it includes an assembly listi

I came, I saw, I deleted all your files.