Multichannel Panning in ChucK
ChucK has two chugins for panning, reflecting two different common strategies. PanN provides 4, 8, and 16 channel panners for equal power 2D panning between speaker arrays. AmbPan provides a 3rd order ambisonics encoder, allowing panning in 3D space. However, you need to route the audio to a proper ambisonics decoder, such as in the CCRMA Listening Room.
Linux ChuGins + ChucK examples
Using the Listening Room
The Listening Room allows you to use either strategy; however PanN/Pan8 only works in 2D, and therefore you will be limited to using the middle speakers, and not the speakers on the ceiling or underneath the floor.
Basic Equal-Power Panning (PanN/Pan8)
To use Pan8, first configure the mixer. Assuming you are running chuck from the Listening Room Linux computer, hit the "Linux" button on the left mixer controller, and make sure that "Ambisonics Decoder Mode" is "Off" on the right mixer controller. Hit the "-15dB" preset on the left mixer controller to set volume levels for each channel to -15dB.
Log in to the Linux computer, and start of course by opening qjackctl and hitting "Start" (if you aren't familiar with qjackctl, you can easily start it by opening a terminal window and executing
qjackctl &). Open a terminal window and download the panning chugins + examples like so:
Decompress the resulting file:
$ tar xzf 220b-panning.tgz
and then navigate to the new directory that has been created:
$ cd 220b-panning/
To run the Pan8 example, run chuck like this:
$ chuck -c16 -g./PanN.chug Pan8.ck
Pan8 (and Pan4 and Pan16) can also be used with any 4, 8, or 16 channel speaker arrangement, such as Studio C, D, and E, and the 4-channel stations sprinkled throughout CCRMA. With a Linux computer, you can use the chugins linked above. On a Mac computer, you can use the latest chugin distribution:
(Windows version forthcoming)
To configure the mixer for ambisonics mode, hit the "On/Off" switch in the "Ambisonics Decoder Mode" so that it lights up, and make sure that the "3D" button is also on. Now, in your Linux terminal, assuming you have already started jack and downloaded the chugins and examples as detailed above, run chuck like this to play the example:
$ chuck -c16 -g./AmbPan.chug AmbPan.ck
You can also run Colin's demo:
$ chuck -c16 -g./AmbPan.chug AmbPan3-demosauce.ck