Removing an old, cherished, yet pointless caveat "This documentation is
[supercollider.git] / Help / GUI / Cocoa-GUI / SCStethoscope.html
blob616f1b6afc350b859f323e4153c96ab7071b2220
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: 12.0px Helvetica}
11 p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px}
12 p.p3 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco; min-height: 12.0px}
13 p.p4 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; color: #001ee6}
14 p.p5 {margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Helvetica}
15 p.p6 {margin: 0.0px 0.0px 0.0px 57.0px; text-indent: -57.0px; font: 9.0px Monaco; min-height: 12.0px}
16 p.p7 {margin: 0.0px 0.0px 0.0px 57.0px; text-indent: -57.0px; font: 12.0px Helvetica}
17 p.p8 {margin: 0.0px 0.0px 0.0px 57.0px; text-indent: -57.0px; font: 12.0px Helvetica; min-height: 14.0px}
18 p.p9 {margin: 0.0px 0.0px 0.0px 85.0px; text-indent: -85.0px; font: 12.0px Helvetica}
19 p.p10 {margin: 0.0px 0.0px 0.0px 57.0px; text-indent: -57.0px; font: 9.0px Monaco}
20 p.p11 {margin: 0.0px 0.0px 0.0px 57.0px; text-indent: -57.0px; font: 9.0px Monaco; color: #0922b2}
21 p.p12 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco}
22 p.p13 {margin: 0.0px 0.0px 0.0px 57.0px; text-indent: -57.0px; font: 9.0px Monaco; color: #8d261b}
23 p.p14 {margin: 0.0px 0.0px 0.0px 57.0px; text-indent: -57.0px; font: 9.0px Monaco; color: #000000}
24 p.p15 {margin: 0.0px 0.0px 0.0px 57.0px; text-indent: -57.0px; font: 9.0px Monaco; color: #bf0000}
25 p.p16 {margin: 0.0px 0.0px 0.0px 57.0px; text-indent: -57.0px; font: 14.0px Helvetica}
26 p.p17 {margin: 0.0px 0.0px 0.0px 85.0px; text-indent: -85.0px; font: 12.0px Helvetica; min-height: 14.0px}
27 p.p18 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco; color: #000000; min-height: 12.0px}
28 p.p19 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco; color: #000000}
29 p.p20 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco; color: #bf0000}
30 span.s1 {font: 18.0px Helvetica}
31 span.s2 {color: #3e54c5}
32 span.s3 {color: #2040df}
33 span.s4 {color: #000000}
34 span.s5 {text-decoration: underline}
35 span.s6 {text-decoration: underline ; color: #394eb8}
36 span.s7 {color: #62633a}
37 span.s8 {color: #0922b2}
38 span.s9 {font: 12.0px Helvetica}
39 span.s10 {color: #0000bf}
40 span.s11 {font: 14.0px Helvetica}
41 span.s12 {color: #606060}
42 span.s13 {color: #bf0000}
43 span.Apple-tab-span {white-space:pre}
44 </style>
45 </head>
46 <body>
47 <p class="p1"><span class="s1"><b>SCStethoscope<span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></b></span><b>a wrapper for a window with an SCScope an control interface</b><span class="s1"><b><span class="Apple-tab-span"> </span></b></span></p>
48 <p class="p2"><br></p>
49 <p class="p1"><b>Inherits from: </b><a href="../../Core/Object.html"><span class="s2"><b>Object</b></span></a></p>
50 <p class="p3"><br></p>
51 <p class="p1">A window containing a configurable <a href="SCScope.html"><span class="s3">SCScope</span></a> with an interface to navigate on buses.</p>
52 <p class="p2"><br></p>
53 <p class="p4"><span class="s4"><b>See also:</b> <a href="SCScope.html"><span class="s5">SCScope</span></a>, <a href="../../ServerArchitecture/Server.html"><span class="s5">Server</span></a></span><span class="s2">, <a href="../../ServerArchitecture/Bus.html"><span class="s6">Bus</span></a></span></p>
54 <p class="p2"><br></p>
55 <p class="p5"><b>Some Important Issues Regarding SCStethoscope</b></p>
56 <p class="p2"><br></p>
57 <p class="p1">the scope window can be controlled by the following keys:</p>
58 <p class="p2"><br></p>
59 <p class="p1">J<span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>one channel back</p>
60 <p class="p1">K<span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>switch rate (audio vs. control)</p>
61 <p class="p1">L<span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>one channel forward</p>
62 <p class="p2"><br></p>
63 <p class="p1">O<span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>jump to first hardware output channel and adjust numChannels to hardware</p>
64 <p class="p1">I<span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>jump to first hardware input channel and adjust numChannels to hardware</p>
65 <p class="p2"><br></p>
66 <p class="p1">space <span class="Apple-tab-span"> </span>run, if not running anyway.</p>
67 <p class="p1">. (period)<span class="Apple-tab-span"> </span>stop.</p>
68 <p class="p1">M<span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>toggle screen size</p>
69 <p class="p2"><br></p>
70 <p class="p1">+ / -<span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>zoom horizontally</p>
71 <p class="p1">* / _<span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>zoom vertically</p>
72 <p class="p1">S<span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>change style between parallel and overlay</p>
73 <p class="p2"><br></p>
74 <p class="p1">shift S <span class="Apple-tab-span"> </span>change style to lissajou (use only with fast computer and small buffer size)</p>
75 <p class="p1">shift A<span class="Apple-tab-span"> </span>allocate buffer size so it fills the screen (to next power of two) (this can be dangerous, might crash)</p>
76 <p class="p2"><br></p>
77 <p class="p5"><b>Creation</b></p>
78 <p class="p6"><br></p>
79 <p class="p7"><b><span class="Apple-tab-span"> </span>*new (server, numChannels, index, bufsize, zoom, rate, view, bufnum)</b></p>
80 <p class="p8"><b><span class="Apple-tab-span"> </span></b></p>
81 <p class="p9"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><b>server </b>- must be <a href="../../ServerArchitecture/Server.html"><span class="s2">Server</span></a>.internal.</p>
82 <p class="p9"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><b>numChannels </b>- An integer. Default value is 2..</p>
83 <p class="p9"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><b>index </b>- The offset index. An integer. Default is nil.</p>
84 <p class="p9"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><b>bufsize </b>- The size of the analysis buffer. Default value is 4096. .</p>
85 <p class="p9"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><b>zoom </b>- Horizontal maginification of the displayed wave. Default is 1.</p>
86 <p class="p9"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><b>rate </b>- <span class="s7">\audio</span> or <span class="s7">\control</span>. Default is Audio.</p>
87 <p class="p9"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><b>view </b>- The parent view of the scope. Default is nil. If nil, then it will open its own <a href="SCWindow.html"><span class="s2">SCWindow</span></a>.</p>
88 <p class="p9"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><b>bufnum </b>- The id number of the <a href="../../ServerArchitecture/Buffer.html"><span class="s2">Buffer</span></a> to analyze. Default value is nil. If nil, then a <a href="../../ServerArchitecture/Buffer.html"><span class="s2">Buffer</span></a> of size <b>bufSize</b> is allocated.</p>
89 <p class="p8"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></p>
90 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="s8">Server</span>.default = s = <span class="s8">Server</span>.internal</p>
91 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>s.boot</p>
92 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>{<span class="s8">SinOsc</span>.ar([330,440], 0, 0.4)}.play;</p>
93 <p class="p11"><span class="s4"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></span>SCStethoscope<span class="s4">(s,2);</span></p>
94 <p class="p6"><br></p>
95 <p class="p5"><b>Creation by Message .scope</b></p>
96 <p class="p2"><br></p>
97 <p class="p1"><span class="Apple-tab-span"> </span><b>aServer.scope(numChannels, index, bufsize, zoom, rate)</b></p>
98 <p class="p2"><b><span class="Apple-tab-span"> </span></b></p>
99 <p class="p1"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>Opens a scope window for the server, and stores it in the server instance var <b>scopeWindow</b></p>
100 <p class="p2"><b><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></b></p>
101 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="s8">Server</span>.default = s = <span class="s8">Server</span>.internal</p>
102 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>s.boot</p>
103 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>{<span class="s8">SinOsc</span>.ar([330,440], 0, 0.4)}.play;</p>
104 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>s.scope;</p>
105 <p class="p2"><b><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></b></p>
106 <p class="p1"><span class="Apple-tab-span"> </span><b>aBus.scope(bufsize, zoom)</b></p>
107 <p class="p2"><b><span class="Apple-tab-span"> </span></b></p>
108 <p class="p1"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>Displays a bus in scope, using the Bus's <b>numChannels</b>, <b>index</b>, and <b>rate</b> settings.</p>
109 <p class="p2"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></p>
110 <p class="p12"><span class="s9"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></span><span class="s8">Server</span>.default = s = <span class="s8">Server</span>.internal</p>
111 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>s.boot</p>
112 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>b=<span class="s8">Bus</span>.audio(s,2);</p>
113 <p class="p13"><span class="s4"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>a={</span><span class="s8">SinOsc</span><span class="s4">.ar([330,440], 0, 0.4)}.play(s,b) </span>//you won't hear this if you only have two channels</p>
114 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>b.scope</p>
115 <p class="p6"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></p>
116 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>a.free;</p>
117 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>b.free;</p>
118 <p class="p2"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></p>
119 <p class="p1"><span class="Apple-tab-span"> </span><b>aFunction.scope(numChannels, outbus, fadeTime, bufsize, zoom)</b></p>
120 <p class="p2"><b><span class="Apple-tab-span"> </span></b></p>
121 <p class="p1"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>Plays a function and shows output in scope, returns synth object, like <b>{ }.play</b></p>
122 <p class="p2"><b><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></b></p>
123 <p class="p14"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="s10">Server</span>.default = s = <span class="s10">Server</span>.internal</p>
124 <p class="p14"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>s.boot</p>
125 <p class="p14"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>a={<span class="s10">SinOsc</span>.ar([330,440], 0, 0.4)}.scope;</p>
126 <p class="p14"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>a.free;</p>
127 <p class="p6"><br></p>
128 <p class="p7"><b><span class="Apple-tab-span"> </span>*ugenScopes</b></p>
129 <p class="p8"><b><span class="Apple-tab-span"> </span></b></p>
130 <p class="p7"><b><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></b>Returns an array of the running ugen scopes.</p>
131 <p class="p8"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></p>
132 <p class="p14"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="s10">Server</span>.default = s = <span class="s10">Server</span>.internal</p>
133 <p class="p14"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>s.boot</p>
134 <p class="p14"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>{[<span class="s10">SinOsc</span>.ar.scope,<span class="s10">WhiteNoise</span>.ar(0.5).scope]*0.1}.scope(2);</p>
135 <p class="p15"><span class="s4"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></span><span class="s10">SCStethoscope</span><span class="s4">.ugenScopes; </span>// returns the ugen scopes</p>
136 <p class="p6"><br></p>
137 <p class="p16"><b>Accessing Instance and Class Variables</b></p>
138 <p class="p8"><span class="Apple-tab-span"> </span></p>
139 <p class="p7"><b><span class="Apple-tab-span"> </span>ugenScopes</b></p>
140 <p class="p8"><b><span class="Apple-tab-span"> </span></b><span class="Apple-tab-span"> </span></p>
141 <p class="p7"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>Returns an array of the running ugen scopes, just like the class method ugenSopes.</p>
142 <p class="p8"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></p>
143 <p class="p7"><b><span class="Apple-tab-span"> </span>numChannels</b></p>
144 <p class="p7"><b><span class="Apple-tab-span"> </span>numChannels_ (n)</b></p>
145 <p class="p8"><b><span class="Apple-tab-span"> </span></b></p>
146 <p class="p7"><b><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></b>Get/set the number of Channels in a scope.</p>
147 <p class="p9"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><b>n </b>- an Integer.</p>
148 <p class="p8"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></p>
149 <p class="p7"><b><span class="Apple-tab-span"> </span>rate</b></p>
150 <p class="p7"><b><span class="Apple-tab-span"> </span>rate_ (argRate)</b></p>
151 <p class="p8"><b><span class="Apple-tab-span"> </span></b></p>
152 <p class="p7"><b><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></b>Get/set the rate of a scope.</p>
153 <p class="p9"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><b>argRate </b>- \audio or \control.</p>
154 <p class="p17"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></p>
155 <p class="p7"><b><span class="Apple-tab-span"> </span>index</b></p>
156 <p class="p7"><b><span class="Apple-tab-span"> </span>index_ (val)</b></p>
157 <p class="p8"><b><span class="Apple-tab-span"> </span></b></p>
158 <p class="p7"><b><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></b>Get/set the offest index in a scope.</p>
159 <p class="p9"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><b>val </b>- and Integer.</p>
160 <p class="p8"><br></p>
161 <p class="p7"><b><span class="Apple-tab-span"> </span>size_ (val)</b></p>
162 <p class="p8"><b><span class="Apple-tab-span"> </span></b></p>
163 <p class="p7"><b><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></b>Set the width and height tof the scope window.</p>
164 <p class="p9"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><b>val </b>- An integer (the iwndow is square).</p>
165 <p class="p8"><br></p>
166 <p class="p7"><b><span class="Apple-tab-span"> </span>window</b></p>
167 <p class="p8"><b><span class="Apple-tab-span"> </span></b><span class="Apple-tab-span"> </span></p>
168 <p class="p7"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>Returns the parent <a href="SCWindow.html"><span class="s3">SCWindow</span></a> of the scope .</p>
169 <p class="p8"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></p>
170 <p class="p7"><b><span class="Apple-tab-span"> </span>bufsize</b></p>
171 <p class="p8"><b><span class="Apple-tab-span"> </span></b><span class="Apple-tab-span"> </span></p>
172 <p class="p7"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>The size of the buffer.</p>
173 <p class="p8"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></p>
174 <p class="p7"><b><span class="Apple-tab-span"> </span>server</b></p>
175 <p class="p8"><b><span class="Apple-tab-span"> </span></b><span class="Apple-tab-span"> </span></p>
176 <p class="p7"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>Returns the server of SCStethoscope</p>
177 <p class="p8"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></p>
178 <p class="p16"><b>Controlling the Scope</b></p>
179 <p class="p8"><b><span class="Apple-tab-span"> </span></b></p>
180 <p class="p7"><b><span class="Apple-tab-span"> </span>quit</b></p>
181 <p class="p6"><br></p>
182 <p class="p7"><b><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></b>Closes the window, and cleans up synths and buffer.</p>
183 <p class="p8"><br></p>
184 <p class="p7"><b><span class="Apple-tab-span"> </span>toggleSize</b></p>
185 <p class="p8"><b><span class="Apple-tab-span"> </span></b></p>
186 <p class="p7"><b><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></b>Toggle between size 500 and 212.</p>
187 <p class="p8"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></p>
188 <p class="p7"><b><span class="Apple-tab-span"> </span>zoom_ (val)</b></p>
189 <p class="p7"><b><span class="Apple-tab-span"> </span>xZoom_ (val)</b></p>
190 <p class="p8"><b><span class="Apple-tab-span"> </span></b></p>
191 <p class="p7"><b><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></b>Zoom the horizontal value by factor <b>val</b>.</p>
192 <p class="p9"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><b>val </b>- An instance of Float.</p>
193 <p class="p8"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></p>
194 <p class="p7"><b><span class="Apple-tab-span"> </span>yZoom_ (val)</b></p>
195 <p class="p8"><b><span class="Apple-tab-span"> </span></b></p>
196 <p class="p7"><b><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></b>Zoom the vertical value by factor <b>val</b>.</p>
197 <p class="p9"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><b>val </b>- An instance of Float.</p>
198 <p class="p6"><br></p>
199 <p class="p7"><b><span class="Apple-tab-span"> </span>style_ (val)</b></p>
200 <p class="p7"><b><span class="Apple-tab-span"> </span></b>.</p>
201 <p class="p9"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><b>val </b>- 1 = Separate channels, 2 = overlayed channels, 3= lissajou (use only with fast computer and small buffer size)</p>
202 <p class="p8"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></p>
203 <p class="p16"><b>Subclassing and Internal Methods</b></p>
204 <p class="p7"><span class="s11"><span class="Apple-tab-span"> </span></span>The following methods are usually not used directly or are called by a primitive. Programmers can still call or override these as needed.</p>
205 <p class="p6"><br></p>
206 <p class="p7"><b><span class="Apple-tab-span"> </span>*tileBounds</b></p>
207 <p class="p8"><b><span class="Apple-tab-span"> </span></b></p>
208 <p class="p7"><b><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></b>A utility used by Ugen : scope to tile scope windows.</p>
209 <p class="p8"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></p>
210 <p class="p7"><b><span class="Apple-tab-span"> </span>*defaultServer</b></p>
211 <p class="p8"><b><span class="Apple-tab-span"> </span></b></p>
212 <p class="p7"><b><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></b>SCStethoscope's default server.<b> </b>Returns Server.internal</p>
213 <p class="p6"><br></p>
214 <p class="p6"><br></p>
215 <p class="p7"><b><span class="Apple-tab-span"> </span>*isValidServer (aServer)</b></p>
216 <p class="p8"><b><span class="Apple-tab-span"> </span></b></p>
217 <p class="p7"><b><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></b>Tests if a server is a valid server. Returns a n instanc of Boolean;</p>
218 <p class="p9"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><b>aServer </b>- An instance of <a href="../../ServerArchitecture/Server.html"><span class="s3">Server</span></a>.</p>
219 <p class="p8"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></p>
220 <p class="p7"><b><span class="Apple-tab-span"> </span>keyDown (char)</b></p>
221 <p class="p7"><b><span class="Apple-tab-span"> </span>spec</b></p>
222 <p class="p7"><b><span class="Apple-tab-span"> </span>setProperties (numChannels, index, bufsize, zoom, rate)</b></p>
223 <p class="p7"><b><span class="Apple-tab-span"> </span>allocBuffer (argbufsize, argbufnum)</b></p>
224 <p class="p7"><b><span class="Apple-tab-span"> </span>xZoom</b></p>
225 <p class="p7"><b><span class="Apple-tab-span"> </span>yZoom</b></p>
226 <p class="p7"><b><span class="Apple-tab-span"> </span>updateColors</b></p>
227 <p class="p7"><b><span class="Apple-tab-span"> </span>switchRate</b></p>
228 <p class="p7"><b><span class="Apple-tab-span"> </span>toInputBus</b></p>
229 <p class="p7"><b><span class="Apple-tab-span"> </span>toOutputBus</b></p>
230 <p class="p7"><b><span class="Apple-tab-span"> </span>adjustBufferSize</b></p>
231 <p class="p7"><b><span class="Apple-tab-span"> </span>run</b></p>
232 <p class="p7"><b><span class="Apple-tab-span"> </span>free</b></p>
233 <p class="p6"><br></p>
234 <p class="p16"><b>Examples</b></p>
235 <p class="p3"><br></p>
236 <p class="p18"><br></p>
237 <p class="p19">(</p>
238 <p class="p19"><span class="s10">Server</span>.default = <span class="s10">Server</span>.internal;</p>
239 <p class="p19">s = <span class="s10">Server</span>.default;</p>
240 <p class="p19">s.boot;</p>
241 <p class="p19">)</p>
242 <p class="p19">(</p>
243 <p class="p19">{</p>
244 <p class="p19"><span class="Apple-tab-span"> </span><span class="s10">SinOsc</span>.ar([225, 450, 900], 0, 0.2)</p>
245 <p class="p19"><span class="Apple-tab-span"> </span>+ <span class="s10">LPF</span>.ar(</p>
246 <p class="p19"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="s10">LFPulse</span>.ar(226 * [1, 2, 5],[0,0.1,0.1],0.2, 0.2),</p>
247 <p class="p19"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="s10">MouseX</span>.kr(20, 10000, 1)</p>
248 <p class="p19"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>)</p>
249 <p class="p19">}.scope;</p>
250 <p class="p19">)</p>
251 <p class="p18"><br></p>
252 <p class="p20">// server.scope only changes the properies explicitly given:</p>
253 <p class="p18"><br></p>
254 <p class="p19">s.scope(numChannels:5);</p>
255 <p class="p19">s.scope(index:12);</p>
256 <p class="p19">s.scope(zoom:4);</p>
257 <p class="p19">s.scope(index:0);</p>
258 <p class="p18"><br></p>
259 <p class="p19">s.scopeWindow.size = 600;</p>
260 <p class="p19">s.scopeWindow.size = 222;</p>
261 <p class="p18"><br></p>
262 <p class="p20">// scoping buses:</p>
263 <p class="p18"><br></p>
264 <p class="p19">a = <span class="s10">Bus</span>.audio(s, 4);</p>
265 <p class="p19">{ <span class="s10">WhiteNoise</span>.ar(0.2.dup(4)) }.play(s, a);</p>
266 <p class="p18"><br></p>
267 <p class="p19">a.scope;</p>
268 <p class="p18"><br></p>
269 <p class="p19">c = <span class="s10">Bus</span>.control(s, 3);</p>
270 <p class="p19">{ <span class="s10">WhiteNoise</span>.kr(1.dup(4) * <span class="s10">MouseX</span>.kr) }.play(s, c);</p>
271 <p class="p18"><br></p>
272 <p class="p19">c.scope;</p>
273 <p class="p18"><br></p>
274 <p class="p20">// note that scoping control rate buses shows block size interpolation (this is due to the</p>
275 <p class="p20">// fact that ScopeOut.kr doesn't work yet.)</p>
276 <p class="p3"><br></p>
277 <p class="p1"><b>external use: you can pass your own view in to add a stethoscope to it;</b></p>
278 <p class="p3"><br></p>
279 <p class="p19">w = <span class="s10">Window</span>.new(<span class="s12">"my own scope"</span>, <span class="s10">Rect</span>(20, 20, 400, 500));</p>
280 <p class="p19">w.view.decorator = <span class="s10">FlowLayout</span>(w.view.bounds);</p>
281 <p class="p19">c = <span class="s10">Stethoscope</span>.new(s, view:w.view);</p>
282 <p class="p19">w.onClose = { c.free }; <span class="s13">// don't forget this</span></p>
283 <p class="p19">w.front;</p>
284 <p class="p18"><br></p>
285 <p class="p3"><br></p>
286 </body>
287 </html>