[LAD] panning thoughts
Ralf Mardorf
ralf.mardorf at alice-dsl.net
Fri Nov 12 05:40:22 UTC 2010
On Thu, 2010-11-11 at 20:22 -0800, Eric Kampman wrote:
> Hello,
>
> I'm writing a synth module on top of jack and I'm starting to contemplate stereo.
>
> I looked up "pan law" and understand that center should be -3 db (or some say -3.5 or 4.5, whatever) given unity at panned hard L or R. It was said that in an ideal room I should be down -6 db in the center. That would mean linearly transitioning from unity gain to completely off as one pans, I *think* (-6 db in the center = .5).
>
> So that's one (very easy) way to go...
>
> There was also mention of "equal power". Since power is proportional to signal squared, this means with parametrized L and R functions
>
> L(t)^^2 + R(t)^^2 = 1, 0 <= t <= 1
>
> We need an f(t) such that f(t) = L(t) and f(1-t) = R(t).
>
> I played around this for awhile and using the sum of the square of sin and cos etc I got an f(t) of
>
> f(t) = cos( pi * t / 2 ) (details available on request)
>
> So L(t) = cos(t * pi / 2) and R(t) = cos((1 - t) * pi / 2)
>
> And that seems to work out correctly.
>
> Is this equal power version worth spending the processing cycles on? I intend to make pan envelope and LFO controllable so it's not going to be the case that the pan value can be thought of as relatively static.
>
> Thoughts?
> Thanks
> Eric
>
> PS now that I know what I'm looking for web search turned up this:
> http://www.midi.org/techspecs/rp36.php
In January Rui at Qtractor devel-list wrote:
stereo panning in qtractor follows an "approximated equal-power"
trigonometric formula: L = SQRT2 * cos(pan * PI/2); R = SQRT2 * sin(pan
* PI/2), where pan value ranges from 0 (full-left) to 1 (full-right).
More information about the Linux-audio-dev
mailing list