Using Audacity 2.2.0. When opening a 16-bit PCM wav file and resaving it, it's not identical.
To reproduce the issue, follow these steps:
- set default sample format to 16-bit (Edit -> Preferences -> Quality)
- open an existing 16-bit wav file (let's say foo.wav)
- export to foo2.wav as a 16-bit PCM wav file
- do a binary comparison of foo.wav and foo2.wav, and see the wave data is not identical
To go even further, open foo2.wav and export it as foo3.wav, again as 16-bit PCM.
foo3.wav is neither identical to foo2.wav or foo.wav.
See attachment for binary comparison after saving once. It looks like a rounding error, or in other words: saving a 16-bit wav file as 16-bit wav file is lossy.
saving 16-bit WAV results in binary difference
Forum rules
This board is ONLY for general feedback and discussion about Audacity 2.X.
If you require help, or think you have found a "bug", please post on the forum board relevant to your operating system.
Windows
Mac OS X
GNU/Linux and Unix-like
This board is ONLY for general feedback and discussion about Audacity 2.X.
If you require help, or think you have found a "bug", please post on the forum board relevant to your operating system.
Windows
Mac OS X
GNU/Linux and Unix-like
saving 16-bit WAV results in binary difference
Last edited by steve on Fri Nov 17, 2017 1:09 pm, edited 1 time in total.
Reason: Put image inline to preserve board layout
Reason: Put image inline to preserve board layout
-
kozikowski
- Forum Staff
- Posts: 69374
- Joined: Thu Aug 02, 2007 5:57 pm
- Operating System: macOS 10.13 High Sierra
Re: saving 16-bit WAV results in binary difference
That's correct. Audacity works internally at 32-bit floating in order to prevent damage when an effect or filter accidentally forces sound to "overload." 32-floating doesn't overload and it's just necessary to reduce the volume out of overload to recover the production. The AudioBook Mastering Suite depends on this process.
The down side to these gymnastics comes when you have to export back to 16-bit. It's possible to get significant errors at this step, so Audacity adds a dither signal to the export. This makes the show sound better but it drives the obsessives nuts.
If you want to take your chances, you can turn the dither system off in Preferences > Quality.
Koz
The down side to these gymnastics comes when you have to export back to 16-bit. It's possible to get significant errors at this step, so Audacity adds a dither signal to the export. This makes the show sound better but it drives the obsessives nuts.
If you want to take your chances, you can turn the dither system off in Preferences > Quality.
Koz
Re: saving 16-bit WAV results in binary difference
Thanks for the suggestion. Turning off dithering makes it save an identical wav file.
-
kozikowski
- Forum Staff
- Posts: 69374
- Joined: Thu Aug 02, 2007 5:57 pm
- Operating System: macOS 10.13 High Sierra
Re: saving 16-bit WAV results in binary difference
Remember, tuning dithering off is only valid if you make no changes while the work is in Audacity. The first effect, filter or volume change is going to put you into the possible damage camp.
If all you're doing is listening, opening, closing, measuring, cutting, copying and pasting, You're pretty much good to go. Any effects including simple volume changes can cause problems.
Koz
If all you're doing is listening, opening, closing, measuring, cutting, copying and pasting, You're pretty much good to go. Any effects including simple volume changes can cause problems.
Koz
Re: saving 16-bit WAV results in binary difference
There's an article in the Audacity wiki that explains the when and why for dither: http://wiki.audacityteam.org/wiki/Dither
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
Re: saving 16-bit WAV results in binary difference
Got it, thanks again.