TITLE:: PanX
summary:: Equal power pan across an array of speakers
categories:: Libraries>JoshUGens, UGens>Multichannel>Panners
keyword:: JoshUGens

DESCRIPTION::
Multichannel equal power panner.


CLASSMETHODS::

METHOD:: kr


ARGUMENT:: numChans
Number of output channels.

ARGUMENT:: in
Input signal.

ARGUMENT:: pos
A value between 0 and 1. 0 is first speaker, 1 is the last. Values < 0 fade out sound from the first speakers, and values > 1 fade out sound from the last speakers. Sound does NOT wrap.

ARGUMENT:: level
A control rate level input.

ARGUMENT:: width
The width of the panning envelope. Nominally this is 2.0 which pans between pairs of adjacent speakers. Width values greater than two will spread the pan over greater numbers of speakers. Width values less than one will leave silent gaps between speakers.


METHOD:: ar

ARGUMENT:: numChans
Number of output channels.

ARGUMENT:: in
Input signal.

ARGUMENT:: pos
A value between 0 and 1. 0 is first speaker, 1 is the last. Values < 0 fade out sound from the first speakers, and values > 1 fade out sound from the last speakers. Sound does NOT wrap.

ARGUMENT:: level
A control rate level input.

ARGUMENT:: width
The width of the panning envelope. Nominally this is 2.0 which pans between pairs of adjacent speakers. Width values greater than two will spread the pan over greater numbers of speakers. Width values less than one will leave silent gaps between speakers.


INSTANCEMETHODS::

METHOD:: init


EXAMPLES::

code::
// five channel panning across an array
s.boot;
(
a = {
	PanX.ar(
		5, 				// numChans
		ClipNoise.ar, 	// in
		MouseX.kr(-0.5, 1.5), // pos
		0.5,			// level
		MouseY.kr(1, 3)			// width
	);
}.play(s);
s.scope(5);
)

a.free;
::
