/usr/share/SuperCollider/HelpSource/Reference/playN.schelp is in supercollider-common 1:3.8.0~repack-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 | title:: playN
summary:: distribute audio over multiple non-adjacent channels
categories:: Libraries>JITLib>NodeProxy
related:: Classes/Monitor, Classes/Bus, Classes/NodeProxy, Classes/Ndef, Classes/ProxySpace
method:: playN
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.
code::
// examples
s.boot;
p = ProxySpace.push;
s.scope(8);
// a 3 channel test sound
~test3 = { SinOsc.ar([2, 3, 5] * 100) * 0.2 };
// compare: play out of 3 adjacent channels
~test3.play(3);
~test3.play(6);
~test3.stop;
~test3.play; // play remembers old (series) output settings;
// outs
~test3.playN([2, 4,7]) // playN to 3 non-adjacent channels
// set outs, amps and vol:
(
~test3.playN(
outs: [2,3,5],
amps: [0.5, 0.25, 0.125],
vol: 1
);
)
~test3.vol_(2);
~test3.stop;
~test3.playN; // remembers last state.
// if playN has been used, one can set outs while playing.
// note: this does not work reliably with the .play method!
~test3.monitor.outs_([3,2,1]);
// set amps while playing.
// note: this does not work with play method!
~test3.monitor.amps_(1/[1, 2, 3]).vol_(1);
~test3.playN;
~test3.monitor.outs_([2, 4, 7]);
// one can also spread out one channel to several, with given amplitudes:
(
~test3.playN(
outs: [1, 3, [5,6,7]],
amps: [0.5, 0.25, [0.125,0.25, 0.5]],
vol: 2
);
)
~test3.stop;
~test3.playN;
// do changes while off:
~test3.stop;
~test3.monitor.outs_([2, 4, [5,6,3]]);
~test3.monitor.amps_(1/[1, 2, [3,2,1]]);
~test3.playN;
// the most comfortable way to edit those parameters is using a text file:
~test3.playNDialog;
// output mapping can be prepared before playN is used:
~test3.clear;
~test3 = { SinOsc.ar([2, 3, 5] * 100) * 0.2 };
~test3.vol_(0.5); // vol can be set already
// outs and amps require making a monitor first;
~test3.initMonitor;
~test3.monitor.outs_([3, 5, 6]);
~test3.monitor.amps_([1, 2, 3]);
~test3.playN;
~test3.end;
~test3.clear;
p.clean;
p.pop;
::
|