The default method of panning is constant-power panning which can be set by calling doPowerPan(). Another panning method is linear panning which can be set by calling doLinearPan().
Constant-power panning maintains a constant loudness for any valid location given by input[1]. This type of panning requires that the sum of the squares of the amplitudes for each output channel remains constant.
Linear panning, on the other hand, keeps the sum of the amplitude envelopes for each output signal constant. This results in a drop in loudness towards the middle of the stereo field (input[1] = 0.5). Here are the amplitude envelopes as functions of pan location for each type of panning method:
Here are plots showing the dip in the total loudness of both output channels for the different panning methods:
Input index | Description | Summary |
---|---|---|
0 | input signal | Incoming signal to be panned. |
1 | pan location | A number between 0 and 1 that represents the pan location in the stereo field; 0=all left channel, 1=all right channel. |
Output index | Description | Summary |
0 | left channel | Input signal scaled by the pan location amplitude value for the left channel. |
1 | right channel | Input signal scaled by the pan location amplitude value for the right channel. |