PCM 24 bit to FLAC 24 Dither

Effects, Recipes, Interfacing with other software, etc.
Forum rules
If you require help using Audacity, please post on the forum board relevant to your operating system:
Windows
Mac OS X
GNU/Linux and Unix-like
Post Reply
Patrick1958
Posts: 10
Joined: Mon Aug 24, 2015 6:20 am
Operating System: Please select

PCM 24 bit to FLAC 24 Dither

Post by Patrick1958 » Sun Jan 01, 2017 12:01 pm

Hi,

I make non stop music mixes with a dj program and the output goes via WASAPI to audacity (both programs are on same computer).

Record settings audacity : 44100 hz 24 bit, after recording only post processing done is removing silence (few seconds) at beginning and end of track and last step is normalize the recording to 0.1 without applying DC offset.
File is saved in pcm (wav) 24 bit 44100 hz. There is no sample rate conversion done so audacity does not apply any dither when saving. I checked this by not removing the silences in a recording, reopening the saved file and measured contrast on a silent part 0, looked at spectrum on a silent part also -214 over the entire frequency.
However when i save the same file as FLAC 24 bit (also no sample rate conversion done) than why does audacity apply a dither (triangle settings are used, best quality). The saved FLAC file reopened shows with measuring contrast -144 and looking at the spectrum it rises from the low end -144 to approx -130 around 5/6 khz and at 125 at and above 20 khz.

Am i correct in assuming i can disable dither when saving to flac when no sample rate conversion has been done, or am i missing something and it is best to leave the dithering on when saving to flac.

Patrick.

Gale Andrews
Quality Assurance
Posts: 41761
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10

Re: PCM 24 bit to FLAC 24 Dither

Post by Gale Andrews » Sun Jan 01, 2017 3:10 pm

Moved to Audio Processing.

Dither is applied when there is downconversion of bit depth, not when there is a change of sample rate.

It is a known Audacity bug that dither is added un-necessarily in some cases when exporting to the same bit depth as the project. So if you have a 24-bit project as chosen at Default Sample Format in Quality Preferences (look above the Mute/Solo buttons on the track), yes it's a bug that exporting FLAC adds dither noise.

The problem if you have a 24-bit project and turn dither off is that Audacity processes internally at 32-bit float. If you apply a filter that changes the sample values, dither should be on so that you don't get harmonic distortion when the 32-bit processing is returned to the track as downconverted 24-bit. But if all you do is delete a few sections, that does not change sample values and so you could turn dither off.

Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual

Patrick1958
Posts: 10
Joined: Mon Aug 24, 2015 6:20 am
Operating System: Please select

Re: PCM 24 bit to FLAC 24 Dither

Post by Patrick1958 » Tue Jan 03, 2017 10:52 am

Gale Andrews wrote:Moved to Audio Processing.

Dither is applied when there is downconversion of bit depth, not when there is a change of sample rate.

It is a known Audacity bug that dither is added un-necessarily in some cases when exporting to the same bit depth as the project. So if you have a 24-bit project as chosen at Default Sample Format in Quality Preferences (look above the Mute/Solo buttons on the track), yes it's a bug that exporting FLAC adds dither noise.

The problem if you have a 24-bit project and turn dither off is that Audacity processes internally at 32-bit float. If you apply a filter that changes the sample values, dither should be on so that you don't get harmonic distortion when the 32-bit processing is returned to the track as downconverted 24-bit. But if all you do is delete a few sections, that does not change sample values and so you could turn dither off.

Gale
Thanks.
Patrick.

Post Reply