OK…
I just took a 16bit/44.1 file, applied a +2% speed increase, exported it as 16bit/44.1 with dither set to “shaped”, I then did the same process with dither set to “none”.
I compared the 2 output files and in the silent couple of seconds before and after the music starts in the one with dither set to “shaped” clearly has audible hiss which the one made with dither set to “none” does not…
On quick listen I can’t actually hear a difference in the musical content, but yeah the one with dither set to “shaped” definitely has a lot more hiss in the silence before and after the music…
So from what I can tell it sounds better with dither set to “none” ?, but from what I think I understand isn’t that the opposite of what you have recommended to me?
Thanks
Shaped dither is recommended when doing the final export of “music”. It is not recommended for exporting “silence”.
Dither is applied when converting from a high bit depth to a lower bit depth.
Without dither, such a conversion creates harmonic distortion.
With dither, such a conversion adds a little noise.
For “music” there is usually so much more naturally occurring background noise that the dither noise is completely inaudible, but the added harmonic distortion adds an unpleasant and unnatural harshness that is noticeable in very quiet passages.
For synthetic (generated) tones and suchlike, it may be better to use other types of dither (such as “rectangle” which does not add noise during absolute silence) or no dither at all.
The complete solution (avoid harmonic distortion without dither noise) is to keep the audio in 32 bit float format, but then there may be compatibility problems with other applications. 24 bit audio is sometimes used as a compromise solution because harmonic distortion without dither is much less, or noise when using dither is much less.
Attached is a very low level 440Hz sine tone (pure tone) that has been converted from 32 bit float to 16 bit, first with dither and then without dither. It has been greatly amplified to make the difference obvious.
And here is the same thing, but at its natural volume. In this sample it begins with a 0 dB (loud) tone so that you can set your playback system to a “normal” level.
At a “normal” playback level we are talking about quite subtle differences.
Hello,
Thanks for the samples…
OK I think that’s where I am confused. I know dither is supposed to be used when downsampling (going from higher to lower bit depth), but when loading a 16bit file into Audacity (with the float point at 32bit), and I export that original 16bit file as 16bit, is that actually downsampling from 32bit?, or is it working with the file as the original 16bit file?
From what I just worked out, it’s actually working with it as a normal 16bit file, not 32bit eg.
I just took a 16bit/44.1 file and saved the first 2 minutes by exporting saved selection with dither “shaped” and another with dither set to “none”.
The file with dither “shaped” has different samples to the original file, but the one exported with dither set to “none” has exactly the same samples as the original file (EAC Wav Compare), so it seems dither set to “none” will export the file as it originally was without changing samples…
Maybe that’s what you meant when you said “They are not used if the audio in Audacity is 32 bit (default) and the sample rate of the track matches the Project rate (lower left corner of the main Audacity window).”, I wasn’t sure at first but I think thagt is what you meant there…?
“Resampling” is when you change the “sample rate” (for example, from 48000 to 44100 samples per second).
This is where the “Best quality-slowest” … setting applies.
“Dither” applies to changing the “sample format” (bit depth) to a lower format - for example from 32 bit to 16 bit.
Audacity always works internally in 32 bit float format.
All processing and mixing occurs in 32 bit float format, including “rendering to a file” (though it is contentious whether Audacity should work in 32 bit float format when rendering 16 bit audio to a 16 bit file).
If you are working purely with 16 bit and are not processing the audio then it is safe to turn dither off because all sample values will be exact 16 bit values and dither is unnecessary. “Cut, Delete, Paste, Copy and Truncate” are simple “editing” commands that do not “process” the sound. Virtually everything else that Audacity does is “processing”. “Processing” is anything that requires sample values to be recalculated. Audacity achieves extreme precision when recalculating sample values by working in 32 bit float, but then that leaves the problem that the 32 bit values need to be “rounded” in some way when exporting to 16 bit.
Ah so it does actually work with a file imported as 16bit at 32 bits (I was never sure if that just meant you could import a file of anything up to 32bits, but have it work with the file at it’s original bitrate (eg. 16, 24, 32), so it seems then that speed changing 16bit and 24bit files technically does require dither to be set to “shaped”, not “none”…
Thanks
16-, 24- and 32-bit are bit depths.
Bit rates for uncompressed files are worked out by multiplying bit depth * number of channels * sample rate. That makes a stereo 16-bit file to be 1411 kbps bit rate.
This table lists the bit depths Audacity imports WAV files at:
Default
Sample Format File bit depth Imports as
16 16 16
16 24 32
16 32 32
24 16 24
24 24 32
24 32 32
32 16 32
32 24 32
32 32 32
Gale
Is the column you call “quality preference” on that list the same as what Audacity settings call the “default sample format”?
You mention specifically for non-compressed eg. WAV, can you please tell me what happens with FLAC, how does FLAC import/export?
PS - I remember 2-3 years ago I was told there was a bug with dither being turned on, and that I should have it set to off…, I guess anything I’ve speed corrected with Audacity in that time will have digital artefacts???
Gale is referring to these settings: http://manual.audacityteam.org/o/man/quality_preferences.html
In this context FLAC can be thought of as “non-compressed”.
As I wrote earlier: “it is contentious whether Audacity should work in 32 bit float format when rendering 16 bit audio to a 16 bit file”. Depending on your point of view this could be seen as a “bug” or a “requested feature enhancement”, but either way the current behaviour is not ideal and is confusing to users. We log “bugs” and “enhancements” on the same bug tracking system, so in that sense it is a “bug” and is not yet resolved.
As to whether or not dither should be disabled please see my previous replies in this topic thread.
FLAC like other lossless formats has its export bit depth set by the export choice. The Default Sample Format in Quality Preferences plays no part .
Import of FLAC (using libflac) could be considered more “logical” than WAV in that you don’t import at a higher bit depth than the Preference bit depth or the file bit depth:
Default
Sample Format File bit depth Imports as
16 16 16
16 24 24
24 16 24
24 24 24
32 16 32
32 24 32
On Linux, FLAC is imported by the WAV importer (libsndfile) by default so I assume but I have not tested that the behaviour will be as for WAV.
Gale
OK I have Audacity at 32 bit float default sample format.
I just loaded a 16bit FLAC file, gave it a +0.1% speed increase, and exported using shaped dither as FLAC.
I then went through exactly the same process but exported as WAVE instead of FLAC.
The exported FLAC file has quiet hiss in the silence before the track, however the exported WAVE file has much louder hiss in the silence before the track…
Why does the exported WAVE have much louder hiss than the exported FLAC?, they were identical process’ apart from one being exported as WAVE and the other FLAC…
Probably because you exported as 24 bit FLAC.
If you exported as 16 bit FLAC the dither should have exactly the same level (note that because dither has a random element they will not be bit for bit identical.)
The amount of dither required when exporting in 24 bit is much lower than 16 bit.
To select 24 bit FLAC, set FLAC as the export format and then click the Options button.
For 24 bit WAV, select “Other uncompressed files” and then click the Options button.
Hello,
Yes I am familiar with how to export WAV and FLAC as 24bits…, so I am certain I did not export as 24bit FLAC as you suggested I might have done…
I am certain I did exactly the following:
Audacity is set at default 32bit float sample format.
Imported a 16bit/44.1 FLAC file, gave it a +0.1% speed increase, and exported using shaped dither as FLAC 16bit/44.1.
I then went through exactly the same process but exported as WAVE 16bit/44.1 instead of FLAC 16bit/44.1.
The exported FLAC file has quiet hiss in the silence before the track, however the exported WAVE file has much louder hiss in the silence before the track…
They were identical process’ apart from one being exported as WAVE and the other FLAC, seems odd to me that that the WAV has more hiss…
I’m sure if you try it you’ll get the same result…
No. I’m getting exactly the same amount of hiss whether I export as 16 bit WAV or 16 bit FLAC.
I’ve also tested on Windows and I get exactly the same result.
If you can give precise step-by-step instructions I will try to replicate your results.
Almost all special effects require some dither. If you have a voice singing three musical notes and you cut one of the notes, then the other two are completely unchanged and can go in and out of Audacity – 16-32-16 – without dither, but if you change the voices in any way, you’re stuck.
There’s a difference between 32 bit and 32-bit floating. Audacity uses floating internally because, for one example, if you apply an effect or filter that causes the show to overload or distort from high volume, 32-floating will allow you to simply reduce the volume with another effect and carry on. The non-float formats would permanently destroy the show.
This happens a lot. Photoshop doesn’t use simple 8-bit color internally.
Koz
AKA “integer formats”.
I don’t know how to explain more clearly than I already have…
And I’ve just had the same happen with a completely different file…
Open the original 16bit/44.1 file.
Highlight the file with the cursor and increase speed +0.1%, go to export and select FLAC…
Dither is SHAPED.
Repeat this except on export save as WAV…
Both exported WAV and FLAC are 16bit / 44.1.
WAV has louder hiss than the FLAC in the silence before the music…
I can hear it in the 3 different programmes I listened with…
How? Drag it into an open project? Open Audacity and select “File > Import > Audio”? Some other way?
When the audio has been imported, in the panel on the left side of the track, does it say that it is 16 bit, 24 bit or 32 bit float?
Is it a mono or stereo track?
How? Using the Change Speed effect? or the Transcription Toolbar? or the “Sliding Time Scale / Pitch Shift” effect? Some other way?
What file name are you entering? Is it a new unique file name or are you overwriting an existing file?
That’s in “Edit > Preferences > Quality” ?
With the same file that you imported in step 1? (what was “step 1”?)
When played how? In what program?
If you import the files back into Audacity, do they sound the same?
What programs?
I can’t see your computer or what you are pressing, so “step by step” really does need to be click by click and key by key if I am to be able to reproduce the same result.
*Open Audacity - File - Open - Double click track
Left panel says Stereo 32 bit float.
*Highlight track with cursor from right to left - select Effect - Change speed - in box make % change 0.1 and standard vinyl RPM n/a and n/a, click OK and speed changes…
*File - Export (doesn’t matter what name you make it same results, even if you leave the original name and just add.wav) eg. I just used the name “+0.1 increase.wav”, then click save, file will save…
*yes Dither is still set to Shaped in Edit - Preferences - Quality.
Repeat exactly as above but save as FLAC not WAV. Both outputs are definitely 2stereo 16bit/44.1.
Playback in Audacity, Adobe Audition 1.5 and GoldWave all have the louder hiss in the WAV.
Try this:
- Open Audacity.
- Generate menu > Silence. Generate 6 seconds of silence.
- Export as silence1.flac (Click the “Options” button to ensure that the FLAC exporter is set to 16 bit).
- Export as silence2.wav (16 bit Microsoft PCM WAV)
- Play the exported files - do you hear a difference in the amount of hiss?
- Close and restart Audacity.
- Import silence1.flac and silence2.wav into Audacity.
- Ctrl+A (select all)
- Effect > Amplify. Apply the “Amplify” effect with the default settings.
Do both tracks show the same amount of noise?
Hi,
Going through the process you listed produces 2 files which seem to have the same amount of hiss to me…, the WAV and FLAC seem to be the same…
However I just downloaded Audacity on a completely different computer (PC not my laptop), and doing the exact process’ I have previously described
also produced the WAV with more hiss than the FLAC.
I have notcied the hiss in the WAV doesn’t seem quite as loud on the PC as my laptop, it’s definitely quiter on the PC, however still more than the FLAC, I then transferred the files made on my PC to my laptop and when played on my laptop the hiss in the WAV produced on my PC is exactly as loud as the WAV produced on my laptop, so the loudness of the hiss seems different whether played on my laptop or PC, however on both PC and laptop the WAV hiss is still louder than the FLAC.
I’m listening full volume with earphones…
Here’s the first 3 seconds of the FLAC:
http://www.4shared.com/file/eyy4msHP/01speed_increase_exported_SHAP.html
Here’s the first 3 seconds of the WAV:
http://www.4shared.com/music/JW_0dyqh/01_speed_increase_exported_SHA.html