Multichannel equal power panner.
numChans |
Number of output channels. |
in |
The input signal. |
pos |
pan position ( Thus all channels will be cyclically panned through if a bipolar sawtooth wave from |
level |
A control rate level input. |
width |
The width of the panning envelope. Nominally this is |
orientation |
Should be |
Five channel circular panning with first channel on the left
(
{
PanAz.ar(
numChans: 5,
in: ClipNoise.ar(0.1),
pos: LFSaw.kr(MouseX.kr(0.2, 8, 'exponential')),
level: 0.5,
width: 3,
orientation: 0.5
);
}.scope
)
Despite a certain similarity, Pan2 and PanAz with 2 channels behave differently.
xxxxxxxxxx
// one full cycle for PanAz: from -1 to 1
{ PanAz.ar(2, DC.ar(1), Line.ar(-1, 1, 0.1), orientation: 0) }.plot(0.1)
// comparing with Pan2
{ Pan2.ar(DC.ar(1), Line.ar(-1, 1, 0.1)) }.plot(0.1)
// to create one full cycle for Pan2, move from 1 to -1 and back to 1
{ Pan2.ar(DC.ar(1), EnvGen.ar(Env([1, -1, 1], [0.05, 0.05]))) }.plot(0.1)
The same in one plot window:
xxxxxxxxxx
(
{
[
PanAz.ar(2, DC.ar(1), Line.ar(-1, 1, 0.1), orientation: 0),
Pan2.ar(DC.ar(1), Line.ar(-1, 1, 0.1)),
Pan2.ar(DC.ar(1), EnvGen.ar(Env([1, -1, 1], [0.05, 0.05])))
].flat;
}.plot(0.1)
)
In other words, while Pan2
needs a position change of 2
from channel 0
to 1
xxxxxxxxxx
{ Pan2.ar(DC.ar(1), Line.ar(-1, 1, 0.1)) }.plot(0.1)
// we need a position change of 1 in PanAz:
{ PanAz.ar(2, DC.ar(1), Line.ar(0, 1, 0.1), orientation: 0) }.plot(0.1)
In one plot window:
xxxxxxxxxx
(
{
[
Pan2.ar(DC.ar(1), Line.ar(-1, 1, 0.1)),
PanAz.ar(2, DC.ar(1), Line.ar(0, 1, 0.1), orientation: 0)
].flat
}.plot(0.1)
)