Stereo narg required
Apr. 14th, 2006 12:28 pmSuppose I have a pair of volumes, one for the left hand channel and one for the right hand channel, and want to represent them as a combined volume and a balance. Is there a conventional relationship between these two representations and if so what is it?
(I'm currently using this interface, but the API shouldn't matter.)
(no subject)
Date: 2006-04-14 12:05 pm (UTC)(no subject)
Date: 2006-04-14 12:14 pm (UTC)(no subject)
Date: 2006-04-14 12:14 pm (UTC)- The balance control is neutral at the centre position, and attenuates one channel or the other (logarithmically or linearly) towards silence at the endstops, oeaving the other at full volume.
- The balance control is a linear cross-fader between 0 and 1 for left channel, and 1 and 0 for right.
(There are a variety of other profiles that are useful in applications such as DJ mixing console cross-faders, but not applicable for a left/right balance.)The former is more useful in domestic audio systems, because it means the centre position gives 0dB gain on both channels, but it isn't constant-volume (you move the balance slider away from the centre position and the sound gets quieter). The latter is more useful in professional mixing contexts because the sound stays the same volume as you change the balance, but you need 3dB of extra headroom over the centre-balance position (i.e. either the channels can go to +3dB, or you have to drop the centre-balance level to -3dB.)
Looked at as an inverse transform, the former mechanism can represent every possible pair of left- and right-channel gain values; the latter cannot represent values where both sliders have gone to eleven </spinal-tap>.
Assuming this is for your jukebox, I'd go with the former, but I hope this is some useful background for the decision. Ask me to go into more detail at your own risk. (-8
(no subject)
Date: 2006-04-14 12:33 pm (UTC)(no subject)
Date: 2006-04-14 12:49 pm (UTC)Let T be the 'true' signal (or in fact the logarihm of such since it is a VU meter) and b be the balance. If b = 0, the true signal comes entirely out of the left channel and if b = 1 the true signal comes out of the right.
R = bT; L = (1-b)T
From which it is clar that
R + L = (b + 1-b)T = T
R - L = (b - 1+b)T = 2bT
Hence we can find the combined signal as T = R + L and find b as
(R - L) / (2 * (R + L)) = b