28

My father and I recently dug out his old Commodore 64 from his basement and tried to revive it. Among other accessories, we also found his old Datasette drive, which is essentially a normal tape drive that can be connected to the computer to store and load data on a standard compact cassette. With a so called "Turbo tape" program, we can store about 3 MB of data on a 90 minute tape (estimated, I haven't tested it for a full tape because the Commodore 64 only has 64KB of RAM), so about 600 B/s. This number seems really small considering that a compact cassette of that type can store 90 minutes of relatively high fidelity analog audio. From Wikipedia I've found out that this is probably due to the fact that this drive used extremely simplistic encoding and a very primitive error correction scheme.

Now, this begs a question which I haven't been able to find an answer for searching the web: How much data could we theoretically store without errors on a compact cassette with more complex, modern encoding schemes like QAM/PKS and modern error correction like Reed-Solomon codes? Have there been any projects trying to explore that?

Furthermore, a more general question: Given an analog medium of known signal to noise ratio and frequency response, how can one even calculate (or approximate) the maximum digital data rate that can be written to it?

And just to be clear, I'm not talking about the Commodore 64 here. It was just the reason this question occured to me in the first place. So please don't vote to close this question or move it to retrocomputing. I'm asking about what modern technology could achieve with compact cassettes, not a 40 year old 8-bit computer. This is a perfectly valid electrical engineering question (though it might have some connection to the DSP forum as well).

Giacomo1968
  • 130
  • 8
DLCom
  • 401
  • 3
  • 6
  • https://dsp.stackexchange.com/questions/70700/why-can-so-little-digital-information-be-stored-on-a-cassette-tape was very informative and I wonder if @marcus-müller would join here. – devnull Nov 26 '21 at 14:36
  • Why would anyone investigate the max storage possibilities of a magnetic tape given the better media now available which is **so** much less error prone? – Solar Mike Nov 26 '21 at 14:43
  • 2
    I’m voting to close this question because it should be on https://retrocomputing.stackexchange.com/ But the Close menu here doesn't offer me Retrocomputing in the migrate options so having to use another VTC option. – TonyM Nov 26 '21 at 14:47
  • 1
    Before it gets closed, perhaps your father already have the answer, if you can interrogate him. :-) at the time Commodore and Apple was using audio cassettes, MODEM over "land-line" just started about 1k bps at the best (if I remember it right). What is the DSL speed these days? – jay Nov 26 '21 at 15:05
  • 6
    @jay I'm also hoping the question is improved to make it clear it is not about a 30 years old computer but what could 3 decades of exponential improvement in DSP capability provide. – devnull Nov 26 '21 at 15:16
  • 3
    Well, just as a reference point, a 56kbps modem could transmit about 35 MB in 90 minutes. These modems were optimized to transmit across a channel with lower SNR and smaller bandwidth than what is provided by a quality audio tape. – user57037 Nov 26 '21 at 18:15
  • 1
    @mkeith To put in perspective, the "turbo tape" mentioned in the question, achieves 4.44 kbits/s. A "fully analog" trellis modulation for a 33.6 kbits/s modem from the 1990s is achieved, as you said, over a much worse medium (bandwidth and noise) than a conventional audio tape+system (20 Hz to 16 kHz, at least, vs 300 to 3.4 kHz). – devnull Nov 26 '21 at 18:22
  • Related https://retrocomputing.stackexchange.com/questions/9260/how-much-data-could-a-home-computer-store-on-an-audio-cassette – Bruce Abbott Nov 27 '21 at 02:07
  • 9
    VOTES TO CLOSE This is a question about using modern methods to record data on audio cassette tape. The reference to olde systems is just a reference to what could be achieved simplistically long ago. This question is a much better fit here than in retrocomputing. – Russell McMahon Nov 27 '21 at 23:26
  • 1
    Those Commodore engineers weren't really trying. Audio recorded decently to tape is superimposed on an AC bias of at least 60 kHz. That suggests that the hardware will give you 120 ksamples/sec without any really hard work. Distinguishing just 8 levels would provide 360kbps. They just wired an acoustic coupler directly into a crappy tape recorder. – Matt Timmermans Nov 28 '21 at 20:14
  • Perhaps this was the impetus to dig out the old Commodore 64, but if not - I'd highly recommend this recent episode from Radiolab's Mixtape series: https://www.wnycstudios.org/podcasts/radiolab/articles/mixtape-cassetternet – dwikle Nov 29 '21 at 18:26
  • 1
    You best not tamper with the insides of the C-64, or you will void the warrantee! – richard1941 Dec 02 '21 at 19:33
  • Besides the S/N ratio and frequency response, you also need the noise spectrum and the signal spectrum. For the "optimum" algorithm, see the classic from the last century, "Extraction of Signals from Noise" by Wanstein and Zhubakov, IIRC. – richard1941 Dec 02 '21 at 19:36
  • For reference, digital “successors” to the compact cassette DCC and DAT achieved 384 and 1536 kbit/s respectively. The digital storage version of DAT (DDS), used a lot for backups, started at 1.4 Mbit/s and reached over 24 Mbit/s on the original 3.81 mm tape after a few iterations (and a decade or so). Of course the medium and devices were quite better than the original compact cassette. – jcaron Dec 02 '21 at 23:58

