cmake build system: visiblity support for clang
[supercollider.git] / Help / Libraries / JITLib / GUI / ProxyMonitorGui.html
blob628fbcb07dbe9b33bbd924ac0377367478971b04
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <meta http-equiv="Content-Style-Type" content="text/css">
6 <title></title>
7 <meta name="Generator" content="Cocoa HTML Writer">
8 <meta name="CocoaVersion" content="949.43">
9 <style type="text/css">
10 p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Helvetica}
11 p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco; min-height: 12.0px}
12 p.p3 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica}
13 p.p4 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco}
14 p.p5 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco; color: #001db9}
15 p.p6 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco; color: #961e1e}
16 p.p7 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco; color: #606060}
17 p.p8 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco; color: #001db9; min-height: 12.0px}
18 span.s1 {color: #001db9}
19 span.s2 {color: #000000}
20 span.s3 {color: #961e1e}
21 span.s4 {color: #606060}
22 span.Apple-tab-span {white-space:pre}
23 </style>
24 </head>
25 <body>
26 <p class="p1"><b>ProxyMonitorGui<span class="Apple-converted-space"> </span></b></p>
27 <p class="p2"><br></p>
28 <p class="p3">is a GUI for controlling the top-level of a nodeproxy and its monitor.<span class="Apple-converted-space"> </span></p>
29 <p class="p3">It is e.g. used in ProxyMixer, and NodeProxyEditor, and it is cross-platform.</p>
30 <p class="p2"><br></p>
31 <p class="p2"><br></p>
32 <p class="p2"><br></p>
33 <p class="p2"><br></p>
34 <p class="p4">(</p>
35 <p class="p4"><span class="s1">Server</span>.default = s = <span class="s1">Server</span>.internal;</p>
36 <p class="p4">s.boot;</p>
37 <p class="p4">)</p>
38 <p class="p2"><br></p>
39 <p class="p3"><span class="Apple-tab-span"> </span>// make a proxy space and a test proxy</p>
40 <p class="p4">(</p>
41 <p class="p4">s.scope(8);</p>
42 <p class="p4">p = <span class="s1">ProxySpace</span>.push;</p>
43 <p class="p2"><br></p>
44 <p class="p5"><span class="s2">~test = { </span>|freq=1000, dens=5, amp=1, lev=3|<span class="s2"><span class="Apple-converted-space"> </span></span></p>
45 <p class="p4"><span class="Apple-tab-span"> </span><span class="s1">var</span> freqline = { exprand(0.3, 3) } ! 3 * <span class="s1">XLine</span>.kr(0.125, 1, 2);</p>
46 <p class="p4"><span class="Apple-tab-span"> </span><span class="s1">Ringz</span>.ar(<span class="s1">Dust</span>.ar(dens ! 3, dens.reciprocal.sqrt), freq * freqline, 0.1)<span class="Apple-converted-space"> </span></p>
47 <p class="p4">};</p>
48 <p class="p4">~test.playN(0, vol: 0.1);</p>
49 <p class="p4">)</p>
50 <p class="p2"><br></p>
51 <p class="p3"><span class="Apple-tab-span"> </span>// make a ProxyMonitorGui</p>
52 <p class="p5"><span class="s2">z = </span>ProxyMonitorGui<span class="s2">();</span></p>
53 <p class="p2"><br></p>
54 <p class="p6"><span class="s2"><span class="Apple-tab-span"> </span></span>// switching between proxies: drag-view displays proxy key<span class="Apple-converted-space"> </span></p>
55 <p class="p6"><span class="s2">z.proxy = ~otto12345;<span class="Apple-tab-span"> </span></span>// up to 9 letters or so on OSX</p>
56 <p class="p4">z.proxy = ~test;<span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>// make audio controls available if proy is audio</p>
57 <p class="p4">z.proxy = <span class="s1">nil</span>;<span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></p>
58 <p class="p4">z.proxy = ~otto; ~otto.kr;<span class="Apple-tab-span"> </span><span class="s3">//<span class="Apple-converted-space"> </span></span></p>
59 <p class="p4">z.proxy = ~test;<span class="Apple-tab-span"> </span></p>
60 <p class="p2"><br></p>
61 <p class="p2"><br></p>
62 <p class="p2"><br></p>
63 <p class="p3"><span class="Apple-tab-span"> </span>// configuration variants</p>
64 <p class="p2"><br></p>
65 <p class="p6"><span class="s2"><span class="Apple-tab-span"> </span></span>// pudgier</p>
66 <p class="p4"><span class="s1">ProxyMonitorGui</span>(~test, bounds: 300@30);</p>
67 <p class="p2"><br></p>
68 <p class="p6"><span class="s2"><span class="Apple-tab-span"> </span></span>// place it in an existing window:<span class="Apple-converted-space"> </span></p>
69 <p class="p7"><span class="s1">ProxyMonitorGui</span><span class="s2">(~test, </span><span class="s1">Window</span><span class="s2">(</span>"ProxyMonitor", Rect(200, 200, 400, 100)<span class="s2">).front);</span></p>
70 <p class="p2"><br></p>
71 <p class="p4"><span class="s1">ProxyMonitorGui</span>(~test, <span class="s1">Window</span>(<span class="s4">"ProxyMonitor"</span>).front, bounds: 350@40);</p>
72 <p class="p2"><br></p>
73 <p class="p4">P<span class="s1">roxyMonitorGui</span>(~test, <span class="s1">Window</span>(<span class="s4">"ProxyMonitor"</span>).front, bounds: Rect(20, 20, 360, 20));</p>
74 <p class="p2"><br></p>
75 <p class="p2"><br></p>
76 <p class="p6"><span class="s2"><span class="Apple-tab-span"> </span></span>// show level in dB - off by default</p>
77 <p class="p4"><span class="s1">ProxyMonitorGui</span>(~test, showLevel: <span class="s1">true</span>, showPlayN: <span class="s1">false</span>);</p>
78 <p class="p2"><br></p>
79 <p class="p6"><span class="s2"><span class="Apple-tab-span"> </span></span>// without multichan out button - then uses proxy.play. true = playN by default.</p>
80 <p class="p4"><span class="s1">ProxyMonitorGui</span>(~test, showPlayN: <span class="s1">false</span>);</p>
81 <p class="p2"><br></p>
82 <p class="p6"><span class="s2"><span class="Apple-tab-span"> </span></span>// show proxy name or not. on by default.</p>
83 <p class="p4"><span class="s1">ProxyMonitorGui</span>(~test, showName: <span class="s1">false</span>);</p>
84 <p class="p2"><br></p>
85 <p class="p6"><span class="s2"><span class="Apple-tab-span"> </span></span>// show proxy pause and send buttons - true by default</p>
86 <p class="p4"><span class="s1">ProxyMonitorGui</span>(~test, showPauseSend: <span class="s1">true</span>, showPlayN: <span class="s1">false</span>);</p>
87 <p class="p2"><br></p>
88 <p class="p2"><br></p>
89 <p class="p6"><span class="s2"><span class="Apple-tab-span"> </span></span>// turn off SkipJack view updates - updates are on by default.</p>
90 <p class="p4"><span class="s1">ProxyMonitorGui</span>(~test, makeWatcher: <span class="s1">false</span>);</p>
91 <p class="p2"><br></p>
92 <p class="p6"><span class="s2"><span class="Apple-tab-span"> </span></span>// minimal:</p>
93 <p class="p4"><span class="s1">ProxyMonitorGui</span>.new(~test, bounds: 300@40, showPlayN: <span class="s1">false</span>, showPauseSend: <span class="s1">false</span>);</p>
94 <p class="p2"><br></p>
95 <p class="p2"><br></p>
96 <p class="p3"><span class="Apple-tab-span"> </span>// the GUI functions:<span class="Apple-converted-space"> </span></p>
97 <p class="p8"><br></p>
98 <p class="p5">ProxyMonitorGui<span class="s2">(~test);</span></p>
99 <p class="p6"><span class="s2"><span class="Apple-tab-span"> </span></span>// left slider is vol</p>
100 <p class="p4">~test.vol_(0.1);</p>
101 <p class="p4">~test.vol_(0.25);</p>
102 <p class="p2"><span class="Apple-tab-span"> </span></p>
103 <p class="p6"><span class="s2">~test.stop;<span class="Apple-tab-span"> </span></span>// play / stop button:</p>
104 <p class="p4">~test.playN;<span class="Apple-tab-span"> </span><span class="s3">//<span class="Apple-converted-space"> </span></span></p>
105 <p class="p6"><span class="s2">~test.end;<span class="Apple-tab-span"> </span></span>// alt-stop fully ends the proxy.</p>
106 <p class="p6"><span class="s2">~test.playN(vol: 0);<span class="Apple-tab-span"> </span></span>// alt-playN starts with volume 0.</p>
107 <p class="p2"><br></p>
108 <p class="p6"><span class="s2"><span class="Apple-tab-span"> </span></span>// number box sets first output channel</p>
109 <p class="p6"><span class="s2"><span class="Apple-tab-span"> </span></span>// when you want to play out of adjacent channels.</p>
110 <p class="p4">~test.playN(0);<span class="Apple-tab-span"> </span></p>
111 <p class="p4">~test.out_(1);</p>
112 <p class="p2"><br></p>
113 <p class="p6"><span class="s2"><span class="Apple-tab-span"> </span></span>// playing out to multiple channels<span class="Apple-converted-space"> </span></p>
114 <p class="p4">~test.playN([0, 2, 5]);<span class="Apple-tab-span"> </span></p>
115 <p class="p4">~test.playN([1, 2, 5]);<span class="Apple-tab-span"> </span></p>
116 <p class="p6"><span class="s2"><span class="Apple-tab-span"> </span></span>// switches the button next to it to show a different output shape:</p>
117 <p class="p6"><span class="s2"><span class="Apple-tab-span"> </span></span>// ("-&lt;" is multiple outs, "-=" is directly adjacent outs.</p>
118 <p class="p6"><span class="s2"><span class="Apple-tab-span"> </span></span>// clicking on that button opens an editing dialog:</p>
119 <p class="p6"><span class="s2">~test.playNDialog;<span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></span>// needs testing with SwingOSC.</p>
120 <p class="p2"><br></p>
121 <p class="p4">~test.out_(0);</p>
122 <p class="p2"><br></p>
123 <p class="p6"><span class="s2"><span class="Apple-tab-span"> </span></span>// the pause button pauses and resumes</p>
124 <p class="p4">~test.pause;</p>
125 <p class="p4">~test.resume;</p>
126 <p class="p2"><br></p>
127 <p class="p6"><span class="s2"><span class="Apple-tab-span"> </span></span>// snd button re-sends proxy's sound as compiled,</p>
128 <p class="p4">~test.send;</p>
129 <p class="p6"><span class="s2"><span class="Apple-tab-span"> </span></span>// or with option-click, it rebuilds the proxy's sound function,</p>
130 <p class="p6"><span class="s2"><span class="Apple-tab-span"> </span></span>// so e.g. normal random numbers or lookups in the lang get remade.</p>
131 <p class="p4">~test.rebuild;</p>
132 <p class="p2"><br></p>
133 <p class="p2"><br></p>
134 <p class="p3">//<span class="Apple-tab-span"> </span>ProxyMonitorGui gets its look from GUI.skin, so you could customize it there,<span class="Apple-converted-space"> </span></p>
135 <p class="p3">//<span class="Apple-tab-span"> </span>or pass your own look in:<span class="Apple-converted-space"> </span></p>
136 <p class="p8"><br></p>
137 <p class="p5">ProxyMonitorGui(skin: &lt;your look here&gt;)<span class="Apple-converted-space"> </span></p>
138 <p class="p8"><br></p>
139 <p class="p2"><br></p>
140 <p class="p3">// <span class="Apple-tab-span"> </span>Quick SwingOsc tests.</p>
141 <p class="p2"><br></p>
142 <p class="p4">g = <span class="s1">SwingOSC</span>.default;<span class="Apple-converted-space"> </span></p>
143 <p class="p4">g.boot;</p>
144 <p class="p4"><span class="s1">GUI</span>.swing;</p>
145 <p class="p2"><br></p>
146 <p class="p5"><span class="s2">y = </span>ProxyMonitorGui<span class="s2">(~test);</span></p>
147 <p class="p2"><br></p>
148 <p class="p4"><span class="s1">GUI</span>.cocoa;</p>
149 <p class="p5"><span class="s2">y = </span>ProxyMonitorGui<span class="s2">(~test);</span></p>
150 <p class="p2"><br></p>
151 </body>
152 </html>