ProxyMixer
provides controls for handling and editing the proxies
in a proxyspace and their monitors. cross-platform.
*new(proxyspace, nProxies, title, bounds)
nProxies: the maximum number of proxies you plan to use
title: window title
bounds: window bounds
p = ProxySpace.push(s.boot, \p);
m = ProxyMixer(p, 8, \p, Rect(20, 500, 0,0));
// the top left menu sets which proxies will be shown.
// existingProxies: even an empty proxy is shown
~test.ar;
// activeProxies: proxy appears when it is alive
~test = { |freq=10, wide=0.2, pan=0.11| Pulse.ar(freq * [1 + wide, 1 - wide]) * 0.2 };
~test.lag(\freq, 1);
~test.set(\freq, 10); // can set outside range
// playingProxies : only those that really play are shown.
~test.playN(vol: 0.5);
// switch back to active proxies...
// the reduce button removes all proxies that are not playing
// and that are not used as sources in other proxies:
~otto = { |dens=12| Dust.ar };
p.reduce;
~otto.clear; // remove it
// doc and docc post the current proxyspace as code,
// openEdit opens the editor zone, see below;
// R opens a Record utility, see below.
// the line of controls for one proxy and its monitor is
// a ProxyMonitorGui, so for full details, see ProxyMonitorGui.help.
// it displays current volume,
~test.vol_(0.1);
~test.vol_(0.25);
// proxy name; play/stop/end control:
~test.playN;
~test.stop;
~test.end; // option-click on stop to end the monitor and the proxy itself.
s.scope(8);
~test.playN(4); // proxy first output channel:
~test.playN(0);
// the "-=" / "-<" button supports multichannel monitoring,
// see ProxyMonitorGui.help
// paus/rsum toggles pause and resume:
~test.pause; // proxy first output channel:
~test.resume;
// send button resends the proxy,
// option-click on send rebuilds the proxy
// (e.g. for lookup in client-site state)
~test.send;
~test.rebuild;
// the ed button sends this proxy to the editor...
// kr proxies show up to the right
~lfo = { SinOsc.kr(2) };
~lfnoyz0 = { |lofreq, mul=1, add| LFDNoise0.kr(lofreq, mul, add) };
// the editor zone is a NodeProxyEditor;
// open it and set
m.openEditZone(1);
m.editor.proxy_(~test).pxKey_(\test);
~test.set(\freq, rrand(30, 200)); // set ~tests parameters
~test.set(\wide, 1.0.linrand);
// if you declare specs for the range of a parameter,
// they can be used in the editor:
Spec.specs.put(\wide, [0, 1, \lin, 0.005].asSpec);
m.editor.proxy_(~test).pxKey_(\test);
// you can map a kr proxy to a control param;
~test.map(\wide, ~lfnoyz0);
~test.unmap(\wide);
// this also works by dragging the kr proxy name
// the field left of the param name.
// some more tests :
// test too many arproxies
10.do { |i| p[("test" ++ i).asSymbol] = { Pan2.ar(Impulse.ar(exprand(5, 50)), 1.0.rand2, 0.2) }; };
// test too many kr proxies
10.do { |i| p[("kr" ++ i).asSymbol] = { LFNoise0.kr(exprand(5, 50)) }; };
p.krProxyNames.do { |key| p.removeAt(key) };
p.reduce(method: \clear);