Raw import-export
Forum rules
This forum is for Audacity on Windows.
Please state which version of Windows you are using,
and the exact three-section version number of Audacity from "Help menu > About Audacity".
Audacity 1.2.x and 1.3.x are obsolete and no longer supported. If you still have those versions, please upgrade at 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 Windows you are using,
and the exact three-section version number of Audacity from "Help menu > About Audacity".
Audacity 1.2.x and 1.3.x are obsolete and no longer supported. If you still have those versions, please upgrade at 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.
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?
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?
-
Gale Andrews
- Quality Assurance
- Posts: 41761
- Joined: Fri Jul 27, 2007 12:02 am
- Operating System: Windows 10
Re: Raw import-export
Did you import it raw as 32-bit float then dither it down for export? See Quality Preferences.ThomAudio wrote: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?
Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual
Re: Raw import-export
Ye i have the same problem.
@UP ye imported it as 32 bit float
@UP ye imported it as 32 bit float
Re: Raw import-export
Yup it is the dither, although this is a bit of an unwelcome surprise. Turning it off gives the desired effect. Thanks.
Re: Raw import-export
So you're saying that if you do something for which there is absolutely no purpose, the result is not what you expected.ThomAudio wrote:I do a raw import on some PCM audio data (16-bit signed 8 kHz), then immediately re-export in same format (raw).
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: http://wiki.audacityteam.org/wiki/Dither
There is also a section about dither in this excellent video: http://xiph.org/video/vid2.shtml
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
Re: Raw import-export
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.steve wrote:So you're saying that if you do something for which there is absolutely no purpose, the result is not what you expected.ThomAudio wrote:I do a raw import on some PCM audio data (16-bit signed 8 kHz), then immediately re-export in same format (raw).
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: http://wiki.audacityteam.org/wiki/Dither
There is also a section about dither in this excellent video: http://xiph.org/video/vid2.shtml
From the very guide you linked:
Which is in fact my situation here. My surprise is not that dither exists, just that it was happening behind my back.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.
Re: Raw import-export
I was only teasingThomAudio wrote: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.
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.ThomAudio wrote: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.
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.ThomAudio wrote:My surprise is not that dither exists, just that it was happening behind my back.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
-
Gale Andrews
- Quality Assurance
- Posts: 41761
- Joined: Fri Jul 27, 2007 12:02 am
- Operating System: Windows 10
Re: Raw import-export
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.ThomAudio wrote:My surprise is not that dither exists, just that it was happening behind my back.
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
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual