PanRingTopBot


a panner for a ring with one speaker on top, and one on the bottom.

see also PanRingTop, TorusPanAz.


*ar(numChans, in, azi, elev, orientation)

numChans number of channels in the ring

in input signal to pan

azi azimuth, angle in the horizontal ring; from 0 to 2, wraps around.

elev height above the horizon, toward top speaker; 0 is ring, 1 is top, -1 is bottom.

orientation direction of azimuth 0: orientation 0 means azi 0 is on chan0, 

orientation 0.5 means azi 0 is between chan0 and chan1.


The order of the returned channels is: ring1, ring2 ... ringN, top, bottom.



Server.internal.boot; 


// orientation defaults to 0.5, between first 2 chans.

z = { |azi=0, elev=0| PanRingTopBot.ar(4, Dust.ar(1000, 0.5), azi, elev) }.scope;



z.set(\azi, -0.25); // chan 1

z.set(\azi, 0.25); // chan 2

z.set(\azi, 0.75); // chan 3

z.set(\azi, 1.25); // chan 4

z.set(\elev, 0.5); // halfway up to top chan (here chan 5).

z.set(\elev, 1); // pan all the way to top chan.

z.set(\elev, -0.5); // halfway down to bottom (here chan 6).

z.set(\elev, -1); // pan fully to to bottom chan.



// The bottom speaker can also be virtual, and mixed to the ring speakers:

(

z = { |azi=0, elev=0| var all, ring, top, bot; 

all = PanRingTopBot.ar(6, Dust.ar(1000, 0.5), azi, elev); 

ring = all.keep(6); 

top = all[6]; 

bot = all[7]; 

(ring + (bot * (1/6))) ++ top;

}.scope;

)


z.set(\azi, -0.17); // chan 1

z.set(\azi, 0.5); // chan 3

z.set(\elev, 1); // pan all the way to top chan.

z.set(\elev, -0.5); // bottom is added to ring of 6.

z.set(\elev, -1); // fully down is now evenly on all ring speakers.




// could also be done with TorusPanAz now.