Saving a wav file - opening Raw

I have a corrupt wav file from a rodecaster pro II. I’m trying to import it as a raw data file, but I’m not certain what the encoding, byte order, channels, start offset, sample rate of a wav, etc are.

Luckily, I have another file that I recorded (with the same settings) right before I recorded the corrupt file. The non-corrupted file opens fine in Audacity when I open it normally, but when I try to open the non-corrupted file in Audacity as a raw data file, it’s all static, leading me to believe that I don’t know the encoding, byte order, channels, etc etc.

My theory is that if I can figure out the details for the non-corrupted file and open it in Audacity, I should be able to do the same with the corrupted file. How can I figure out the correct settings on the non-corrupted file?

Thanks!

Check the good file with MediaInfoOnline (or you can install MediaInfo on your computer). It will give you most of the information, and most of the other defaults will be right for a regular WAV file.

The “channels” are either 1 (mono) or 2 (stereo) and you probably know that already. If the number of channels are off the speed will be wrong but the sound should be recognizable.

If the sample rate is wrong the speed will be off.

The offset is where the file header ends and the audio begins. The offset in a regular (non-corrupt) WAV file is 44 bytes. But there are other offsets that will work. As you may know, there are 8-bits in a byte and if the offset is wrong the byte-order will be wrong and it will sound very bad. But for example, with 16-bit files, an offset of 0 or 1 (or 44 or 45) will work. With 24-bits 0, 1, or 2, will work. With 8-bits, any offset will work.

If you use an offset of 0 or 1 with a good WAV file the header will be converted to sound data and you’ll have a short glitch (maybe a click noise) at the beginning. But that can be edited out.

The other thing with offset is that with a stereo (or multi-channel file) the left & right data alternate, so the left & right channels can be mixed-up.

If you can’t get it to work, check the file size and playing time compared to the good file. The relationship should be the same and if it’s not, the file might be hopelessly corrupted or it may be in a compressed format and then the RAW compressed data will be pure noise.

…Or, with uncompressed files-
Playing time = Sample rate x (bit depth/8) x number of channels.
i.e. 44.1kHz x (16/2) x 2 channels = 176kB per second (or around 10MB per minute).

My file was 24 bit and I was able to solve this with an offset of 2! All of the data is still there!

Thanks you!

This topic was automatically closed after 30 days. New replies are no longer allowed.