1 <!DOCTYPE html PUBLIC
"-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
4 <meta http-equiv=
"Content-Type" content=
"text/html; charset=UTF-8">
5 <meta http-equiv=
"Content-Style-Type" content=
"text/css">
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: #0000bf}
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: 14.0px Helvetica
}
20 p
.p11
{margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco
}
21 p
.p12
{margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco
; color: #bf0000}
22 p
.p13
{margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco
; color: #606060}
23 p
.p14
{margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco
; color: #0000bf}
24 span
.s1
{font: 18.0px Helvetica
}
25 span
.s2
{color: #0000bf}
26 span
.s3
{color: #000000}
27 span
.s4
{text-decoration: underline
}
28 span
.s5
{color: #0000bf}
29 span
.s6
{color: #0000bf}
30 span
.s7
{color: #0000bf}
31 span
.s8
{color: #606060}
32 span
.s9
{color: #007300}
33 span
.Apple-tab-span
{white-space:pre
}
37 <p class=
"p1"><span class=
"s1"><b>SCTabletView
<span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></b></span><b>a view that receives extended wacom tablet data
</b><span class=
"s1"><b><span class=
"Apple-tab-span"> </span></b></span></p>
38 <p class=
"p2"><br></p>
39 <p class=
"p1"><b>Inherits from:
</b><a href=
"../../Core/Object.html"><span class=
"s2"><b>Object
</b></span></a><b> :
</b><a href=
"SCView.html"><span class=
"s2"><b>SCView
</b></span></a></p>
40 <p class=
"p3"><br></p>
41 <p class=
"p1">An otherwise featureless view that receives extended wacom tablet data. It can also be used with a normal mouse but with less resolution.
</p>
42 <p class=
"p2"><br></p>
43 <p class=
"p4"><span class=
"s3"><b>See also:
</b> <a href=
"SC2DTabletSlider.html"><span class=
"s4">SC2DTabletSlider
</span></a></span></p>
44 <p class=
"p2"><br></p>
45 <p class=
"p5"><b>Some Important Issues Concerning SCTabletView
</b></p>
46 <p class=
"p2"><br></p>
47 <p class=
"p1">Drag and drop returns and accepts a
<a href=
"../../Geometry/Point.html"><span class=
"s5">Point
</span></a>.
</p>
48 <p class=
"p2"><br></p>
49 <p class=
"p5"><b>Creation / Class Methods
</b></p>
50 <p class=
"p6"><br></p>
51 <p class=
"p7"><b><span class=
"Apple-tab-span"> </span>*new (parent, bounds)
</b></p>
52 <p class=
"p8"><b><span class=
"Apple-tab-span"> </span></b></p>
53 <p class=
"p9"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><b>parent
</b>- The parent view.
</p>
54 <p class=
"p9"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><b>bounds
</b>- An instance of
<a href=
"../../Geometry/Rect.html"><span class=
"s6">Rect
</span></a>, or a
<a href=
"../../Geometry/Point.html"><span class=
"s6">Point
</span></a> indicating width@height.
</p>
55 <p class=
"p6"><br></p>
56 <p class=
"p10"><b>Accessing Instance and Class Variables
</b></p>
57 <p class=
"p8"><span class=
"Apple-tab-span"> </span></p>
58 <p class=
"p7"><b><span class=
"Apple-tab-span"> </span>mouseDown (x, y, pressure, tiltx, tilty, deviceID, buttonNumber, clickCount, absoluteZ, rotation)
</b></p>
59 <p class=
"p7"><b><span class=
"Apple-tab-span"> </span>mouseUp (x, y, pressure, tiltx, tilty, deviceID, buttonNumber, clickCount, absoluteZ, rotation)
</b></p>
60 <p class=
"p7"><b><span class=
"Apple-tab-span"> </span>doAction (x, y, pressure, tiltx, tilty, deviceID, buttonNumber, clickCount, absoluteZ, rotation)
</b></p>
61 <p class=
"p8"><b><span class=
"Apple-tab-span"> </span></b></p>
62 <p class=
"p1"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>Each of the three actions are passed the following wacom tablet values:
</p>
63 <p class=
"p1"><b><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>view -
</b>the view
</p>
64 <p class=
"p1"><span class=
"Apple-tab-span"> </span><b><span class=
"Apple-tab-span"> </span>x -
</b>subpixel location in view
</p>
65 <p class=
"p1"><span class=
"Apple-tab-span"> </span><b><span class=
"Apple-tab-span"> </span>y -
</b>subpixel location in view
</p>
66 <p class=
"p1"><span class=
"Apple-tab-span"> </span><b><span class=
"Apple-tab-span"> </span>pressure -
</b>0.
.1</p>
67 <p class=
"p1"><span class=
"Apple-tab-span"> </span><b><span class=
"Apple-tab-span"> </span>tiltX :
</b>-
1 (max. left) ... +
1 (max. right)
</p>
68 <p class=
"p1"><span class=
"Apple-tab-span"> </span><b><span class=
"Apple-tab-span"> </span>tiltY :
</b>-
1 (max. down) ... +
1 (max. up)
</p>
69 <p class=
"p1"><span class=
"Apple-tab-span"> </span><b><span class=
"Apple-tab-span"> </span>deviceID -
</b>will be used to look up if the tip or the eraser is used
</p>
70 <p class=
"p1"><span class=
"Apple-tab-span"> </span><b><span class=
"Apple-tab-span"> </span>buttonNumber -
</b>0 left,
1 right,
2 middle wheel click
</p>
71 <p class=
"p1"><span class=
"Apple-tab-span"> </span><b><span class=
"Apple-tab-span"> </span>clickCount -
</b>double click, triple click ...
</p>
72 <p class=
"p1"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>most relevant for the mouseDown, but still valid for the dragged and mouseUp
</p>
73 <p class=
"p1"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><b>absoluteZ
</b> - the wheel on the side of some mice
</p>
74 <p class=
"p1"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><b>rotation
</b> - in degrees, only on the
4d mice
</p>
75 <p class=
"p6"><br></p>
76 <p class=
"p6"><br></p>
77 <p class=
"p10"><b>Examples
</b></p>
78 <p class=
"p3"><span class=
"Apple-tab-span"> </span></p>
80 <p class=
"p11">w =
<span class=
"s7">Window
</span>.new;
</p>
81 <p class=
"p11">t =
<span class=
"s7">TabletView
</span>(w,
<span class=
"s7">Rect
</span>(
40,
40,
300,
300));
</p>
82 <p class=
"p11">t.background =
<span class=
"s7">Color
</span>.white;
</p>
83 <p class=
"p11">w.front;
</p>
84 <p class=
"p3"><br></p>
85 <p class=
"p11">t.mouseDownAction = {
<span class=
"s7">arg
</span> view,x,y,pressure,tiltx,tilty,deviceID, buttonNumber,clickCount,absoluteZ,rotation;
</p>
86 <p class=
"p11"><span class=
"Apple-tab-span"> </span>[
<span class=
"s8">"down"</span>,x,y,pressure,tiltx,tilty,deviceID, buttonNumber,clickCount,absoluteZ,rotation].postln;
</p>
88 <p class=
"p3"><br></p>
89 <p class=
"p11">t.action = {
<span class=
"s7">arg
</span> view,x,y,pressure,tiltx,tilty,deviceID, buttonNumber,clickCount,absoluteZ,rotation;
</p>
90 <p class=
"p11"><span class=
"Apple-tab-span"> </span>[
<span class=
"s8">"dragging"</span>, x,y,pressure,tiltx,tilty,deviceID, buttonNumber,clickCount,absoluteZ,rotation].postln;
</p>
91 <p class=
"p11"><span class=
"Apple-tab-span"> </span>t.background =
<span class=
"s7">Color
</span>(x /
300,y /
300,tiltx,pressure);
</p>
93 <p class=
"p3"><br></p>
94 <p class=
"p11">t.mouseUpAction = {
<span class=
"s7">arg
</span> view,x,y,pressure,tiltx,tilty,deviceID, buttonNumber,clickCount,absoluteZ,rotation;
</p>
95 <p class=
"p11"><span class=
"Apple-tab-span"> </span>[
<span class=
"s8">"up"</span>,x,y,pressure,tiltx,tilty,deviceID, buttonNumber,clickCount,absoluteZ,rotation].postln;
</p>
97 <p class=
"p3"><br></p>
99 <p class=
"p3"><br></p>
100 <p class=
"p12">//Assign the same function to each action
</p>
102 <p class=
"p11">w =
<span class=
"s7">Window
</span>.new;
</p>
103 <p class=
"p11">t =
<span class=
"s7">TabletView
</span>(w,
<span class=
"s7">Rect
</span>(
40,
40,
300,
300));
</p>
104 <p class=
"p11">t.background =
<span class=
"s7">Color
</span>.white;
</p>
105 <p class=
"p11">w.front;
</p>
106 <p class=
"p3"><br></p>
107 <p class=
"p11">f = {
<span class=
"s7">arg
</span> view,x,y,pressure,tiltx,tilty,deviceID, buttonNumber,clickCount;
</p>
108 <p class=
"p11"><span class=
"Apple-tab-span"> </span>[x,y,pressure,tiltx,tilty,deviceID, buttonNumber,clickCount].postln;
</p>
109 <p class=
"p11"><span class=
"Apple-tab-span"> </span>t.background =
<span class=
"s7">Color
</span>(x /
300,y /
300,tiltx,pressure);
</p>
110 <p class=
"p11">};
</p>
111 <p class=
"p3"><br></p>
112 <p class=
"p11">t.mouseDownAction = f;
</p>
113 <p class=
"p11">t.action = f;
</p>
114 <p class=
"p11">t.mouseUpAction = f;
</p>
115 <p class=
"p3"><br></p>
117 <p class=
"p3"><br></p>
118 <p class=
"p12">// sound example
</p>
119 <p class=
"p3"><br></p>
120 <p class=
"p11">s.boot
</p>
121 <p class=
"p3"><br></p>
123 <p class=
"p11"><span class=
"s7">SynthDef
</span>(
<span class=
"s8">"help-2DTabletSlider"</span>,{
<span class=
"s7">arg
</span> freq=
440,int1=
5,int2 = -
5,
</p>
124 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>ffreqInterval=
0,rq=
0.4,gate=
0.0;
</p>
125 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"s7">var
</span> p,c,d,f;
</p>
126 <p class=
"p11"><span class=
"Apple-tab-span"> </span>c=
<span class=
"s7">LFNoise1
</span>.kr(
0.1,
0.45,
0.55);
</p>
127 <p class=
"p11"><span class=
"Apple-tab-span"> </span>d=
<span class=
"s7">LFNoise1
</span>.kr(
0.1,
0.45,
0.55);
</p>
128 <p class=
"p11"><span class=
"Apple-tab-span"> </span>f=
<span class=
"s7">LFNoise1
</span>.kr(
0.1,
2);
</p>
129 <p class=
"p11"><span class=
"Apple-tab-span"> </span>p=
<span class=
"s7">Pulse
</span>.ar([ freq * int1.midiratio + f , freq, freq * int2.midiratio - f],
</p>
130 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>[c,d,c],
0.2);
</p>
131 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"s7">Out
</span>.ar(
0,
</p>
132 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"s7">RLPF
</span>.ar(
<span class=
"s7">Mix
</span>.ar(p),freq * ffreqInterval.midiratio,rq)
</p>
133 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>*
<span class=
"s7">EnvGen
</span>.kr(
<span class=
"s7">Env
</span>.adsr, gate, gate)
</p>
134 <p class=
"p11"><span class=
"Apple-tab-span"> </span>)
</p>
135 <p class=
"p11">},[
0.1,
0.1,
0.1,
0.1,
0.1,
<span class=
"s7">nil
</span>]).send(s);
</p>
137 <p class=
"p3"><br></p>
139 <p class=
"p3"><br></p>
140 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"s7">var
</span> w, v,freq,int,synth;
</p>
141 <p class=
"p13"><span class=
"s3"><span class=
"Apple-tab-span"> </span>synth =
</span><span class=
"s7">Synth
</span><span class=
"s3">(
</span>"help-2DTabletSlider"<span class=
"s3">);
</span></p>
142 <p class=
"p11"><span class=
"Apple-tab-span"> </span>w =
<span class=
"s7">Window
</span>.new.front;
</p>
143 <p class=
"p3"><br></p>
144 <p class=
"p11"><span class=
"Apple-tab-span"> </span>freq =
<span class=
"s7">ControlSpec
</span>(
100,
3000,
<span class=
"s9">\exp
</span>);
</p>
145 <p class=
"p11"><span class=
"Apple-tab-span"> </span>int =
<span class=
"s7">ControlSpec
</span>(-
48,
48,
<span class=
"s9">\linear
</span>,
1);
</p>
146 <p class=
"p3"><span class=
"Apple-tab-span"> </span></p>
147 <p class=
"p11"><span class=
"Apple-tab-span"> </span>v =
<span class=
"s7">TabletView
</span>(w,
<span class=
"s7">Rect
</span>(
10,
10,
380,
380));
</p>
148 <p class=
"p11"><span class=
"Apple-tab-span"> </span>v.background =
<span class=
"s7">Color
</span>.blue.alpha_(
0.2);
</p>
149 <p class=
"p11"><span class=
"Apple-tab-span"> </span>v.action = {
<span class=
"s7">arg
</span> view,x,y,pressure,tiltx,tilty;
</p>
150 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>synth.set(
<span class=
"Apple-tab-span"> </span></p>
151 <p class=
"p11"><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=
"s9">\int1
</span>, int.map(x),
</p>
152 <p class=
"p11"><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=
"s9">\int2
</span>, int.map(y),
</p>
153 <p class=
"p11"><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=
"s9">\ffreqInterval
</span>, int.map(pressure),
</p>
154 <p class=
"p11"><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=
"s9">\gate
</span>, pressure.postln
</p>
155 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>);
</p>
156 <p class=
"p11"><span class=
"Apple-tab-span"> </span>};
</p>
157 <p class=
"p3"><span class=
"Apple-tab-span"> </span></p>
158 <p class=
"p11"><span class=
"Apple-tab-span"> </span>v.mouseDownAction = {
<span class=
"s7">arg
</span> view,x,y,pressure;
</p>
159 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>synth.set(
</p>
160 <p class=
"p11"><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=
"s9">\freq
</span> , rrand(
30,
80).midicps,
</p>
161 <p class=
"p11"><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=
"s9">\gate
</span>, pressure.postln
</p>
162 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>)
</p>
163 <p class=
"p11"><span class=
"Apple-tab-span"> </span>};
</p>
164 <p class=
"p11"><span class=
"Apple-tab-span"> </span>v.mouseUpAction = {
<span class=
"s7">arg
</span> view,x,y,pressure;
</p>
165 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>synth.set(
<span class=
"s9">\gate
</span>,
0.postln )
</p>
166 <p class=
"p11"><span class=
"Apple-tab-span"> </span>};
</p>
167 <p class=
"p3"><span class=
"Apple-tab-span"> </span></p>
169 <p class=
"p3"><br></p>
170 <p class=
"p3"><br></p>
171 <p class=
"p3"><br></p>
172 <p class=
"p3"><span class=
"Apple-tab-span"> </span></p>
173 <p class=
"p12">//An example using crucial library
</p>
175 <p class=
"p11"><span class=
"s7">Instr
</span>([
<span class=
"s9">\minimoog
</span>,
<span class=
"s9">\loose
</span>],{
<span class=
"s7">arg
</span> freq=
440,int1=
5,int2 = -
5,
</p>
176 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>ffreqInterval=
0,rq=
0.4,gate=
0.0;
</p>
177 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"s7">var
</span> p,c,d,f;
</p>
178 <p class=
"p11"><span class=
"Apple-tab-span"> </span>c=
<span class=
"s7">LFNoise1
</span>.kr(
0.1,
0.45,
0.55);
</p>
179 <p class=
"p11"><span class=
"Apple-tab-span"> </span>d=
<span class=
"s7">LFNoise1
</span>.kr(
0.1,
0.45,
0.55);
</p>
180 <p class=
"p11"><span class=
"Apple-tab-span"> </span>f=
<span class=
"s7">LFNoise1
</span>.kr(
0.1,
2);
</p>
181 <p class=
"p11"><span class=
"Apple-tab-span"> </span>p=
<span class=
"s7">Pulse
</span>.ar([ freq * int1.midiratio + f , freq, freq * int2.midiratio - f],
</p>
182 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>[c,d,c],
0.2);
</p>
183 <p class=
"p3"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></p>
184 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"s7">RLPF
</span>.ar(
<span class=
"s7">Mix
</span>.ar(p),freq * ffreqInterval.midiratio,rq)
</p>
185 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>*
<span class=
"s7">EnvGen
</span>.kr(
<span class=
"s7">Env
</span>.adsr, gate,
<span class=
"s7">Latch
</span>.kr(gate,gate))
</p>
186 <p class=
"p3"><br></p>
187 <p class=
"p11">},#[
</p>
188 <p class=
"p14"><span class=
"s3"><span class=
"Apple-tab-span"> </span></span>nil
<span class=
"s3">,
</span></p>
189 <p class=
"p11"><span class=
"Apple-tab-span"> </span>[[-
48,
48,
<span class=
"s9">\linear
</span>,
1]],
</p>
190 <p class=
"p11"><span class=
"Apple-tab-span"> </span>[[-
48,
48,
<span class=
"s9">\linear
</span>,
1]],
</p>
191 <p class=
"p11"><span class=
"Apple-tab-span"> </span>[[-
48,
48,
<span class=
"s9">\linear
</span>,
1]]
</p>
192 <p class=
"p11">]);
</p>
193 <p class=
"p3"><br></p>
194 <p class=
"p11">p =
<span class=
"s7">Patch
</span>.new([
<span class=
"s9">'minimoog'
</span>,
<span class=
"s9">'loose'
</span> ],[
</p>
195 <p class=
"p14"><span class=
"s3"><span class=
"Apple-tab-span"> </span></span>nil
<span class=
"s3">,
</span>nil
<span class=
"s3">,
</span>nil
<span class=
"s3">,
</span>nil
<span class=
"s3">,
</span>nil
<span class=
"s3">,
</span></p>
196 <p class=
"p12"><span class=
"s3"><span class=
"Apple-tab-span"> </span></span><span class=
"s7">KrNumberEditor
</span><span class=
"s3">(
0.0,
</span><span class=
"s9">\gate
</span><span class=
"s3">)
</span>// override the default control
</p>
197 <p class=
"p11">]);
</p>
198 <p class=
"p3"><br></p>
199 <p class=
"p14">Sheet
<span class=
"s3">({
</span>arg
<span class=
"s3"> f;
</span></p>
200 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"s7">var
</span> v,freq,int;
</p>
201 <p class=
"p11"><span class=
"Apple-tab-span"> </span>freq =
<span class=
"s7">ControlSpec
</span>(
100,
3000,
<span class=
"s9">\exp
</span>);
</p>
202 <p class=
"p11"><span class=
"Apple-tab-span"> </span>int = [-
48,
48,
<span class=
"s9">\linear
</span>,
1].asSpec;
</p>
203 <p class=
"p3"><span class=
"Apple-tab-span"> </span></p>
204 <p class=
"p11"><span class=
"Apple-tab-span"> </span>p.topGui(f);
</p>
205 <p class=
"p11"><span class=
"Apple-tab-span"> </span>v =
<span class=
"s7">TabletView
</span>(f,
<span class=
"s7">Rect
</span>(
0,
0,
200,
200));
</p>
206 <p class=
"p11"><span class=
"Apple-tab-span"> </span>v.background =
<span class=
"s7">Color
</span>.white;
</p>
207 <p class=
"p11"><span class=
"Apple-tab-span"> </span>v.action = {
<span class=
"s7">arg
</span> view,x,y,pressure,tiltx,tilty;
</p>
208 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>p.args.at(
1).value_( int.map( x /
200 ) ).changed;
</p>
209 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>p.args.at(
2).value_( int.map( y /
200 ) ).changed;
</p>
210 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>p.args.at(
3).value_( int.map( pressure ) ).changed;
</p>
211 <p class=
"p11"><span class=
"Apple-tab-span"> </span>};
</p>
212 <p class=
"p11"><span class=
"Apple-tab-span"> </span>v.mouseDownAction = {
<span class=
"s7">arg
</span> view,x,y,pressure;
</p>
213 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>p.args.at(
0).value_( rrand(
30,
80).midicps ).changed;
</p>
214 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>p.args.at(
5).value_( pressure ).changed;
</p>
215 <p class=
"p11"><span class=
"Apple-tab-span"> </span>};
</p>
216 <p class=
"p11"><span class=
"Apple-tab-span"> </span>v.mouseUpAction = {
<span class=
"s7">arg
</span> view,x,y,pressure;
</p>
217 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>p.args.at(
5).value_(
0.0 ).changed;
</p>
218 <p class=
"p11"><span class=
"Apple-tab-span"> </span>};
</p>
219 <p class=
"p11">});
</p>
220 <p class=
"p3"><br></p>
222 <p class=
"p3"><br></p>