1 class:: ProxyMonitorGui
2 summary:: controls the top-level of a nodeproxy and its monitor
3 categories:: Libraries>JITLib>GUI
4 related:: Classes/ProxyMixer, Classes/NodeProxyEditor
8 is a GUI for controlling the top-level of a nodeproxy and its monitor. It is e.g. used in ProxyMixer, and NodeProxyEditor, and it is cross-platform.
14 Server.default = s = Server.internal;
18 // make a proxy space and a test proxy
23 ~test = { |freq=1000, dens=5, amp=1, lev=3|
24 var freqline = { exprand(0.3, 3) } ! 3 * XLine.kr(0.125, 1, 2);
25 Ringz.ar(Dust.ar(dens ! 3, dens.reciprocal.sqrt), freq * freqline, 0.1)
27 ~test.playN(0, vol: 0.1);
30 // make a ProxyMonitorGui
31 z = ProxyMonitorGui();
33 // switching between proxies: drag-view displays proxy key
34 z.proxy = ~otto12345; // up to 9 letters or so on OSX
35 z.proxy = ~test; // make audio controls available if proy is audio
37 z.proxy = ~otto; ~otto.kr; //
42 // configuration variants
45 ProxyMonitorGui(~test, bounds: 300@30);
47 // place it in an existing window:
48 ProxyMonitorGui(~test, Window("ProxyMonitor", Rect(200, 200, 400, 100)).front);
50 ProxyMonitorGui(~test, Window("ProxyMonitor").front, bounds: 350@40);
52 ProxyMonitorGui(~test, Window("ProxyMonitor").front, bounds: Rect(20, 20, 360, 20));
55 // show level in dB - off by default
56 ProxyMonitorGui(~test, showLevel: true, showPlayN: false);
58 // without multichan out button - then uses proxy.play. true = playN by default.
59 ProxyMonitorGui(~test, showPlayN: false);
61 // show proxy name or not. on by default.
62 ProxyMonitorGui(~test, showName: false);
64 // show proxy pause and send buttons - true by default
65 ProxyMonitorGui(~test, showPauseSend: true, showPlayN: false);
68 // turn off SkipJack view updates - updates are on by default.
69 ProxyMonitorGui(~test, makeWatcher: false);
72 ProxyMonitorGui.new(~test, bounds: 300@40, showPlayN: false, showPauseSend: false);
77 ProxyMonitorGui(~test);
82 ~test.stop; // play / stop button:
84 ~test.end; // alt-stop fully ends the proxy.
85 ~test.playN(vol: 0); // alt-playN starts with volume 0.
87 // number box sets first output channel
88 // when you want to play out of adjacent channels.
92 // playing out to multiple channels
93 ~test.playN([0, 2, 5]);
94 ~test.playN([1, 2, 5]);
95 // switches the button next to it to show a different output shape:
96 // ("-<" is multiple outs, "-=" is directly adjacent outs.
97 // clicking on that button opens an editing dialog:
98 ~test.playNDialog; // needs testing with SwingOSC.
102 // the pause button pauses and resumes
106 // snd button re-sends proxy's sound as compiled,
108 // or with option-click, it rebuilds the proxy's sound function,
109 // so e.g. normal random numbers or lookups in the lang get remade.
113 // ProxyMonitorGui gets its look from GUI.skin, so you could customize it there,
114 // or pass your own look in:
116 ProxyMonitorGui(skin: <your look here>)
119 // Quick SwingOsc tests.
121 g = SwingOSC.default;
125 y = ProxyMonitorGui(~test);
128 y = ProxyMonitorGui(~test);