fons at kokkinizita.net fons at kokkinizita.net
Fri Nov 12 09:18:06 UTC 2010

```On Thu, Nov 11, 2010 at 08:22:08PM -0800, Eric Kampman wrote:

> 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).

The ideal value depends on frequency, in theory -6 dB of LF
and -3 dB for HF, with a gradual transition at around 500 Hz
or so.

> 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.

It is correct.

> 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.

If you are concerned about the CPU use, consider this:

panning value x = [-1..+1]

L_gain = (1 - x) * (0.7 + 0.2 * x)
R_gain = (1 + x) * (0.7 - 0.2 * x)

which will be -3.1 dB at the center. You can modify this
modyfying the 0.7 and 0.2 constants, for example

L_gain = (1 - x) * (0.65 + 0.15 * x)
R_gain = (1 + x) * (0.65 - 0.15 * x)

will produce -3.75 dB, and

L_gain = (1 - x) * (0.6 + 0.1 * x)
R_gain = (1 + x) * (0.6 - 0.1 * x)

will produce -4.4 dB, etc.

Ciao,

--
FA

There are three of them, and Alleline.

```