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 the maximum number of proxies you plan to use
36 p = ProxySpace.push(s.boot, \p);
37 m = ProxyMixer(p, 8, \p, Rect(20, 500, 0,0));
41 // the top left menu sets which proxies will be shown.
43 // existingProxies: even an empty proxy is shown
46 ( // activeProxies: proxy appears when it is alive
47 ~test = { |freq=250, intv=19, timescale=1, curve=0, loopnode=0|
49 Env({ 1.0.rand2 }!11, {1.0.rand}!10, curve, releaseNode: 9, loopNode: loopnode),
50 timeScale: timescale);
51 var pitch = (env * [1, 0.33, -1] * intv).midiratio * freq;
52 Splay.ar(Formant.ar(pitch, pitch.scramble * 2, pitch.scramble)) * 0.1;
57 // playingProxies : only those that really play are shown.
60 // switch back to active proxies...
62 // the reduce button removes all proxies that are not playing
63 // and that are not used as sources in other proxies:
64 ~otto = { |dens=12| Dust.ar(dens) };
66 ~otto.clear; // remove it
69 // doc and docc post the current proxyspace as code
72 // openEdit opens the editor zone, see below;
75 // R opens a Record utility, see below.
77 // the line of controls for one proxy and its monitor is
78 // a ProxyMonitorGui, so for full details see ProxyMonitorGui.help.
80 // it displays current volume,
84 // proxy name; play/stop/end control:
85 ~test.playN; // playN as is
87 ~test.end; // option-click on stop : end the monitor and the proxy itself.
88 ~test.playN(vol: 0); // option-click on play : start playing with volume zero.
93 ~test.playN(4); // set proxy's first output channel:
96 // the "-=" / "-<" button supports multichannel monitoring,
97 // see ProxyMonitorGui.help
99 // paus/rsum toggles pause and resume:
103 // send button resends the proxy,
104 // option-click on send rebuilds the proxy
105 // (e.g. for lookup in client-site state)
114 // the ed button sends this proxy to the editor - see below
116 // kr proxies show up in the middle
117 ~lfo = { SinOsc.kr(2) };
118 ~lfnoyz0 = { |lofreq, mul=1, add| LFDNoise0.kr(lofreq, mul, add) };
120 // the editor zone is a NodeProxyEditor
121 // open it and set some params
123 m.editor.proxy_(~test);
124 ~test.set(\freq, exprand(80, 1250)); // set ~tests parameters
125 ~test.set(\intv, 1.0.linrand);
127 // if you declare global specs for the range of a parameter,
128 // they can be used in the editor:
129 Spec.add(\intv, [0, 36, \lin]);
130 Spec.add(\timescale, [0.001, 10, \exp]);
131 Spec.add(\loopnode, [0, 7, \lin, 1]);
132 Spec.add(\curve, [-10, 10]);
134 m.editor.proxy_(~test);
136 // you can map a kr proxy to a control param;
137 ~test.map(\intv, ~lfnoyz0);
139 // this also works by dragging the kr proxy name
140 // the field left of the param name.
144 // if there are too many ar proxies, a scroller appears
146 10.do { |i| p[("test" ++ i).asSymbol] = {
147 Pan2.ar(Ringz.ar(Impulse.ar(exprand(0.5, 4)), exprand(300, 3000), 0.02), 1.0.rand2, 0.2) };
151 10.do { |i| p[("test" ++ i).asSymbol].playN(vol: linrand(1.0), fadeTime: exprand(0.01, 5)) };
153 // and the same for kr proxies
154 10.do { |i| p[("kr" ++ i).asSymbol] = { LFNoise0.kr(exprand(5, 50)) }; };
156 p.krProxyNames.do { |key| p.removeAt(key) };
158 p.reduce(method: \clear);