supernova: fix boost.thread move semantics
[supercollider.git] / Help / GUI / GUI-Tools / Plotter.html
blob29ba907a556dd8f6ac16d6c1c855f157036521c4
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="1038.29">
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: 14.0px Helvetica}
14 p.p5 {margin: 0.0px 0.0px 0.0px 57.0px; text-indent: -57.0px; font: 9.0px Monaco; min-height: 12.0px}
15 p.p6 {margin: 0.0px 0.0px 0.0px 57.0px; text-indent: -57.0px; font: 12.0px Helvetica}
16 p.p7 {margin: 0.0px 0.0px 0.0px 57.0px; text-indent: -57.0px; font: 12.0px Helvetica; min-height: 14.0px}
17 p.p8 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco}
18 p.p9 {margin: 0.0px 0.0px 0.0px 57.0px; text-indent: -57.0px; font: 9.0px Monaco; color: #cd1612}
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: #737373}
21 p.p12 {margin: 0.0px 0.0px 0.0px 57.0px; text-indent: -57.0px; font: 14.0px Helvetica}
22 p.p13 {margin: 0.0px 0.0px 0.0px 57.0px; text-indent: -57.0px; font: 14.0px Helvetica; min-height: 17.0px}
23 p.p14 {margin: 0.0px 0.0px 0.0px 57.0px; text-indent: -57.0px; font: 9.0px Monaco; color: #00831b}
24 p.p15 {margin: 0.0px 0.0px 0.0px 57.0px; text-indent: -57.0px; font: 9.0px Monaco; color: #0b28c6}
25 p.p16 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco; color: #cd1612}
26 p.p17 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco; color: #737373}
27 span.s1 {font: 18.0px Helvetica}
28 span.s2 {color: #0000bf}
29 span.s3 {color: #1135f9}
30 span.s4 {font: 9.0px Monaco}
31 span.s5 {color: #0b28c5}
32 span.s6 {color: #737373}
33 span.s7 {font: 12.0px Helvetica; color: #000000}
34 span.s8 {color: #000000}
35 span.s9 {color: #0b28c6}
36 span.s10 {font: 12.0px Helvetica}
37 span.s11 {color: #3300d3}
38 span.s12 {color: #00831b}
39 span.s13 {color: #cd1612}
40 span.s14 {color: #00831c}
41 span.Apple-tab-span {white-space:pre}
42 </style>
43 </head>
44 <body>
45 <p class="p1"><span class="s1"><b>Plotter<span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></b></span><b>plot numerical data on a window or view</b><span class="s1"><b><span class="Apple-tab-span"> </span></b></span></p>
46 <p class="p2"><br></p>
47 <p class="p1"><b>Inherits from: </b><a href="../../Core/Object.html"><span class="s2"><b>Object</b></span></a></p>
48 <p class="p3"><br></p>
49 <p class="p1">Plot data of up to three dimensions on a <a href="../Main-GUI/Window.html"><span class="s3">Window</span></a> or <a href="../Main-GUI/UserView.html"><span class="s3">UserView</span></a>.</p>
50 <p class="p2"><br></p>
51 <p class="p1"><b>See also:</b> plot.</p>
52 <p class="p2"><br></p>
53 <p class="p2"><br></p>
54 <p class="p4"><b>Creation / Class Methods</b></p>
55 <p class="p5"><br></p>
56 <p class="p6"><b><span class="Apple-tab-span"> </span>*new(name, bounds, parent)</b></p>
57 <p class="p6"><b><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>name</b> - Plot window title.</p>
58 <p class="p6"><b><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>parent</b> - Either a <a href="../Main-GUI/Window.html"><span class="s3">Window</span></a>/<a href="../Main-GUI/View.html"><span class="s3">View</span></a> may be passed in - then the plot is embedded. Otherwise a new Window is created.</p>
59 <p class="p6"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><b>bounds</b> - the window bounds (a <a href="../../Geometry/Rect.html"><span class="s3">Rect</span></a>)</p>
60 <p class="p7"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></p>
61 <p class="p6"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="s4">(</span></p>
62 <p class="p8"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>a = <span class="s5">Plotter</span>(<span class="s6">"the plot"</span>, <span class="s5">Rect</span>(600, 30, 800, 250));</p>
63 <p class="p8"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>a.value = (0..1000).normalize(0, 14pi).curdle(0.01).scramble.flat.sin;</p>
64 <p class="p8"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>)</p>
65 <p class="p7"><br></p>
66 <p class="p7"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></p>
67 <p class="p7"><b><span class="Apple-tab-span"> </span></b></p>
68 <p class="p6"><b><span class="Apple-tab-span"> </span></b>something.<b>plot2(args)</b></p>
69 <p class="p7"><b><span class="Apple-tab-span"> </span></b></p>
70 <p class="p9"><span class="s7"><b><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></b></span>// plot array</p>
71 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>[1, 6, 2, -5, 2].plot2;</p>
72 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>(0..100).normalize(0, 8pi).sin.plot2;</p>
73 <p class="p9"><span class="s8"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></span>// nested arrays</p>
74 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>{ (0..100).normalize(0, 15.0.rand).sin }.dup(3).plot2;</p>
75 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>{ { (0..17).normalize(0, 15.0.rand).sin }.dup(4) }.dup(3).plot2;</p>
76 <p class="p9"><span class="s8"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></span>// UGen functions</p>
77 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>{ <span class="s9">SinOsc</span>.ar([700, 357]) * <span class="s9">SinOsc</span>.ar([400, 476]) * 0.2 }.plot2;</p>
78 <p class="p9"><span class="s8"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></span>// Buffer</p>
79 <p class="p11"><span class="s8"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></span><span class="s9">Buffer</span><span class="s8">.read(s, </span>"sounds/SinedPink.aiff"<span class="s8">).plot2;</span></p>
80 <p class="p9"><span class="s8"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></span>// Env</p>
81 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="s9">Env</span>.perc(0.4, 0.6).plot2;</p>
82 <p class="p5"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></p>
83 <p class="p6"><span class="s4"><span class="Apple-tab-span"> </span></span>something.<b>plotGraph2(n,from,to,...)</b></p>
84 <p class="p7"><b><span class="Apple-tab-span"> </span></b></p>
85 <p class="p10"><span class="s10"><b><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></b></span>{ <span class="s11">|x|</span> sin(x) }.plotGraph2(300,0,2*pi);</p>
86 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>{ <span class="s11">|x|</span> sin(1/x)*x }.plotGraph2(from:0.0001,to:0.2);<span class="Apple-tab-span"> </span></p>
87 <p class="p5"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></p>
88 <p class="p7"><br></p>
89 <p class="p12"><b>Keyboard shortcuts</b></p>
90 <p class="p13"><br></p>
91 <p class="p6">When the plotter window has focus, the following keyboard shortcuts can be used to change the display:</p>
92 <p class="p7"><span class="Apple-tab-span"> </span></p>
93 <p class="p6"><b><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>+ / -<span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>vertical zoom</b></p>
94 <p class="p6"><b><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>=<span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>compare plot channels</b></p>
95 <p class="p6"><b><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>n<span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>toggle normalize display (0..1) / (-1..1), or fit range</b></p>
96 <p class="p6"><b><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>s<span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>toggle superposition<span class="Apple-converted-space">  </span></b>(see: superpose)</p>
97 <p class="p6"><b><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>m<span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>switch plot mode </b>(see: plotMode)</p>
98 <p class="p7"><b><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></b></p>
99 <p class="p6"><b><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>e<span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>toggle editing </b>(see: editMode)</p>
100 <p class="p6"><b><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>g <span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>toggle horizontal (domain) grid</b></p>
101 <p class="p6"><b><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>G <span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>toggle vertical (codomain) grid</b></p>
102 <p class="p7"><b><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></b></p>
103 <p class="p6"><b><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>ctrl-+ / -<span class="Apple-tab-span"> </span>zoom font</b></p>
104 <p class="p6"><b><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>alt-click<span class="Apple-tab-span"> </span>post value</b></p>
105 <p class="p7"><br></p>
106 <p class="p7"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><b><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></b></p>
107 <p class="p7"><br></p>
108 <p class="p12"><b>Accessing Instance and Class Variables</b></p>
109 <p class="p7"><span class="Apple-tab-span"> </span></p>
110 <p class="p6"><b><span class="Apple-tab-span"> </span>makeWindow(parent, bounds)</b></p>
111 <p class="p6"><b><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></b>Open given plotter in a new window or within a given composite view.</p>
112 <p class="p6"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><b>parent</b> - Either a <a href="../Main-GUI/Window.html"><span class="s3">Window</span></a>/<a href="../Main-GUI/View.html"><span class="s3">View</span></a> may be passed in - then the plot is embedded. Otherwise a new Window is created.</p>
113 <p class="p6"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><b>bounds</b> - the window bounds (a <a href="../../Geometry/Rect.html"><span class="s3">Rect</span></a>).</p>
114 <p class="p7"><b><span class="Apple-tab-span"> </span></b></p>
115 <p class="p6"><b><span class="Apple-tab-span"> </span>plotMode_(symbol)</b></p>
116 <p class="p6"><b><span class="Apple-tab-span"> </span>plotMode</b></p>
117 <p class="p7"><b><span class="Apple-tab-span"> </span></b><span class="Apple-tab-span"> </span></p>
118 <p class="p6"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>Set the style of data display.<span class="Apple-converted-space"> </span></p>
119 <p class="p6"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>Available modes:<span class="Apple-converted-space"> </span></p>
120 <p class="p6"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><b>\linear</b><span class="Apple-tab-span"> </span>connecting data points with linear interpolation</p>
121 <p class="p6"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><b>\points</b><span class="Apple-tab-span"> </span>draw data points only</p>
122 <p class="p6"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><b>\plines</b><span class="Apple-tab-span"> </span>combination of lines and points</p>
123 <p class="p6"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><b>\levels</b><span class="Apple-tab-span"> </span>horizontal lines</p>
124 <p class="p6"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><b>\steps</b><span class="Apple-tab-span"> </span>connecting data points with step interpolation</p>
125 <p class="p7"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></p>
126 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>a = (0..20).scramble.plot2;</p>
127 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>a.plotMode = <span class="s12">\points</span>; a.refresh;</p>
128 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>a.plotMode = <span class="s12">\plines</span>; a.refresh;</p>
129 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>a.plotMode = <span class="s12">\levels</span>; a.refresh;</p>
130 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>a.plotMode = <span class="s12">\steps</span>; a.refresh;</p>
131 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>a.plotMode = <span class="s12">\linear</span>; a.refresh;</p>
132 <p class="p5"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></p>
133 <p class="p6"><span class="s4"><span class="Apple-tab-span"> </span></span><b>setProperties(...pairs)</b></p>
134 <p class="p7"><b><span class="Apple-tab-span"> </span></b><span class="Apple-tab-span"> </span></p>
135 <p class="p6"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>Set properties of all plot views. Defaults are taken from GUI.skin.at(\plot);</p>
136 <p class="p6"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>Supported properties:<span class="Apple-converted-space"> </span></p>
137 <p class="p6"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><b>font, fontColor, gridColorX, gridColorY, plotColor (an array), backgroundColor,</b></p>
138 <p class="p6"><b><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>gridLinePattern, gridLineSmoothing (bool), labelX, labelY, gridOnX (bool), gridOnY (bool)</b></p>
139 <p class="p7"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></p>
140 <p class="p6"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="s4">(</span></p>
141 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>a = { (0..30).scramble }.dup(2).plot2;</p>
142 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>a.setProperties(</p>
143 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="s12">\fontColor</span>, <span class="s9">Color</span>.red,<span class="Apple-converted-space"> </span></p>
144 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="s12">\plotColor</span>, <span class="s9">Color</span>.blue,<span class="Apple-converted-space"> </span></p>
145 <p class="p14"><span class="s8"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></span>\backgroundColor<span class="s8">, </span><span class="s9">Color</span><span class="s8">.black,</span></p>
146 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="s12">\gridColorX</span>, <span class="s9">Color</span>.white,</p>
147 <p class="p11"><span class="s8"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></span><span class="s12">\labelX</span><span class="s8">, </span>"Humidity"</p>
148 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>);<span class="Apple-converted-space"> </span></p>
149 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>a.refresh;</p>
150 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>);</p>
151 <p class="p5"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></p>
152 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="s9">GUI</span>.skin.at(<span class="s12">\plot</span>); <span class="s13">// defaults</span></p>
153 <p class="p7"><br></p>
154 <p class="p6"><b><span class="Apple-tab-span"> </span>editMode_(boolean)</b></p>
155 <p class="p6"><b><span class="Apple-tab-span"> </span>editMode</b></p>
156 <p class="p7"><b><span class="Apple-tab-span"> </span></b><span class="Apple-tab-span"> </span></p>
157 <p class="p6"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>If the edit mode is set to true, the data may be edited via cursor.</p>
158 <p class="p7"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></p>
159 <p class="p10"><span class="s10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></span>a = (0..20).plot2;</p>
160 <p class="p9"><span class="s8"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>a.editMode = </span><span class="s9">true</span><span class="s8">; </span>// now edit the data by clicking into the plot..</p>
161 <p class="p9"><span class="s8"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>a.value; </span>// the value</p>
162 <p class="p7"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></p>
163 <p class="p6"><span class="Apple-tab-span"> </span><b>resolution_(val)</b></p>
164 <p class="p6"><b><span class="Apple-tab-span"> </span>resolution</b></p>
165 <p class="p7"><b><span class="Apple-tab-span"> </span></b><span class="Apple-tab-span"> </span></p>
166 <p class="p6"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>Set the number of data points displayed maximally per pixel (default: 1)</p>
167 <p class="p7"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></p>
168 <p class="p10"><span class="s10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></span>a = (0..200).scramble.plot2;</p>
169 <p class="p9"><span class="s8"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>a.resolution = 8; a.refresh; </span>// resizing the window shows interpolation</p>
170 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>a.resolution = 1; a.refresh;</p>
171 <p class="p7"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></p>
172 <p class="p6"><span class="Apple-tab-span"> </span><b>findSpecs_(boolean)</b></p>
173 <p class="p6"><b><span class="Apple-tab-span"> </span>findSpecs</b></p>
174 <p class="p7"><b><span class="Apple-tab-span"> </span></b><span class="Apple-tab-span"> </span></p>
175 <p class="p6"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>If true (default: true), specs are derived from new data (using min and max values) automatically.</p>
176 <p class="p7"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></p>
177 <p class="p6"><span class="Apple-tab-span"> </span><b>superpose_(boolean)</b></p>
178 <p class="p6"><b><span class="Apple-tab-span"> </span>superpose</b></p>
179 <p class="p7"><b><span class="Apple-tab-span"> </span></b><span class="Apple-tab-span"> </span></p>
180 <p class="p6"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>If set to true, plotter displays channels on top of each other (keyboard shortcut: s)</p>
181 <p class="p7"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></p>
182 <p class="p10"><span class="s10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></span>a = { (0..30).scramble }.dup(2).plot2;</p>
183 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>a.superpose = <span class="s9">true</span>; a.refresh;</p>
184 <p class="p7"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></p>
185 <p class="p7"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></p>
186 <p class="p6"><b><span class="Apple-tab-span"> </span>value</b></p>
187 <p class="p6"><b><span class="Apple-tab-span"> </span>value_(array)</b></p>
188 <p class="p7"><b><span class="Apple-tab-span"> </span></b><span class="Apple-tab-span"> </span></p>
189 <p class="p6"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>Return or set the data values. Data may be numerical arrays of up to 3 dimensions.</p>
190 <p class="p7"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></p>
191 <p class="p10"><span class="s10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></span>a = [1, 4, 2, 7, 4].dup(2).plot2;</p>
192 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>a.value;</p>
193 <p class="p7"><span class="Apple-tab-span"> </span></p>
194 <p class="p6"><b><span class="Apple-tab-span"> </span>data</b></p>
195 <p class="p7"><b><span class="Apple-tab-span"> </span></b><span class="Apple-tab-span"> </span></p>
196 <p class="p6"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>Reference to the current internal data.</p>
197 <p class="p7"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></p>
198 <p class="p7"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></p>
199 <p class="p6"><b><span class="Apple-tab-span"> </span>cursorPos</b></p>
200 <p class="p7"><b><span class="Apple-tab-span"> </span></b><span class="Apple-tab-span"> </span></p>
201 <p class="p6"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>Return the last cursorPos (a <a href="../../Geometry/Point.html"><span class="s3">Point</span></a>)</p>
202 <p class="p7"><b><span class="Apple-tab-span"> </span></b></p>
203 <p class="p6"><b><span class="Apple-tab-span"> </span>plots</b></p>
204 <p class="p7"><b><span class="Apple-tab-span"> </span></b><span class="Apple-tab-span"> </span></p>
205 <p class="p6"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>Return the single subplots (a Plot).</p>
206 <p class="p7"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></p>
207 <p class="p6"><b><span class="Apple-tab-span"> </span>specs</b></p>
208 <p class="p6"><b><span class="Apple-tab-span"> </span>specs_(list)</b></p>
209 <p class="p7"><b><span class="Apple-tab-span"> </span></b><span class="Apple-tab-span"> </span></p>
210 <p class="p6"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>Set or get the spec for the y-axis (codomain).</p>
211 <p class="p7"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></p>
212 <p class="p6"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="s4">(</span></p>
213 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>a = { (40..3000).scramble }.dup(2).plot2;</p>
214 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>a.specs = \freq.asSpec; a.refresh;</p>
215 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>)</p>
216 <p class="p7"><span class="Apple-tab-span"> </span></p>
217 <p class="p6"><b><span class="Apple-tab-span"> </span>domainSpecs</b></p>
218 <p class="p6"><b><span class="Apple-tab-span"> </span>domainSpecs_(list)</b></p>
219 <p class="p7"><b><span class="Apple-tab-span"> </span></b><span class="Apple-tab-span"> </span></p>
220 <p class="p6"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>Set or get the spec for the x-axis (domain).</p>
221 <p class="p7"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></p>
222 <p class="p10"><span class="s10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></span>a = { (40..300).scramble }.dup(2).plot2;</p>
223 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>a.domainSpecs = <span class="s12">\freq</span>.asSpec; a.refresh;</p>
224 <p class="p7"><span class="Apple-tab-span"> </span></p>
225 <p class="p6"><b><span class="Apple-tab-span"> </span>editFunc</b></p>
226 <p class="p6"><b><span class="Apple-tab-span"> </span>editFunc_(func)</b></p>
227 <p class="p7"><b><span class="Apple-tab-span"> </span></b><span class="Apple-tab-span"> </span></p>
228 <p class="p6"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>Supply a function which is evaluated when editing data. The function is called with the arguments: plotter, plotIndex, index, val, x, y</p>
229 <p class="p7"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></p>
230 <p class="p6"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="s4">(</span></p>
231 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>a = { (0..10).scramble.normalize }.dup(2).plot2;</p>
232 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>a.editMode = <span class="s9">true</span>;</p>
233 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>a.editFunc = { <span class="s9">|...args|</span> args.postln };</p>
234 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>);</p>
235 <p class="p5"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></p>
236 <p class="p9"><span class="s8"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></span>// using plotter as a control interface</p>
237 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>(</p>
238 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>a = (0..10).scramble.normalize(300, 400).plot2;</p>
239 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>a.specs = <span class="s12">\freq</span>; a.plotMode = <span class="s12">\points</span>;</p>
240 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>a.editMode = <span class="s9">true</span>;</p>
241 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>x = { <span class="s9">SinOsc</span>.ar(<span class="s12">\freq</span>.kr(a.value)).mean * 0.1 }.play;</p>
242 <p class="p15"><span class="s8"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>a.editFunc = { </span>|plotter, plotIndex, i, val|</p>
243 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>x.setn(<span class="s12">\freq</span>, a.value)</p>
244 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>};</p>
245 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>a.parent.onClose = { x.release };</p>
246 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>);</p>
247 <p class="p5"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></p>
248 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>(</p>
249 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>a = { (0..10).scramble.normalize(300, 400) }.dup.plot2;</p>
250 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>a.specs = <span class="s14">\freq</span>; a.plotMode = <span class="s14">\levels</span>;</p>
251 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>a.editMode = <span class="s9">true</span>;</p>
252 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>x = {</p>
253 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>var phase = <span class="s9">SinOsc</span>.ar(<span class="s14">\rate</span>.kr(a.value[1]));</p>
254 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="s9">SinOsc</span>.ar(<span class="s14">\freq</span>.kr(a.value[0]), phase).mean * 0.1<span class="Apple-converted-space"> </span></p>
255 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>}.play;</p>
256 <p class="p15"><span class="s8"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>a.editFunc = { </span>|plotter, plotIndex, i, val|</p>
257 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>x.setn(<span class="s14">\freq</span>, a.value[0]);</p>
258 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>x.setn(<span class="s14">\rate</span>, a.value[1]);</p>
259 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>};</p>
260 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>a.parent.onClose = { x.release };</p>
261 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>);</p>
262 <p class="p7"><br></p>
263 <p class="p7"><br></p>
264 <p class="p7"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></p>
265 <p class="p7"><span class="Apple-tab-span"> </span></p>
266 <p class="p12"><b>Changing global defaults</b></p>
267 <p class="p13"><br></p>
268 <p class="p6">The default styles are kept (and may be overridden) in GUI.skin.at(\plot). See also <a href="GUI.html"><span class="s3">GUI</span></a> help.<span class="Apple-tab-span"> </span></p>
269 <p class="p7"><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>
270 <p class="p2"><br></p>
271 <p class="p16"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>// specify plot layout</p>
272 <p class="p8"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>(</p>
273 <p class="p8"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="s5">GUI</span>.skin.plot.gridLinePattern = <span class="s5">FloatArray</span>[1, 0];</p>
274 <p class="p8"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="s5">GUI</span>.skin.plot.fontColor = <span class="s5">Color</span>(0.5, 1, 0);</p>
275 <p class="p8"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="s5">GUI</span>.skin.plot.gridColorX = <span class="s5">Color</span>.yellow(0.5);</p>
276 <p class="p8"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="s5">GUI</span>.skin.plot.gridColorY = <span class="s5">Color</span>.yellow(0.5);</p>
277 <p class="p8"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="s5">GUI</span>.skin.plot.background = <span class="s5">Color</span>.black;</p>
278 <p class="p8"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="s5">GUI</span>.skin.plot.plotColor = (10..0).normalize(0.1, 1).collect { <span class="s5">|i|</span> <span class="s5">Color</span>.rand(i) };</p>
279 <p class="p8"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="s5">GUI</span>.skin.plot.labelX = <span class="s6">"X"</span>;</p>
280 <p class="p8"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="s5">GUI</span>.skin.plot.labelY = <span class="s6">"Y"</span>;</p>
281 <p class="p8"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>);</p>
282 <p class="p3"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></p>
283 <p class="p8"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>(</p>
284 <p class="p8"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>x = { <span class="s5">|i|</span> (0..60).scramble.clump(8) * (3.5 ** i) }.dup(3);</p>
285 <p class="p8"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>x.plot2(<span class="s6">"ARRAY:PLOT"</span>, <span class="s5">Rect</span>(200, 300, 600, 500));</p>
286 <p class="p8"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>)</p>
287 <p class="p2"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></p>
288 <p class="p2"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></p>
289 <p class="p8"><span class="s5"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>GUI</span>.skin.plot.put(<span class="s14">\plotColor</span>, { <span class="s5">Color</span>.rand(0.0, 0.8) } ! 8);</p>
290 <p class="p8"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>[(0..100), (20..120), (40..140)].squared.flop.bubble.plot2;</p>
291 <p class="p2"><br></p>
292 <p class="p2"><br></p>
293 <p class="p16"><span class="s7"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></span>// reset the defaults:</p>
294 <p class="p8"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="s9">Plot</span>.initClass;</p>
295 <p class="p2"><br></p>
296 <p class="p2"><br></p>
297 <p class="p2"><br></p>
298 <p class="p12"><b>More examples</b></p>
299 <p class="p3"><br></p>
300 <p class="p7"><br></p>
301 <p class="p7"><br></p>
302 <p class="p9">// embedding in another GUI</p>
303 <p class="p8">(</p>
304 <p class="p8">w = <span class="s5">Window</span>(<span class="s6">"plot panel"</span>, <span class="s5">Rect</span>(20, 30, 520, 250));</p>
305 <p class="p8"><span class="s5">Slider</span>.new(w, <span class="s5">Rect</span>(10, 10, 490, 20)).resize_(2).action_ { <span class="s5">|v|</span></p>
306 <p class="p8"><span class="Apple-tab-span"> </span>a.value = (0..(v.value * 80).asInteger).scramble;</p>
307 <p class="p8"><span class="Apple-tab-span"> </span>w.refresh;</p>
308 <p class="p8">};</p>
309 <p class="p8">z = <span class="s5">CompositeView</span>(w, <span class="s5">Rect</span>(10, 35, 490, 200)).background_(<span class="s5">Color</span>.rand(0.7)).resize_(5);</p>
310 <p class="p8">a = <span class="s5">Plotter</span>(<span class="s6">"plot"</span>, parent: z).value_([0, 1, 2, 3, 4].scramble * 100);<span class="Apple-converted-space"> </span></p>
311 <p class="p8">w.front;</p>
312 <p class="p8">)</p>
313 <p class="p3"><br></p>
314 <p class="p3"><br></p>
315 <p class="p8">(</p>
316 <p class="p8">a = <span class="s5">Plotter</span>(<span class="s6">"the plot"</span>, <span class="s5">Rect</span>(600, 30, 600, 400));</p>
317 <p class="p8">a.value = (0..100).normalize(0, 8pi).sin;</p>
318 <p class="p8">)</p>
319 <p class="p3"><br></p>
320 <p class="p8">a.value = { <span class="s5">|i|</span> (0..90) % (i + 12) + ( (0..90) % (i + 2 * 1) ) }.dup(3);</p>
321 <p class="p8">a.value = (0..12).squared;</p>
322 <p class="p8">a.plotMode = <span class="s14">\points</span>; a.refresh;</p>
323 <p class="p8">a.plotMode = <span class="s14">\levels</span>; a.refresh;</p>
324 <p class="p8">a.plotMode = <span class="s14">\plines</span>; a.refresh;</p>
325 <p class="p3"><br></p>
326 <p class="p8">a.domainSpecs = [[0, 115, <span class="s14">\lin</span>, 1]]; a.refresh;</p>
327 <p class="p3"><br></p>
328 <p class="p8">a.parent.close; <span class="s13">// close window</span></p>
329 <p class="p16"><span class="s8">a.makeWindow;<span class="Apple-tab-span"> </span></span>// open it again</p>
330 <p class="p3"><br></p>
331 <p class="p8">a.value = { (0..70).scramble }.dup(3);</p>
332 <p class="p8">a.plotMode = <span class="s14">\linear</span>; a.refresh;</p>
333 <p class="p8">a.value = { <span class="s5">|i|</span> (0..2000).normalize(0, 4pi + i).sin } ! 4; <span class="s13">// lots of values, test efficiency</span></p>
334 <p class="p8">a.value = { <span class="s5">|i|</span> (0..10000).normalize(0, 8pi + i).sin } ! 3; <span class="s13">// lots of values, test efficiency</span></p>
335 <p class="p8">a.value = { (0..140).scramble } ! 7;</p>
336 <p class="p3"><br></p>
337 <p class="p8">a.value = { <span class="s5">|i|</span> (0..90).normalize(0, 8pi + (i*2pi)).sin } ! 2 * [400, 560] + 700;</p>
338 <p class="p8">a.value = { <span class="s5">|i|</span> (<span class="s5">_</span> + 2.0.rand).dup(100).normalize(0, 8pi + i).sin } ! 2 * 400 + 700;</p>
339 <p class="p3"><br></p>
340 <p class="p3"><br></p>
341 <p class="p16">// multi channel expansion of single values</p>
342 <p class="p8">a.value = { <span class="s5">|i|</span> (<span class="s5">_</span> + 2.0.rand).dup(100).normalize(0, 8pi + i).sin *.t [1, 2, 3] } ! 2 * 400 + 700;</p>
343 <p class="p8">a.value = { <span class="s5">|i|</span> (0..10) **.t [1, 1.2, 1.3, 1.5] * (3.5 ** i) }.dup(3);</p>
344 <p class="p3"><br></p>
345 <p class="p8">a.parent.bounds = <span class="s5">Rect</span>(400, 100, 500, 700);</p>
346 <p class="p8">a.parent.bounds = <span class="s5">Rect</span>(600, 30, 500, 300);</p>
347 <p class="p3"><br></p>
348 <p class="p8">a.superpose = <span class="s5">true</span>;</p>
349 <p class="p8">a.value = { <span class="s5">|i|</span> (0..20) * (3.5 ** i) }.dup(5);</p>
350 <p class="p8">a.superpose = <span class="s5">false</span>;</p>
351 <p class="p3"><br></p>
352 <p class="p16">// specs</p>
353 <p class="p3"><br></p>
354 <p class="p8">a.value = (50..90).midicps.scramble;</p>
355 <p class="p8">a.specs = <span class="s14">\freq</span>; a.refresh;</p>
356 <p class="p8">a.value = (1..60).scramble.neg;</p>
357 <p class="p8">a.specs = <span class="s14">\db</span>; a.refresh;</p>
358 <p class="p3"><br></p>
359 <p class="p8">a.value = { <span class="s5">|i|</span> { exprand(1e3, (10 ** (i + 8))) }.dup(90) }.dup(3);</p>
360 <p class="p8">a.value = { { exprand(1e3, 1e9) }.dup(90) }.dup(3);</p>
361 <p class="p8">a.specs = [[1e3, 1e10, <span class="s14">\exp</span>], [1e3, 1e20, <span class="s14">\exp</span>], [1e3, 1e30, <span class="s14">\exp</span>]]; a.refresh;</p>
362 <p class="p8">a.domainSpecs = [[0, 5], [-8, 100], [-1, 1]]; a.refresh;</p>
363 <p class="p3"><br></p>
364 <p class="p3"><br></p>
365 <p class="p16">// Array:plot</p>
366 <p class="p8">(</p>
367 <p class="p8">a = (4 ** (-5..0)).postln.plot2;</p>
368 <p class="p8">a.specs = <span class="s14">\delay</span>; a.refresh;</p>
369 <p class="p8">a.domainSpecs = [0, 10, <span class="s14">\lin</span>, 0, 0, <span class="s6">" Kg"</span>].asSpec; a.refresh;</p>
370 <p class="p8">);</p>
371 <p class="p3"><br></p>
372 <p class="p8">a.domainSpecs = [0.1, 10, <span class="s14">\exponential</span>, 0, 0, <span class="s6">" Kg"</span>].asSpec; a.refresh;</p>
373 <p class="p8">a.domainSpecs = [-10, 10, <span class="s14">\lin</span>, 0, 0, <span class="s6">" Kg"</span>].asSpec; a.refresh;</p>
374 <p class="p3"><br></p>
375 <p class="p3"><br></p>
376 <p class="p8">a = [(0..100) * 9, (200..1300) * 2, (200..1000)/ 5].plot2;</p>
377 <p class="p8">a.superpose = <span class="s5">true</span>;</p>
378 <p class="p3"><br></p>
379 <p class="p8">a = [[0, 1.2, 1.5], [0, 1.3, 1.5, 1.6], [0, 1.5, 1.8, 2, 6]].midiratio.plot2;</p>
380 <p class="p8">a.plotMode = <span class="s14">\levels</span>; a.refresh;</p>
381 <p class="p8">a.superpose = <span class="s5">false</span>;</p>
382 <p class="p3"><br></p>
383 <p class="p3"><br></p>
384 <p class="p3"><br></p>
385 <p class="p16">// Function:plot</p>
386 <p class="p8">a = { <span class="s5">SinOsc</span>.ar([700, 357]) * <span class="s5">SinOsc</span>.ar([400, 476]) * 0.2 }.plot2;</p>
387 <p class="p8">a = { <span class="s5">SinOsc</span>.ar([700, 357] *0.02) * <span class="s5">SinOsc</span>.ar([400, 476]) * 0.3 }.plot2(0.2, minval: -1);</p>
388 <p class="p8">a = { <span class="s5">SinOsc</span>.ar(440) }.plot2(1);</p>
389 <p class="p3"><br></p>
390 <p class="p3"><br></p>
391 <p class="p16">// Env:plot</p>
392 <p class="p8"><span class="s5">Env</span>.perc(0.4, 0.6).plot2;</p>
393 <p class="p8"><span class="s5">Env</span>.new({ 1.0.rand2 }! 8, { 1.0.rand } ! 7, <span class="s14">\sin</span>).plot2;</p>
394 <p class="p3"><br></p>
395 <p class="p16">// Buffer:plot</p>
396 <p class="p17"><span class="s8">b = </span><span class="s5">Buffer</span><span class="s8">.read(s, </span>"sounds/SinedPink.aiff"<span class="s8">);</span></p>
397 <p class="p16"><span class="s8"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></span>// "sounds/SinedPink.aiff" contains SinOsc on left, PinkNoise on right</p>
398 <p class="p8">b.plot2;</p>
399 <p class="p8">b.free;</p>
400 <p class="p3"><br></p>
401 <p class="p3"><br></p>
402 <p class="p3"><br></p>
403 <p class="p3"><br></p>
404 </body>
405 </html>