Audacity: Editing 16-Bit Source File Using 32-Bit Float

Discussion in 'Audio Hardware' started by bubba-ho-tep, May 14, 2018.

Thread Status:
Not open for further replies.
  1. bubba-ho-tep

    bubba-ho-tep Resident Ne'er-Do-Well Thread Starter

    Location:
    San Tan Valley, AZ
    I couldn't find this addressed in any searches I did so sorry if this has already been covered,,,,,

    If I am doing some minor editing on 16-bit audio files in Audacity using the default 32-bit float mode, do I need to apply dithering when exporting the edited files back to 16-bit or should I just do all of my editing in the native 16-bit?
     
  2. The FRiNgE

    The FRiNgE Forum Resident

    I believe a 16 bit import on 32 bit float setting will be 16/44.1 in Audacity. The 16 bit audacity file (at 32 bit float mode) will export cleanly to WAV.
     
  3. harby

    harby Forum Resident

    Location:
    Portland, OR, USA
    If you are only editing the file, and not changing the audio characteristics, or are only making changes to very small segments (like healing clicks) then you should both load and save the file in 16 bit, which will not alter the digital data unless you have actually made changes to the file.

    If you have a more extensive changes to make to the audio, such as equalization and volume changes, you should first upsample to 24 bit or floating point. Every filter in the audio software, if implemented properly, will do its own dithering, and these repeated dithers, especially when later changing the amplitude, can cause cumulative effects otherwise. Then when the audio file is finalized, use a single pass through the more formalized noise-shaped dither, downsampling back to 16 bit.
     
  4. rnranimal

    rnranimal Senior Member

    Location:
    Ohio
    If you're simply editing (i.e. cutting out portions), then no, don't dither. Go into preferences under "Quality" tab and set both dither options to "none". Don't worry about it being a 32-bit project. Just save as 16-bit when done.
     
  5. bubba-ho-tep

    bubba-ho-tep Resident Ne'er-Do-Well Thread Starter

    Location:
    San Tan Valley, AZ
    What I'm trying to do is speed-correct a recording from a CD. So, if I understand this correctly, I need to import and edit at 32-bit float and export the adjusted audio back to 16-bit and apply dithering in the process. Is this correct?
     
  6. Mister Charlie

    Mister Charlie "Music Is The Doctor Of My Soul " - Doobie Bros.

    Location:
    Aromas, CA USA
    No need to dither.
     
    The FRiNgE likes this.
  7. The FRiNgE

    The FRiNgE Forum Resident

    The Audacity versions are similar with differences. Mine is 2.0.2, which has a good compressor program and outstanding EQ features (exactly what I need) When I upload a CD or WAV file, the Audacity waveform is 16/44.1. This does not change in 32 bit float mode, no upsampling. (you can do that manually but does not occur automatically) The 16 bit Audacity file exports without any dithering at all, and since it is already a 16 bit file, no need to manually apply dithering.

    BTW I'm very happy with the speed feature as it does not corrupt the waveform, however the pitch effect and tempo does. For music editing, advise to avoid "Pitch" and "Tempo" changes (speed changes do affect pitch, naturally and works great)
     
    Last edited: May 15, 2018
    bubba-ho-tep likes this.
  8. rnranimal

    rnranimal Senior Member

    Location:
    Ohio
    Yes, you should work in 32-bit and apply dither if doing speed correction as it's altering the audio.
     
    marcb likes this.
  9. McLover

    McLover Senior Member

    Which it does, by the way!
     
    The FRiNgE likes this.
  10. SOONERFAN

    SOONERFAN Forum Resident

    Location:
    Norman, Oklahoma
    I recently used audacity to lower the volume/amplitude of an audio file to better match the volume level of the other tracks I was going to burn together on a CD-R. I loaded and saved the file in 16 bit. I understand from your post this was not the proper procedure since I changed the audio. What is the downside of how I did this. I do not understand the 32 bit float feature.
     
  11. InStepWithTheStars

    InStepWithTheStars It's a miracle, let it alter you

    Location:
    North Carolina
    Hey man, I owe you lunch. I use Audacity to dither hi-res downloads into 16/44.1 to use in iTunes, so I (obviously) have dither enabled. What confused me was why all of my (already-16/44) WAV and FLAC exports (usually editing out the first 0.9 seconds or so of silence at the beginning of a CD) mysteriously had what appeared to be dither noise in the higher frequencies! It's inaudible and it doesn't affect the lossless-ness of the files, but it bugged me.

    Since those exports were just 16/44 to 16/44, I wasn't understanding why, as I only had the "high quality" dither option selected (the "real time" was set to none). For some reason it never occurred to me to try switching the high quality one off until I read your post, and sure enough, that fixed my problem. This revelation comes as a relief and a disappointment: I'm glad that I've found the problem, but it also means I'll have to adjust that when I do hi-res conversions, and it also means I'll have to redo all of my edits and FLAC conversions! Damn this OCD...

    This could have been avoided if "high quality conversion" meant "conversion from a higher quality to a lower quality". I didn't put a ton of effort into all of those conversions and edits I did, but it sure did take a lot of time. Oh well...

    As for the OP's question - 32-bit float means it's capable of being extended if it needs to. If you import a 16-bit file as a 32-bit float, and export it as a 16-bit file with no dither, you'll be fine. "Float" just means that if for any reason it need to go higher than 16-bit (e.g. you add 24-bit or 32-bit audio onto the same track), it will be compatible. It's basically just a higher ceiling but it doesn't affect what you need.

    And, as I have just discovered, if you do have dither applied, it will add the dither noise to the audio without actually doing any dithering.
     
    Last edited: Dec 7, 2019
    rnranimal and The FRiNgE like this.
  12. anorak2

    anorak2 Forum Resident

    Location:
    Berlin, Germany
    Dither - Audacity Manual is the relevant manual page. This means when exporting, Audacity will downsample according to the settings unter Edit->Preferences->High Quality conversion. So if dither is activated there, it will dither implicitly on any export. No need to manually add another layer of dither.

    The default setting should be "High Quality" / "Shaped". If you never changed it, you're fine.
     
  13. harby

    harby Forum Resident

    Location:
    Portland, OR, USA
    If you just turned down the volume and saved, the digital volume control will do the required dithering to maintain dynamic range, and then saving the 16 bit audio makes no further changes, so that is fine. Volume reduction is itself lossy; a -6dB volume decrease puts all the audio within 15 bits, lowering the signal-to-noise ratio.

    It is when you make multiple changes, such as turning the volume down and turning it back up, that not having loaded or converted the file to 24 bit first will cause preventable degradation.
     
    anorak2 likes this.
  14. SOONERFAN

    SOONERFAN Forum Resident

    Location:
    Norman, Oklahoma
    You mention volume reduction is lossy. I opened the desired file with Audacity as 16 bit wav. I then went to the effect drop down box and selected amplify. From there, I went to the lower box and entered - x.x (do not remember the exact number, -3.?). From there I chose export audio as wav file (still 16 bit) to the desired folder in prep for burning my CDR mix. Did I degrade the audio/create a lossless file?
     
    The FRiNgE likes this.
  15. The FRiNgE

    The FRiNgE Forum Resident

    Interesting, this makes sense. Perhaps some very low level nuance could be lost with a lot of volume reduction (I think certainly would) I have "clip fixed" some of my loud files to restore musical dynamics, and this requires about -4dB level reduction. The louder passages are altered (hopefully for the better) but the quieter passages unaffected by the clip-fix program. The clip fix in Audacity can be fickle, some waveforms respond better than others.

    So I am curious on how much volume reduction could lead to audible losses? Can we reasonably assume, this could be cumulative by repeated raising and lowering, or multiple eq adjustments... and/or dependent on program, on how much low level signal is there? If we experiment by reducing the volume, then increase back to where it was, then invert the "processed" track against the original, we should see the difference between them in the spectrum analyzer. If nothing is lost, then we should have silence. Because, playing two identical tracks with one of them inverted produces zero VU. But it stands to reason, if we reduce the level further to zero (or near zero) the original waveform can not be restored.
     
    Last edited: Dec 7, 2019
  16. InStepWithTheStars

    InStepWithTheStars It's a miracle, let it alter you

    Location:
    North Carolina
    For clarity, this is wrong. This will add dither noise into your exported file, even if it's the same resolution file. Set both to "None" (in place of shaped) and the file will be truly identical - if you're exporting to the same resolution. If you are converting from a higher bitrate down, Shaped is the best dither quality IMO. Unfortunately you would need to toggle between them depending on whether you're doing hi-res downsampling or re-exporting the same resolution.
     
    rnranimal likes this.
  17. harby

    harby Forum Resident

    Location:
    Portland, OR, USA
    The "loss" is loss of signal-to-noise ratio. When proper dithering (as is employed by any good audio software's filters and effects) is used in downsampling to a lower bit depth (and turning down the volume is essentially transposing the audio to a lower bit depth), the characteristics of the audio remain the same, it is just burdened by more quantization noise than the original.

    Here's a demo I previously posted, originally to show the utility and necessity of dither, but it also serves to show the nature of "lossyness" when digital is pushed to extremes.

    Original music (my 32-bit digitally rendered composition):

    in-23.75db.flac

    Normalized to 0dB 16 bit, turned down -96dB (all audio below the last bit of 16 bit) with dither, and then turned back up to the original volume:

    out-23.75db.flac

    This demonstrates that 1) Dither preserves audio when otherwise there would just be 0 bit silence or 50%+ quantization distortion), 2) the side effect is just noise (which can be made less objectionable by noise-shaping), and 3) 16 bit audio has plenty of headroom for casual manipulations, and you don't need to worry about such minor bit depth concerns for your personal files, as the spectral quantization noise and distortion is far below your threshold of hearing.

    To answer OP, yes, dither as part of final bit depth reduction should be enabled. While audio software filters would use a default dither repeatedly if needed if you edit a 16 bit file, when you purposely save the dither and downsampling as the last step in "mastering", that you control, it can use more advanced algorithms suitable for the destination.

    Here I master audio not to 16 bit, but to an 8 bit file. By employing noise-shaped dither, the digital audio maintains quality, and the now-significant noise is moved to high frequencies where it only bothers young ears:

    brothers-8bit.flac

    (a counterargument to the usefulness of consumer "high-resolution" audio.)
     
    Last edited: Dec 8, 2019
    JohnO, anorak2 and The FRiNgE like this.
  18. InStepWithTheStars

    InStepWithTheStars It's a miracle, let it alter you

    Location:
    North Carolina
    I should clarify that the noise it adds is inaudible. If you were to take that same export with and without the dither setting enabled, invert the polarity of one, and play them back, you would hear nothing and the VU meter would register nothing. However, there is still light noise in the high frequencies - decide for yourself if the inconvenience of having to toggle that dither setting is worth a little bit of inaudible noise being added to your exports.
     
    rnranimal likes this.
  19. rnranimal

    rnranimal Senior Member

    Location:
    Ohio
    Glad it helped. I discovered it happening the same way. When I was seeing my digital silent beginning of a track no longer was showing as silent. Luckily I hadn't already done a bunch of files or I'd be re-doing them, too. I had to mess around a while until I figured out how to make sure files remained bit perfect in Audacity.

    After realizing it was adding dither to everything I saved when high quality conversion was checked, I thought maybe it had to do with the 32-bit timeline it automatically loads into. So after I loaded a 16-bit, which it loaded into a 32-bit timeline, at the pulldown to the left of the waveform of the track, I changed the "format" to 16-bit. I thought maybe since it's a 16-bit file in a 16-bit timeline now, it won't apply dither. Guess what? It applied the dither as soon as I changed the timeline from 32 to 16! So then I'm thinking what if I change the preference so that it loads files as 16-bit. So I do that and load a 16-bit file in and it doesn't add dither in the timeline but it does upon save. So even loading a 16-bit file into a 16-bit timeline and saving as 16-bit adds dither.

    Now I leave all the dither unchecked in Audacity but then I have to be careful when I need to turn I on to make sure I turn it back off.
     
    InStepWithTheStars likes this.
  20. InStepWithTheStars

    InStepWithTheStars It's a miracle, let it alter you

    Location:
    North Carolina
    That makes no sense, but at least there is a workaround. That said, Audacity really is a wonderful program, and a minor inconvenience like this is well worth everything else it offers.
     
    rnranimal likes this.
  21. anorak2

    anorak2 Forum Resident

    Location:
    Berlin, Germany
    Could you explain your reasoning in more detail please? I think I understand your thinking that dither is not necessary when exporting to the same resolution as the original, and I would agree with that in principle. But my logic was that Audacity works with 32 bits internally by upsampling from the source file, so dither should be necessary when going back to 16 bit, even if the 32 bit internal representation was merely created by upsampling.
     
  22. InStepWithTheStars

    InStepWithTheStars It's a miracle, let it alter you

    Location:
    North Carolina
    I had the high-resolution dither enabled, and when I would export a 16/44 file to 16/44 (no change in resolution), it would still add dither noise. I couldn't figure out why until I read that post by @rnranimal the other day. I'll post some images in a bit.
     
    rnranimal and anorak2 like this.
  23. rnranimal

    rnranimal Senior Member

    Location:
    Ohio
    This is true but only when the audio has been processed- EQ, gain, etc. If only editing or swapping channels or doing something else which doesn't actually use any of the extra bits of the 32-bit timeline then it should not be dithered. You'd just be adding noise for no reason. When dither is turned on in Audacity, it adds it to everything you save even if you didn't process the audio and even if you are saving to the same bit depth.

    For example- If I took a CD which has the left/right channels swapped and I want to correct it. I load it into audacity and swap the channels. Even though this was in a 32-bit timeline, nothing was done beyond the original 16-bits so when saving it out, you would want to save as 16-bit without any dither. If you also adjusted gain, then you would want dither added.
     
    anorak2 likes this.
  24. InStepWithTheStars

    InStepWithTheStars It's a miracle, let it alter you

    Location:
    North Carolina
    Meant to do this yesterday. Just to clear up any confusion.

    Figure 1: Export of a 16-bit/44.1 kHz WAV file ripped from a CD without high-quality conversion enabled. Notice it was mastered with no data above 20k - I chose this one because it would be easier to see.

    [​IMG]

    Figure 2: Export of that same CD rip with high-quality conversion enabled. Notice how it's added some noise from about 18k up.

    [​IMG]

    [​IMG]

    If you are converting a high-resolution file down to a lower resolution, then you will need the High-Quality Conversion set to something (I personally prefer Shaped). Then, using the small drop-down box on the bottom-left of the screen marked "Project Rate (Hz)", set the resolution you want to export to, and then the bit depth on the export screen. This will properly apply dither.

    However, if you are NOT changing the resolution of the file, disable both, or it will add dither noise despite not doing any actual dithering (as shown in the two spectrogram images). I had been under the false impression that "High-Quality Conversion" meant dither was only applied if you changed the resolution of the file. This is not true.

    Thank you very much @rnranimal for figuring this out. I thought the newest build of Audacity just had some kind of automatic noise addition thing for some reason.
     
  25. InStepWithTheStars

    InStepWithTheStars It's a miracle, let it alter you

    Location:
    North Carolina
    I just realized the OP was asking about using the speed correction. I don't know for certain how that affects the frequencies. If it speeds up enough to introduce frequencies above 22050 Hz within a 44.1k project rate, does it automatically apply dither to it? I've played with the speed function but not actively analyzed it.

    At any rate, having the dither option enabled will introduce noise even if no actual dithering is occuring. If it stays the same rate, you're only adding noise, not masking anything. So I guess do one with and without and see if you can hear a difference?
     
Thread Status:
Not open for further replies.

Share This Page

molar-endocrine