2 summary:: mix control for a proxyspace
3 categories:: Libraries>JITLib>GUI
4 related:: Classes/ProxySpace, Classes/NodeProxyEditor
9 ProxyMixer has been updated - some little adaptations to existing uses may be needed. If you like, you can also replace "ProxyMixer" with "ProxyMixerOld" to keep using the old style of ProxyMixer.
12 ProxyMixer provides controls for handling and editing the node proxies in a proxyspace and their monitors (cross-platform graphics).
14 Overview: link::Overviews/JITLib::
25 a link::Classes/ProxySpace::
28 the maximum number of proxies you plan to use
39 p = ProxySpace.push(s.boot, \p);
40 m = ProxyMixer(p, 8, \p, Rect(20, 500, 0,0));
44 // the top left menu sets which proxies will be shown.
46 // existingProxies: even an empty proxy is shown
49 ( // activeProxies: proxy appears when it is alive
50 ~test = { |freq=250, intv=19, timescale=1, curve=0, loopnode=0|
52 Env({ 1.0.rand2 }!11, {1.0.rand}!10, curve, releaseNode: 9, loopNode: loopnode),
53 timeScale: timescale);
54 var pitch = (env * [1, 0.33, -1] * intv).midiratio * freq;
55 Splay.ar(Formant.ar(pitch, pitch.scramble * 2, pitch.scramble)) * 0.1;
60 // playingProxies : only those that really play are shown.
63 // switch back to active proxies...
65 // the reduce button removes all proxies that are not playing
66 // and that are not used as sources in other proxies:
67 ~otto = { |dens=12| Dust.ar(dens) };
69 ~otto.clear; // remove it
72 // doc and docc post the current proxyspace as code
75 // openEdit opens the editor zone, see below;
78 // R opens a Record utility, see below.
80 // the line of controls for one proxy and its monitor is
81 // a ProxyMonitorGui, so for full details see ProxyMonitorGui.help.
83 // it displays current volume,
87 // proxy name; play/stop/end control:
88 ~test.playN; // playN as is
90 ~test.end; // option-click on stop : end the monitor and the proxy itself.
91 ~test.playN(vol: 0); // option-click on play : start playing with volume zero.
96 ~test.playN(4); // set proxy's first output channel:
99 // the "-=" / "-<" button supports multichannel monitoring,
100 // see ProxyMonitorGui.help
102 // paus/rsum toggles pause and resume:
106 // send button resends the proxy,
107 // option-click on send rebuilds the proxy
108 // (e.g. for lookup in client-site state)
117 // the ed button sends this proxy to the editor - see below
119 // kr proxies show up in the middle
120 ~lfo = { SinOsc.kr(2) };
121 ~lfnoyz0 = { |lofreq, mul=1, add| LFDNoise0.kr(lofreq, mul, add) };
123 // the editor zone is a NodeProxyEditor
124 // open it and set some params
126 m.editor.proxy_(~test);
127 ~test.set(\freq, exprand(80, 1250)); // set ~tests parameters
128 ~test.set(\intv, 1.0.linrand);
130 // if you declare global specs for the range of a parameter,
131 // they can be used in the editor:
132 Spec.add(\intv, [0, 36, \lin]);
133 Spec.add(\timescale, [0.001, 10, \exp]);
134 Spec.add(\loopnode, [0, 7, \lin, 1]);
135 Spec.add(\curve, [-10, 10]);
137 m.editor.proxy_(~test);
139 // you can map a kr proxy to a control param;
140 ~test.map(\intv, ~lfnoyz0);
142 // this also works by dragging the kr proxy name
143 // the field left of the param name.
147 // if there are too many ar proxies, a scroller appears
149 10.do { |i| p[("test" ++ i).asSymbol] = {
150 Pan2.ar(Ringz.ar(Impulse.ar(exprand(0.5, 4)), exprand(300, 3000), 0.02), 1.0.rand2, 0.2) };
154 10.do { |i| p[("test" ++ i).asSymbol].playN(vol: linrand(1.0), fadeTime: exprand(0.01, 5)) };
156 // and the same for kr proxies
157 10.do { |i| p[("kr" ++ i).asSymbol] = { LFNoise0.kr(exprand(5, 50)) }; };
159 p.krProxyNames.do { |key| p.removeAt(key) };
161 p.reduce(method: \clear);