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: 14.0px Helvetica
}
14 p
.p5
{margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica
; color: #0000bf}
15 p
.p6
{margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Helvetica
; min-height: 17.0px}
16 p
.p7
{margin: 0.0px 0.0px 0.0px 57.0px; text-indent: -57.0px; font: 9.0px Monaco
; min-height: 12.0px}
17 p
.p8
{margin: 0.0px 0.0px 0.0px 57.0px; text-indent: -57.0px; font: 12.0px Helvetica
}
18 p
.p9
{margin: 0.0px 0.0px 0.0px 57.0px; text-indent: -57.0px; font: 12.0px Helvetica
; min-height: 14.0px}
19 p
.p10
{margin: 0.0px 0.0px 0.0px 85.0px; text-indent: -85.0px; font: 12.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 57.0px; text-indent: -57.0px; font: 14.0px Helvetica
}
23 p
.p14
{margin: 0.0px 0.0px 0.0px 57.0px; text-indent: -57.0px; font: 14.0px Helvetica
; min-height: 17.0px}
24 p
.p15
{margin: 0.0px 0.0px 0.0px 57.0px; text-indent: -57.0px; font: 9.0px Monaco
}
25 p
.p16
{margin: 0.0px 0.0px 0.0px 85.0px; text-indent: -85.0px; font: 12.0px Helvetica
; min-height: 14.0px}
26 span
.s1
{font: 18.0px Helvetica
}
27 span
.s2
{color: #0000bf}
28 span
.s3
{color: #000000}
29 span
.s4
{text-decoration: underline
}
30 span
.s5
{font: 11.0px Monaco
}
31 span
.s6
{color: #606060}
32 span
.s7
{color: #007300}
33 span
.Apple-tab-span
{white-space:pre
}
37 <p class=
"p1"><span class=
"s1"><b>EZRanger
<span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></b></span><b>a wrapper class for a label, a rangeslider, and numberboxes
</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=
"EZGui.html"><span class=
"s2"><b>EZGui
</b></span></a></p>
40 <p class=
"p3"><br></p>
41 <p class=
"p1">EZRanger is wrapper class which creates an (optional)
<a href=
"../Main-GUI/StaticText.html"><span class=
"s2">StaticText
</span></a>, and a
<a href=
"../Main-GUI/Slider.html"><span class=
"s2">Slider
</span></a><span class=
"s2"> </span>plus a
<a href=
"../Main-GUI/NumberBox.html"><span class=
"s2">NumberBox
</span></a>. If the parent is nil, then EZRanger will create its own window. See
<a href=
"EZGui.html"><span class=
"s2">EZGui
</span></a> more options.
<span class=
"Apple-converted-space"> </span></p>
42 <p class=
"p2"><br></p>
43 <p class=
"p4"><b>Scrolling and Arrow Keys
</b></p>
44 <p class=
"p1">EZRanger's number boxs scroll by default, using the step size of the
<a href=
"../../Control/ControlSpec.html"><span class=
"s2">ControlSpec
</span></a>. If the controlSpec's step is set to
0, or is not set, then the the stepping and scrolling will be guessed according to the
<b>minval
</b> and
<b>maxval
</b> values of the spec on creation of the view.
<span class=
"Apple-converted-space"> </span>Unlike the step variable of a regular NumberBox,
<b>controlSpec.step
</b> is also the smallest possible increment for the NumberBoxs.
<span class=
"Apple-converted-space"> </span>By default, the shift-key modifier
<span class=
"Apple-converted-space"> </span>will allow you to step by
100 x controlSpec.step , while the ctrl-key will give you
10x controlSpec.step.
<span class=
"Apple-converted-space"> </span>Since the alt-key would give you
0.1 of the minimum step, it is disabled by default, but you can change that by setting
<b>numberView.alt_step
</b> to any value you like
<b>.
</b> Accordingly you can customize the other modifiers to fit your needs.
<span class=
"Apple-converted-space"> </span>See
<a href=
"../Main-GUI/NumberBox.html"><span class=
"s2">NumberBox
</span></a> and
<a href=
"../Main-GUI/Slider.html"><span class=
"s2">Slider
</span></a>. This also effects the arrow keys for the slider.
</p>
45 <p class=
"p2"><br></p>
46 <p class=
"p5"><span class=
"s3"><b>See also:
</b> <a href=
"../Main-GUI/Slider.html"><span class=
"s4">Slider
</span></a>,
<a href=
"../Main-GUI/NumberBox.html"><span class=
"s4">NumberBox
</span></a>,
<a href=
"../Main-GUI/StaticText.html"><span class=
"s4">StaticText
</span></a>,
<a href=
"../Main-GUI/CompositeView.html"><span class=
"s4">CompositeView
</span></a>,
<a href=
"EZGui.html"><span class=
"s4">EZGui
</span></a></span></p>
47 <p class=
"p6"><br></p>
48 <p class=
"p4"><b>Creation / Class Methods
</b></p>
49 <p class=
"p7"><br></p>
50 <p class=
"p8"><b><span class=
"Apple-tab-span"> </span>*new (parent, bounds, label, controlSpec, action, initVal, initAction, labelWidth, numberWidth,unitWidth,labelHeight, layout,gap)
</b></p>
51 <p class=
"p9"><b><span class=
"Apple-tab-span"> </span></b></p>
52 <p class=
"p10"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><b>parent
</b>- The parent view or window. If the parent is nil, then EZRanger will create its own
<a href=
"../Main-GUI/Window.html"><span class=
"s2">Window
</span></a>, and place it conveniently on the screen if the bounds are a
<a href=
"../../Geometry/Point.html"><span class=
"s2">Point
</span></a>. If the bounds are a
<a href=
"../../Geometry/Rect.html"><span class=
"s2">Rect
</span></a>, then the Rect determines the window bounds.
</p>
53 <p class=
"p10"><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=
"s2">Rect
</span></a> or
<a href=
"../../Geometry/Point.html"><span class=
"s2">Point
</span></a>. Default value is
<span class=
"s5">160@
20</span>.
</p>
54 <p class=
"p10"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><b>label
</b>- The label. Default value is nil. If nil, then no StaticText is created.
<span class=
"Apple-converted-space"> </span></p>
55 <p class=
"p10"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><b>controlSpec
</b>- The
<a href=
"../../Control/ControlSpec.html"><span class=
"s2">ControlSpec
</span></a> for scaling the value.
</p>
56 <p class=
"p10"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><b>action
</b>- A
<a href=
"../../Core/Kernel/Function.html"><span class=
"s2">Function
</span></a> called when the value changes. The function is passed the EZRanger instance as its argument.
</p>
57 <p class=
"p10"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><b>initVal
</b>- An inistance of Array [lo, hi]. If nil, then it uses the ControlSpec's default value.
</p>
58 <p class=
"p10"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><b>initAction
</b>- A
<a href=
"../../Core/Boolean.html"><span class=
"s2">Boolean
</span></a> indicating whether the action function should be called when setting the initial value. The default is false.
</p>
59 <p class=
"p10"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><b>labelWidth
</b>- Number of pixels width for the label. default is
60..
</p>
60 <p class=
"p10"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><b>numberWidth
</b>- Number of pixels width for the number box. default is
45.
</p>
61 <p class=
"p10"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><b>unitWidth
</b>- Number of pixels width for the unit label. The default is
0.
<span class=
"Apple-converted-space"> </span>If
0, then no unitLabel is created
</p>
62 <p class=
"p10"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><b>labelHeight
</b>- The default is
20;
</p>
63 <p class=
"p10"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><b>layout
</b>- \vert \line2, or \horz. The default is \horz;
</p>
64 <p class=
"p10"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><b>gap
</b>- A
<a href=
"../../Geometry/Point.html"><span class=
"s2">Point
</span></a>. By default, the view tries to get its parent's gap, otherwise it defaults to
2@
2. Setting it overrides these.
</p>
65 <p class=
"p10"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><b>margin
</b>- A
<a href=
"../../Geometry/Point.html"><span class=
"s2">Point
</span></a>. This will inset the bounds occupied
<span class=
"Apple-converted-space"> </span>by the subviews of view.
</p>
66 <p class=
"p3"><br></p>
67 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>(
</p>
68 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>w=
<span class=
"s2">Window
</span>.new.front;
</p>
69 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>g=
<span class=
"s2">EZRanger
</span>(w,
400@
16,
<span class=
"s6">" test<span class="Apple-converted-space
"> </span>"</span>,
<span class=
"s7">\freq
</span>,{
<span class=
"s2">|v|
</span> v.value.postln},[
50,
2000],unitWidth:
30)
</p>
70 <p class=
"p3"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></p>
71 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>);
</p>
72 <p class=
"p3"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></p>
73 <p class=
"p3"><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>
74 <p class=
"p12"><span class=
"s3"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></span>// Simplest version, no parent view, so a window is created
</p>
75 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>(
</p>
76 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"s2">EZRanger
</span>(
<span class=
"s2">nil
</span>,
400@
16,
<span class=
"s6">" test<span class="Apple-converted-space
"> </span>"</span>,
<span class=
"s7">\freq
</span>,{
<span class=
"s2">|v|
</span> v.value.postln},[
50,
2000])
</p>
77 <p class=
"p3"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></p>
78 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>);
</p>
79 <p class=
"p2"><br></p>
80 <p class=
"p1">The contained views can be accessed via the EZRanger instance variables:
</p>
81 <p class=
"p1"><span class=
"Apple-tab-span"> </span><b>rangeSlider, hiBox,loBox, unitView,labelView
</b></p>
82 <p class=
"p2"><span class=
"Apple-tab-span"> </span></p>
83 <p class=
"p7"><br></p>
84 <p class=
"p7"><br></p>
85 <p class=
"p7"><br></p>
86 <p class=
"p13"><b>Accessing Instance and Class Variables
</b></p>
87 <p class=
"p9"><span class=
"Apple-tab-span"> </span></p>
88 <p class=
"p8"><b><span class=
"Apple-tab-span"> </span>unitView
</b></p>
89 <p class=
"p9"><b><span class=
"Apple-tab-span"> </span></b><span class=
"Apple-tab-span"> </span></p>
90 <p class=
"p8"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>The Units label. Only appears if unitWidth was set to
>0<span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></p>
91 <p class=
"p9"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></p>
92 <p class=
"p8"><b><span class=
"Apple-tab-span"> </span>controlSpec_(arg1)
</b></p>
93 <p class=
"p8"><b><span class=
"Apple-tab-span"> </span>controlSpec
</b></p>
94 <p class=
"p9"><b><span class=
"Apple-tab-span"> </span></b><span class=
"Apple-tab-span"> </span></p>
95 <p class=
"p8"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>An instance of
<a href=
"../../Control/ControlSpec.html"><span class=
"s2">ControlSpec
</span></a> for scaling the values.
</p>
96 <p class=
"p9"><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>
97 <p class=
"p8"><b><span class=
"Apple-tab-span"> </span>loBox
</b></p>
98 <p class=
"p9"><b><span class=
"Apple-tab-span"> </span></b><span class=
"Apple-tab-span"> </span></p>
99 <p class=
"p8"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>The lo value
<span class=
"Apple-converted-space"> </span><a href=
"../Main-GUI/NumberBox.html"><span class=
"s2">NumberBox
</span></a></p>
100 <p class=
"p9"><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>
101 <p class=
"p8"><b><span class=
"Apple-tab-span"> </span>action
</b></p>
102 <p class=
"p8"><b><span class=
"Apple-tab-span"> </span>action_(arg1)
</b></p>
103 <p class=
"p9"><b><span class=
"Apple-tab-span"> </span></b></p>
104 <p class=
"p8"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>A function to be evaluated when the value changes. Te first argument will be the EZRanger.
</p>
105 <p class=
"p10"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><b>arg1
</b>- An instance of
<a href=
"../../Core/Kernel/Function.html"><span class=
"s2">Function
</span></a> or
<a href=
"../../Core/Kernel/FunctionList.html"><span class=
"s2">FunctionList
</span></a>. Default value is nil.
</p>
106 <p class=
"p9"><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>
107 <p class=
"p8"><b><span class=
"Apple-tab-span"> </span>rangeSlider
</b></p>
108 <p class=
"p9"><b><span class=
"Apple-tab-span"> </span></b><span class=
"Apple-tab-span"> </span></p>
109 <p class=
"p8"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>The
<a href=
"../Main-GUI/RangeSlider.html"><span class=
"s2">RangeSlider
</span></a> View
</p>
110 <p class=
"p9"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></p>
111 <p class=
"p8"><b><span class=
"Apple-tab-span"> </span>lo
</b></p>
112 <p class=
"p8"><b><span class=
"Apple-tab-span"> </span>lo_ (val)
</b></p>
113 <p class=
"p9"><b><span class=
"Apple-tab-span"> </span></b></p>
114 <p class=
"p8"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>The low value
</p>
115 <p class=
"p9"><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>
116 <p class=
"p8"><b><span class=
"Apple-tab-span"> </span>hi
</b></p>
117 <p class=
"p8"><b><span class=
"Apple-tab-span"> </span>lo_ (val)
</b></p>
118 <p class=
"p9"><b><span class=
"Apple-tab-span"> </span></b></p>
119 <p class=
"p8"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>The high value
</p>
120 <p class=
"p9"><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><span class=
"Apple-tab-span"> </span></p>
121 <p class=
"p8"><b><span class=
"Apple-tab-span"> </span>hiBox
</b></p>
122 <p class=
"p9"><b><span class=
"Apple-tab-span"> </span></b><span class=
"Apple-tab-span"> </span></p>
123 <p class=
"p8"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>The hi value
<span class=
"Apple-converted-space"> </span><a href=
"../Main-GUI/NumberBox.html"><span class=
"s2">NumberBox
</span></a></p>
124 <p class=
"p9"><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>
125 <p class=
"p8"><b><span class=
"Apple-tab-span"> </span>round_(arg1)
</b></p>
126 <p class=
"p8"><b><span class=
"Apple-tab-span"> </span>round
</b></p>
127 <p class=
"p9"><b><span class=
"Apple-tab-span"> </span></b><span class=
"Apple-tab-span"> </span></p>
128 <p class=
"p8"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>Rounds the values in the number boxes.
</p>
129 <p class=
"p9"><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>
130 <p class=
"p9"><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>
131 <p class=
"p13"><b>Doing Some Task (optional)
</b></p>
132 <p class=
"p14"><br></p>
133 <p class=
"p7"><br></p>
134 <p class=
"p8"><b><span class=
"Apple-tab-span"> </span>doAction
</b></p>
135 <p class=
"p9"><b><span class=
"Apple-tab-span"> </span></b></p>
136 <p class=
"p8"><b><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></b>Performs the action at the current index and the global action.
</p>
137 <p class=
"p7"><br></p>
138 <p class=
"p7"><br></p>
139 <p class=
"p8"><b><span class=
"Apple-tab-span"> </span>value
</b></p>
140 <p class=
"p8"><b><span class=
"Apple-tab-span"> </span>value_ (vals)
</b></p>
141 <p class=
"p9"><b><span class=
"Apple-tab-span"> </span></b></p>
142 <p class=
"p8"><b><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></b>Gets/sets the lo and hi values.
</p>
143 <p class=
"p10"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><b>vals
</b>- An instance of
<a href=
"../../Collections/Array.html"><span class=
"s2">Array
</span></a>: [ lo, hi ]
</p>
144 <p class=
"p9"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></p>
145 <p class=
"p7"><br></p>
146 <p class=
"p8"><b><span class=
"Apple-tab-span"> </span>valueAction_ (vals)
</b></p>
147 <p class=
"p9"><b><span class=
"Apple-tab-span"> </span></b></p>
148 <p class=
"p8"><b><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></b>Sets the value and performs the action at the index value and the global action.
</p>
149 <p class=
"p10"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><b>vals
</b>- An instance of
<a href=
"../../Collections/Array.html"><span class=
"s2">Array
</span></a>: [ lo, hi ]
</p>
150 <p class=
"p7"><br></p>
152 <p class=
"p13"><b>Changing Appearance
</b></p>
153 <p class=
"p9"><br></p>
154 <p class=
"p8"><b><span class=
"Apple-tab-span"> </span>setColors(stringBackground,stringColor,sliderColor,numBackground,
</b></p>
155 <p class=
"p8"><b><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>numStringColor,numNormalColor,numTypingColor,knobColor,background)
</b></p>
156 <p class=
"p9"><b><span class=
"Apple-tab-span"> </span></b></p>
157 <p class=
"p10"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><b>stringBackground
</b>- An instance of
<a href=
"../GUI-Tools/Color.html"><span class=
"s2">Color
</span></a>. The
<b>background
</b> of the label and unit views.
</p>
158 <p class=
"p10"><b><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>stringColor
</b>- An instance of
<a href=
"../GUI-Tools/Color.html"><span class=
"s2">Color
</span></a>. The
<b>stringColor
</b> of the label and unit views.
</p>
159 <p class=
"p10"><b><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>sliderColor
</b>- An instance of
<a href=
"../GUI-Tools/Color.html"><span class=
"s2">Color
</span></a>. The slider
<b>background
</b>.
</p>
160 <p class=
"p10"><b><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>numBackground
</b>- An instance of
<a href=
"../GUI-Tools/Color.html"><span class=
"s2">Color
</span></a>. The
<b>background
</b> of the number view.
</p>
161 <p class=
"p10"><b><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>numStringColor
</b>- An instance of
<a href=
"../GUI-Tools/Color.html"><span class=
"s2">Color
</span></a>. The
<b>stringColor
</b> of the number view.
</p>
162 <p class=
"p10"><b><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>numNormalColor
</b>- An instance of
<a href=
"../GUI-Tools/Color.html"><span class=
"s2">Color
</span></a>. The
<b>normalColor
</b> of the number view.
</p>
163 <p class=
"p10"><b><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>numTypingColor
</b>- An instance of
<a href=
"../GUI-Tools/Color.html"><span class=
"s2">Color
</span></a>. The
<b>typingColor
</b> of the number view.
</p>
164 <p class=
"p10"><b><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>knobColor
</b>- An instance of
<a href=
"../GUI-Tools/Color.html"><span class=
"s2">Color
</span></a>. The
<b>knobColor
</b> of the slider view.
</p>
165 <p class=
"p10"><b><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>background
</b>- An instance of
<a href=
"../GUI-Tools/Color.html"><span class=
"s2">Color
</span></a>. The
<b>backround
</b> of the enclosing view.
</p>
166 <p class=
"p9"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></p>
167 <p class=
"p7"><br></p>
168 <p class=
"p8"><b><span class=
"Apple-tab-span"> </span>font_(font)
</b></p>
169 <p class=
"p8"><b><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></b>Set the Font used by all the views.
</p>
170 <p class=
"p10"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><b>font
</b>- An instance of
<a href=
"../Main-GUI/Font.html"><span class=
"s2">Font
</span></a>.
<span class=
"Apple-converted-space"> </span></p>
171 <p class=
"p16"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></p>
172 <p class=
"p7"><br></p>
173 <p class=
"p7"><br></p>
174 <p class=
"p13"><b>Examples
</b></p>
175 <p class=
"p14"><br></p>
176 <p class=
"p3"><br></p>
177 <p class=
"p12"><span class=
"s3">(
<span class=
"Apple-tab-span"> </span></span>// basic use
</p>
178 <p class=
"p11"><span class=
"Apple-tab-span"> </span>w=
<span class=
"s2">Window
</span>.new.front;
</p>
179 <p class=
"p11"><span class=
"Apple-tab-span"> </span>g=
<span class=
"s2">EZRanger
</span>(w,
400@
16,
<span class=
"s6">" test<span class="Apple-converted-space
"> </span>"</span>,
<span class=
"s7">\freq
</span>,{
<span class=
"s2">|v|
</span> v.value.postln},[
50,
2000],unitWidth:
30);
</p>
180 <p class=
"p11"><span class=
"Apple-tab-span"> </span>g.setColors(
<span class=
"s2">Color
</span>.grey,
<span class=
"s2">Color
</span>.white,
<span class=
"s2">Color
</span>.grey(
0.7),
<span class=
"s2">Color
</span>.grey,
<span class=
"s2">Color
</span>.white,
<span class=
"s2">Color
</span>.yellow);
</p>
181 <p class=
"p11">);
</p>
182 <p class=
"p3"><br></p>
183 <p class=
"p12">// lots of range sliders on a view
</p>
185 <p class=
"p11">w=
<span class=
"s2">Window
</span>.new.front;
</p>
186 <p class=
"p11">w.view.decorator=
<span class=
"s2">FlowLayout
</span>(w.view.bounds);
</p>
187 <p class=
"p11">w.view.decorator.gap=
1@
1;
</p>
188 <p class=
"p3"><br></p>
189 <p class=
"p11">20.do{
</p>
190 <p class=
"p11"><span class=
"Apple-tab-span"> </span>g=
<span class=
"s2">EZRanger
</span>(w,
400@
16,
<span class=
"s6">" test<span class="Apple-converted-space
"> </span>"</span>,
<span class=
"s7">\freq
</span>,{
<span class=
"s2">|v|
</span> v.value.postln},[
50.rand,
50+
20000.rand],unitWidth:
30)
</p>
191 <p class=
"p11"><span class=
"Apple-tab-span"> </span>.setColors(
<span class=
"s2">Color
</span>.grey,
<span class=
"s2">Color
</span>.white,
<span class=
"s2">Color
</span>.grey(
0.7),
<span class=
"s2">Color
</span>.grey,
<span class=
"s2">Color
</span>.white,
<span class=
"s2">Color
</span>.white,
<span class=
"s2">Color
</span>.yellow)
</p>
192 <p class=
"p11"><span class=
"Apple-tab-span"> </span>.font_(
<span class=
"s2">Font
</span>(
<span class=
"s6">"Helvetica"</span>,
11));
</p>
193 <p class=
"p3"><br></p>
194 <p class=
"p11">};
</p>
195 <p class=
"p11">);
</p>
196 <p class=
"p3"><br></p>
197 <p class=
"p11"><span class=
"s2">Window
</span>.closeAll
</p>
198 <p class=
"p3"><br></p>
199 <p class=
"p12">/////////////////////////////////////////////////////////////////
</p>
200 <p class=
"p12">////////// click these parentheses to see all features and layouts
<span class=
"Apple-converted-space"> </span></p>
201 <p class=
"p11">(
<span class=
"Apple-converted-space"> </span></p>
202 <p class=
"p3"><br></p>
203 <p class=
"p11">m=
<span class=
"s2">nil
</span>;
</p>
204 <p class=
"p12"><span class=
"s3">m=
2@
2;
</span>// comment for no margin
</p>
205 <p class=
"p3"><br></p>
206 <p class=
"p3"><br></p>
207 <p class=
"p12">/////////////////
</p>
208 <p class=
"p12">/// Layout \horz
</p>
209 <p class=
"p3"><br></p>
210 <p class=
"p12"><span class=
"s3">(
<span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></span>// all features, small font
</p>
211 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>g=
<span class=
"s2">EZRanger
</span>(
<span class=
"s2">nil
</span>,
400@
16,
<span class=
"s6">" freq<span class="Apple-converted-space
"> </span>"</span>,
<span class=
"s7">\freq
</span>,
</p>
212 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>initVal:[
100.rand,
200+
2000.rand],unitWidth:
30, numberWidth:
60,layout:
<span class=
"s7">\horz
</span>, margin:
2@
2);
</p>
213 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>g.setColors(
<span class=
"s2">Color
</span>.grey,
<span class=
"s2">Color
</span>.white,
<span class=
"s2">Color
</span>.grey(
0.7),
</p>
214 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"s2">Color
</span>.grey,
<span class=
"s2">Color
</span>.white,
<span class=
"s2">Color
</span>.yellow, background:
<span class=
"s2">Color
</span>.grey(
0.7),
<span class=
"Apple-converted-space"> </span></p>
215 <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>knobColor:
<span class=
"s2">HiliteGradient
</span>(
<span class=
"s2">Color
</span>.grey,
<span class=
"s2">Color
</span>.white));
</p>
216 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>g.window.bounds = g.window.bounds.moveBy(-
180,
50);
</p>
217 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>g.font_(
<span class=
"s2">Font
</span>(
<span class=
"s6">"Helvetica"</span>,
10));
</p>
218 <p class=
"p11">);
</p>
219 <p class=
"p3"><br></p>
220 <p class=
"p12"><span class=
"s3">(
<span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></span>// no unitView
</p>
221 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>g=
<span class=
"s2">EZRanger
</span>(
<span class=
"s2">nil
</span>,
400@
16,
<span class=
"s6">" freq<span class="Apple-converted-space
"> </span>"</span>,
<span class=
"s7">\freq
</span>,initVal:[
100.rand,
200+
2000.rand],
</p>
222 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>unitWidth:
0, numberWidth:
60,layout:
<span class=
"s7">\horz
</span>, margin:
2@
2);
</p>
223 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>g.setColors(
<span class=
"s2">Color
</span>.grey,
<span class=
"s2">Color
</span>.white,
<span class=
"s2">Color
</span>.grey(
0.7),
</p>
224 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"s2">Color
</span>.grey,
<span class=
"s2">Color
</span>.white,
<span class=
"s2">Color
</span>.yellow, background:
<span class=
"s2">Color
</span>.grey(
0.7),
<span class=
"Apple-converted-space"> </span></p>
225 <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>knobColor:
<span class=
"s2">HiliteGradient
</span>(
<span class=
"s2">Color
</span>.grey,
<span class=
"s2">Color
</span>.white));
</p>
226 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>g.window.bounds = g.window.bounds.moveBy(-
180, -
20);
</p>
227 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>g.font_(
<span class=
"s2">Font
</span>(
<span class=
"s6">"Helvetica"</span>,
10));
</p>
228 <p class=
"p11">);
</p>
229 <p class=
"p12"><span class=
"s3">(
<span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></span>// no label, so use window name as label
</p>
230 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>g=
<span class=
"s2">EZRanger
</span>(
<span class=
"s2">nil
</span>,
400@
16,
<span class=
"s2">nil
</span>,
<span class=
"s7">\freq
</span>,initVal:[
100.rand,
200+
2000.rand],
</p>
231 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>unitWidth:
0, numberWidth:
60,layout:
<span class=
"s7">\horz
</span>, margin:
2@
2);
</p>
232 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>g.setColors(
<span class=
"s2">Color
</span>.grey,
<span class=
"s2">Color
</span>.white,
<span class=
"s2">Color
</span>.grey(
0.7),
</p>
233 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"s2">Color
</span>.grey,
<span class=
"s2">Color
</span>.white,
<span class=
"s2">Color
</span>.yellow, background:
<span class=
"s2">Color
</span>.grey(
0.7),
<span class=
"Apple-converted-space"> </span></p>
234 <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>knobColor:
<span class=
"s2">HiliteGradient
</span>(
<span class=
"s2">Color
</span>.grey,
<span class=
"s2">Color
</span>.white));
</p>
235 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>g.window.bounds = g.window.bounds.moveBy(-
180, -
90);
</p>
236 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>g.window.name=
<span class=
"s6">"Freq"</span>;
</p>
237 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>g.font_(
<span class=
"s2">Font
</span>(
<span class=
"s6">"Helvetica"</span>,
10));
</p>
238 <p class=
"p11">);
</p>
239 <p class=
"p3"><br></p>
240 <p class=
"p12">/////////////////
</p>
241 <p class=
"p12">/// Layout \line2
</p>
242 <p class=
"p3"><br></p>
243 <p class=
"p12"><span class=
"s3">(
<span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></span>// all features
</p>
244 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>g=
<span class=
"s2">EZRanger
</span>(
<span class=
"s2">nil
</span>,
300@
42,
<span class=
"s6">" freq<span class="Apple-converted-space
"> </span>"</span>,
<span class=
"s7">\freq
</span>,initVal:[
100.rand,
200+
2000.rand],
</p>
245 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>unitWidth:
30, numberWidth:
60,layout:
<span class=
"s7">\line2
</span>, margin:
2@
2);
</p>
246 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>g.setColors(
<span class=
"s2">Color
</span>.grey,
<span class=
"s2">Color
</span>.white,
<span class=
"s2">Color
</span>.grey(
0.7),
</p>
247 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"s2">Color
</span>.grey,
<span class=
"s2">Color
</span>.white,
<span class=
"s2">Color
</span>.yellow, background:
<span class=
"s2">Color
</span>.grey(
0.7),
<span class=
"Apple-converted-space"> </span></p>
248 <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>knobColor:
<span class=
"s2">HiliteGradient
</span>(
<span class=
"s2">Color
</span>.grey,
<span class=
"s2">Color
</span>.white));
</p>
249 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>g.window.bounds = g.window.bounds.moveBy(-
180,-
160);
</p>
250 <p class=
"p11">);
</p>
251 <p class=
"p3"><br></p>
252 <p class=
"p12"><span class=
"s3">(
<span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></span>// no unitView, with label
</p>
253 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>g=
<span class=
"s2">EZRanger
</span>(
<span class=
"s2">nil
</span>,
300@
42,
<span class=
"s6">" freq<span class="Apple-converted-space
"> </span>"</span>,
<span class=
"s7">\freq
</span>,initVal:[
100.rand,
200+
2000.rand],
</p>
254 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>unitWidth:
0, numberWidth:
60,layout:
<span class=
"s7">\line2
</span>, margin:
2@
2);
</p>
255 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>g.setColors(
<span class=
"s2">Color
</span>.grey,
<span class=
"s2">Color
</span>.white,
<span class=
"s2">Color
</span>.grey(
0.7),
</p>
256 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"s2">Color
</span>.grey,
<span class=
"s2">Color
</span>.white,
<span class=
"s2">Color
</span>.yellow, background:
<span class=
"s2">Color
</span>.grey(
0.7),
<span class=
"Apple-converted-space"> </span></p>
257 <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>knobColor:
<span class=
"s2">HiliteGradient
</span>(
<span class=
"s2">Color
</span>.grey,
<span class=
"s2">Color
</span>.white));
</p>
258 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>g.window.bounds = g.window.bounds.moveBy(-
180,-
260);
</p>
259 <p class=
"p11">);
</p>
260 <p class=
"p3"><br></p>
261 <p class=
"p12"><span class=
"s3">(
<span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></span>// no label
</p>
262 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>g=
<span class=
"s2">EZRanger
</span>(
<span class=
"s2">nil
</span>,
300@
42,
<span class=
"s2">nil
</span>,
<span class=
"s7">\freq
</span>, initVal:[
100.rand,
200+
2000.rand],
</p>
263 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>unitWidth:
30, numberWidth:
60,layout:
<span class=
"s7">\line2
</span>, margin:
2@
2);
</p>
264 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>g.setColors(
<span class=
"s2">Color
</span>.grey,
<span class=
"s2">Color
</span>.white,
<span class=
"s2">Color
</span>.grey(
0.7),
</p>
265 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"s2">Color
</span>.grey,
<span class=
"s2">Color
</span>.white,
<span class=
"s2">Color
</span>.yellow, background:
<span class=
"s2">Color
</span>.grey(
0.7),
<span class=
"Apple-converted-space"> </span></p>
266 <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>knobColor:
<span class=
"s2">HiliteGradient
</span>(
<span class=
"s2">Color
</span>.grey,
<span class=
"s2">Color
</span>.white));
</p>
267 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>g.window.bounds = g.window.bounds.moveBy(-
180,-
360);
</p>
268 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>g.window.name=
<span class=
"s6">"Freq"</span>;
</p>
269 <p class=
"p11">);
</p>
270 <p class=
"p3"><br></p>
271 <p class=
"p12"><span class=
"s3">(
<span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></span>// no label, so use window name as label
</p>
272 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>g=
<span class=
"s2">EZRanger
</span>(
<span class=
"s2">nil
</span>,
150@
42,
<span class=
"s2">nil
</span>,
<span class=
"s7">\freq
</span>,initVal:[
100.rand,
200+
2000.rand],
</p>
273 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>unitWidth:
0, numberWidth:
60,layout:
<span class=
"s7">\line2
</span>, margin:
2@
2);
</p>
274 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>g.setColors(
<span class=
"s2">Color
</span>.grey,
<span class=
"s2">Color
</span>.white,
<span class=
"s2">Color
</span>.grey(
0.7),
</p>
275 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"s2">Color
</span>.grey,
<span class=
"s2">Color
</span>.white,
<span class=
"s2">Color
</span>.yellow, background:
<span class=
"s2">Color
</span>.grey(
0.7),
<span class=
"Apple-converted-space"> </span></p>
276 <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>knobColor:
<span class=
"s2">HiliteGradient
</span>(
<span class=
"s2">Color
</span>.grey,
<span class=
"s2">Color
</span>.white));
</p>
277 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>g.window.bounds = g.window.bounds.moveBy(-
180,-
460);
</p>
278 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>g.window.name=
<span class=
"s6">"Freq"</span>;
</p>
279 <p class=
"p11">);
</p>
280 <p class=
"p3"><br></p>
281 <p class=
"p12">/////////////////
</p>
282 <p class=
"p12">/// Layout \vert
</p>
283 <p class=
"p3"><br></p>
284 <p class=
"p12"><span class=
"s3">(
<span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></span>// all features, small font
</p>
285 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>g=
<span class=
"s2">EZRanger
</span>(
<span class=
"s2">nil
</span>,
45@
300,
<span class=
"s6">" Vol<span class="Apple-converted-space
"> </span>"</span>,
<span class=
"s7">\db
</span>.asSpec.step_(
0.01),initVal:[-
3-
15.rand,-
2.rand],
</p>
286 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>unitWidth:
30, numberWidth:
60,layout:
<span class=
"s7">\vert
</span>, margin:
2@
2);
</p>
287 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>g.setColors(
<span class=
"s2">Color
</span>.grey,
<span class=
"s2">Color
</span>.white,
<span class=
"s2">Color
</span>.grey(
0.7),
</p>
288 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"s2">Color
</span>.grey,
<span class=
"s2">Color
</span>.white,
<span class=
"s2">Color
</span>.yellow, background:
<span class=
"s2">Color
</span>.grey(
0.7),
<span class=
"Apple-converted-space"> </span></p>
289 <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>knobColor:
<span class=
"s2">HiliteGradient
</span>(
<span class=
"s2">Color
</span>.grey,
<span class=
"s2">Color
</span>.white,
<span class=
"s7">\h
</span>));
</p>
290 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>g.window.bounds = g.window.bounds.moveBy(
250,
50);
</p>
291 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>g.font_(
<span class=
"s2">Font
</span>(
<span class=
"s6">"Helvetica"</span>,
9));
</p>
292 <p class=
"p11">);
</p>
293 <p class=
"p12"><span class=
"s3">(
<span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></span>// no label, small font
</p>
294 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>g=
<span class=
"s2">EZRanger
</span>(
<span class=
"s2">nil
</span>,
45@
300,
<span class=
"s2">nil
</span>,
<span class=
"s7">\db
</span>.asSpec.step_(
0.01),initVal:[-
3-
15.rand,-
2.rand],
</p>
295 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>unitWidth:
30, numberWidth:
60,layout:
<span class=
"s7">\vert
</span>, margin:
2@
2);
</p>
296 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>g.setColors(
<span class=
"s2">Color
</span>.grey,
<span class=
"s2">Color
</span>.white,
<span class=
"s2">Color
</span>.grey(
0.7),
</p>
297 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"s2">Color
</span>.grey,
<span class=
"s2">Color
</span>.white,
<span class=
"s2">Color
</span>.yellow, background:
<span class=
"s2">Color
</span>.grey(
0.7),
<span class=
"Apple-converted-space"> </span></p>
298 <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>knobColor:
<span class=
"s2">HiliteGradient
</span>(
<span class=
"s2">Color
</span>.grey,
<span class=
"s2">Color
</span>.white,
<span class=
"s7">\h
</span>));
</p>
299 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>g.window.bounds = g.window.bounds.moveBy(
310,
50);
</p>
300 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>g.font_(
<span class=
"s2">Font
</span>(
<span class=
"s6">"Helvetica"</span>,
9));
</p>
301 <p class=
"p11">);
</p>
302 <p class=
"p12"><span class=
"s3">(
<span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></span>// no Units small font
</p>
303 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>g=
<span class=
"s2">EZRanger
</span>(
<span class=
"s2">nil
</span>,
45@
300,
<span class=
"s6">" Vol"</span>,
<span class=
"s7">\db
</span>.asSpec.step_(
0.01),initVal:[-
3-
15.rand,-
2.rand],
</p>
304 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>unitWidth:
0, numberWidth:
60,layout:
<span class=
"s7">\vert
</span>, margin:
2@
2);
</p>
305 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>g.setColors(
<span class=
"s2">Color
</span>.grey,
<span class=
"s2">Color
</span>.white,
<span class=
"s2">Color
</span>.grey(
0.7),
</p>
306 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"s2">Color
</span>.grey,
<span class=
"s2">Color
</span>.white,
<span class=
"s2">Color
</span>.yellow, background:
<span class=
"s2">Color
</span>.grey(
0.7),
<span class=
"Apple-converted-space"> </span></p>
307 <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>knobColor:
<span class=
"s2">HiliteGradient
</span>(
<span class=
"s2">Color
</span>.grey,
<span class=
"s2">Color
</span>.white,
<span class=
"s7">\h
</span>));
</p>
308 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>g.window.bounds = g.window.bounds.moveBy(
370,
50);
</p>
309 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>g.font_(
<span class=
"s2">Font
</span>(
<span class=
"s6">"Helvetica"</span>,
9));
</p>
310 <p class=
"p11">);
</p>
311 <p class=
"p12"><span class=
"s3">(
<span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></span>// no unitView, no units small font
</p>
312 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>g=
<span class=
"s2">EZRanger
</span>(
<span class=
"s2">nil
</span>,
45@
300,
<span class=
"s2">nil
</span>,
<span class=
"s7">\db
</span>.asSpec.step_(
0.01),initVal:[-
3-
15.rand,-
2.rand],
</p>
313 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>unitWidth:
0, numberWidth:
60,layout:
<span class=
"s7">\vert
</span>, margin:
2@
2);
</p>
314 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>g.setColors(
<span class=
"s2">Color
</span>.grey,
<span class=
"s2">Color
</span>.white,
<span class=
"s2">Color
</span>.grey(
0.7),
</p>
315 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"s2">Color
</span>.grey,
<span class=
"s2">Color
</span>.white,
<span class=
"s2">Color
</span>.yellow, background:
<span class=
"s2">Color
</span>.grey(
0.7),
<span class=
"Apple-converted-space"> </span></p>
316 <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>knobColor:
<span class=
"s2">HiliteGradient
</span>(
<span class=
"s2">Color
</span>.grey,
<span class=
"s2">Color
</span>.white,
<span class=
"s7">\h
</span>));
</p>
317 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>g.window.bounds = g.window.bounds.moveBy(
430,
50);
</p>
318 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>g.font_(
<span class=
"s2">Font
</span>(
<span class=
"s6">"Helvetica"</span>,
9));
</p>
319 <p class=
"p11">);
</p>
320 <p class=
"p3"><br></p>
321 <p class=
"p11">)
<span class=
"Apple-tab-span"> </span></p>
322 <p class=
"p3"><br></p>
323 <p class=
"p12">/////////////////
</p>
324 <p class=
"p3"><br></p>
325 <p class=
"p12">////Sound Example
</p>
326 <p class=
"p3"><br></p>
327 <p class=
"p3"><br></p>
328 <p class=
"p12"><span class=
"s3">(
<span class=
"Apple-tab-span"> </span></span>// example to explore a synthesis idea:
</p>
329 <p class=
"p11">p =
<span class=
"s2">ProxySpace
</span>.push(s.boot);
</p>
330 <p class=
"p3"><br></p>
331 <p class=
"p11">q = q ? ();
</p>
332 <p class=
"p11">q.freqRange = [
200,
2000];
</p>
333 <p class=
"p11">q.ampRange = [
0.1,
1];
</p>
334 <p class=
"p11">q.ringRange = [
0.1,
10];
</p>
335 <p class=
"p11">q.numRange = [
3,
30];
</p>
336 <p class=
"p3"><br></p>
337 <p class=
"p11">q.soundfunc = {
<span class=
"s2">|dens=
5|
</span></p>
338 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"s2">Splay
</span>.ar(
</p>
339 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"s2">Array
</span>.fill(exprand(q.numRange[
0], q.numRange[
1]).asInteger, {
</p>
340 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"s2">Ringz
</span>.ar(
</p>
341 <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=
"s2">Dust
</span>.ar(dens),
</p>
342 <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>exprand(q.freqRange[
0], q.freqRange[
1]),
</p>
343 <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>exprand(q.ringRange[
0], q.ringRange[
1]),
</p>
344 <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>exprand(q.ampRange[
0], q.ampRange[
1])
</p>
345 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>)
</p>
346 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>})
</p>
347 <p class=
"p11"><span class=
"Apple-tab-span"> </span>).distort
</p>
348 <p class=
"p11">};
</p>
350 <p class=
"p11">~plong.play;
</p>
351 <p class=
"p3"><br></p>
352 <p class=
"p11">~plong.fadeTime =
3;
</p>
353 <p class=
"p11">~plong = q[
<span class=
"s7">\soundfunc
</span>];
</p>
354 <p class=
"p3"><br></p>
356 <p class=
"p11">w =
<span class=
"s2">Window
</span>(
<span class=
"s6">"cow herd"</span>).front;
</p>
357 <p class=
"p11">w.view.decorator_(
<span class=
"s2">FlowLayout
</span>(w.bounds.copy.moveTo(
0,
0)));
</p>
358 <p class=
"p3"><br></p>
359 <p class=
"p11"><span class=
"s2">Spec
</span>.add(
<span class=
"s7">\ring
</span>, [
0.03,
30,
<span class=
"s7">\exp
</span>]);
</p>
360 <p class=
"p11"><span class=
"s2">Spec
</span>.add(
<span class=
"s7">\num
</span>, [
3,
30,
<span class=
"s7">\exp
</span>,
1]);
</p>
361 <p class=
"p3"><br></p>
362 <p class=
"p11"><span class=
"s2">EZRanger
</span>(w,
390@
20,
<span class=
"s6">"numRange"</span>,
<span class=
"s7">\num
</span>, {
<span class=
"s2">|sl|
</span> q.numRange = sl.value; }, labelWidth:
65)
</p>
363 <p class=
"p11"><span class=
"Apple-tab-span"> </span>.round_(
1);
</p>
364 <p class=
"p3"><br></p>
365 <p class=
"p11"><span class=
"s2">EZRanger
</span>(w,
390@
20,
<span class=
"s6">"freqRange"</span>,
<span class=
"s7">\freq
</span>, {
<span class=
"s2">|sl|
</span> q.freqRange = sl.value; }, q.freqRange, labelWidth:
65)
</p>
366 <p class=
"p11"><span class=
"Apple-tab-span"> </span>.round_(
0.1);
</p>
367 <p class=
"p11"><span class=
"s2">EZRanger
</span>(w,
390@
20,
<span class=
"s6">"ringRange"</span>,
<span class=
"s7">\ring
</span>, {
<span class=
"s2">|sl|
</span> q.ringRange = sl.value; }, q.ringRange, labelWidth:
65)
</p>
368 <p class=
"p11"><span class=
"Apple-tab-span"> </span>.round_(
0.0001);
</p>
369 <p class=
"p11"><span class=
"s2">EZRanger
</span>(w,
390@
20,
<span class=
"s6">"ampRange"</span>,
<span class=
"s7">\amp
</span>, {
<span class=
"s2">|sl|
</span> q.ampRange = sl.value; }, q.ampRange, labelWidth:
65)
</p>
370 <p class=
"p11"><span class=
"Apple-tab-span"> </span>.round_(
0.0001);
</p>
371 <p class=
"p11"><span class=
"s2">Button
</span>(w,
190@
20).states_([[
<span class=
"s7">\newSound
</span>]]).action_({~plong = q[
<span class=
"s7">\soundfunc
</span>] });
</p>