Help with PanAz

I need help for understanding PanAz: What I am trying to get is (in an 8-channel setup) to be able to send a signal to each channel separately. I tried setting the width to 1, then I get no signal. How can I send a signal to exactly 1 channel in an 8-channel setup?

Away from my machine but I think width 2 does it (similar to Pan2). With orientation 0.5 an 8 chans – pan of 0 should be channel 0 - pan 0.25 should be channel 1 etc

1 Like

Ok, I wrote a function which converts the Index number of a channel I want my signal go to (which means width of PanAz is 1, so the signal is focused in one channel), to the position parameter as PanAz expects:

~idxToAzPos = {
	/*
	Returns the position of a signal for Azimuth-panning based on a simple
	channel index. Arguments are (besides channel index) number of channels, and the orientation (
	as used by PanAz)
	*/
	arg channelidx, num=4, orient=0;
	var kanalFaktor = 2 / num;
	var shift = (kanalFaktor * orient).neg;
	(channelidx * kanalFaktor + shift)
};
1 Like

Something like this should work, I think?

While technically possible to do discrete channel sends using PanAz, this isn’t really what PanAz is designed for. If you want discrete mono sends to individual busses, it may be simpler to make a monophonic output SynthDef with a bus argument, and specify the desired bus when creating each Synth.

s.options.numOutputBusChannels = 8;
s.reboot;

s.meter;

(
SynthDef(\panaz, {
	var sig, orient = \orient.ir(0); // also works for orient = 0.5
	sig = PinkNoise.ar(0.1) * Line.kr(1, 0, 2, doneAction: 2);
	sig = PanAz.ar(
		numChans: 8,
		in: sig,
		
		// calculate pos from channel index & speaker orientation
		pos: (\chan.ir(0) - orient) / 4,
		
		level: 1,
		width: 2,
		orientation: orient
	);
	Out.ar(0, sig);
}).add;
)

Synth(\panaz, [chan: 0]); // send to chan 0
Synth(\panaz, [chan: 1]); // send to chan 1
Synth(\panaz, [chan: 2]); // send to chan 2, etc.