[LAD] Mixing audio: Implementing pan and balance

Fons Adriaensen fons at linuxaudio.org
Tue Mar 12 09:56:15 UTC 2013


On Tue, Mar 12, 2013 at 01:23:02AM -0400, Tim E. Real wrote:
 
> I noticed our app uses this pan formula:
> 
> 	vol_L = volume * (1.0 - pan);
> 	vol_R = volume * (1.0 + pan);
> 
>  where volume is the fader value, pan is the pan knob value
>  which ranges between -1.0 and 1.0, and vol_L and vol_R are the 
>  factors to be applied to the data when sending a mono signal 
>  to a stereo bus.
> 
> When pan is center, 100% of the signal is sent to L and R.
> At pan extremities, the signal is boosted by 3dB.

6 dB actually.

 
> But according to [1], we should be using a Pan Law [2],
>  where pan center is around 3dB to 6dB down and pan 
>  extremities is full signal.

There are two independent issues involved here:

1. The attenuation at the center w.r.t. to extreme L and R.
2. Whether the center or the extremes should be 0 dB.

(2) is very much a matter of taste and of virtually no practical
consequence : you will adjust the fader (channel gain) to get
the right balance anyway. 

Regarding (1), if you take psycho-acoustics into account you'd
want -6 dB at the center for low frequencies and -3 dB for high
frequencies, with a gentle crossover at around 500 Hz or so. 
So the SSL compromise of -4.5 dB makes sense.
Note that unless you use the panner to move a sound around 
during a mix, all of this hardly matters: you will adjust
the balance anyway and compensate for whatever the panner
is doing.

Returning to (2): for a panner (mono -> stereo) I'd prefer
0 dB at L and R. For a balance control (stereo -> stereo)
I'd prefer 0 dB at the center position. 


-- 
FA

A world of exhaustive, reliable metadata would be an utopia.
It's also a pipe-dream, founded on self-delusion, nerd hubris
and hysterically inflated market opportunities. (Cory Doctorow)



More information about the Linux-audio-dev mailing list