home/ atoms/ sc-pan2-stereo-positioning

Pan2 places a mono signal in the stereo field: -1 hard left, 0 center, +1 hard right

Pan2.ar(signal, pos, level) takes a monophonic signal and positions it in a two-channel stereo field. The pos argument runs from -1 (hard left) through 0 (center) to +1 (hard right), using an equal-power law so perceived loudness stays roughly constant as the source moves across the field. Adding a pan argument plus a Pan2 near the end of a SynthDef is the simplest way to spatialize otherwise monophonic sound. Pan2 expects a mono input; to reposition an already-stereo signal you use Balance2 instead, which takes explicit left and right channels. Panning is distinct from multichannel expansion (which merely assigns channels to buses) because it distributes one source continuously between the two speakers.

Examples

sig = Pan2.ar(SinOsc.ar(440), MouseX.kr(-1,1), 0.2); — mouse sweeps the sine across the stereo field. sig = Pan2.ar(sig, pan); inside a SynthDef, with arg pan=0; exposed for live control.

Assessment

A student has a mono saw and wants it slightly left of center at constant loudness. Write the Pan2 call. Then explain why Pan2 will not work on an already-stereo signal and name the UGen to use instead.

“where 1 is hard right, negative 1 is hard left, and 0 in the center”
corpus · supercollider-tutorials-full-transcripts-and-code-eli-fields · chunk 87