Skip to main content

Topic: Recommened codec for computer tape audio? (Flac: 688kB, 7z: 5kB) (Read 949 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • VonOben
  • [*]
Recommened codec for computer tape audio? (Flac: 688kB, 7z: 5kB)
Hi.

I'm looking for a codec that's suitable to compress the audio of old computer tapes. I have an audio file that is generated, so it's flawless in terms of noise. I will be using some device (a phone most likely) to play this audio file to a retro computer instead of using it's ageing tape player.

A small mono wav-file is 1705kB, flac can compress it down to 688kB. 7z can compress the wav to 5kB! The flac-file can be compressed down to 25kB with 7z. (There are around 1kB of actual computer data in the audio file.)

I understand that this is a very specific scenario when it comes to audio encoding. Are there any other codecs that are more suited for these tasks?

If not, does anyonw know any Android player that transparently can decompress a 7z and play the wav inside it on the fly?

Thanks.

  • hlloyge
  • [*][*][*][*][*]
Re: Recommened codec for computer tape audio? (Flac: 688kB, 7z: 5kB)
Reply #1
You can try other losless codecs, like Monkey's Audio or Wavpack. But, I've seen people had compressed C64 tapes in mp3 format and loading them from portable CD player through some kind of interface, replacing cassette player.

  • bryant
  • [*][*][*][*][*]
  • Developer (Donating)
Re: Recommened codec for computer tape audio? (Flac: 688kB, 7z: 5kB)
Reply #2
This may not be applicable to your situation, but the most straightforward way to accomplish this would be to port the utility that generates the wav file from the computer data, and then simply have Android generate and play the audio on-the-fly from the original data you want to transfer. Of course, this assumes you have the source code and programming skills.

Otherwise, WavPack lossy might be a good choice because it leaves the waveform unaltered. Regular lossy codes based on human hearing models are probably not recommended.

  • splice
  • [*][*][*]
Re: Recommened codec for computer tape audio? (Flac: 688kB, 7z: 5kB)
Reply #3
Most audio tape-based computer data formats (record and play on standard audio tape deck) are designed to work with limited frequency response and low SNR, speed variations, and phase shifts. They typically only need telephone grade bandwidth and SNR (4 KHz bandwidth, 40-55 dB SNR). You could use a lower sample rate such as 11 or 8 KHz / 8 bit.
Do consider the playback mechanism, though. It's no use using 8/8 format, or some specialised codec format, if the playback device doesn't support it.
Personally, I'd use MP3 encoding.  About 10 years ago I had to record the training sequence and data stream of a 2400 bps modem and send it to an overseas lab. I recorded it at 16/44.1 mono and converted to 128 Kbps MP3. The lab had no difficulty playing it into their analyser. I just now took one of the original files and compressed it with LAME at quality 9 (VBR, 45-85 Kbps) for a 20:1 reduction.  Overlaying the input and output waveforms shows an almost perfect match.
Regards,
   Don Hills
"People hear what they see." - Doris Day

  • Klimis
  • [*]
Re: Recommened codec for computer tape audio? (Flac: 688kB, 7z: 5kB)
Reply #4
Your best bet is to research a way to store the demodulated data into a player that will remodulate it back and output the signal. There are some mobile apps that do that but I don't remember their names etc. They store the actual data carried on the audio part but they are saved as data and not audio, which should be some KB of data and upon demand they will modulate the file and play it back from their headphone jack. If I'm not wrong asciiexpress.net online portal actually works that way.

I could help more if I knew exactly for what system you try to achieve this.
  • Last Edit: 17 August, 2017, 05:26:17 PM by Klimis

  • VonOben
  • [*]
Re: Recommened codec for computer tape audio? (Flac: 688kB, 7z: 5kB)
Reply #5
This is for Commodore 64, I'm using a 90s cassette-to-line-in-adapter in the tape player, and it works really well.

And 622kB instead of 1705kB (A tape turbo) is of course no big deal. But it somehow hurts deep inside when I know 7z makes it 5kB. :D

I found this: http://www.foobar2000.org/components/view/foo_unpack_7z

... but alas, foobar mobile don't seem to have support for add-ons.

  • VonOben
  • [*]
Re: Recommened codec for computer tape audio? (Flac: 688kB, 7z: 5kB)
Reply #6
Yea. I guess I should stop looking, and use this... https://play.google.com/store/apps/details?id=co.kica.tapdancer

  • polemon
  • [*][*][*][*]
Re: Recommened codec for computer tape audio? (Flac: 688kB, 7z: 5kB)
Reply #7
I'm looking for a codec that's suitable to compress the audio of old computer tapes.

Took me a couple tries understand what you need, but the nail finally dropped: you mean something like the audio from Datasette tapes, like for a C64 and a PET, correct?

If that's the case, I remember a dude at some Demo party had a similar system. In case it's the Datasette it's a little tricky because it doesn't use sines for '0' and '1', instead it writes square waves directly onto the tape. He used some sort of App on his phone to generate the files on the fly. I.e. the files were in binary form, and the App would generate the tones and output them through the headphone jack.

Another dude I know keeps the files as MP3s, because the SNR of those tapes wasn't exactly superb to begin with. Especially the tape machines were kinda low-range, etc. He just plays them back on his phone and it works every time. Even with C64 "Turbo Tapes".

So for archival reasons, having binary versions of the information is probably the best way to go, for quick playback from a phone, just go with the most convenient audio format.

EDIT: Just in case anyone cares, the binary files were tiny, even though they were uncompressed. A couple kilobytes at most. I'm guessing that if you'd use anything else but a stream compressor like xz or lz77, you'd get so much overhead it wouldn't even be worth doing.
  • Last Edit: 17 August, 2017, 07:55:56 PM by polemon

  • Klimis
  • [*]
Re: Recommened codec for computer tape audio? (Flac: 688kB, 7z: 5kB)
Reply #8
Yea. I guess I should stop looking, and use this... https://play.google.com/store/apps/details?id=co.kica.tapdancer
That was exactly what I would recommend.

  • polemon
  • [*][*][*][*]
Re: Recommened codec for computer tape audio? (Flac: 688kB, 7z: 5kB)
Reply #9
Yea. I guess I should stop looking, and use this... https://play.google.com/store/apps/details?id=co.kica.tapdancer
I'm not sure if the dude I've met uses this exact app, but the concept is the same. I'd also recommend this.