Different Bit Rates Hardware vs. Recording?

My external sound card is capable of (and currently set to) 48kHz. I want to produce conventional CDs (44.1kHz) ultimately, so I will be exporting to a 16-bit WAV file. I’m not finding clear instructions on down-conversion in the Manual. I presume Audacity will do the down-conversion automatically, but exactly how do I control this? Is that controlled by the “Project Rate?”

I’m assuming that down-conversion (with appropriate dithering) will provide (slightly?) better sound quality than just sampling at 44.1 kHz on the sound card. Is this actually true?

Thanks for any clarification for this newbie.

Clark2 (Windows 10, 21H1; Audacity 3.1.3)

Audacity handles this on the Export to WAV - the Audacity default setting is for 16-bit PCM stereo WAV

See: https://manual.audacityteam.org/man/wav_export_options.html

The dither settings used on downsampling for export can be controlled from Quality Preferences- see:
https://manual.audacityteam.org/man/quality_preferences.html
but I would suggest leaving all those at Audacity’s default settings.

Peter

Conversion between 44.1kHz and 48kHz (or higher) is generally transparent in either direction. (You won’t hear any difference in a proper blind listening test.)

The “Project Rate” in the lower-left of the Audacity window determines the sample rate that’s exported.

Note that Windows can fool you! The drivers will make any necessary conversions so you can record (or play) a 24-bit/196kHz file, even if your hardware only supports 16-bit/48kHz.

Audacity won’t change secretly/automatically the sample rate (from what Windows feeds it) but it does convert everything to 32-bit floating-point. That just makes any audio processing better & easier and better. The conversion from 16-bit or 24-bit integer to 32-bit float and back is lossless.

I’m assuming that down-conversion (with appropriate dithering) will provide (slightly?) better sound quality than just sampling at 44.1 kHz on the sound card. Is this actually true?

First, don’t worry about it too much. :wink: At 16 bit or better and normal listening conditions you can’t hear dither (or the effects of dither).

You are "supposed’ to dither when you reduce the bit depth, not when you change the sample rate. This can be a grey area because audacity is working in 32-bit floating point internally and if you do any “processing”, such as equalization or even a fade-out, those extra bits will contain “real information”. If you’re recording with a 16-bit sound card/interface and just cutting & splicing, then you shouldn’t dither. If you’re recording at 24-bits and downsampling to 16-bits, yes you should dither.

Also, dither is low-level noise which is supposed to sound better than “raw” quantization noise. Most analog sources, especially vinyl records or cassettes, already have noise that’s “worse” than the dither noise so they are “self dithered” and there’s no point in adding more dither noise.

If you are making MP3s, most lossy compression formats don’t have a fixed-integer bit depth so you shouldn’t dither. Also, the added noise means there is more “sound” to compress and you might get lower quality or a larger file.

Different Bit Rates…

kHz is the sample rate = The number of samples per second. With uncompressed formats we usually talk about the sample rate and the bit depth (i.e. 16-bits) rather than the bit rate.

The bit rate is kbps (or sometimes Mbps for video) and that’s kilo_bits_ per second. Generally bit rate is used as a rough indication of audio quality with lossy compression (MP3s, etc.) where a lower bitrate indicates a smaller file and generally lower quality (more compression = more data loss).

However we can easily calculate the bit rate for lossless files. For example, CD audio is 44,100 sample per second X 16-bits per sample X 2 Channels = 1411kbps.

There are 8-bits in a byte so if we know the bit rate we can divide by 8 to get the file size in bytes per second. (So CD audio is 176k bytes per second or a little more than 10MB per minute.)

DVDdoug – Thanks for the very thorough answer. (Sorry about the title, hadn’t fully through out my question when I wrote it, but I’m glad it didn’t lead you astray.)

One question about what you said here:

“Note that Windows can fool you! The drivers will make any necessary conversions so you can record (or play) a 24-bit/196kHz file, even if your hardware only supports 16-bit/48kHz.”

Question: Not sure I follow this statement (warning?). I hope you mean that Windows can interpose itself between input hardware (in my case at least) and the computer’s internal output hardware to surreptitiously resample the data, not that Windows can interfere between my input hardware and Audacity’s recording. Right?

Best Regards – Clark2

Dear DVDdoug – I can’t send a PM yet, but could you please clarify this statement? – Clark2

Windows is able to resample on the fly, so if you send 32-bit float / 96 kHz audio to your sound card, and your sound card works at 16-bit 44.1 kHz, then Windows (or to be precise, the Windows device drivers) should be able to convert the audio data so that the sound card can play it. Similarly with recording, but in the opposite direction. However, this is dependent on a number of factors, including the capabilities of the device driver, and the “host”.

That can happen too. Window will often apply “Enhancements” to both recording and playback, which can ruin recordings. A very common symptom is when recordings sound like they were made in a tunnel, hence the title of this FAQ: FAQ:Recording - Troubleshooting - Audacity Manual

Dear DVDdoug – I can’t send a PM yet, but could you please clarify this statement? – Clark2

The same thing happens if you print a high-resolution image on a low-resolution printer. It gets printed and you don’t get any notification or warning that the resolution has been reduced. It’s a feature of Windows to help keep everything compatible. (But it would be kinda’ nice to know when it’s messing with your audio/video.)

…I generally ignore PMs and it’s usually better to keep the discussion public so anyone can contribute/answer and the discussion remains on the forum to help others in the future.