4 Answers4

21

Have there been any projects trying to explore that?

Ben North attempted to play video from a standard audio cassette tape using QAM modulation. First he tested the signal through a loopback cable. The resulting constellation looked pretty good:-

enter image description here

Then he tried recording to an actual cassette tape in an NAD 6220, and playing it back with a Sony WM-EX194. The results were in his words 'disastrous'. Limited bandwidth, amplitude variations, flutter, phase noise and varying motor speed all conspired to make the signal unreadable.

To compensate for speed variations he recorded a pilot tone to one channel and used Barker codes to correlate it to the data channel. Using this technique he managed to get ~24kbps with a 2% symbol error rate. The received constellation looked like this:-

enter image description here

This probably represents the limit for consumer grade compact cassette recorders.

Better results could be achieved using a dedicated machine optimized for the job, perhaps including a tape head with more tracks. Here's an example from 1987 that achieved 60kbps using an 8 track head with the two outer tracks providing control pulses. An advantage of this system is that it automatically compensates for tape head azimuth alignment errors, which was a common problem for distribution of prerecorded computer tapes.

Bruce Abbott
  • 55,540
  • 1
  • 47
  • 89
  • 5
    I just want to note that this is a better practical answer than mine. My answer was assuming that a tape player was an otherwise linear channel with Dolby. It was neglecting the fact that you have wow and flutter and other effects that essentially make it a time varying channel. This answer is also based on a history of practical experimentation, where mine is just theoretical musing. – TimWescott Nov 27 '21 at 19:32
  • This is a great answer for what can be stored using an off-the-shelf tape recorder. Using modern technology it would be possible to create a tape deck that more effectively uses the magnetic surface available in a standard compact cassette as a medium. – jpa Nov 28 '21 at 08:50
  • But... the best dial-up modem we had in the day did 56kbps, and a cassette has a lot more bandwidth than POTS service. – Matt Timmermans Nov 28 '21 at 15:22
  • @MattTimmermans Not quite http://www.laits.utexas.edu/~anorman/long.extra/Student.F98/modem/56k.htm Most analog telephone lines have a wider (equalized) bandwidth on the copper. They also have much lower noise than cassette tape, and don't suffer from wow, flutter, and dropouts. This means the MODEM can rely on the signal being very stable in frequency, phase and amplitude - essential for QAM. The high audio bandwidth of hifi compact cassette decks is also somewhat illusory because it only applies at low amplitude (OK for music because it doesn't have much energy at high frequencies). – Bruce Abbott Nov 28 '21 at 17:59
  • Copper is pretty good, but POTS only guarantees 4KHz, and toward the end of the dailup period, IIRC, a lot of the link was digital at 8KHz sampling rate * 8-bit companded. It's true that cassettes suffer from the problems you mention, but those seem like things that could be corrected in the digital domain fairly easily. – Matt Timmermans Nov 28 '21 at 18:58
  • 1
    I an quite familiar with 'POTS' - I was a telephone exchange technician for 15 years (1976-1991) and worked on both analog and digital systems. I also designed the electronics for a 'hifi' tape deck that I built in1978, so I have first-hand experience with the vagarities of compact cassette tape. It truly is an awful medium! I admire your optimism regarding 'things that could be corrected in the digital domain fairly easily'. – Bruce Abbott Nov 29 '21 at 04:32
10

Given an analog medium of known signal to noise ratio and frequency response, how can one even calculate (or approximate) the maximum digital data rate that can be written to it?

Yes. The field of information theory is to a large part based on the Shannon channel capacity theorem, which gives the ultimate bit rate that can be achieved given SNR and frequency response.

Note that for a cassette tape, you're not just limited by the tape: you're limited by the tape player. Also, if the tape player does any nonlinear processing (i.e. one of the Dolby noise reduction schemes) that may complicate the decoding process.

