What gain levels for output mix?

I thought I would find a post or a white paper on this but perhaps I am not searching properly.

I have recorded 4 tracks and want to mix them equally to a wav file. The tracks collected from my peripheral mics are about 3dB weaker than from the center ones. I have corrected this by comparing with the anaylyze:contrast feature and then amplified the weaker tracks by the average gain difference with the effects:amplify feature. This works well leaving all tracks about equal in power. Now I am about to write them back to a stereo wav file. My question:

What is the gain recommendation when writing the tracks? They are all uniformly a bit weak so I would like to set up the gain slider on all of them. Is there some output target power that I should seek when generating the wav file? (-6dB for example)?

Thanks
Fritz

Simple answer - Render (export) the stereo mix to 32-bit floating-point WAV which essentially has no upper limit. Audacity (like most audio editors) also uses floating-point internally. The red lines in Audacity indicate potential clipping, but audacity itself is not clipping the waveform.

Open the floating-point WAV, run the Amplify effect and apply the default gain/attenuation. Amplify scans your file and determines the amount of change required for normalized (maximized) 0dB peaks.

Export to the format of your choice.


If you mix two identical files (where identical peaks line-up in-phase at the same time) the amplitude will increase by 6dB (double the amplitude). Four files would increase by 12dB (four times the amplitude). That’s the “worst case”, but it’s likely that two non-identical files with the same amplitude will increase by 6dB, or nearly 6dB somewhere in the combined file.

Your analog-to-digital converter, digital-to-analog converter, CDs, and regular 16-bit & 24-bit WAV files are all limited to 0dB.

I have corrected this by comparing with the anaylyze:contrast feature and then amplified the weaker tracks by the average gain difference with the effects:amplify feature.

You’re the boss on your project, but mixing is normally done by ear.

OK and thanks. I think the key point that you are making is that I need to target zero dB which is the default for the amplify.

I am not so clear on the 32 bit export. I am running a WIN7 64 bit machine and audacity only shows 16bit-PCM for the wav file export options.

Yes-I will have to tackle phase cancellation. I am rather new to all of this. My main mics were collocated (x-y) so I am more concerned about those in the periphery. First cut seemed OK.

I appreciate you response
Fritz

I am not so clear on the 32 bit export.

It’s FLOATING POINT that’s important. 16-bit and 24-bit WAV files are INTEGER formats.


:smiling_imp: Hang on…

With 16-bit binary (base 2)* you can have values between −32,768 to 32,767 (when converted to normal base 10). A 0dBFS** file will have positive and negative peaks that hit those values. You simply cannot go any higher without more bits. If you try to go higher/louder you’ll get [u]clipping[/u] (distorted waves with flat tops & bottoms)

An analogy would be a 4-digit decimal counter. You can’t count/hold values greater than 9999. If you try to go higher, the counter will either roll-over to zero or hold at 9999.

Since they are integers (whole numbers), there are no fractions or decimals and you can’t have any (non-zero) values less than 1. Zero is silence and in a 16-bit file 1 is about -93 or -96dB. In a 24-bit file, 1 is somewhere around -140dB.

A 24-bit file is also “maxed out” at 0dB. Your driver insures that 0dB 8, 16, or 24-bit (or a 0dB floating point) files all play back at the same volume, even though the higher bit depth files have bigger numbers.

Floating point files have an exponent, which means the values can be very-very large, or very-very tiny decimal fractions with a negative exponent. The scale for a floating point file is different and 0dB is defined as +1.0 or -1.0. So a normalized floating-point file won’t have any values greater than 1. A floating-point file with +6dB peaks has twice the amplitude with peaks that go to +/- 2.0.


\

  • With binary signed integers, the leftmost bit is the sign bit. 0111 1111 1111 1111 binary converts to decimal +32,797. It’s traditional for programmers to write binary numbers in groups of 4 because it’s easier to read and it makes it easier to convert to hexadecimal (base-16). Negative numbers use two’s compliment so they are a little “strange” to convert to decimal, but if the 1st digit is 1, it’s a negative value. If you want to “play around”, the Windows calculator can convert between binary and decimal in the programmer mode. (I don’t think it handles negative binary numbers.)


    ** 0dBFS = zero decibels full scale, which simply means that 0dB is defined as the maximum.

Well thanks for your well written analysis! I guess FP processors have come a long way since the 60’s and I didn’t realize it can be processed faster than integer arithmetic (according to some articles I looked up). So I assume that audacity has chosen to internally manipulate 32bit FP for speed and granularity.

I was confused about input vs output----It is the formatting of the input internally for processing that you are referring to here yes? I looked a little more at the audacity menus and found that Edit:Preferences:Quality has a selection for the bit density and datatype. I am working with original 24 bit wav files (and amplifying a weak channel) so I assume that the 32-bit FP is best but that apparently is the default for audacity 2.xx.

Regarding the output (export) my ultimate objective is to cut CDs to send to the orchestra. I don’t think audacity burns CDs so I will have to export in the “most lossless” format and burn them. I assume that WAV is best here but I note that the dropdown for File:export has MS16bit and GSM 6.10 WAV. (standards are great–everyone has one!). I am a bit “WAV files challenged”. There is a huge clutter of standards out there and I don’t have time to read about all of them. At any rate from what little I read I assume that the 16bit MS WAV is higher quality to the GSM version?

Thanks for taking time to help!
Fritz

Yes, there are significant advantages to using 32 bit float.
Virtually all modern processors (I’d guess for at least the last decade) have FP processors built in, which gives the performance advantage.
The “quality” advantage is twofold - not only do you have more “bits per sample” (particularly in the important low amplitude range), but also, as DVDdoug wrote, the audio is protected against clipping at 0 dB.

“Regular” WAV files are PCM. Audio CDs use 44.1kHz, 16-bit, stereo PCM, but in a different “package”.

The WAV format is a “container” that allows other formats but most WAVs are PCM. i.e. It’s “legal” to have an MP3 formatted file in a WAV container. Your player software will read the file header and happily play the file, but it’s unusual and it confuses everybody.

So, make a 44.1kHz, 16-bit, stereo WAV (PCM) and your audio CD will contain the exact same underlying data.

Most CD burning applications will convert from higher (or lower) resolution or from MP3, etc., as long as you configure it to make an “audio CD”. If you make a “data CD”, you’ll just be copying the files to to the disc and it will play on a computer but not in a regular CD player.

I’m actually not familiar with GSM, but with my 20 seconds of research, it appears to be a lossy compression format.



\

Well thanks for your well written analysis! I guess FP processors have come a long way since the 60’s and I didn’t realize it can be processed faster than integer arithmetic (according to some articles I looked up). So I assume that audacity has chosen to internally manipulate 32bit FP for speed and granularity.

If you remember computers in the 60s you’re a few years older than me. I do remember adding a floating-point processor to my IBM PC clone. I had a Commodore 64 before that, and in college I’d done some programming on a mainframe and on a microprocessor (An Intel 8085 I think).

From my limited understanding of DSP programming, there’s a lot of summation involved and it’s a lot easier in floating-point because you don’t have to worry about numbers overflowing.




P.S.
I guess you found the 32-bit option… I had forgotten it was under “Other uncompressed formats”.

If you want to change the sample rate, you do the in the lower-left part of the Audacity window before you export.

Yep–I got in on the tail end of the UNIVACs in the late 60s. I always tell the young engineers here that “when I started working the computers were made out of wood”. :wink:

I just cut a CD of our concert and it sounds really good. Fortunately our orchestra performs in the same place most of the time so I can improve my mic placement and keep it that way for the future.

Thanks for all the help again
cheers
Fritz