Steve – Thanks for the quick reference! I’m hoping that this kind of thing happens ONLY when settings in the device driver for the recording device (external A/D with its own custom driver in my case) are set incorrectly. I’m concerned at the moment about recording at 48kHz and then exporting from Audacity at 44.1kHz. I guess if Windows tinkered with the sampling rate before feeding it to Audacity, that would be evident in the Track Control Panel, right? – Clark2

That shouldn’t be a problem.

When you Export from Audacity, the sample rate of the exported file is set by the “Project Rate” (lower left corner of Audacity). If any tracks in the project have a different sample rate, Audacity resamples to match the Project Rate (using the excellent “soxr” resampling library).

Thanks much! – Clark2

Dear DVDdoug – On Steve’s recommendation, I got a nice Behringer UMC202HD and am in the process of exploring how to use Audacity while testing it. I understand now the issues you were trying to explain to me about down-conversion and changing bit depth on Export, but there’s one nagging question: The UMC202HD is supposed to be a 24-bit device. Is there any way I can tell from Audacity whether it’s actually recording 24-bit data? – Clark2

Well, I found a way, but not through Audacity. In Windows if I look that the properties of an exported WAV file, I can see a value for bit rate (see attached screen shot).


In this case 96kHz X 24bit X 2channels = 4608mbps.

Seems as though Audacity should tell me this (or the bit depth) without having to export it… Clark2

After exporting Windows simply tells you what format you exported to. It doesn’t know if it was re-sampled…

There is a tool called [u]Lossless Audio Checker[/u] that can sometimes tell you if the audio was up-sampled or converted from MP3. I worked for me when I opened a 16-bit file and exported as 24-bits without dither.* It shows “Upscaled”. (With dither turned-on it shows “Clean”.)

You’ll need to set [u]Dither[/u] to “None”.

Then record something and export as 24-bit WAV without doing anything. …Even a small volume change will fill all of the bits with non-zero data.


\

  • Dither is added noise which adds data to the low-order bits. A 16-bit file has 2-bytes per sample and a 24-bit file has 3-bytes per sample. If you simply up-sample to 24-bits, the least significant byte is zero.

DVDdoug – Good point. I guess I had to set the WAVE export to 24bits to try to get the full bit depth of the ADC, so Windows is just telling me the obvious. I’ll try your suggested approach, but…

By default Audacity converts everything internally to 32-bit float when it comes in from the external unit (although that can be changed). At some point in the recording process, however, it must know what it’s being fed by the driver (in this case the recommended driver from Behringer for that unit).

Am I right that Audacity just isn’t programmed to tell us, am I missing something, or is there really no way for it to know? – Clark2

DVDdoug – The tool reports “Upsampled,” NOT “Upscaled.” What did I do wrong? – Clark2

Anybody, Please – I think I have an explanation for the above report (and a new problem?): When I tell Audacity instead to record at 48k, export it as such, and run that through the app, it says, “Clean.” The Windows file properties agree that it’s still 24bit (Bit rate 2304k).

Note further that, when I run Behringer’s “UMC Control Panel,” installed along with the recommended driver for my UMC202HD (BEHRINGER_UMC_v5.12.0_2021-06-16_setup.exe), it ALWAYS reports the sample rate as “48000,” no matter what I tell Audacity to record. Am I missing something about how to set the device’s sample rate or how to communicate between Audacity and the device?

Maybe I should also post this last question in the Audio Technology/Recording Equipment section of the forum? – Clark2

Partial answer to the above: The Windows 10 Control Panel/Sound/Behringer/(Both Recording and Playback)/Advanced properties for this device were set to 2ch 24-bit 48000Hz. Evidently Audacity does not trump these settings. Does that mean that I have to change both every time I want to change sample rate or bit depth, or channel number? – Clark2

No idea. Windows works in mysterious ways. I think you’ll need to experiment.
If you mostly work with video, then 48000 is probably the best sample rate to use. Otherwise, 44100 for audio only work.

Leave Audacity’s default sample format set to “32-bit float” for best quality.

Steve – At present I don’t have the tools to experiment. In other words, I only know what Audacity is telling me. If the Behringer driver is telling me 192kHz, but I tell Audacity in Edit/Preferences to use a “Default Sample Rate” of 96kHz, which is really happening. Audacity quotes 96kHz on its “Track Control Panel,” but my only measurement tool (unless I knew how to look inside the project file to see how many samples were recorded) is to export, and that’s meaningless because Audacity will just upsample or downsample as needed to produce the output file I ask for in “Project Rate…”

Please refer to post, “Sound Card Reviews - Recording Equipment - Audacity Forum”, for provisional solution to this conundrum. – Clark2

On current version, Audacity doesn’t applies dither if no 32-bit operations are made (I have it set to shaped but if I only do copy/paste operations on a file, dithering isn’t applied when exporting).

However dithering is applied if I convert the sample rate (i.e. from 44100hz to 48000hz).
I tried exporting the same file (a 44khz file resampled to 48khz when exporting) either with “shaped” and “none” settings. The difference is obviously visible on the waveform but I can’t really hear any difference.

So for re-sampling operations (44khz to 48khz) should I set dithering to “none”?

EDIT: I found this answer to a similar question on another forum:

You’re sample rate converting which means implementing low-pass filtering and sample reconstruction. The first will undoubtedly result in an extended word-length to maximise the accuracy of the process, and so dithering is required to generate the 16-bit output correctly.

Is this correct?