saving 16-bit WAV results in binary difference

Feedback and Reviews for Audacity 2.x

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

Permanent link to this post Posted by hapbap » Thu Nov 16, 2017 11:52 pm

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.

foo_foo2.png
foo_foo2.png (215.25 KiB) Viewed 251 times
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
hapbap
 
Posts: 3
Joined: Thu Nov 16, 2017 11:31 pm
Operating System: Windows 10

Re: saving 16-bit WAV results in binary difference

Permanent link to this post Posted by kozikowski » Fri Nov 17, 2017 3:44 am

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
kozikowski
Forum Staff
 
Posts: 38445
Joined: Thu Aug 02, 2007 5:57 pm
Location: Los Angeles
Operating System: OS X 10.9 Mavericks

Re: saving 16-bit WAV results in binary difference

Permanent link to this post Posted by hapbap » Fri Nov 17, 2017 4:14 am

Thanks for the suggestion. Turning off dithering makes it save an identical wav file.
hapbap
 
Posts: 3
Joined: Thu Nov 16, 2017 11:31 pm
Operating System: Windows 10

Re: saving 16-bit WAV results in binary difference

Permanent link to this post Posted by kozikowski » Fri Nov 17, 2017 4:37 am

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
kozikowski
Forum Staff
 
Posts: 38445
Joined: Thu Aug 02, 2007 5:57 pm
Location: Los Angeles
Operating System: OS X 10.9 Mavericks

Re: saving 16-bit WAV results in binary difference

Permanent link to this post Posted by steve » Fri Nov 17, 2017 9:00 am

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)
steve
Site Admin
 
Posts: 45326
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: saving 16-bit WAV results in binary difference

Permanent link to this post Posted by hapbap » Fri Nov 17, 2017 3:12 pm

Got it, thanks again.
hapbap
 
Posts: 3
Joined: Thu Nov 16, 2017 11:31 pm
Operating System: Windows 10


Return to Audacity 2.x Feedback and Reviews



Who is online

Users browsing this forum: No registered users and 4 guests