Coverting a tape drive (DATASET) audio file back into bytes

Started by Midimaster, August 14, 2023, 09:40:48

Previous topic - Next topic

Baggey

Hi,

How did we arrive at these figure's

QuoteA single wave is a sequence of 7 bytes:
[227 , 251 , 183 , 73 , 5 , 29 , 128]

i know we can analise the wave in audacity and take a best guess but if i have 0.5 or -0.8 how do i calculate this to a Byte.

Kind Regards Baggey
Running a PC that just Aint fast enough!? i7 4Ghz Quad core 24GB ram 1TB SSD and NVIDIA Quadro K620 . DID Technology stop! Or have we been assimulated!

ZX Spectrum 48k, C64, ORIC Atmos 48K, Enterprise 128K, The SID chip. Im Misunderstood!

Midimaster

load your WAV file into a TBank, then print bytes between pos=4999 to 5100

You will see a repeating sequence of 7 values. 

[227 , 251 , 183 , 73 , 5 , 29 , 128]

This is "The Wave" as it was build for this WAV-file. It is build very intelligent, because it crosses the zero-line (=128) between pos 3 and 4 without having a ZERO (=128). Only the 7th pos is a real ZERO (128). This makes it easy to count ZERO-Crossings. This was definitiv constructed and not recorded!!! With a real recording we would see time artifacts and occasion middle wave zero-crossings.

So.. the best you can do is use exactly this sequence to build the tap waves.

The algorithm for "voltage to 8-BIT-PCM" is very easy

Volt *128 + 128

I already wrote this table some post ago:


000....127 means negativ wave  -1.00 Volt  to -0.01 Volt
128        means                               0.00 Volt
129....255 means positive wave +0.01 Volt  to +1.00 Volt
...back from Egypt