import .wav file as raw
Forum rules
This forum is for Audacity on GNU/Linux.
Please state:
Audacity 1.2.x and 1.3.x are obsolete and no longer supported. If you still have those versions, please upgrade (see https://www.audacityteam.org/download/).
The old forums for those versions are now closed, but you can still read the archives of the 1.2.x and 1.3.x forums.
Please state:
- which version of Linux you are using,
- the exact three-section version number of Audacity from Help menu > About Audacity,
- whether you installed your distribution's release, PPA version, or compiled Audacity from source code.
Audacity 1.2.x and 1.3.x are obsolete and no longer supported. If you still have those versions, please upgrade (see https://www.audacityteam.org/download/).
The old forums for those versions are now closed, but you can still read the archives of the 1.2.x and 1.3.x forums.
import .wav file as raw
I use ubuntu 16.04 and Audacity 2.1.2 I try to import a .wav file from a professional audio recorder because it is damaged. However, I cannot import even an undamaged file. There is only noise. Mediainfo says it has 2.304kbps, 48kHz, 24bits, 2channels, PCM(little/signed). So I set 24bit signed, little endian, Stereo and so on. I only hear noise. What is wrong?
-
kozikowski
- Forum Staff
- Posts: 68941
- Joined: Thu Aug 02, 2007 5:57 pm
- Operating System: macOS 10.13 High Sierra
Re: import .wav file as raw
What was the recording and how was it damaged?
Koz
Koz
Re: import .wav file as raw
Import RAW does not work for 24-bit files (it's a bug).Dan_Cox wrote:What is wrong?
I'll log it on the bug tracker.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
Re: import .wav file as raw
Cancel that. Looking closer, it's not a bug.steve wrote:Import RAW does not work for 24-bit files (it's a bug).
The problem is that the file you are working with is not a true RAW file.
A standard Microsoft PCM WAV files has 44 bytes "header" before the start of the data.
Each sample of a 24-bit PCM file is 3 bytes.
If you don't discard the header, then it is read as 14 samples + 2 bytes, and those 2 bytes push the rest of the data out of order. Where Audacity is expecting to get a 3 byte number for each sample, it is getting 2 bytes that belong to one sample, and one byte that belongs to the next sample.
To read 24-bit PCM correctly, it is essential that a correct offset is given (or at least, an offset that puts the first byte of each sample as the first in each group of 3 bytes).
Try importing with an offset of 44 bytes.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
Re: import .wav file as raw
Note that not all WAV files have standard Microsoft PCM WAV headers. It's not uncommon for valid WAV files to have headers larger than 44 bytes, so you may need to experiment, (or use a Hex Editor to examine how big the header actually is).steve wrote:A standard Microsoft PCM WAV files has 44 bytes "header" before the start of the data.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
Re: import .wav file as raw
Some information about that: https://stackoverflow.com/questions/199 ... yte-headersteve wrote:(or use a Hex Editor to examine how big the header actually is).
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
Re: import .wav file as raw
and the Microsoft RIFF format specification here: http://soundfile.sapp.org/doc/WaveFormat/
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
Re: import .wav file as raw
Thank you all. It works with an offset of 4 or 10 or 16 and so on. The other row with 1 or 7 or 13 and so on channels are changed.