How much data could we theoretically store without errors on a compact cassette with more complex, modern encoding schemes like QAM/PKS and modern error correction like Reed-Solomon codes?

One of the "fun" things about information theory is that you can never go to your boss and promise zero errors -- you can only promise a given upper bound on the probability of error, and then only if you make assumptions about the medium.

But, yes, some more modern system could probably enjoy vastly increased performance. In the end you may end up with something like extensive forward error correction stacked on top of an underlying modulation scheme that is very similar to a telephone modem protocol but that uses the available bandwidth on the tape.

At a guess, at least the audio bandwidth in bits per second, so maybe 10kbps. Probably way more.

TimWescott
  • 44,867
  • 1
  • 41
  • 104
  • 1
    Given your comment about phase response, I wonder if OFDM would work well. You'd certainly need to trim the scheme to the tape machine -- there was a wide range of intended use and levels of quality to them. – TimWescott Nov 27 '21 at 04:15
  • 1
    I'm wondering how you arrive at the 10kbps. A HiFi cassette should reproduce frequencies up to 18kHz, I think; that would require at least twice the sample rate, and more than one bit per sample (maybe 8 or 9 or so?) in order to reproduce that (of course looking at analog information from a digital standpoint). This sounds to me as if the analogue bandwidth should be an order of magnitude higher than 10kbps. With a safety margin and extensive error correction the 24kbps in the other answer is closer to what I would expect from this back-of-the-envelope consideration of a total layman ;-). – Peter - Reinstate Monica Nov 28 '21 at 13:32
  • You just wrote out the long version of my "probably way more". If there's one thing you learn in estimating what you can do, it's to start by being _very_ conservative. – TimWescott Nov 28 '21 at 17:41
  • No disagreement in any of this. I was simply wondering about the "audio bandwidth in bits per second, so maybe 10kbps". As a layman, I'm struggling even with the terminology and was wondering whether the (analog) audio bandwidth is not much higher. How much of this one can reliably use for digital storage is a completely different matter. – Peter - Reinstate Monica Nov 28 '21 at 19:55
3

At the level of individual magnetic grains, magnetic recording media are fundamentally binary. So the highest areal bit density is directly given by the grain density per area.

This assumes that each grain can hold its own magnetic state independent of its neighbor.

This is the case e.g. for modern hard drive media but I am not sure if old analog tape is designed that way.

If not, the density will be somewhat lower but it is impossible to answer without knowing the material specifics of the magnetic layer.

Giacomo1968
  • 130
  • 8
tobalt
  • 18,646
  • 16
  • 73
  • 2
    This is incredibly easy to answer, given that cassette media has a well-known SNR and bandwidth. – hacktastical Nov 26 '21 at 21:17
  • An actual market example that held up to 600MB on a compact cassette format: https://obsoletemedia.org/streamer-cassette/ – hacktastical Nov 26 '21 at 21:24
  • 1
    @hacktastical the medium doesnt have any SNR. It is the Read-out electronics that might. But if the OP supposedly asks what would theoretically be possible in this medium if an optimum Read-out mechanism is used, the Read-out SNR becomes irrelevant – tobalt Nov 26 '21 at 23:04
0

After a quick search around the net, it looks like you could count on 50 dB SNR up to 15 kHz or better.

That seems unlikely, but if you trust the lying specs, then channel capacity is about 200 kbps. We can get arbitrarily close to channel capacity with practical encoding methods these days, so that would be my guess.

200 kbps seems reasonable, given that we could do 56 kbps over dial-up. Cassette tape has improved bandwidth and encoding techniques are much better.

That would be 400 kbps if you used stereo.


On second thought... Audio recorded to cassette is superimposed on an AC bias with frequency of at least 60 kHz. The hardware must therefore be able to reproduce frequencies well above this.

Furthermore, the bias is there to overcome the non-linear nature of the recording medium, and there really is a limit to how well you can expect this to work. Even so, good decks claimed better than the 50 dB SNR I mention above.

I think a good digital recording system for cassettes would modulate that bias signal directly at >= 120 ksamples/sec, modelling the non-linear effects between samples. The channel capacity then becomes a measure of how many different levels you can distinguish with reasonable reliability. 16 levels should be doable, at least, which would be 480 kbps per track.

1 Mbps using stereo hardware should be possible if you bypass the audio processing like this, and modulate the heads directly.

chicks
  • 183
  • 3
  • 8
Matt Timmermans
  • 1,358
  • 6
  • 7