Raw import-export

Question. Using audacity 2.0.6 on Windows 7 Pro, installed from .exe installer.

I do a raw import on some PCM audio data (16-bit signed 8 kHz), then immediately re-export in same format (raw). The resultant file is substantially the same but does not exactly match the original, almost all samples differ by 1 or more LSBs. I was expecting a bit-for-bit copy. Same effect if I export as WAV and examine sample by sample. What am I missing?

Did you import it raw as 32-bit float then dither it down for export? See Quality Preferences.

Gale

Ye i have the same problem.
@UP ye imported it as 32 bit float

Yup it is the dither, although this is a bit of an unwelcome surprise. Turning it off gives the desired effect. Thanks.

So you’re saying that if you do something for which there is absolutely no purpose, the result is not what you expected. :smiley:

There is a very good reason for applying dither - for processed audio it eliminated harmonic distortion caused by quantize errors, thereby improving the sound quality and extending the dynamic range.

A detailed account is described in the Audacity wiki: Missing features - Audacity Support

There is also a section about dither in this excellent video: Xiph.Org Video Presentations: Digital Show & Tell

The “something for which there is absolutely no purpose” was the most concise example I could think of that illustrated the behavior I didn’t understand, not the actual use. And I have good reasons for not wanting dither. “Quality” is not an issue and in fact this sound is not for human ears at all. I’m helping a group of students with a project involving audio input processing on a robotics platform and suggested audacity for basic manipulation (cut, trim, etc) while they are in the early stages of writing code. So anything that makes their data not look like the actual input is bad thing and I have to tell them to double-check their work in light of this, although I don’t expect it matters much.

From the very guide you linked:

Here’s the exception to the rule: If you have recorded in 16-bit and are only doing simple editing (cut, delete, paste, trim…) and not doing any processing (amplify, equalize, frequency filter…) then for highest accuracy dither can be set to “none”. In this case, because there are no 32-bit operations prior to export there is no benefit to using dither.

Which is in fact my situation here. My surprise is not that dither exists, just that it was happening behind my back.

I was only teasing :wink:
The example you gave is indeed the clearest imaginable.

Sounds interesting. We hear of all sorts of unusual uses for Audacity in addition to audio use.

Personally I’d prefer that the dither option was more readily accessible, for example in the Export dialog, though if we did that I expect that a lot of users would, through not understanding what it does, turn it off when it would be better on. Unfortunately it is not easy to add controls to the Export dialog and no consensus that doing so is a good idea, but at least there is an option, even if not the easiest thing to find.

If you had 32-bit float Default Sample Format set when you imported the 16-bit file, the dither noise would be expected in the 16-bit export.

If you had 16-bit Default Sample Format set when you imported the 16-bit file, the dither noise is a bug: http://bugzilla.audacityteam.org/show_bug.cgi?id=22.


Gale