2 summary:: distribute audio over multiple non-adjacent channels
3 categories:: Libraries>JITLib>NodeProxy
4 related:: Classes/Monitor, Classes/NodeProxy, Classes/Ndef, Classes/ProxySpace
8 playN is a multichannel play method for link::Classes/Monitor:: and link::Classes/NodeProxy:: (see also: link::Classes/ProxySpace::, link::Classes/Ndef::) that supports playing proxy outputs over strong::non-adjacent channels::; somewhat like a splitter/line mixer.
13 Server.default = s = Server.internal;
19 // a 3 channel test sound
20 ~test3 = { SinOsc.ar([2, 3, 5] * 100) * 0.2 };
22 // compare: play out of 3 adjacent channels
27 ~test3.play; // play remembers old (series) output settings;
31 ~test3.playN([2, 4,7]) // playN to 3 non-adjacent channels
33 // set outs, amps and vol:
37 amps: [0.5, 0.25, 0.125],
44 ~test3.playN; // remembers last state.
46 // if playN has been used, one can set outs while playing.
47 // note: this does not work reliably with the .play method!
48 ~test3.monitor.outs_([3,2,1]);
50 // set amps while playing.
51 // note: this does not work with play method!
52 ~test3.monitor.amps_(1/[1, 2, 3]).vol_(1);
54 ~test3.monitor.outs_([2, 4, 7]);
57 // one can also spread out one channel to several, with given amplitudes:
60 outs: [1, 3, [5,6,7]],
61 amps: [0.5, 0.25, [0.125,0.25, 0.5]],
69 // do changes while off:
71 ~test3.monitor.outs_([2, 4, [5,6,3]]);
72 ~test3.monitor.amps_(1/[1, 2, [3,2,1]]);
75 // most comfortable way to edit - only tested on osx.
79 // output mapping can be prepared before playN is used:
82 ~test3 = { SinOsc.ar([2, 3, 5] * 100) * 0.2 };
84 ~test3.vol_(0.5); // vol can be set already
86 // outs and amps require making a monitor first;
89 ~test3.monitor.outs_([3, 5, 6]);
91 ~test3.monitor.amps_([1, 2, 3]);