Rui Nuno Capela rncbc at rncbc.org
Fri Nov 12 15:47:34 UTC 2010

```On 11/12/2010 03:08 PM, Eric Kampman wrote:
> Thanks. I don't understand the square root though. The equation is even
> more expensive processor-wise than the straight cos.
>

the SQRT2 is a constant := sqrtf(2.0f), usually defined as M_SQRT2 in
"math.h"

qtractor computes the panning coefficients each turn they get changed.
then it applies through regular gain to each steaming channel as usual.
just const mul over a vector/block/buffer, whatever

> Granted, you're quoting someone else, but maybe someone out there knows.

i'm no expert but i'm sure Ralf quoted me :)

>
> On Nov 11, 2010, at 9:40 PM, Ralf Mardorf wrote:
>>
>> 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).
>>

seeya
--
rncbc aka Rui Nuno Capela
rncbc at rncbc.org

```