Audacity 2.1.3
Ubuntu 16.04 amd64
This also affects windows version.
Importing 16bit signed raw results strange waveform, seems like non linear a-law or u-law. Also most of the raw formats imports result unexpectedly.
attachments:
sin.raw: a signed 16-bit big-endian linear sine wave
unable to upload raw file, using this xxd dump instead
sin.txt (83 KB)
steve
April 28, 2017, 1:08pm
3
Note that Audacity attempts to guess the raw data format, but it’s no more than an educated guess. It is not possible to make this guess 100% accurate, which is why audio files usually contain header information.
Please test importing this file as RAW data (you can change the file extension if you wish - I’ve just named it as a WAV file so that I can upload it to the forum).
/uploads/default/original/2X/9/96f3b1168db29ee7e769868cb6ab411139faef18.wav
The settings should be like this (these are automatically selected on my Xubuntu 16.04 machine):
And this is the (correct) waveform as it appears on my machine after importing as RAW:
steve
April 28, 2017, 1:19pm
4
Not surprising, because “sin.txt” is not 16-bit signed PCM.
Where did that file come from?
steve
April 28, 2017, 1:37pm
5
Here’s the first 100 bytes as signed 16-bit big endian:
(it does not look like a sine wave to me)
0 30 30 12336
2 30 30 12336
4 30 30 12336
6 30 30 12336
8 3A 20 14880
10 65 36 25910
12 30 30 12336
14 20 65 8293
16 39 30 14640
18 30 20 12320
20 65 39 25913
22 30 30 12336
24 20 65 8293
26 62 30 25136
28 30 20 12320
30 65 65 25957
32 30 30 12336
34 20 65 8293
36 66 30 26160
38 30 20 12320
40 66 30 26160
42 30 30 12336
44 20 66 8294
46 33 30 13104
48 30 20 12320
50 20 2E 8238
i cannot upload the raw, the txt is its xxd dump
you can "xxd -r " to restore the raw.
the correct waveform is like this (using matplotlib)
steve:
Note that Audacity attempts to guess the raw data format, but it’s no more than an educated guess. It is not possible to make this guess 100% accurate, which is why audio files usually contain header information.
Please test importing this file as RAW data (you can change the file extension if you wish - I’ve just named it as a WAV file so that I can upload it to the forum).
The settings should be like this (these are automatically selected on my Xubuntu 16.04 machine):
And this is the (correct) waveform as it appears on my machine after importing as RAW:
Thanks! That explains it.
But this is exactly the issue. we need the “Import RAW Data” for raw files have no valid headers. or we can just “open” them.
steve:
Note that Audacity attempts to guess the raw data format, but it’s no more than an educated guess. It is not possible to make this guess 100% accurate, which is why audio files usually contain header information.
Please test importing this file as RAW data (you can change the file extension if you wish - I’ve just named it as a WAV file so that I can upload it to the forum).
16-bit_RawDataTest.wav
The settings should be like this (these are automatically selected on my Xubuntu 16.04 machine):
fullwindow-Import Raw Data-000.png
And this is the (correct) waveform as it appears on my machine after importing as RAW:
firsttrack000.png
the attachment is my RAW, extracted from an oscilloscope.
Sometimes I use audacity as a scientific tool, viewing and processing waveform.
/uploads/default/original/2X/0/0c785a2247bea59eb7f82262f4629cb4c3986217.wav
steve
April 29, 2017, 10:07am
10
terrance_h:
sin.raw.notrealwav.wav
On my machine, that is detected by Audacity as signed 8-bit, little endian, 2 channel (stereo), which produces this waveform:
so sad, I wrote a small tool converts the raw to wav…