ProxyMonitorGui
is a GUI for controlling the top-level of a proxy and its monitor.
It is e.g. used in ProxyMixer, and it is crossplatform.
(
Server.default = s = Server.internal;
s.boot;
)
(
s.scope(8);
p = ProxySpace.push;
~test = { |freq=1000, dens=5, amp=1, lev=3|
var freqline = { exprand(0.3, 3) } ! 3 * XLine.kr(0.125, 1, 2);
Ringz.ar(Dust.ar(dens ! 3, dens.reciprocal.sqrt), freq * freqline, 0.1)
};
~test.playN(0);
)
GUI.cocoa;
// make a ProxyMonitorGui
z = ProxyMonitorGui(~test);
// without multichan out button, custom height
ProxyMonitorGui(~test, height: 24, usePlayN: false);
// left slider is vol
~test.vol_(0.1);
~test.vol_(0.25);
// drag source displays proxy key
z.proxy = ~otto12345; // up to 9 letters on osx
z.proxy = ~test;
~test.stop; // play / stop button:
~test.playN;
~test.end; // alt-stop fully ends the proxy.
// number box sets first output channel
// when you want to play out of adjacent channels.
~test.playN(0);
// playing out to multiple channels blocks the numberbox:
~test.playN([0, 2, 5]);
~test.playN([1, 2, 5]);
// ... and the button next to it shows the output shape now:
// ("-<" is multiple outs, "-=" is adjacent outs.
// clicking on that button opens an editing dialog:
~test.playNDialog; // not working with swingOSC yet.
// the pause button pauses and resumes
~test.pause;
~test.resume;
// snd button re-sends proxy's sound as compiled,
~test.send;
// or with option-click, it rebuilds the proxy's sound function,
// so e.g. normal random numbers or lookups in the lang get remade.
~test.rebuild;
ProxyMonitorGui gets its look from GUI.skin, so you could customize it there.
If you use SwingOsc, try:
g = SwingOSC.default;
g.boot;
GUI.swing;
y = ProxyMonitorGui(~test);