OSDN Git Service

Add files via upload
[timewavesynth/Timewave_Synthesizer.git] / timewavesynth12.scd
1 (
2 //To run the synth, click anywhere within the parenthesis above and press "ctrl - enter" or "cmd - return".
3 //A guide to using the instrument is available by clicking on the "i" button in the bottom right corner of the GUI.
4 //Several lines down, where it says "//VARIABLES YOU MAY WISH TO CHANGE", are variables that you can change for various things,
5 //including key codes for keyboard functions.
6
7 //It is recommended to reboot the interpreter in the "Language" toolbar, or by hightlighting - (thisProcess.platform.recompile);
8 //and pressing "ctrl - enter" or "cmd - return", before each server boot. Rebooting the interpreter is not needed to
9 //evaluate the code below if the server is booted.
10
11 //You can program/make a song by using the "timewavesynth12script.scd" file
12
13 //This version is slightly CPU intensive due to the amount of synths it has, so a less-powerful computer may experience trouble running it
14
15 s.options.memSize = 2097152/4;
16 MIDIIn.connectAll;
17
18 (
19 s.boot;
20 s.waitForBoot({
21         var point, w, view, view2,
22         vol = 0.02,mute1,mute2,mute3,mute4,mute5,mute6,mute7,mute8,mute9,mute10,mute11,mute12,muteall,unmuteall,
23         g1,g2,g6,g8,g33,g48,g64,g72,g88,gm,ngm1,ngm2,ngm6,set1,set2,menu1,menu2,
24         ts,sts,str,spaceb,b1,b2,b3,b4,button,button1,info,
25         n1,n2,n3,n4,n5,n6,n7,n8,keycodeb,
26         f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12;
27
28
29         //VARIABLES YOU MAY WISH TO CHANGE
30
31
32         //note A tuning frequency in hz
33
34         ~tuning_frequency = 432; //default 432 hz
35
36         ~freqmap = (i = ~tuning_frequency / (2 ** (69 / 12)); a = (-1); b = (-1); Array.fill(128, {i * (2 ** (((a=a+1) / 12).trunc)) * ( (2 ** (12.reciprocal)) ** ((b=b+1)  % 12));}));/*~freqmap = (i = 8.0271480262684/*-0.0000000000024*/; ~stepratio = 1.0594630943593; Array.fill(128, { i = i*~stepratio;}));*/
37
38
39         //number of KW(King Wen) sequences in a timewave half-cycle (or amplitude x2)
40
41         ~synthdefnum = 12; //default 12
42
43
44         //timewave starting base (lowest) frequency
45
46         ~base_frequency = ~freqmap.at(38); //default 38 (72.081352125182 hz), replace "~freqmap.at(#)" for custom value
47
48
49         //starting synthdef setting
50
51         if((~kws_setting == nil) or: (~ratio_setting == nil), {
52
53                 ~kws_setting = 1; //default type of King Wen sequence interpretation
54
55                 ~ratio_setting = "psine1"; //default ratio setting for synthdef
56         });
57
58
59         //low-pass filter settings
60
61         if(~low_pass_filter_on == nil, {~low_pass_filter_on = 1}); //set starting low-pass filter on/off. 1 means on - switch to 0 for off.
62
63         if(~low_pass_filter_set_value == nil, {~low_pass_filter_freq_limit = 2100; //frequency limit for low-pass filter in synthdefs. default is 2100.
64         });
65
66
67         //default sendreply toggle
68
69         if(~sendreplysynthdef_on == nil, {~sendreplysynthdef_on = 0; //switch for mid-timewave sequence events. 0 is off, 1 is on. default is 0
70         });
71         if(~sendreplyfuncswitch == nil, {~sendreplyfuncswitch = 1; //1 is random western scale note change per timewave half-cycle, 2 is eastern scale. default is 1
72         });
73
74
75         //volume
76
77         ~vol = 0.005; //default 0.005
78         12.do(x = 0; {("vol"++(x=x+1)).asSymbol.envirPut(~vol)});
79
80
81         //Key codes for keyboard functions - either unicode or keycode. To find key codes, see below:
82
83         ~rightarrow_keycode = 65363; //next note change increase
84         ~leftarrow_keycode = 65361; //next note change decrease
85         ~uparrow_keycode = 65362; //change synth up
86         ~downarrow_keycode = 65364; //change synth down
87
88         ~rightarrow_keycode1 = 114; //next note change increase (old version - may not work)
89         ~leftarrow_keycode1 = 113; //next note change decrease (old version - may not work)
90         ~uparrow_keycode1 = 111; //change synth up (old version - may not work)
91         ~downarrow_keycode1 = 116; //change synth down (old version - may not work)
92
93         ~enter_unicode = 13; //
94         ~s_unicode = 115; //start synth
95         ~m_unicode = 109; //mute/unmute all synths
96         ~r_unicode = 114; //routine/loop function
97         ~u_unicode = 117; //
98         ~t_unicode = 116; //timer function
99         ~c_unicode = 99; //copy function
100         ~i_unicode = 105; //change synth up
101         ~k_unicode = 107; //change synth down
102         ~j_unicode = 106; //next note change decrease
103         ~l_unicode = 108; //next note change increase
104         ~spacebar_unicode = 32; //pause all synths
105         ~one_unicode = 49; //choose synth 1
106         ~two_unicode = 50; //choose synth 2
107         ~three_unicode = 51; //choose synth 3
108         ~four_unicode = 52; //choose synth 4
109         ~five_unicode = 53; //choose synth 5
110         ~six_unicode = 54; //choose synth 6
111         ~seven_unicode = 55; //choose synth 7
112         ~eight_unicode = 56; //choose synth 8
113         ~nine_unicode = 57; //choose synth 9
114         ~ten_unicode = 48; //choose synth 10
115         ~eleven_unicode = 45; //choose synth 11
116         ~twelve_unicode = 61; //choose synth 12
117         ~escape_unicode = 27; //escape function
118
119
120         //To find key codes in post window... Hightlight the function and its parenthesis in red below,
121         //and press "ctrl - enter" or "cmd - return" - then a small window called "test" will pop up...
122         //Press the "type" button inside of the window, then press anywhere on the keyboard to find
123         //the key codes in the right-hand side post window. Layout: [unicode, keycode, modifiers]. It is either a unicode
124         //or a keycode. Do not delete the /* and */ characters, or else the
125         //program will not run.
126
127         /*
128
129         (
130         var win = Window(\test, Rect(10, 100, 100, 50)),
131         btn = Button(win, Rect(5, 5, 90, 40)).states_([["type"]]);
132         btn.keyDownAction =
133         { arg view, char, modifiers, unicode, keycode;
134         ["unicode:"+unicode, "keycode:"+keycode, "modifiers:"+modifiers].postln;
135         };
136         win.front;
137         )
138
139         */
140
141
142         //gui set frequency ranges - currently set at the lowest and highest notes on a 128 key range using 432 hz A tuning
143         //you can change the tuning near top
144         //to insert custom ranges, replace "~freqmap.at()" with a hz frequency
145
146         ~outmin1 = ~freqmap.at(0);       // 8.0271480262684 hz                       //base frequency of upper set
147         ~outmax1 = ~freqmap.at(127);     // 12315.783879572 hz                       //high frequency of upper set
148         ~outmin2 = ~freqmap.at(0)*8;     // (8.0271480262684)*8 hz                   //base frequency of lower set
149         ~outmax2 = ~freqmap.at(127)/8;   // (12315.783879572)/8 hz;                  //high frequency of lower set
150
151         ~outmina = ~outmin2;
152         ~outmaxa = ~outmax2;
153         ~outminb = ~outmin1;
154         ~outmaxb = ~outmax1;
155
156
157         //increase or decrease magnitude of second and third harmonics for synthdefs and synth functions (not recommend changing if uncertain of effects)
158
159         //synthdefs
160
161         ~first_harmonic = 1;  //1
162         ~second_harmonic = 2; //2
163         ~third_harmonic = 6;  //6
164
165         //synth functions
166
167         ~icd3 = 3; //3
168         ~icd6 = 6; //6
169
170
171         //ratio values
172
173         ~fth = 1.4142135623729; //default kws binary interval
174         ~bi = ~fth; //~bi = "binary interval" - intverval of key change to a hexagram line's opposite in King Wen sequence
175         ~stepratio = 1.0594630943593;
176         ~nval = 1.0355417528;
177         ~n9s = 1.86;
178         ~n9 = 1.080059789899;
179         ~n18 = 1.0392592260319;
180         ~n27 = 1.0260044847071;
181         ~n36 = 1.0194406437022;
182         ~n45 = 1.0155225125043;
183         ~n54 = 1.012918794725;
184         ~n63 = 1.0110630844869;
185         ~n72 = 1.0096735332285;
186         ~gm = 1.6180339887499; //phi (golden mean), scaled on 1 key change per King Wen sequence
187         ~gm2 = 1.2720196495141;
188         ~gm6 = 1.0835058821738;
189         ~ngm1 = 1.0549232131786; //phi (golden mean), scaled on 9 key changes per King Wen sequence
190         ~ngm2 = 1.0270945492887;
191         ~ngm6 = 1.0089511542031;
192         ~nngm1 = 1.0075472729363; //phi (golden mean), scaled on 64 key changes per King Wen sequence
193         ~nngm2 = 1.0037665430449;
194         ~nngm6 = 1.0012539413222;
195         ~h1 = 11.10101010101; //based on 19.47:360, scaled on 1 key change per King Wen sequence
196         ~h2 = 4.2999982083345;
197         ~h6 = 1.6261331058274;
198         ~nh1 = 1.3828361607663; //based on 19.47:360, scaled on 9 key changes per King Wen sequence
199         ~nh2 = 1.1759405430404;
200         ~nh6 = 1.0555086286213;
201         ~nnh1 = 1.0466365180627; //based on 19.47:360, scaled on 64 key changes per King Wen sequence
202         ~nnh2 = 1.0230525490231;
203         ~nnh6 = 1.0076258811195;
204
205
206         //edit SAVED s1-s8 frequencies/chords. Replace any "[ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ]" with desired frequencies.
207         //Example: [~f1=31.385685128991,~f2=86.222407114322,~f3=229.95963599755,~f4=841.97361403235,~f5=894.01606840275,~f6=38.068730542463,~f7=80.91428965114,~f8=554.92014995488,~f9=267.88136743588,~f10=962.78155194321,~f11=772.35072747751,~f12=1365.644617352]
208         //You can find frequencies in the "copy" section of GUI under "saved open/flow 1-8 frequencies:" or "saved slide 1-8 frequencies:".
209         //Remove both the "/*" and "*/" around the code to make evaluable. Put them back to make it unevaluable.
210
211         /*
212
213         12.do(x = 0; {("fp"++(x=x+1)).asSymbol.envirPut([ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ].at(x-1))});
214         12.do(x = 0; {("fp"++(x=x+1)++"b").asSymbol.envirPut([ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ].at(x-1))});
215         12.do(x = 0; {("fp"++(x=x+1)++"c").asSymbol.envirPut([ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ].at(x-1))});
216         12.do(x = 0; {("fp"++(x=x+1)++"d").asSymbol.envirPut([ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ].at(x-1))});
217         12.do(x = 0; {("fp"++(x=x+1)++"e").asSymbol.envirPut([ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ].at(x-1))});
218         12.do(x = 0; {("fp"++(x=x+1)++"f").asSymbol.envirPut([ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ].at(x-1))});
219         12.do(x = 0; {("fp"++(x=x+1)++"g").asSymbol.envirPut([ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ].at(x-1))});
220         12.do(x = 0; {("fp"++(x=x+1)++"h").asSymbol.envirPut([ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ].at(x-1))});
221
222         */
223
224
225         //edit STARTING frequencies/chord (not saved s1-s8 frequencies/chords). Replace "[ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ]" with starting frequencies.
226         //Example: [~f1=31.385685128991,~f2=86.222407114322,~f3=229.95963599755,~f4=841.97361403235,~f5=894.01606840275,~f6=38.068730542463,~f7=80.91428965114,~f8=554.92014995488,~f9=267.88136743588,~f10=962.78155194321,~f11=772.35072747751,~f12=1365.644617352]
227         //You can find frequencies in the "copy" section of GUI under "current chord/frequencies".
228         //Remove both the "/*" and "*/" around the code to make evaluable. Put them back to make it unevaluable again.
229
230         /*
231
232         12.do(x = 0; {("f"++(x=x+1)).asSymbol.envirPut(
233
234         [ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ]
235
236         .at(x-1))});
237
238         */
239
240         //^Imoprtant note: "edit STARTING frequencies/chord" must be placed after "edit SAVED frequencies/chords" in code in order for it to work correctly
241
242
243         ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
244
245
246         //default starting notes
247
248         if(([f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil]), {
249                 #f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12 = [
250                         (~freqmap.at(127)/8).rand,
251                         (~freqmap.at(127)/8).rand,
252                         (~freqmap.at(127)/8).rand,
253                         (~freqmap.at(127)/8).rand,
254                         (~freqmap.at(127)/8).rand,
255                         (~freqmap.at(127)/8).rand,
256                         (~freqmap.at(127)/8).rand,
257                         (~freqmap.at(127)/8).rand,
258                         (~freqmap.at(127)/8).rand,
259                         (~freqmap.at(127)/8).rand,
260                         (~freqmap.at(127)/8).rand,
261                         (~freqmap.at(127)/8).rand,
262                 ];
263         });
264
265         if(([ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil]), {12.do(x = 0; {("f"++(x=x+1)).asSymbol.envirPut([f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12].at(x-1))});});
266
267         if([~fp1,~fp2,~fp3,~fp4,~fp5,~fp6,~fp7,~fp8,~fp9,~fp10,~fp11,~fp12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {12.do(x = 0; {("fp"++(x=x+1)).asSymbol.envirPut([ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ].at(x-1))});});
268         if([~fp1b,~fp2b,~fp3b,~fp4b,~fp5b,~fp6b,~fp7b,~fp8b,~fp9b,~fp10b,~fp11b,~fp12b] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {12.do(x = 0; {("fp"++(x=x+1)++"b").asSymbol.envirPut([ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ].at(x-1))});});
269         if([~fp1c,~fp2c,~fp3c,~fp4c,~fp5c,~fp6c,~fp7c,~fp8c,~fp9c,~fp10c,~fp11c,~fp12c] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {12.do(x = 0; {("fp"++(x=x+1)++"c").asSymbol.envirPut([ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ].at(x-1))});});
270         if([~fp1d,~fp2d,~fp3d,~fp4d,~fp5d,~fp6d,~fp7d,~fp8d,~fp9d,~fp10d,~fp11d,~fp12d] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {12.do(x = 0; {("fp"++(x=x+1)++"d").asSymbol.envirPut([ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ].at(x-1))});});
271         if([~fp1e,~fp2e,~fp3e,~fp4e,~fp5e,~fp6e,~fp7e,~fp8e,~fp9e,~fp10e,~fp11e,~fp12e] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {12.do(x = 0; {("fp"++(x=x+1)++"e").asSymbol.envirPut([ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ].at(x-1))});});
272         if([~fp1f,~fp2f,~fp3f,~fp4f,~fp5f,~fp6f,~fp7f,~fp8f,~fp9f,~fp10f,~fp11f,~fp12f] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {12.do(x = 0; {("fp"++(x=x+1)++"f").asSymbol.envirPut([ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ].at(x-1))});});
273         if([~fp1g,~fp2g,~fp3g,~fp4g,~fp5g,~fp6g,~fp7g,~fp8g,~fp9g,~fp10g,~fp11g,~fp12g] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {12.do(x = 0; {("fp"++(x=x+1)++"g").asSymbol.envirPut([ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ].at(x-1))});});
274         if([~fp1h,~fp2h,~fp3h,~fp4h,~fp5h,~fp6h,~fp7h,~fp8h,~fp9h,~fp10h,~fp11h,~fp12h] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {12.do(x = 0; {("fp"++(x=x+1)++"h").asSymbol.envirPut([ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ].at(x-1))});});
275
276         12.do(x = 0; {("u"++(x=x+1)).asSymbol.envirPut([~fp1,~fp2,~fp3,~fp4,~fp5,~fp6,~fp7,~fp8,~fp9,~fp10,~fp11,~fp12].at(x-1))});
277         12.do(x = 0; {("u"++(x=x+1)++"b").asSymbol.envirPut([~fp1b,~fp2b,~fp3b,~fp4b,~fp5b,~fp6b,~fp7b,~fp8b,~fp9b,~fp10b,~fp11b,~fp12b].at(x-1))});
278         12.do(x = 0; {("u"++(x=x+1)++"c").asSymbol.envirPut([~fp1c,~fp2c,~fp3c,~fp4c,~fp5c,~fp6c,~fp7c,~fp8c,~fp9c,~fp10c,~fp11c,~fp12c].at(x-1))});
279         12.do(x = 0; {("u"++(x=x+1)++"d").asSymbol.envirPut([~fp1d,~fp2d,~fp3d,~fp4d,~fp5d,~fp6d,~fp7d,~fp8d,~fp9d,~fp10d,~fp11d,~fp12d].at(x-1))});
280         12.do(x = 0; {("u"++(x=x+1)++"e").asSymbol.envirPut([~fp1e,~fp2e,~fp3e,~fp4e,~fp5e,~fp6e,~fp7e,~fp8e,~fp9e,~fp10e,~fp11e,~fp12e].at(x-1))});
281         12.do(x = 0; {("u"++(x=x+1)++"f").asSymbol.envirPut([~fp1f,~fp2f,~fp3f,~fp4f,~fp5f,~fp6f,~fp7f,~fp8f,~fp9f,~fp10f,~fp11f,~fp12f].at(x-1))});
282         12.do(x = 0; {("u"++(x=x+1)++"g").asSymbol.envirPut([~fp1g,~fp2g,~fp3g,~fp4g,~fp5g,~fp6g,~fp7g,~fp8g,~fp9g,~fp10g,~fp11g,~fp12g].at(x-1))});
283         12.do(x = 0; {("u"++(x=x+1)++"h").asSymbol.envirPut([~fp1h,~fp2h,~fp3h,~fp4h,~fp5h,~fp6h,~fp7h,~fp8h,~fp9h,~fp10h,~fp11h,~fp12h].at(x-1))});
284
285         if([~sg1a1,~sg1a2,~sg1a3,~sg1a4,~sg1a5,~sg1a6,~sg1a7,~sg1a8,~sg1a9,~sg1a10,~sg1a11,~sg1a12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg1a1=~f1,~sg1a2=~f2,~sg1a3=~f3,~sg1a4=~f4,~sg1a5=~f5,~sg1a6=~f6,~sg1a7=~f7,~sg1a8=~f8,~sg1a9=~f9,~sg1a10=~f10,~sg1a11=~f11,~sg1a12=~f12];});
286         if([~sg1b1,~sg1b2,~sg1b3,~sg1b4,~sg1b5,~sg1b6,~sg1b7,~sg1b8,~sg1b9,~sg1b10,~sg1b11,~sg1b12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg1b1=~f1,~sg1b2=~f2,~sg1b3=~f3,~sg1b4=~f4,~sg1b5=~f5,~sg1b6=~f6,~sg1b7=~f7,~sg1b8=~f8,~sg1b9=~f9,~sg1b10=~f10,~sg1b11=~f11,~sg1b12=~f12];});
287         if([~sg1c1,~sg1c2,~sg1c3,~sg1c4,~sg1c5,~sg1c6,~sg1c7,~sg1c8,~sg1c9,~sg1c10,~sg1c11,~sg1c12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg1c1=~f1,~sg1c2=~f2,~sg1c3=~f3,~sg1c4=~f4,~sg1c5=~f5,~sg1c6=~f6,~sg1c7=~f7,~sg1c8=~f8,~sg1c9=~f9,~sg1c10=~f10,~sg1c11=~f11,~sg1c12=~f12];});
288         if([~sg1d1,~sg1d2,~sg1d3,~sg1d4,~sg1d5,~sg1d6,~sg1d7,~sg1d8,~sg1d9,~sg1d10,~sg1d11,~sg1d12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg1d1=~f1,~sg1d2=~f2,~sg1d3=~f3,~sg1d4=~f4,~sg1d5=~f5,~sg1d6=~f6,~sg1d7=~f7,~sg1d8=~f8,~sg1d9=~f9,~sg1d10=~f10,~sg1d11=~f11,~sg1d12=~f12];});
289         if([~sg1e1,~sg1e2,~sg1e3,~sg1e4,~sg1e5,~sg1e6,~sg1e7,~sg1e8,~sg1e9,~sg1e10,~sg1e11,~sg1e12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg1e1=~f1,~sg1e2=~f2,~sg1e3=~f3,~sg1e4=~f4,~sg1e5=~f5,~sg1e6=~f6,~sg1e7=~f7,~sg1e8=~f8,~sg1e9=~f9,~sg1e10=~f10,~sg1e11=~f11,~sg1e12=~f12];});
290         if([~sg1f1,~sg1f2,~sg1f3,~sg1f4,~sg1f5,~sg1f6,~sg1f7,~sg1f8,~sg1f9,~sg1f10,~sg1f11,~sg1f12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg1f1=~f1,~sg1f2=~f2,~sg1f3=~f3,~sg1f4=~f4,~sg1f5=~f5,~sg1f6=~f6,~sg1f7=~f7,~sg1f8=~f8,~sg1f9=~f9,~sg1f10=~f10,~sg1f11=~f11,~sg1f12=~f12];});
291         if([~sg1g1,~sg1g2,~sg1g3,~sg1g4,~sg1g5,~sg1g6,~sg1g7,~sg1g8,~sg1g9,~sg1g10,~sg1g11,~sg1g12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg1g1=~f1,~sg1g2=~f2,~sg1g3=~f3,~sg1g4=~f4,~sg1g5=~f5,~sg1g6=~f6,~sg1g7=~f7,~sg1g8=~f8,~sg1g9=~f9,~sg1g10=~f10,~sg1g11=~f11,~sg1g12=~f12];});
292         if([~sg1h1,~sg1h2,~sg1h3,~sg1h4,~sg1h5,~sg1h6,~sg1h7,~sg1h8,~sg1h9,~sg1h10,~sg1h11,~sg1h12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg1h1=~f1,~sg1h2=~f2,~sg1h3=~f3,~sg1h4=~f4,~sg1h5=~f5,~sg1h6=~f6,~sg1h7=~f7,~sg1h8=~f8,~sg1h9=~f9,~sg1h10=~f10,~sg1h11=~f11,~sg1h12=~f12];});
293         if([~sg2a1,~sg2a2,~sg2a3,~sg2a4,~sg2a5,~sg2a6,~sg2a7,~sg2a8,~sg2a9,~sg2a10,~sg2a11,~sg2a12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg2a1=~f1,~sg2a2=~f2,~sg2a3=~f3,~sg2a4=~f4,~sg2a5=~f5,~sg2a6=~f6,~sg2a7=~f7,~sg2a8=~f8,~sg2a9=~f9,~sg2a10=~f10,~sg2a11=~f11,~sg2a12=~f12];});
294         if([~sg2b1,~sg2b2,~sg2b3,~sg2b4,~sg2b5,~sg2b6,~sg2b7,~sg2b8,~sg2b9,~sg2b10,~sg2b11,~sg2b12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg2b1=~f1,~sg2b2=~f2,~sg2b3=~f3,~sg2b4=~f4,~sg2b5=~f5,~sg2b6=~f6,~sg2b7=~f7,~sg2b8=~f8,~sg2b9=~f9,~sg2b10=~f10,~sg2b11=~f11,~sg2b12=~f12];});
295         if([~sg2c1,~sg2c2,~sg2c3,~sg2c4,~sg2c5,~sg2c6,~sg2c7,~sg2c8,~sg2c9,~sg2c10,~sg2c11,~sg2c12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg2c1=~f1,~sg2c2=~f2,~sg2c3=~f3,~sg2c4=~f4,~sg2c5=~f5,~sg2c6=~f6,~sg2c7=~f7,~sg2c8=~f8,~sg2c9=~f9,~sg2c10=~f10,~sg2c11=~f11,~sg2c12=~f12];});
296         if([~sg2d1,~sg2d2,~sg2d3,~sg2d4,~sg2d5,~sg2d6,~sg2d7,~sg2d8,~sg2d9,~sg2d10,~sg2d11,~sg2d12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg2d1=~f1,~sg2d2=~f2,~sg2d3=~f3,~sg2d4=~f4,~sg2d5=~f5,~sg2d6=~f6,~sg2d7=~f7,~sg2d8=~f8,~sg2d9=~f9,~sg2d10=~f10,~sg2d11=~f11,~sg2d12=~f12];});
297         if([~sg2e1,~sg2e2,~sg2e3,~sg2e4,~sg2e5,~sg2e6,~sg2e7,~sg2e8,~sg2e9,~sg2e10,~sg2e11,~sg2e12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg2e1=~f1,~sg2e2=~f2,~sg2e3=~f3,~sg2e4=~f4,~sg2e5=~f5,~sg2e6=~f6,~sg2e7=~f7,~sg2e8=~f8,~sg2e9=~f9,~sg2e10=~f10,~sg2e11=~f11,~sg2e12=~f12];});
298         if([~sg2f1,~sg2f2,~sg2f3,~sg2f4,~sg2f5,~sg2f6,~sg2f7,~sg2f8,~sg2f9,~sg2f10,~sg2f11,~sg2f12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg2f1=~f1,~sg2f2=~f2,~sg2f3=~f3,~sg2f4=~f4,~sg2f5=~f5,~sg2f6=~f6,~sg2f7=~f7,~sg2f8=~f8,~sg2f9=~f9,~sg2f10=~f10,~sg2f11=~f11,~sg2f12=~f12];});
299         if([~sg2g1,~sg2g2,~sg2g3,~sg2g4,~sg2g5,~sg2g6,~sg2g7,~sg2g8,~sg2g9,~sg2g10,~sg2g11,~sg2g12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg2g1=~f1,~sg2g2=~f2,~sg2g3=~f3,~sg2g4=~f4,~sg2g5=~f5,~sg2g6=~f6,~sg2g7=~f7,~sg2g8=~f8,~sg2g9=~f9,~sg2g10=~f10,~sg2g11=~f11,~sg2g12=~f12];});
300         if([~sg2h1,~sg2h2,~sg2h3,~sg2h4,~sg2h5,~sg2h6,~sg2h7,~sg2h8,~sg2h9,~sg2h10,~sg2h11,~sg2h12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg2h1=~f1,~sg2h2=~f2,~sg2h3=~f3,~sg2h4=~f4,~sg2h5=~f5,~sg2h6=~f6,~sg2h7=~f7,~sg2h8=~f8,~sg2h9=~f9,~sg2h10=~f10,~sg2h11=~f11,~sg2h12=~f12];});
301         if([~sg3a1,~sg3a2,~sg3a3,~sg3a4,~sg3a5,~sg3a6,~sg3a7,~sg3a8,~sg3a9,~sg3a10,~sg3a11,~sg3a12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg3a1=~f1,~sg3a2=~f2,~sg3a3=~f3,~sg3a4=~f4,~sg3a5=~f5,~sg3a6=~f6,~sg3a7=~f7,~sg3a8=~f8,~sg3a9=~f9,~sg3a10=~f10,~sg3a11=~f11,~sg3a12=~f12];});
302         if([~sg3b1,~sg3b2,~sg3b3,~sg3b4,~sg3b5,~sg3b6,~sg3b7,~sg3b8,~sg3b9,~sg3b10,~sg3b11,~sg3b12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg3b1=~f1,~sg3b2=~f2,~sg3b3=~f3,~sg3b4=~f4,~sg3b5=~f5,~sg3b6=~f6,~sg3b7=~f7,~sg3b8=~f8,~sg3b9=~f9,~sg3b10=~f10,~sg3b11=~f11,~sg3b12=~f12];});
303         if([~sg3c1,~sg3c2,~sg3c3,~sg3c4,~sg3c5,~sg3c6,~sg3c7,~sg3c8,~sg3c9,~sg3c10,~sg3c11,~sg3c12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg3c1=~f1,~sg3c2=~f2,~sg3c3=~f3,~sg3c4=~f4,~sg3c5=~f5,~sg3c6=~f6,~sg3c7=~f7,~sg3c8=~f8,~sg3c9=~f9,~sg3c10=~f10,~sg3c11=~f11,~sg3c12=~f12];});
304         if([~sg3d1,~sg3d2,~sg3d3,~sg3d4,~sg3d5,~sg3d6,~sg3d7,~sg3d8,~sg3d9,~sg3d10,~sg3d11,~sg3d12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg3d1=~f1,~sg3d2=~f2,~sg3d3=~f3,~sg3d4=~f4,~sg3d5=~f5,~sg3d6=~f6,~sg3d7=~f7,~sg3d8=~f8,~sg3d9=~f9,~sg3d10=~f10,~sg3d11=~f11,~sg3d12=~f12];});
305         if([~sg3e1,~sg3e2,~sg3e3,~sg3e4,~sg3e5,~sg3e6,~sg3e7,~sg3e8,~sg3e9,~sg3e10,~sg3e11,~sg3e12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg3e1=~f1,~sg3e2=~f2,~sg3e3=~f3,~sg3e4=~f4,~sg3e5=~f5,~sg3e6=~f6,~sg3e7=~f7,~sg3e8=~f8,~sg3e9=~f9,~sg3e10=~f10,~sg3e11=~f11,~sg3e12=~f12];});
306         if([~sg3f1,~sg3f2,~sg3f3,~sg3f4,~sg3f5,~sg3f6,~sg3f7,~sg3f8,~sg3f9,~sg3f10,~sg3f11,~sg3f12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg3f1=~f1,~sg3f2=~f2,~sg3f3=~f3,~sg3f4=~f4,~sg3f5=~f5,~sg3f6=~f6,~sg3f7=~f7,~sg3f8=~f8,~sg3f9=~f9,~sg3f10=~f10,~sg3f11=~f11,~sg3f12=~f12];});
307         if([~sg3g1,~sg3g2,~sg3g3,~sg3g4,~sg3g5,~sg3g6,~sg3g7,~sg3g8,~sg3g9,~sg3g10,~sg3g11,~sg3g12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg3g1=~f1,~sg3g2=~f2,~sg3g3=~f3,~sg3g4=~f4,~sg3g5=~f5,~sg3g6=~f6,~sg3g7=~f7,~sg3g8=~f8,~sg3g9=~f9,~sg3g10=~f10,~sg3g11=~f11,~sg3g12=~f12];});
308         if([~sg3h1,~sg3h2,~sg3h3,~sg3h4,~sg3h5,~sg3h6,~sg3h7,~sg3h8,~sg3h9,~sg3h10,~sg3h11,~sg3h12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg3h1=~f1,~sg3h2=~f2,~sg3h3=~f3,~sg3h4=~f4,~sg3h5=~f5,~sg3h6=~f6,~sg3h7=~f7,~sg3h8=~f8,~sg3h9=~f9,~sg3h10=~f10,~sg3h11=~f11,~sg3h12=~f12];});
309         if([~sg4a1,~sg4a2,~sg4a3,~sg4a4,~sg4a5,~sg4a6,~sg4a7,~sg4a8,~sg4a9,~sg4a10,~sg4a11,~sg4a12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg4a1=~f1,~sg4a2=~f2,~sg4a3=~f3,~sg4a4=~f4,~sg4a5=~f5,~sg4a6=~f6,~sg4a7=~f7,~sg4a8=~f8,~sg4a9=~f9,~sg4a10=~f10,~sg4a11=~f11,~sg4a12=~f12];});
310         if([~sg4b1,~sg4b2,~sg4b3,~sg4b4,~sg4b5,~sg4b6,~sg4b7,~sg4b8,~sg4b9,~sg4b10,~sg4b11,~sg4b12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg4b1=~f1,~sg4b2=~f2,~sg4b3=~f3,~sg4b4=~f4,~sg4b5=~f5,~sg4b6=~f6,~sg4b7=~f7,~sg4b8=~f8,~sg4b9=~f9,~sg4b10=~f10,~sg4b11=~f11,~sg4b12=~f12];});
311         if([~sg4c1,~sg4c2,~sg4c3,~sg4c4,~sg4c5,~sg4c6,~sg4c7,~sg4c8,~sg4c9,~sg4c10,~sg4c11,~sg4c12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg4c1=~f1,~sg4c2=~f2,~sg4c3=~f3,~sg4c4=~f4,~sg4c5=~f5,~sg4c6=~f6,~sg4c7=~f7,~sg4c8=~f8,~sg4c9=~f9,~sg4c10=~f10,~sg4c11=~f11,~sg4c12=~f12];});
312         if([~sg4d1,~sg4d2,~sg4d3,~sg4d4,~sg4d5,~sg4d6,~sg4d7,~sg4d8,~sg4d9,~sg4d10,~sg4d11,~sg4d12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg4d1=~f1,~sg4d2=~f2,~sg4d3=~f3,~sg4d4=~f4,~sg4d5=~f5,~sg4d6=~f6,~sg4d7=~f7,~sg4d8=~f8,~sg4d9=~f9,~sg4d10=~f10,~sg4d11=~f11,~sg4d12=~f12];});
313         if([~sg4e1,~sg4e2,~sg4e3,~sg4e4,~sg4e5,~sg4e6,~sg4e7,~sg4e8,~sg4e9,~sg4e10,~sg4e11,~sg4e12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg4e1=~f1,~sg4e2=~f2,~sg4e3=~f3,~sg4e4=~f4,~sg4e5=~f5,~sg4e6=~f6,~sg4e7=~f7,~sg4e8=~f8,~sg4e9=~f9,~sg4e10=~f10,~sg4e11=~f11,~sg4e12=~f12];});
314         if([~sg4f1,~sg4f2,~sg4f3,~sg4f4,~sg4f5,~sg4f6,~sg4f7,~sg4f8,~sg4f9,~sg4f10,~sg4f11,~sg4f12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg4f1=~f1,~sg4f2=~f2,~sg4f3=~f3,~sg4f4=~f4,~sg4f5=~f5,~sg4f6=~f6,~sg4f7=~f7,~sg4f8=~f8,~sg4f9=~f9,~sg4f10=~f10,~sg4f11=~f11,~sg4f12=~f12];});
315         if([~sg4g1,~sg4g2,~sg4g3,~sg4g4,~sg4g5,~sg4g6,~sg4g7,~sg4g8,~sg4g9,~sg4g10,~sg4g11,~sg4g12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg4g1=~f1,~sg4g2=~f2,~sg4g3=~f3,~sg4g4=~f4,~sg4g5=~f5,~sg4g6=~f6,~sg4g7=~f7,~sg4g8=~f8,~sg4g9=~f9,~sg4g10=~f10,~sg4g11=~f11,~sg4g12=~f12];});
316         if([~sg4h1,~sg4h2,~sg4h3,~sg4h4,~sg4h5,~sg4h6,~sg4h7,~sg4h8,~sg4h9,~sg4h10,~sg4h11,~sg4h12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg4h1=~f1,~sg4h2=~f2,~sg4h3=~f3,~sg4h4=~f4,~sg4h5=~f5,~sg4h6=~f6,~sg4h7=~f7,~sg4h8=~f8,~sg4h9=~f9,~sg4h10=~f10,~sg4h11=~f11,~sg4h12=~f12];});
317         if([~sg5a1,~sg5a2,~sg5a3,~sg5a4,~sg5a5,~sg5a6,~sg5a7,~sg5a8,~sg5a9,~sg5a10,~sg5a11,~sg5a12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg5a1=~f1,~sg5a2=~f2,~sg5a3=~f3,~sg5a4=~f4,~sg5a5=~f5,~sg5a6=~f6,~sg5a7=~f7,~sg5a8=~f8,~sg5a9=~f9,~sg5a10=~f10,~sg5a11=~f11,~sg5a12=~f12];});
318         if([~sg5b1,~sg5b2,~sg5b3,~sg5b4,~sg5b5,~sg5b6,~sg5b7,~sg5b8,~sg5b9,~sg5b10,~sg5b11,~sg5b12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg5b1=~f1,~sg5b2=~f2,~sg5b3=~f3,~sg5b4=~f4,~sg5b5=~f5,~sg5b6=~f6,~sg5b7=~f7,~sg5b8=~f8,~sg5b9=~f9,~sg5b10=~f10,~sg5b11=~f11,~sg5b12=~f12];});
319         if([~sg5c1,~sg5c2,~sg5c3,~sg5c4,~sg5c5,~sg5c6,~sg5c7,~sg5c8,~sg5c9,~sg5c10,~sg5c11,~sg5c12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg5c1=~f1,~sg5c2=~f2,~sg5c3=~f3,~sg5c4=~f4,~sg5c5=~f5,~sg5c6=~f6,~sg5c7=~f7,~sg5c8=~f8,~sg5c9=~f9,~sg5c10=~f10,~sg5c11=~f11,~sg5c12=~f12];});
320         if([~sg5d1,~sg5d2,~sg5d3,~sg5d4,~sg5d5,~sg5d6,~sg5d7,~sg5d8,~sg5d9,~sg5d10,~sg5d11,~sg5d12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg5d1=~f1,~sg5d2=~f2,~sg5d3=~f3,~sg5d4=~f4,~sg5d5=~f5,~sg5d6=~f6,~sg5d7=~f7,~sg5d8=~f8,~sg5d9=~f9,~sg5d10=~f10,~sg5d11=~f11,~sg5d12=~f12];});
321         if([~sg5e1,~sg5e2,~sg5e3,~sg5e4,~sg5e5,~sg5e6,~sg5e7,~sg5e8,~sg5e9,~sg5e10,~sg5e11,~sg5e12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg5e1=~f1,~sg5e2=~f2,~sg5e3=~f3,~sg5e4=~f4,~sg5e5=~f5,~sg5e6=~f6,~sg5e7=~f7,~sg5e8=~f8,~sg5e9=~f9,~sg5e10=~f10,~sg5e11=~f11,~sg5e12=~f12];});
322         if([~sg5f1,~sg5f2,~sg5f3,~sg5f4,~sg5f5,~sg5f6,~sg5f7,~sg5f8,~sg5f9,~sg5f10,~sg5f11,~sg5f12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg5f1=~f1,~sg5f2=~f2,~sg5f3=~f3,~sg5f4=~f4,~sg5f5=~f5,~sg5f6=~f6,~sg5f7=~f7,~sg5f8=~f8,~sg5f9=~f9,~sg5f10=~f10,~sg5f11=~f11,~sg5f12=~f12];});
323         if([~sg5g1,~sg5g2,~sg5g3,~sg5g4,~sg5g5,~sg5g6,~sg5g7,~sg5g8,~sg5g9,~sg5g10,~sg5g11,~sg5g12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg5g1=~f1,~sg5g2=~f2,~sg5g3=~f3,~sg5g4=~f4,~sg5g5=~f5,~sg5g6=~f6,~sg5g7=~f7,~sg5g8=~f8,~sg5g9=~f9,~sg5g10=~f10,~sg5g11=~f11,~sg5g12=~f12];});
324         if([~sg5h1,~sg5h2,~sg5h3,~sg5h4,~sg5h5,~sg5h6,~sg5h7,~sg5h8,~sg5h9,~sg5h10,~sg5h11,~sg5h12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg5h1=~f1,~sg5h2=~f2,~sg5h3=~f3,~sg5h4=~f4,~sg5h5=~f5,~sg5h6=~f6,~sg5h7=~f7,~sg5h8=~f8,~sg5h9=~f9,~sg5h10=~f10,~sg5h11=~f11,~sg5h12=~f12];});
325         if([~sg6a1,~sg6a2,~sg6a3,~sg6a4,~sg6a5,~sg6a6,~sg6a7,~sg6a8,~sg6a9,~sg6a10,~sg6a11,~sg6a12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg6a1=~f1,~sg6a2=~f2,~sg6a3=~f3,~sg6a4=~f4,~sg6a5=~f5,~sg6a6=~f6,~sg6a7=~f7,~sg6a8=~f8,~sg6a9=~f9,~sg6a10=~f10,~sg6a11=~f11,~sg6a12=~f12];});
326         if([~sg6b1,~sg6b2,~sg6b3,~sg6b4,~sg6b5,~sg6b6,~sg6b7,~sg6b8,~sg6b9,~sg6b10,~sg6b11,~sg6b12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg6b1=~f1,~sg6b2=~f2,~sg6b3=~f3,~sg6b4=~f4,~sg6b5=~f5,~sg6b6=~f6,~sg6b7=~f7,~sg6b8=~f8,~sg6b9=~f9,~sg6b10=~f10,~sg6b11=~f11,~sg6b12=~f12];});
327         if([~sg6c1,~sg6c2,~sg6c3,~sg6c4,~sg6c5,~sg6c6,~sg6c7,~sg6c8,~sg6c9,~sg6c10,~sg6c11,~sg6c12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg6c1=~f1,~sg6c2=~f2,~sg6c3=~f3,~sg6c4=~f4,~sg6c5=~f5,~sg6c6=~f6,~sg6c7=~f7,~sg6c8=~f8,~sg6c9=~f9,~sg6c10=~f10,~sg6c11=~f11,~sg6c12=~f12];});
328         if([~sg6d1,~sg6d2,~sg6d3,~sg6d4,~sg6d5,~sg6d6,~sg6d7,~sg6d8,~sg6d9,~sg6d10,~sg6d11,~sg6d12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg6d1=~f1,~sg6d2=~f2,~sg6d3=~f3,~sg6d4=~f4,~sg6d5=~f5,~sg6d6=~f6,~sg6d7=~f7,~sg6d8=~f8,~sg6d9=~f9,~sg6d10=~f10,~sg6d11=~f11,~sg6d12=~f12];});
329         if([~sg6e1,~sg6e2,~sg6e3,~sg6e4,~sg6e5,~sg6e6,~sg6e7,~sg6e8,~sg6e9,~sg6e10,~sg6e11,~sg6e12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg6e1=~f1,~sg6e2=~f2,~sg6e3=~f3,~sg6e4=~f4,~sg6e5=~f5,~sg6e6=~f6,~sg6e7=~f7,~sg6e8=~f8,~sg6e9=~f9,~sg6e10=~f10,~sg6e11=~f11,~sg6e12=~f12];});
330         if([~sg6f1,~sg6f2,~sg6f3,~sg6f4,~sg6f5,~sg6f6,~sg6f7,~sg6f8,~sg6f9,~sg6f10,~sg6f11,~sg6f12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg6f1=~f1,~sg6f2=~f2,~sg6f3=~f3,~sg6f4=~f4,~sg6f5=~f5,~sg6f6=~f6,~sg6f7=~f7,~sg6f8=~f8,~sg6f9=~f9,~sg6f10=~f10,~sg6f11=~f11,~sg6f12=~f12];});
331         if([~sg6g1,~sg6g2,~sg6g3,~sg6g4,~sg6g5,~sg6g6,~sg6g7,~sg6g8,~sg6g9,~sg6g10,~sg6g11,~sg6g12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg6g1=~f1,~sg6g2=~f2,~sg6g3=~f3,~sg6g4=~f4,~sg6g5=~f5,~sg6g6=~f6,~sg6g7=~f7,~sg6g8=~f8,~sg6g9=~f9,~sg6g10=~f10,~sg6g11=~f11,~sg6g12=~f12];});
332         if([~sg6h1,~sg6h2,~sg6h3,~sg6h4,~sg6h5,~sg6h6,~sg6h7,~sg6h8,~sg6h9,~sg6h10,~sg6h11,~sg6h12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg6h1=~f1,~sg6h2=~f2,~sg6h3=~f3,~sg6h4=~f4,~sg6h5=~f5,~sg6h6=~f6,~sg6h7=~f7,~sg6h8=~f8,~sg6h9=~f9,~sg6h10=~f10,~sg6h11=~f11,~sg6h12=~f12];});
333         if([~sg7a1,~sg7a2,~sg7a3,~sg7a4,~sg7a5,~sg7a6,~sg7a7,~sg7a8,~sg7a9,~sg7a10,~sg7a11,~sg7a12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg7a1=~f1,~sg7a2=~f2,~sg7a3=~f3,~sg7a4=~f4,~sg7a5=~f5,~sg7a6=~f6,~sg7a7=~f7,~sg7a8=~f8,~sg7a9=~f9,~sg7a10=~f10,~sg7a11=~f11,~sg7a12=~f12];});
334         if([~sg7b1,~sg7b2,~sg7b3,~sg7b4,~sg7b5,~sg7b6,~sg7b7,~sg7b8,~sg7b9,~sg7b10,~sg7b11,~sg7b12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg7b1=~f1,~sg7b2=~f2,~sg7b3=~f3,~sg7b4=~f4,~sg7b5=~f5,~sg7b6=~f6,~sg7b7=~f7,~sg7b8=~f8,~sg7b9=~f9,~sg7b10=~f10,~sg7b11=~f11,~sg7b12=~f12];});
335         if([~sg7c1,~sg7c2,~sg7c3,~sg7c4,~sg7c5,~sg7c6,~sg7c7,~sg7c8,~sg7c9,~sg7c10,~sg7c11,~sg7c12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg7c1=~f1,~sg7c2=~f2,~sg7c3=~f3,~sg7c4=~f4,~sg7c5=~f5,~sg7c6=~f6,~sg7c7=~f7,~sg7c8=~f8,~sg7c9=~f9,~sg7c10=~f10,~sg7c11=~f11,~sg7c12=~f12];});
336         if([~sg7d1,~sg7d2,~sg7d3,~sg7d4,~sg7d5,~sg7d6,~sg7d7,~sg7d8,~sg7d9,~sg7d10,~sg7d11,~sg7d12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg7d1=~f1,~sg7d2=~f2,~sg7d3=~f3,~sg7d4=~f4,~sg7d5=~f5,~sg7d6=~f6,~sg7d7=~f7,~sg7d8=~f8,~sg7d9=~f9,~sg7d10=~f10,~sg7d11=~f11,~sg7d12=~f12];});
337         if([~sg7e1,~sg7e2,~sg7e3,~sg7e4,~sg7e5,~sg7e6,~sg7e7,~sg7e8,~sg7e9,~sg7e10,~sg7e11,~sg7e12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg7e1=~f1,~sg7e2=~f2,~sg7e3=~f3,~sg7e4=~f4,~sg7e5=~f5,~sg7e6=~f6,~sg7e7=~f7,~sg7e8=~f8,~sg7e9=~f9,~sg7e10=~f10,~sg7e11=~f11,~sg7e12=~f12];});
338         if([~sg7f1,~sg7f2,~sg7f3,~sg7f4,~sg7f5,~sg7f6,~sg7f7,~sg7f8,~sg7f9,~sg7f10,~sg7f11,~sg7f12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg7f1=~f1,~sg7f2=~f2,~sg7f3=~f3,~sg7f4=~f4,~sg7f5=~f5,~sg7f6=~f6,~sg7f7=~f7,~sg7f8=~f8,~sg7f9=~f9,~sg7f10=~f10,~sg7f11=~f11,~sg7f12=~f12];});
339         if([~sg7g1,~sg7g2,~sg7g3,~sg7g4,~sg7g5,~sg7g6,~sg7g7,~sg7g8,~sg7g9,~sg7g10,~sg7g11,~sg7g12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg7g1=~f1,~sg7g2=~f2,~sg7g3=~f3,~sg7g4=~f4,~sg7g5=~f5,~sg7g6=~f6,~sg7g7=~f7,~sg7g8=~f8,~sg7g9=~f9,~sg7g10=~f10,~sg7g11=~f11,~sg7g12=~f12];});
340         if([~sg7h1,~sg7h2,~sg7h3,~sg7h4,~sg7h5,~sg7h6,~sg7h7,~sg7h8,~sg7h9,~sg7h10,~sg7h11,~sg7h12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg7h1=~f1,~sg7h2=~f2,~sg7h3=~f3,~sg7h4=~f4,~sg7h5=~f5,~sg7h6=~f6,~sg7h7=~f7,~sg7h8=~f8,~sg7h9=~f9,~sg7h10=~f10,~sg7h11=~f11,~sg7h12=~f12];});
341         if([~sg8a1,~sg8a2,~sg8a3,~sg8a4,~sg8a5,~sg8a6,~sg8a7,~sg8a8,~sg8a9,~sg8a10,~sg8a11,~sg8a12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg8a1=~f1,~sg8a2=~f2,~sg8a3=~f3,~sg8a4=~f4,~sg8a5=~f5,~sg8a6=~f6,~sg8a7=~f7,~sg8a8=~f8,~sg8a9=~f9,~sg8a10=~f10,~sg8a11=~f11,~sg8a12=~f12];});
342         if([~sg8b1,~sg8b2,~sg8b3,~sg8b4,~sg8b5,~sg8b6,~sg8b7,~sg8b8,~sg8b9,~sg8b10,~sg8b11,~sg8b12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg8b1=~f1,~sg8b2=~f2,~sg8b3=~f3,~sg8b4=~f4,~sg8b5=~f5,~sg8b6=~f6,~sg8b7=~f7,~sg8b8=~f8,~sg8b9=~f9,~sg8b10=~f10,~sg8b11=~f11,~sg8b12=~f12];});
343         if([~sg8c1,~sg8c2,~sg8c3,~sg8c4,~sg8c5,~sg8c6,~sg8c7,~sg8c8,~sg8c9,~sg8c10,~sg8c11,~sg8c12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg8c1=~f1,~sg8c2=~f2,~sg8c3=~f3,~sg8c4=~f4,~sg8c5=~f5,~sg8c6=~f6,~sg8c7=~f7,~sg8c8=~f8,~sg8c9=~f9,~sg8c10=~f10,~sg8c11=~f11,~sg8c12=~f12];});
344         if([~sg8d1,~sg8d2,~sg8d3,~sg8d4,~sg8d5,~sg8d6,~sg8d7,~sg8d8,~sg8d9,~sg8d10,~sg8d11,~sg8d12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg8d1=~f1,~sg8d2=~f2,~sg8d3=~f3,~sg8d4=~f4,~sg8d5=~f5,~sg8d6=~f6,~sg8d7=~f7,~sg8d8=~f8,~sg8d9=~f9,~sg8d10=~f10,~sg8d11=~f11,~sg8d12=~f12];});
345         if([~sg8e1,~sg8e2,~sg8e3,~sg8e4,~sg8e5,~sg8e6,~sg8e7,~sg8e8,~sg8e9,~sg8e10,~sg8e11,~sg8e12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg8e1=~f1,~sg8e2=~f2,~sg8e3=~f3,~sg8e4=~f4,~sg8e5=~f5,~sg8e6=~f6,~sg8e7=~f7,~sg8e8=~f8,~sg8e9=~f9,~sg8e10=~f10,~sg8e11=~f11,~sg8e12=~f12];});
346         if([~sg8f1,~sg8f2,~sg8f3,~sg8f4,~sg8f5,~sg8f6,~sg8f7,~sg8f8,~sg8f9,~sg8f10,~sg8f11,~sg8f12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg8f1=~f1,~sg8f2=~f2,~sg8f3=~f3,~sg8f4=~f4,~sg8f5=~f5,~sg8f6=~f6,~sg8f7=~f7,~sg8f8=~f8,~sg8f9=~f9,~sg8f10=~f10,~sg8f11=~f11,~sg8f12=~f12];});
347         if([~sg8g1,~sg8g2,~sg8g3,~sg8g4,~sg8g5,~sg8g6,~sg8g7,~sg8g8,~sg8g9,~sg8g10,~sg8g11,~sg8g12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg8g1=~f1,~sg8g2=~f2,~sg8g3=~f3,~sg8g4=~f4,~sg8g5=~f5,~sg8g6=~f6,~sg8g7=~f7,~sg8g8=~f8,~sg8g9=~f9,~sg8g10=~f10,~sg8g11=~f11,~sg8g12=~f12];});
348         if([~sg8h1,~sg8h2,~sg8h3,~sg8h4,~sg8h5,~sg8h6,~sg8h7,~sg8h8,~sg8h9,~sg8h10,~sg8h11,~sg8h12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg8h1=~f1,~sg8h2=~f2,~sg8h3=~f3,~sg8h4=~f4,~sg8h5=~f5,~sg8h6=~f6,~sg8h7=~f7,~sg8h8=~f8,~sg8h9=~f9,~sg8h10=~f10,~sg8h11=~f11,~sg8h12=~f12];});
349
350
351         //set n1-n9 ratio values
352
353         case
354         {~ratio_setting == "psine1";}{~n_value1 = ~gm;    ~n_value2 = ~gm2;   ~n_value6 = ~gm6;}
355         {~ratio_setting == "psine2";}{~n_value1 = ~ngm1;  ~n_value2 = ~ngm2;  ~n_value6 = ~ngm6;}
356         {~ratio_setting == "psine3";}{~n_value1 = ~nngm1; ~n_value2 = ~nngm2; ~n_value6 = ~nngm6;}
357         {~ratio_setting == "hsine1";}{~n_value1 = ~h1;    ~n_value2 = ~h2;    ~n_value6 = ~h6;}
358         {~ratio_setting == "hsine2";}{~n_value1 = ~nh1;   ~n_value2 = ~nh2;   ~n_value6 = ~nh6;}
359         {~ratio_setting == "hsine3";}{~n_value1 = ~nnh1;  ~n_value2 = ~nnh2;  ~n_value6 = ~nnh6;};
360
361
362         //King Wen sequence interpretation settings 1-3 for synthdefs
363
364         ~kws_setting_1_a = {[/*1*/      #a,b,c,d,e,f=[ ~a,~b,~c,~d,~e,~f  ],/*2*/       [ a = a/~bi, b = b/~bi, c = c/~bi, d = d/~bi, e = e/~bi, f = f/~bi ],/*3*/      [ a = a,         b = b*~bi,    c = c,         d = d,         e = e,         f = f*~bi  ],/*4*/  [ a = a*~bi,    b = b/~bi,    c = c,         d = d,         e = e*~bi,    f = f/~bi  ],/*5*/    [ a = a/~bi,    b = b*~bi,    c = c,         d = d*~bi,    e = e,         f = f*~bi ],/*6*/     [ a = a*~bi,    b = b,         c = c*~bi,    d = d/~bi,    e = e,         f = f/~bi  ],/*7*/    [ a = a/~bi,    b = b/~bi,    c = c/~bi,    d = d,         e = e,         f = f ],/*8*/ [ a = a,         b = b*~bi,    c = c,         d = d,         e = e/~bi,    f = f ],/*9*/        [ a = a*~bi,    b = b,         c = c,         d = d*~bi,    e = e*~bi,    f = f*~bi ],/*10*/    [ a = a,         b = b,         c = c*~bi,    d = d/~bi,    e = e,         f = f ],/*11*/       [ a = a/~bi,    b = b/~bi,    c = c/~bi,    d = d*~bi,    e = e,         f = f ],/*12*/ [ a = a*~bi, b = b*~bi, c = c*~bi, d = d/~bi, e = e/~bi, f = f/~bi ],/*13*/     [ a = a,         b = b,         c = c,         d = d*~bi,    e = e,         f = f*~bi ],/*14*/  [ a = a,         b = b/~bi,    c = c,         d = d,         e = e*~bi,    f = f],/*15*/        [ a = a/~bi,    b = b,         c = c/~bi,    d = d,         e = e/~bi,    f = f/~bi ],/*16*/    [ a = a,         b = b,         c = c*~bi,    d = d/~bi,    e = e,         f = f ],/*17*/       [ a = a,         b = b*~bi,    c = c,         d = d,         e = e,         f = f*~bi],/*18*/   [ a = a*~bi, b = b/~bi, c = c/~bi, d = d*~bi, e = e*~bi, f = f/~bi ],/*19*/     [ a = a/~bi,    b = b,         c = c,         d = d/~bi,    e = e,         f = f*~bi ],/*20*/   [ a = a*~bi,    b = b*~bi,    c = c,         d = d,         e = e/~bi,    f = f/~bi ],/*21*/    [ a = a,         b = b/~bi,    c = c*~bi,    d = d,         e = e,         f = f*~bi ],/*22*/   [ a = a,         b = b,         c = c/~bi,    d = d*~bi,    e = e,         f = f ],/*23*/       [ a = a,         b = b,         c = c,         d = d/~bi,    e = e,         f = f/~bi ],/*24*/  [ a = a/~bi,    b = b,         c = c,         d = d,         e = e,         f = f*~bi ],/*25*/  [ a = a*~bi,    b = b*~bi,    c = c*~bi,    d = d,         e = e,         f = f ],/*26*/        [ a = a,         b = b/~bi,    c = c/~bi,    d = d*~bi,    e = e*~bi,    f = f ],/*27*/ [ a = a,         b = b,         c = c,         d = d/~bi,    e = e/~bi,    f = f ],/*28*/       [ a = a/~bi, b = b*~bi, c = c*~bi, d = d*~bi, e = e*~bi, f = f/~bi ],/*29*/     [ a = a,         b = b,         c = c/~bi,    d = d/~bi,    e = e,         f = f ],/*30*/       [ a = a*~bi, b = b/~bi, c = c*~bi, d = d*~bi, e = e/~bi, f = f*~bi ],/*31*/     [ a = a/~bi,    b = b*~bi,    c = c,         d = d,         e = e,         f = f/~bi ],/*32*/   [ a = a,         b = b/~bi,    c = c,         d = d,         e = e*~bi,    f = f ],/*33*/       [ a = a*~bi,    b = b*~bi,    c = c,         d = d,         e = e/~bi,    f = f ],/*34*/        [ a = a/~bi,    b = b/~bi,    c = c,         d = d,         e = e*~bi,    f = f*~bi ],/*35*/    [ a = a*~bi,    b = b,         c = c,         d = d/~bi,    e = e/~bi,    f = f/~bi ],/*36*/    [ a = a/~bi,    b = b,         c = c/~bi,    d = d*~bi,    e = e,         f = f*~bi ],/*37*/    [ a = a*~bi,    b = b*~bi,    c = c,         d = d,         e = e,         f = f ],/*38*/       [ a = a,         b = b/~bi,    c = c*~bi,    d = d/~bi,    e = e*~bi,    f = f ],/*39*/ [ a = a/~bi, b = b*~bi, c = c/~bi, d = d*~bi, e = e/~bi, f = f/~bi ],/*40*/     [ a = a,         b = b/~bi,    c = c*~bi,    d = d/~bi,    e = e*~bi,    f = f ],/*41*/ [ a = a*~bi,    b = b,         c = c/~bi,    d = d,         e = e,         f = f*~bi ],/*42*/   [ a = a,         b = b*~bi,    c = c,         d = d,         e = e/~bi,    f = f ],/*43*/       [ a = a/~bi,    b = b,         c = c*~bi,    d = d*~bi,    e = e*~bi,    f = f ],/*44*/ [ a = a*~bi,    b = b,         c = c,         d = d,         e = e,         f = f/~bi ],/*45*/  [ a = a/~bi,    b = b,         c = c,         d = d/~bi,    e = e/~bi,    f = f ],/*46*/        [ a = a,         b = b/~bi,    c = c/~bi,    d = d*~bi,    e = e*~bi,    f = f ],/*47*/ [ a = a,         b = b*~bi,    c = c*~bi,    d = d/~bi,    e = e,         f = f ],/*48*/        [ a = a,         b = b,         c = c/~bi,    d = d*~bi,    e = e,         f = f ],/*49*/       [ a = a,         b = b,         c = c*~bi,    d = d,         e = e/~bi,    f = f*~bi ],/*50*/   [ a = a*~bi,    b = b/~bi,    c = c,         d = d,         e = e*~bi,    f = f/~bi ],/*51*/    [ a = a/~bi,    b = b,         c = c,         d = d/~bi,    e = e/~bi,    f = f*~bi ],/*52*/    [ a = a*~bi,    b = b,         c = c/~bi,    d = d*~bi,    e = e,         f = f/~bi ],/*53*/    [ a = a,         b = b*~bi,    c = c,         d = d,         e = e,         f = f ],/*54*/      [ a = a/~bi, b = b/~bi, c = c*~bi, d = d/~bi, e = e*~bi, f = f*~bi ],/*55*/     [ a = a,         b = b,         c = c,         d = d*~bi,    e = e/~bi,    f = f ],/*56*/       [ a = a*~bi,    b = b,         c = c,         d = d,         e = e,         f = f/~bi ],/*57*/  [ a = a,         b = b*~bi,    c = c/~bi,    d = d,         e = e*~bi,    f = f ],/*58*/        [ a = a/~bi,    b = b,         c = c*~bi,    d = d/~bi,    e = e,         f = f*~bi ],/*59*/    [ a = a*~bi,    b = b,         c = c/~bi,    d = d,         e = e,         f = f/~bi ],/*60*/   [ a = a/~bi,    b = b,         c = c,         d = d,         e = e,         f = f*~bi ],/*61*/  [ a = a*~bi,    b = b,         c = c,         d = d,         e = e,         f = f ],/*62*/      [ a = a/~bi, b = b/~bi, c = c*~bi, d = d*~bi, e = e/~bi, f = f/~bi ],/*63*/     [ a = a,         b = b*~bi,    c = c/~bi,    d = d,         e = e,         f = f*~bi ],/*64*/   [ a = a*~bi, b = b/~bi, c = c*~bi, d = d/~bi, e = e*~bi, f = f/~bi ]]};
365         ~kws_setting_1_b = {[/*1*/      [ a = a*~n1,         b = b*~n1*~bi,    c = c*~n1,         d = d*~n1*~bi,    e = e*~n1,         f = f*~n1*~bi ],/*2*/    [ a = a/~bi, b = b/~bi, c = c/~bi, d = d/~bi, e = e/~bi, f = f/~bi ],/*3*/      [ a = a,         b = b*~bi,    c = c,         d = d,         e = e,         f = f*~bi  ],/*4*/  [ a = a*~bi,    b = b/~bi,    c = c,         d = d,         e = e*~bi,    f = f/~bi  ],/*5*/    [ a = a/~bi,    b = b*~bi,    c = c,         d = d*~bi,    e = e,         f = f*~bi ],/*6*/     [ a = a*~bi,    b = b,         c = c*~bi,    d = d/~bi,    e = e,         f = f/~bi  ],/*7*/    [ a = a/~bi,    b = b/~bi,    c = c/~bi,    d = d,         e = e,         f = f ],/*8*/ [ a = a,         b = b*~bi,    c = c,         d = d,         e = e/~bi,    f = f ],/*9*/        [ a = a*~bi,    b = b,         c = c,         d = d*~bi,    e = e*~bi,    f = f*~bi ],/*10*/    [ a = a,         b = b,         c = c*~bi,    d = d/~bi,    e = e,         f = f ],/*11*/       [ a = a/~bi,    b = b/~bi,    c = c/~bi,    d = d*~bi,    e = e,         f = f ],/*12*/ [ a = a*~bi, b = b*~bi, c = c*~bi, d = d/~bi, e = e/~bi, f = f/~bi ],/*13*/     [ a = a,         b = b,         c = c,         d = d*~bi,    e = e,         f = f*~bi ],/*14*/  [ a = a,         b = b/~bi,    c = c,         d = d,         e = e*~bi,    f = f],/*15*/        [ a = a/~bi,    b = b,         c = c/~bi,    d = d,         e = e/~bi,    f = f/~bi ],/*16*/    [ a = a,         b = b,         c = c*~bi,    d = d/~bi,    e = e,         f = f ],/*17*/       [ a = a,         b = b*~bi,    c = c,         d = d,         e = e,         f = f*~bi],/*18*/   [ a = a*~bi, b = b/~bi, c = c/~bi, d = d*~bi, e = e*~bi, f = f/~bi ],/*19*/     [ a = a/~bi,    b = b,         c = c,         d = d/~bi,    e = e,         f = f*~bi ],/*20*/   [ a = a*~bi,    b = b*~bi,    c = c,         d = d,         e = e/~bi,    f = f/~bi ],/*21*/    [ a = a,         b = b/~bi,    c = c*~bi,    d = d,         e = e,         f = f*~bi ],/*22*/   [ a = a,         b = b,         c = c/~bi,    d = d*~bi,    e = e,         f = f ],/*23*/       [ a = a,         b = b,         c = c,         d = d/~bi,    e = e,         f = f/~bi ],/*24*/  [ a = a/~bi,    b = b,         c = c,         d = d,         e = e,         f = f*~bi ],/*25*/  [ a = a*~bi,    b = b*~bi,    c = c*~bi,    d = d,         e = e,         f = f ],/*26*/        [ a = a,         b = b/~bi,    c = c/~bi,    d = d*~bi,    e = e*~bi,    f = f ],/*27*/ [ a = a,         b = b,         c = c,         d = d/~bi,    e = e/~bi,    f = f ],/*28*/       [ a = a/~bi, b = b*~bi, c = c*~bi, d = d*~bi, e = e*~bi, f = f/~bi ],/*29*/     [ a = a,         b = b,         c = c/~bi,    d = d/~bi,    e = e,         f = f ],/*30*/       [ a = a*~bi, b = b/~bi, c = c*~bi, d = d*~bi, e = e/~bi, f = f*~bi ],/*31*/     [ a = a/~bi,    b = b*~bi,    c = c,         d = d,         e = e,         f = f/~bi ],/*32*/   [ a = a,         b = b/~bi,    c = c,         d = d,         e = e*~bi,    f = f ],/*33*/       [ a = a*~bi,    b = b*~bi,    c = c,         d = d,         e = e/~bi,    f = f ],/*34*/        [ a = a/~bi,    b = b/~bi,    c = c,         d = d,         e = e*~bi,    f = f*~bi ],/*35*/    [ a = a*~bi,    b = b,         c = c,         d = d/~bi,    e = e/~bi,    f = f/~bi ],/*36*/    [ a = a/~bi,    b = b,         c = c/~bi,    d = d*~bi,    e = e,         f = f*~bi ],/*37*/    [ a = a*~bi,    b = b*~bi,    c = c,         d = d,         e = e,         f = f ],/*38*/       [ a = a,         b = b/~bi,    c = c*~bi,    d = d/~bi,    e = e*~bi,    f = f ],/*39*/ [ a = a/~bi, b = b*~bi, c = c/~bi, d = d*~bi, e = e/~bi, f = f/~bi ],/*40*/     [ a = a,         b = b/~bi,    c = c*~bi,    d = d/~bi,    e = e*~bi,    f = f ],/*41*/ [ a = a*~bi,    b = b,         c = c/~bi,    d = d,         e = e,         f = f*~bi ],/*42*/   [ a = a,         b = b*~bi,    c = c,         d = d,         e = e/~bi,    f = f ],/*43*/       [ a = a/~bi,    b = b,         c = c*~bi,    d = d*~bi,    e = e*~bi,    f = f ],/*44*/ [ a = a*~bi,    b = b,         c = c,         d = d,         e = e,         f = f/~bi ],/*45*/  [ a = a/~bi,    b = b,         c = c,         d = d/~bi,    e = e/~bi,    f = f ],/*46*/        [ a = a,         b = b/~bi,    c = c/~bi,    d = d*~bi,    e = e*~bi,    f = f ],/*47*/ [ a = a,         b = b*~bi,    c = c*~bi,    d = d/~bi,    e = e,         f = f ],/*48*/        [ a = a,         b = b,         c = c/~bi,    d = d*~bi,    e = e,         f = f ],/*49*/       [ a = a,         b = b,         c = c*~bi,    d = d,         e = e/~bi,    f = f*~bi ],/*50*/   [ a = a*~bi,    b = b/~bi,    c = c,         d = d,         e = e*~bi,    f = f/~bi ],/*51*/    [ a = a/~bi,    b = b,         c = c,         d = d/~bi,    e = e/~bi,    f = f*~bi ],/*52*/    [ a = a*~bi,    b = b,         c = c/~bi,    d = d*~bi,    e = e,         f = f/~bi ],/*53*/    [ a = a,         b = b*~bi,    c = c,         d = d,         e = e,         f = f ],/*54*/      [ a = a/~bi, b = b/~bi, c = c*~bi, d = d/~bi, e = e*~bi, f = f*~bi ],/*55*/     [ a = a,         b = b,         c = c,         d = d*~bi,    e = e/~bi,    f = f ],/*56*/       [ a = a*~bi,    b = b,         c = c,         d = d,         e = e,         f = f/~bi ],/*57*/  [ a = a,         b = b*~bi,    c = c/~bi,    d = d,         e = e*~bi,    f = f ],/*58*/        [ a = a/~bi,    b = b,         c = c*~bi,    d = d/~bi,    e = e,         f = f*~bi ],/*59*/    [ a = a*~bi,    b = b,         c = c/~bi,    d = d,         e = e,         f = f/~bi ],/*60*/   [ a = a/~bi,    b = b,         c = c,         d = d,         e = e,         f = f*~bi ],/*61*/  [ a = a*~bi,    b = b,         c = c,         d = d,         e = e,         f = f ],/*62*/      [ a = a/~bi, b = b/~bi, c = c*~bi, d = d*~bi, e = e/~bi, f = f/~bi ],/*63*/     [ a = a,         b = b*~bi,    c = c/~bi,    d = d,         e = e,         f = f*~bi ],/*64*/   [ a = a*~bi, b = b/~bi, c = c*~bi, d = d/~bi, e = e*~bi, f = f/~bi ]]};
366
367         ~kws_setting_2_a = {[/*1*/      #a,b,c,d,e,f=[ ~a,~b,~c,~d,~e,~f  ],/*2*/       [ a = a*~n1/~bi, b = b*~n1/~bi, c = c*~n1/~bi, d = d*~n1/~bi, e = e*~n1/~bi, f = f*~n1/~bi ],/*3*/      [ a = a,         b = b*~bi,    c = c,         d = d,         e = e,         f = f*~bi    ],/*4*/        [ a = a*~bi,    b = b/~bi,    c = c,         d = d,         e = e*~bi,    f = f/~bi    ],/*5*/  [ a = a/~bi,    b = b*~bi,    c = c,         d = d*~bi,    e = e,         f = f*~bi    ],/*6*/  [ a = a*~bi,    b = b,         c = c*~bi,    d = d/~bi,    e = e,         f = f/~bi    ],/*7*/  [ a = a/~bi,    b = b/~bi,    c = c/~bi,    d = d,         e = e,         f = f         ],/*8*/ [ a = a,         b = b*~bi,    c = c,         d = d,         e = e/~bi,    f = f         ],/*9*/        [ a = a*~bi,    b = b,         c = c,         d = d*~bi,    e = e*~bi,    f = f*~bi    ],/*10*/ [ a = a,         b = b,         c = c*~bi,    d = d/~bi,    e = e,         f = f         ],/*11*/       [ a = a/~bi,    b = b/~bi,    c = c/~bi,    d = d*~bi,    e = e,         f = f         ],/*12*/ [ a = a*~n2*~bi, b = b*~n2*~bi, c = c*~n2*~bi, d = d*~n2/~bi, e = e*~n2/~bi, f = f*~n2/~bi ],/*13*/     [ a = a,         b = b,         c = c,         d = d*~bi,    e = e,         f = f*~bi    ],/*14*/       [ a = a,         b = b/~bi,    c = c,         d = d,         e = e*~bi,    f = f         ],/*15*/       [ a = a/~bi,    b = b,         c = c/~bi,    d = d,         e = e/~bi,    f = f/~bi    ],/*16*/ [ a = a,         b = b,         c = c*~bi,    d = d/~bi,    e = e,         f = f         ],/*17*/       [ a = a,         b = b*~bi,    c = c,         d = d,         e = e,         f = f*~bi    ],/*18*/       [ a = a*~n3*~bi, b = b*~n3/~bi, c = c*~n3/~bi, d = d*~n3*~bi, e = e*~n3*~bi, f = f*~n3/~bi ],/*19*/     [ a = a/~bi,    b = b,         c = c,         d = d/~bi,    e = e,         f = f*~bi    ],/*20*/        [ a = a*~bi,    b = b*~bi,    c = c,         d = d,         e = e/~bi,    f = f/~bi    ],/*21*/ [ a = a,         b = b/~bi,    c = c*~bi,    d = d,         e = e,         f = f*~bi    ],/*22*/        [ a = a,         b = b,         c = c/~bi,    d = d*~bi,    e = e,         f = f         ],/*23*/       [ a = a,         b = b,         c = c,         d = d/~bi,    e = e,         f = f/~bi    ],/*24*/       [ a = a/~bi,    b = b,         c = c,         d = d,         e = e,         f = f*~bi    ],/*25*/       [ a = a*~bi,    b = b*~bi,    c = c*~bi,    d = d,         e = e,         f = f         ],/*26*/        [ a = a,         b = b/~bi,    c = c/~bi,    d = d*~bi,    e = e*~bi,    f = f         ],/*27*/ [ a = a,         b = b,         c = c,         d = d/~bi,    e = e/~bi,    f = f         ],/*28*/       [ a = a*~n4/~bi, b = b*~n4*~bi, c = c*~n4*~bi, d = d*~n4*~bi, e = e*~n4*~bi, f = f*~n4/~bi ],/*29*/     [ a = a,         b = b,         c = c/~bi,    d = d/~bi,    e = e,         f = f         ],/*30*/       [ a = a*~n5*~bi, b = b*~n5/~bi, c = c*~n5*~bi, d = d*~n5*~bi, e = e*~n5/~bi, f = f*~n5*~bi ],/*31*/     [ a = a/~bi,    b = b*~bi,    c = c,         d = d,         e = e,         f = f/~bi    ],/*32*/        [ a = a,         b = b/~bi,    c = c,         d = d,         e = e*~bi,    f = f         ],/*33*/       [ a = a*~bi,    b = b*~bi,    c = c,         d = d,         e = e/~bi,    f = f         ],/*34*/        [ a = a/~bi,    b = b/~bi,    c = c,         d = d,         e = e*~bi,    f = f*~bi    ],/*35*/ [ a = a*~bi,    b = b,         c = c,         d = d/~bi,    e = e/~bi,    f = f/~bi    ],/*36*/ [ a = a/~bi,    b = b,         c = c/~bi,    d = d*~bi,    e = e,         f = f*~bi    ],/*37*/ [ a = a*~bi,    b = b*~bi,    c = c,         d = d,         e = e,         f = f         ],/*38*/       [ a = a,         b = b/~bi,    c = c*~bi,    d = d/~bi,    e = e*~bi,    f = f         ],/*39*/ [ a = a*~n6/~bi, b = b*~n6*~bi, c = c*~n6/~bi, d = d*~n6*~bi, e = e*~n6/~bi, f = f*~n6/~bi ],/*40*/     [ a = a,         b = b/~bi,    c = c*~bi,    d = d/~bi,    e = e*~bi,    f = f         ],/*41*/ [ a = a*~bi,    b = b,         c = c/~bi,    d = d,         e = e,         f = f*~bi    ],/*42*/        [ a = a,         b = b*~bi,    c = c,         d = d,         e = e/~bi,    f = f         ],/*43*/       [ a = a/~bi,    b = b,         c = c*~bi,    d = d*~bi,    e = e*~bi,    f = f         ],/*44*/ [ a = a*~bi,    b = b,         c = c,         d = d,         e = e,         f = f/~bi    ],/*45*/       [ a = a/~bi,    b = b,         c = c,         d = d/~bi,    e = e/~bi,    f = f         ],/*46*/        [ a = a,         b = b/~bi,    c = c/~bi,    d = d*~bi,    e = e*~bi,    f = f         ],/*47*/ [ a = a,         b = b*~bi,    c = c*~bi,    d = d/~bi,    e = e,         f = f         ],/*48*/        [ a = a,         b = b,         c = c/~bi,    d = d*~bi,    e = e,         f = f         ],/*49*/       [ a = a,         b = b,         c = c*~bi,    d = d,         e = e/~bi,    f = f*~bi    ],/*50*/        [ a = a*~bi,    b = b/~bi,    c = c,         d = d,         e = e*~bi,    f = f/~bi    ],/*51*/ [ a = a/~bi,    b = b,         c = c,         d = d/~bi,    e = e/~bi,    f = f*~bi    ],/*52*/ [ a = a*~bi,    b = b,         c = c/~bi,    d = d*~bi,    e = e,         f = f/~bi    ],/*53*/ [ a = a,         b = b*~bi,    c = c,         d = d,         e = e,         f = f         ],/*54*/      [ a = a*~n7/~bi, b = b*~n7/~bi, c = c*~n7*~bi, d = d*~n7/~bi, e = e*~n7*~bi, f = f*~n7*~bi ],/*55*/     [ a = a,         b = b,         c = c,         d = d*~bi,    e = e/~bi,    f = f         ],/*56*/       [ a = a*~bi,    b = b,         c = c,         d = d,         e = e,         f = f/~bi    ],/*57*/       [ a = a,         b = b*~bi,    c = c/~bi,    d = d,         e = e*~bi,    f = f         ],/*58*/        [ a = a/~bi,    b = b,         c = c*~bi,    d = d/~bi,    e = e,         f = f*~bi    ],/*59*/ [ a = a*~bi,    b = b,         c = c/~bi,    d = d,         e = e,         f = f/~bi    ],/*60*/        [ a = a/~bi,    b = b,         c = c,         d = d,         e = e,         f = f*~bi    ],/*61*/       [ a = a*~bi,    b = b,         c = c,         d = d,         e = e,         f = f         ],/*62*/      [ a = a*~n8/~bi, b = b*~n8/~bi, c = c*~n8*~bi, d = d*~n8*~bi, e = e*~n8/~bi, f = f*~n8/~bi ],/*63*/     [ a = a,         b = b*~bi,    c = c/~bi,    d = d,         e = e,         f = f*~bi    ],/*64*/        [ a = a*~n9*~bi, b = b*~n9/~bi, c = c*~n9*~bi, d = d*~n9/~bi, e = e*~n9*~bi, f = f*~n9/~bi ]]};
368         ~kws_setting_2_b = {[/*1*/      [ a = a,         b = b*~bi,    c = c,         d = d*~bi,    e = e,         f = f*~bi    ],/*2*/ [ a = a*~n1/~bi, b = b*~n1/~bi, c = c*~n1/~bi, d = d*~n1/~bi, e = e*~n1/~bi, f = f*~n1/~bi ],/*3*/      [ a = a,         b = b*~bi,    c = c,         d = d,         e = e,         f = f*~bi    ],/*4*/        [ a = a*~bi,    b = b/~bi,    c = c,         d = d,         e = e*~bi,    f = f/~bi    ],/*5*/  [ a = a/~bi,    b = b*~bi,    c = c,         d = d*~bi,    e = e,         f = f*~bi    ],/*6*/  [ a = a*~bi,    b = b,         c = c*~bi,    d = d/~bi,    e = e,         f = f/~bi    ],/*7*/  [ a = a/~bi,    b = b/~bi,    c = c/~bi,    d = d,         e = e,         f = f         ],/*8*/ [ a = a,         b = b*~bi,    c = c,         d = d,         e = e/~bi,    f = f         ],/*9*/        [ a = a*~bi,    b = b,         c = c,         d = d*~bi,    e = e*~bi,    f = f*~bi    ],/*10*/ [ a = a,         b = b,         c = c*~bi,    d = d/~bi,    e = e,         f = f         ],/*11*/       [ a = a/~bi,    b = b/~bi,    c = c/~bi,    d = d*~bi,    e = e,         f = f         ],/*12*/ [ a = a*~n2*~bi, b = b*~n2*~bi, c = c*~n2*~bi, d = d*~n2/~bi, e = e*~n2/~bi, f = f*~n2/~bi ],/*13*/     [ a = a,         b = b,         c = c,         d = d*~bi,    e = e,         f = f*~bi    ],/*14*/       [ a = a,         b = b/~bi,    c = c,         d = d,         e = e*~bi,    f = f         ],/*15*/       [ a = a/~bi,    b = b,         c = c/~bi,    d = d,         e = e/~bi,    f = f/~bi    ],/*16*/ [ a = a,         b = b,         c = c*~bi,    d = d/~bi,    e = e,         f = f         ],/*17*/       [ a = a,         b = b*~bi,    c = c,         d = d,         e = e,         f = f*~bi    ],/*18*/       [ a = a*~n3*~bi, b = b*~n3/~bi, c = c*~n3/~bi, d = d*~n3*~bi, e = e*~n3*~bi, f = f*~n3/~bi ],/*19*/     [ a = a/~bi,    b = b,         c = c,         d = d/~bi,    e = e,         f = f*~bi    ],/*20*/        [ a = a*~bi,    b = b*~bi,    c = c,         d = d,         e = e/~bi,    f = f/~bi    ],/*21*/ [ a = a,         b = b/~bi,    c = c*~bi,    d = d,         e = e,         f = f*~bi    ],/*22*/        [ a = a,         b = b,         c = c/~bi,    d = d*~bi,    e = e,         f = f         ],/*23*/       [ a = a,         b = b,         c = c,         d = d/~bi,    e = e,         f = f/~bi    ],/*24*/       [ a = a/~bi,    b = b,         c = c,         d = d,         e = e,         f = f*~bi    ],/*25*/       [ a = a*~bi,    b = b*~bi,    c = c*~bi,    d = d,         e = e,         f = f         ],/*26*/        [ a = a,         b = b/~bi,    c = c/~bi,    d = d*~bi,    e = e*~bi,    f = f         ],/*27*/ [ a = a,         b = b,         c = c,         d = d/~bi,    e = e/~bi,    f = f         ],/*28*/       [ a = a*~n4/~bi, b = b*~n4*~bi, c = c*~n4*~bi, d = d*~n4*~bi, e = e*~n4*~bi, f = f*~n4/~bi ],/*29*/     [ a = a,         b = b,         c = c/~bi,    d = d/~bi,    e = e,         f = f         ],/*30*/       [ a = a*~n5*~bi, b = b*~n5/~bi, c = c*~n5*~bi, d = d*~n5*~bi, e = e*~n5/~bi, f = f*~n5*~bi ],/*31*/     [ a = a/~bi,    b = b*~bi,    c = c,         d = d,         e = e,         f = f/~bi    ],/*32*/        [ a = a,         b = b/~bi,    c = c,         d = d,         e = e*~bi,    f = f         ],/*33*/       [ a = a*~bi,    b = b*~bi,    c = c,         d = d,         e = e/~bi,    f = f         ],/*34*/        [ a = a/~bi,    b = b/~bi,    c = c,         d = d,         e = e*~bi,    f = f*~bi    ],/*35*/ [ a = a*~bi,    b = b,         c = c,         d = d/~bi,    e = e/~bi,    f = f/~bi    ],/*36*/ [ a = a/~bi,    b = b,         c = c/~bi,    d = d*~bi,    e = e,         f = f*~bi    ],/*37*/ [ a = a*~bi,    b = b*~bi,    c = c,         d = d,         e = e,         f = f         ],/*38*/       [ a = a,         b = b/~bi,    c = c*~bi,    d = d/~bi,    e = e*~bi,    f = f         ],/*39*/ [ a = a*~n6/~bi, b = b*~n6*~bi, c = c*~n6/~bi, d = d*~n6*~bi, e = e*~n6/~bi, f = f*~n6/~bi ],/*40*/     [ a = a,         b = b/~bi,    c = c*~bi,    d = d/~bi,    e = e*~bi,    f = f         ],/*41*/ [ a = a*~bi,    b = b,         c = c/~bi,    d = d,         e = e,         f = f*~bi    ],/*42*/        [ a = a,         b = b*~bi,    c = c,         d = d,         e = e/~bi,    f = f         ],/*43*/       [ a = a/~bi,    b = b,         c = c*~bi,    d = d*~bi,    e = e*~bi,    f = f         ],/*44*/ [ a = a*~bi,    b = b,         c = c,         d = d,         e = e,         f = f/~bi    ],/*45*/       [ a = a/~bi,    b = b,         c = c,         d = d/~bi,    e = e/~bi,    f = f         ],/*46*/        [ a = a,         b = b/~bi,    c = c/~bi,    d = d*~bi,    e = e*~bi,    f = f         ],/*47*/ [ a = a,         b = b*~bi,    c = c*~bi,    d = d/~bi,    e = e,         f = f         ],/*48*/        [ a = a,         b = b,         c = c/~bi,    d = d*~bi,    e = e,         f = f         ],/*49*/       [ a = a,         b = b,         c = c*~bi,    d = d,         e = e/~bi,    f = f*~bi    ],/*50*/        [ a = a*~bi,    b = b/~bi,    c = c,         d = d,         e = e*~bi,    f = f/~bi    ],/*51*/ [ a = a/~bi,    b = b,         c = c,         d = d/~bi,    e = e/~bi,    f = f*~bi    ],/*52*/ [ a = a*~bi,    b = b,         c = c/~bi,    d = d*~bi,    e = e,         f = f/~bi    ],/*53*/ [ a = a,         b = b*~bi,    c = c,         d = d,         e = e,         f = f         ],/*54*/      [ a = a*~n7/~bi, b = b*~n7/~bi, c = c*~n7*~bi, d = d*~n7/~bi, e = e*~n7*~bi, f = f*~n7*~bi ],/*55*/     [ a = a,         b = b,         c = c,         d = d*~bi,    e = e/~bi,    f = f         ],/*56*/       [ a = a*~bi,    b = b,         c = c,         d = d,         e = e,         f = f/~bi    ],/*57*/       [ a = a,         b = b*~bi,    c = c/~bi,    d = d,         e = e*~bi,    f = f         ],/*58*/        [ a = a/~bi,    b = b,         c = c*~bi,    d = d/~bi,    e = e,         f = f*~bi    ],/*59*/ [ a = a*~bi,    b = b,         c = c/~bi,    d = d,         e = e,         f = f/~bi    ],/*60*/        [ a = a/~bi,    b = b,         c = c,         d = d,         e = e,         f = f*~bi    ],/*61*/       [ a = a*~bi,    b = b,         c = c,         d = d,         e = e,         f = f         ],/*62*/      [ a = a*~n8/~bi, b = b*~n8/~bi, c = c*~n8*~bi, d = d*~n8*~bi, e = e*~n8/~bi, f = f*~n8/~bi ],/*63*/     [ a = a,         b = b*~bi,    c = c/~bi,    d = d,         e = e,         f = f*~bi    ],/*64*/        [ a = a*~n9*~bi, b = b*~n9/~bi, c = c*~n9*~bi, d = d*~n9/~bi, e = e*~n9*~bi, f = f*~n9/~bi ]]};
369
370         ~kws_setting_3_a = {[/*1*/      #a,b,c,d,e,f=[ ~a,~b,~c,~d,~e,~f  ],/*2*/       [ a = a*~n1/~bi,    b = b*~n1/~bi,    c = c*~n1/~bi,    d = d*~n1/~bi,    e = e*~n1/~bi,    f = f*~n1/~bi    ],/*3*/    [ a = a*~n1,         b = b*~n1*~bi,    c = c*~n1,         d = d*~n1,         e = e*~n1,         f = f*~n1*~bi    ],/*4*/        [ a = a*~n1*~bi,    b = b*~n1/~bi,    c = c*~n1,         d = d*~n1,         e = e*~n1*~bi,    f = f*~n1/~bi    ],/*5*/  [ a = a*~n1/~bi,    b = b*~n1*~bi,    c = c*~n1,         d = d*~n1*~bi,    e = e*~n1,         f = f*~n1*~bi    ],/*6*/  [ a = a*~n1*~bi,    b = b*~n1,         c = c*~n1*~bi,    d = d*~n1/~bi,    e = e*~n1,         f = f*~n1/~bi    ],/*7*/  [ a = a*~n1/~bi,    b = b*~n1/~bi,    c = c*~n1/~bi,    d = d*~n1,         e = e*~n1,         f = f*~n1         ],/*8*/ [ a = a*~n1,         b = b*~n1*~bi,    c = c*~n1,         d = d*~n1,         e = e*~n1/~bi,    f = f*~n1         ],/*9*/        [ a = a*~n1*~bi,    b = b*~n1,         c = c*~n1,         d = d*~n1*~bi,    e = e*~n1*~bi,    f = f*~n1*~bi    ],/*10*/ [ a = a*~n1,         b = b*~n1,         c = c*~n1*~bi,    d = d*~n1/~bi,    e = e*~n1,         f = f*~n1         ],/*11*/       [ a = a*~n1/~bi,    b = b*~n1/~bi,    c = c*~n1/~bi,    d = d*~n1*~bi,    e = e*~n1,         f = f*~n1         ],/*12*/ [ a = a*~n1*~bi,    b = b*~n1*~bi,    c = c*~n1*~bi,    d = d*~n1/~bi,    e = e*~n1/~bi,    f = f*~n1/~bi    ],/*13*/   [ a = a*~n1,         b = b*~n1,         c = c*~n1,         d = d*~n1*~bi,    e = e*~n1,         f = f*~n1*~bi    ],/*14*/       [ a = a*~n1,         b = b*~n1/~bi,    c = c*~n1,         d = d*~n1,         e = e*~n1*~bi,    f = f*~n1         ],/*15*/       [ a = a*~n1/~bi,    b = b*~n1,         c = c*~n1/~bi,    d = d*~n1,         e = e*~n1/~bi,    f = f*~n1/~bi    ],/*16*/ [ a = a*~n1,         b = b*~n1,         c = c*~n1*~bi,    d = d*~n1/~bi,    e = e*~n1,         f = f*~n1         ],/*17*/       [ a = a*~n1,         b = b*~n1*~bi,    c = c*~n1,         d = d*~n1,         e = e*~n1,         f = f*~n1*~bi    ],/*18*/       [ a = a*~n1*~bi,    b = b*~n1/~bi,    c = c*~n1/~bi,    d = d*~n1*~bi,    e = e*~n1*~bi,    f = f*~n1/~bi    ],/*19*/   [ a = a*~n1/~bi,    b = b*~n1,         c = c*~n1,         d = d*~n1/~bi,    e = e*~n1,         f = f*~n1*~bi    ],/*20*/        [ a = a*~n1*~bi,    b = b*~n1*~bi,    c = c*~n1,         d = d*~n1,         e = e*~n1/~bi,    f = f*~n1/~bi    ],/*21*/ [ a = a*~n1,         b = b*~n1/~bi,    c = c*~n1*~bi,    d = d*~n1,         e = e*~n1,         f = f*~n1*~bi    ],/*22*/        [ a = a*~n1,         b = b*~n1,         c = c*~n1/~bi,    d = d*~n1*~bi,    e = e*~n1,         f = f*~n1         ],/*23*/       [ a = a*~n1,         b = b*~n1,         c = c*~n1,         d = d*~n1/~bi,    e = e*~n1,         f = f*~n1/~bi    ],/*24*/       [ a = a*~n1/~bi,    b = b*~n1,         c = c*~n1,         d = d*~n1,         e = e*~n1,         f = f*~n1*~bi    ],/*25*/       [ a = a*~n1*~bi,    b = b*~n1*~bi,    c = c*~n1*~bi,    d = d*~n1,         e = e*~n1,         f = f*~n1         ],/*26*/        [ a = a*~n1,         b = b*~n1/~bi,    c = c*~n1/~bi,    d = d*~n1*~bi,    e = e*~n1*~bi,    f = f*~n1         ],/*27*/ [ a = a*~n1,         b = b*~n1,         c = c*~n1,         d = d*~n1/~bi,    e = e*~n1/~bi,    f = f*~n1         ],/*28*/       [ a = a*~n1/~bi,    b = b*~n1*~bi,    c = c*~n1*~bi,    d = d*~n1*~bi,    e = e*~n1*~bi,    f = f*~n1/~bi    ],/*29*/   [ a = a*~n1,         b = b*~n1,         c = c*~n1/~bi,    d = d*~n1/~bi,    e = e*~n1,         f = f*~n1         ],/*30*/       [ a = a*~n1*~bi,    b = b*~n1/~bi,    c = c*~n1*~bi,    d = d*~n1*~bi,    e = e*~n1/~bi,    f = f*~n1*~bi    ],/*31*/   [ a = a*~n1/~bi,    b = b*~n1*~bi,    c = c*~n1,         d = d*~n1,         e = e*~n1,         f = f*~n1/~bi    ],/*32*/        [ a = a*~n1,         b = b*~n1/~bi,    c = c*~n1,         d = d*~n1,         e = e*~n1*~bi,    f = f*~n1         ],/*33*/       [ a = a*~n1*~bi,    b = b*~n1*~bi,    c = c*~n1,         d = d*~n1,         e = e*~n1/~bi,    f = f*~n1         ],/*34*/        [ a = a*~n1/~bi,    b = b*~n1/~bi,    c = c*~n1,         d = d*~n1,         e = e*~n1*~bi,    f = f*~n1*~bi    ],/*35*/ [ a = a*~n1*~bi,    b = b*~n1,         c = c*~n1,         d = d*~n1/~bi,    e = e*~n1/~bi,    f = f*~n1/~bi    ],/*36*/ [ a = a*~n1/~bi,    b = b*~n1,         c = c*~n1/~bi,    d = d*~n1*~bi,    e = e*~n1,         f = f*~n1*~bi    ],/*37*/ [ a = a*~n1*~bi,    b = b*~n1*~bi,    c = c*~n1,         d = d*~n1,         e = e*~n1,         f = f*~n1         ],/*38*/       [ a = a*~n1,         b = b*~n1/~bi,    c = c*~n1*~bi,    d = d*~n1/~bi,    e = e*~n1*~bi,    f = f*~n1         ],/*39*/ [ a = a*~n1/~bi,    b = b*~n1*~bi,    c = c*~n1/~bi,    d = d*~n1*~bi,    e = e*~n1/~bi,    f = f*~n1/~bi    ],/*40*/   [ a = a*~n1,         b = b*~n1/~bi,    c = c*~n1*~bi,    d = d*~n1/~bi,    e = e*~n1*~bi,    f = f*~n1         ],/*41*/ [ a = a*~n1*~bi,    b = b*~n1,         c = c*~n1/~bi,    d = d*~n1,         e = e*~n1,         f = f*~n1*~bi    ],/*42*/        [ a = a*~n1,         b = b*~n1*~bi,    c = c*~n1,         d = d*~n1,         e = e*~n1/~bi,    f = f*~n1         ],/*43*/       [ a = a*~n1/~bi,    b = b*~n1,         c = c*~n1*~bi,    d = d*~n1*~bi,    e = e*~n1*~bi,    f = f*~n1         ],/*44*/ [ a = a*~n1*~bi,    b = b*~n1,         c = c*~n1,         d = d*~n1,         e = e*~n1,         f = f*~n1/~bi    ],/*45*/       [ a = a*~n1/~bi,    b = b*~n1,         c = c*~n1,         d = d*~n1/~bi,    e = e*~n1/~bi,    f = f*~n1         ],/*46*/        [ a = a*~n1,         b = b*~n1/~bi,    c = c*~n1/~bi,    d = d*~n1*~bi,    e = e*~n1*~bi,    f = f*~n1         ],/*47*/ [ a = a*~n1,         b = b*~n1*~bi,    c = c*~n1*~bi,    d = d*~n1/~bi,    e = e*~n1,         f = f*~n1         ],/*48*/        [ a = a*~n1,         b = b*~n1,         c = c*~n1/~bi,    d = d*~n1*~bi,    e = e*~n1,         f = f*~n1         ],/*49*/       [ a = a*~n1,         b = b*~n1,         c = c*~n1*~bi,    d = d*~n1,         e = e*~n1/~bi,    f = f*~n1*~bi    ],/*50*/        [ a = a*~n1*~bi,    b = b*~n1/~bi,    c = c*~n1,         d = d*~n1,         e = e*~n1*~bi,    f = f*~n1/~bi    ],/*51*/ [ a = a*~n1/~bi,    b = b*~n1,         c = c*~n1,         d = d*~n1/~bi,    e = e*~n1/~bi,    f = f*~n1*~bi    ],/*52*/ [ a = a*~n1*~bi,    b = b*~n1,         c = c*~n1/~bi,    d = d*~n1*~bi,    e = e*~n1,         f = f*~n1/~bi    ],/*53*/ [ a = a*~n1,         b = b*~n1*~bi,    c = c*~n1,         d = d*~n1,         e = e*~n1,         f = f*~n1         ],/*54*/      [ a = a*~n1/~bi,    b = b*~n1/~bi,    c = c*~n1*~bi,    d = d*~n1/~bi,    e = e*~n1*~bi,    f = f*~n1*~bi    ],/*55*/   [ a = a*~n1,         b = b*~n1,         c = c*~n1,         d = d*~n1*~bi,    e = e*~n1/~bi,    f = f*~n1         ],/*56*/       [ a = a*~n1*~bi,    b = b*~n1,         c = c*~n1,         d = d*~n1,         e = e*~n1,         f = f*~n1/~bi    ],/*57*/       [ a = a*~n1,         b = b*~n1*~bi,    c = c*~n1/~bi,    d = d*~n1,         e = e*~n1*~bi,    f = f*~n1         ],/*58*/        [ a = a*~n1/~bi,    b = b*~n1,         c = c*~n1*~bi,    d = d*~n1/~bi,    e = e*~n1,         f = f*~n1*~bi    ],/*59*/ [ a = a*~n1*~bi,    b = b*~n1,         c = c*~n1/~bi,    d = d*~n1,         e = e*~n1,         f = f*~n1/~bi    ],/*60*/        [ a = a*~n1/~bi,    b = b*~n1,         c = c*~n1,         d = d*~n1,         e = e*~n1,         f = f*~n1*~bi    ],/*61*/       [ a = a*~n1*~bi,    b = b*~n1,         c = c*~n1,         d = d*~n1,         e = e*~n1,         f = f*~n1         ],/*62*/      [ a = a*~n1/~bi,    b = b*~n1/~bi,    c = c*~n1*~bi,    d = d*~n1*~bi,    e = e*~n1/~bi,    f = f*~n1/~bi    ],/*63*/   [ a = a*~n1,         b = b*~n1*~bi,    c = c*~n1/~bi,    d = d*~n1,         e = e*~n1,         f = f*~n1*~bi    ],/*64*/        [ a = a*~n1*~bi,    b = b*~n1/~bi,    c = c*~n1*~bi,    d = d*~n1/~bi,    e = e*~n1*~bi,    f = f*~n1/~bi    ]]};
371         ~kws_setting_3_b = {[/*1*/      [ a = a*~n1,         b = b*~n1*~bi,    c = c*~n1,         d = d*~n1*~bi,    e = e*~n1,         f = f*~n1*~bi    ],/*2*/ [ a = a*~n1/~bi,    b = b*~n1/~bi,    c = c*~n1/~bi,    d = d*~n1/~bi,    e = e*~n1/~bi,    f = f*~n1/~bi    ],/*3*/    [ a = a*~n1,         b = b*~n1*~bi,    c = c*~n1,         d = d*~n1,         e = e*~n1,         f = f*~n1*~bi    ],/*4*/        [ a = a*~n1*~bi,    b = b*~n1/~bi,    c = c*~n1,         d = d*~n1,         e = e*~n1*~bi,    f = f*~n1/~bi    ],/*5*/  [ a = a*~n1/~bi,    b = b*~n1*~bi,    c = c*~n1,         d = d*~n1*~bi,    e = e*~n1,         f = f*~n1*~bi    ],/*6*/  [ a = a*~n1*~bi,    b = b*~n1,         c = c*~n1*~bi,    d = d*~n1/~bi,    e = e*~n1,         f = f*~n1/~bi    ],/*7*/  [ a = a*~n1/~bi,    b = b*~n1/~bi,    c = c*~n1/~bi,    d = d*~n1,         e = e*~n1,         f = f*~n1         ],/*8*/ [ a = a*~n1,         b = b*~n1*~bi,    c = c*~n1,         d = d*~n1,         e = e*~n1/~bi,    f = f*~n1         ],/*9*/        [ a = a*~n1*~bi,    b = b*~n1,         c = c*~n1,         d = d*~n1*~bi,    e = e*~n1*~bi,    f = f*~n1*~bi    ],/*10*/ [ a = a*~n1,         b = b*~n1,         c = c*~n1*~bi,    d = d*~n1/~bi,    e = e*~n1,         f = f*~n1         ],/*11*/       [ a = a*~n1/~bi,    b = b*~n1/~bi,    c = c*~n1/~bi,    d = d*~n1*~bi,    e = e*~n1,         f = f*~n1         ],/*12*/ [ a = a*~n1*~bi,    b = b*~n1*~bi,    c = c*~n1*~bi,    d = d*~n1/~bi,    e = e*~n1/~bi,    f = f*~n1/~bi    ],/*13*/   [ a = a*~n1,         b = b*~n1,         c = c*~n1,         d = d*~n1*~bi,    e = e*~n1,         f = f*~n1*~bi    ],/*14*/       [ a = a*~n1,         b = b*~n1/~bi,    c = c*~n1,         d = d*~n1,         e = e*~n1*~bi,    f = f*~n1         ],/*15*/       [ a = a*~n1/~bi,    b = b*~n1,         c = c*~n1/~bi,    d = d*~n1,         e = e*~n1/~bi,    f = f*~n1/~bi    ],/*16*/ [ a = a*~n1,         b = b*~n1,         c = c*~n1*~bi,    d = d*~n1/~bi,    e = e*~n1,         f = f*~n1         ],/*17*/       [ a = a*~n1,         b = b*~n1*~bi,    c = c*~n1,         d = d*~n1,         e = e*~n1,         f = f*~n1*~bi    ],/*18*/       [ a = a*~n1*~bi,    b = b*~n1/~bi,    c = c*~n1/~bi,    d = d*~n1*~bi,    e = e*~n1*~bi,    f = f*~n1/~bi    ],/*19*/   [ a = a*~n1/~bi,    b = b*~n1,         c = c*~n1,         d = d*~n1/~bi,    e = e*~n1,         f = f*~n1*~bi    ],/*20*/        [ a = a*~n1*~bi,    b = b*~n1*~bi,    c = c*~n1,         d = d*~n1,         e = e*~n1/~bi,    f = f*~n1/~bi    ],/*21*/ [ a = a*~n1,         b = b*~n1/~bi,    c = c*~n1*~bi,    d = d*~n1,         e = e*~n1,         f = f*~n1*~bi    ],/*22*/        [ a = a*~n1,         b = b*~n1,         c = c*~n1/~bi,    d = d*~n1*~bi,    e = e*~n1,         f = f*~n1         ],/*23*/       [ a = a*~n1,         b = b*~n1,         c = c*~n1,         d = d*~n1/~bi,    e = e*~n1,         f = f*~n1/~bi    ],/*24*/       [ a = a*~n1/~bi,    b = b*~n1,         c = c*~n1,         d = d*~n1,         e = e*~n1,         f = f*~n1*~bi    ],/*25*/       [ a = a*~n1*~bi,    b = b*~n1*~bi,    c = c*~n1*~bi,    d = d*~n1,         e = e*~n1,         f = f*~n1         ],/*26*/        [ a = a*~n1,         b = b*~n1/~bi,    c = c*~n1/~bi,    d = d*~n1*~bi,    e = e*~n1*~bi,    f = f*~n1         ],/*27*/ [ a = a*~n1,         b = b*~n1,         c = c*~n1,         d = d*~n1/~bi,    e = e*~n1/~bi,    f = f*~n1         ],/*28*/       [ a = a*~n1/~bi,    b = b*~n1*~bi,    c = c*~n1*~bi,    d = d*~n1*~bi,    e = e*~n1*~bi,    f = f*~n1/~bi    ],/*29*/   [ a = a*~n1,         b = b*~n1,         c = c*~n1/~bi,    d = d*~n1/~bi,    e = e*~n1,         f = f*~n1         ],/*30*/       [ a = a*~n1*~bi,    b = b*~n1/~bi,    c = c*~n1*~bi,    d = d*~n1*~bi,    e = e*~n1/~bi,    f = f*~n1*~bi    ],/*31*/   [ a = a*~n1/~bi,    b = b*~n1*~bi,    c = c*~n1,         d = d*~n1,         e = e*~n1,         f = f*~n1/~bi    ],/*32*/        [ a = a*~n1,         b = b*~n1/~bi,    c = c*~n1,         d = d*~n1,         e = e*~n1*~bi,    f = f*~n1         ],/*33*/       [ a = a*~n1*~bi,    b = b*~n1*~bi,    c = c*~n1,         d = d*~n1,         e = e*~n1/~bi,    f = f*~n1         ],/*34*/        [ a = a*~n1/~bi,    b = b*~n1/~bi,    c = c*~n1,         d = d*~n1,         e = e*~n1*~bi,    f = f*~n1*~bi    ],/*35*/ [ a = a*~n1*~bi,    b = b*~n1,         c = c*~n1,         d = d*~n1/~bi,    e = e*~n1/~bi,    f = f*~n1/~bi    ],/*36*/ [ a = a*~n1/~bi,    b = b*~n1,         c = c*~n1/~bi,    d = d*~n1*~bi,    e = e*~n1,         f = f*~n1*~bi    ],/*37*/ [ a = a*~n1*~bi,    b = b*~n1*~bi,    c = c*~n1,         d = d*~n1,         e = e*~n1,         f = f*~n1         ],/*38*/       [ a = a*~n1,         b = b*~n1/~bi,    c = c*~n1*~bi,    d = d*~n1/~bi,    e = e*~n1*~bi,    f = f*~n1         ],/*39*/ [ a = a*~n1/~bi,    b = b*~n1*~bi,    c = c*~n1/~bi,    d = d*~n1*~bi,    e = e*~n1/~bi,    f = f*~n1/~bi    ],/*40*/   [ a = a*~n1,         b = b*~n1/~bi,    c = c*~n1*~bi,    d = d*~n1/~bi,    e = e*~n1*~bi,    f = f*~n1         ],/*41*/ [ a = a*~n1*~bi,    b = b*~n1,         c = c*~n1/~bi,    d = d*~n1,         e = e*~n1,         f = f*~n1*~bi    ],/*42*/        [ a = a*~n1,         b = b*~n1*~bi,    c = c*~n1,         d = d*~n1,         e = e*~n1/~bi,    f = f*~n1         ],/*43*/       [ a = a*~n1/~bi,    b = b*~n1,         c = c*~n1*~bi,    d = d*~n1*~bi,    e = e*~n1*~bi,    f = f*~n1         ],/*44*/ [ a = a*~n1*~bi,    b = b*~n1,         c = c*~n1,         d = d*~n1,         e = e*~n1,         f = f*~n1/~bi    ],/*45*/       [ a = a*~n1/~bi,    b = b*~n1,         c = c*~n1,         d = d*~n1/~bi,    e = e*~n1/~bi,    f = f*~n1         ],/*46*/        [ a = a*~n1,         b = b*~n1/~bi,    c = c*~n1/~bi,    d = d*~n1*~bi,    e = e*~n1*~bi,    f = f*~n1         ],/*47*/ [ a = a*~n1,         b = b*~n1*~bi,    c = c*~n1*~bi,    d = d*~n1/~bi,    e = e*~n1,         f = f*~n1         ],/*48*/        [ a = a*~n1,         b = b*~n1,         c = c*~n1/~bi,    d = d*~n1*~bi,    e = e*~n1,         f = f*~n1         ],/*49*/       [ a = a*~n1,         b = b*~n1,         c = c*~n1*~bi,    d = d*~n1,         e = e*~n1/~bi,    f = f*~n1*~bi    ],/*50*/        [ a = a*~n1*~bi,    b = b*~n1/~bi,    c = c*~n1,         d = d*~n1,         e = e*~n1*~bi,    f = f*~n1/~bi    ],/*51*/ [ a = a*~n1/~bi,    b = b*~n1,         c = c*~n1,         d = d*~n1/~bi,    e = e*~n1/~bi,    f = f*~n1*~bi    ],/*52*/ [ a = a*~n1*~bi,    b = b*~n1,         c = c*~n1/~bi,    d = d*~n1*~bi,    e = e*~n1,         f = f*~n1/~bi    ],/*53*/ [ a = a*~n1,         b = b*~n1*~bi,    c = c*~n1,         d = d*~n1,         e = e*~n1,         f = f*~n1         ],/*54*/      [ a = a*~n1/~bi,    b = b*~n1/~bi,    c = c*~n1*~bi,    d = d*~n1/~bi,    e = e*~n1*~bi,    f = f*~n1*~bi    ],/*55*/   [ a = a*~n1,         b = b*~n1,         c = c*~n1,         d = d*~n1*~bi,    e = e*~n1/~bi,    f = f*~n1         ],/*56*/       [ a = a*~n1*~bi,    b = b*~n1,         c = c*~n1,         d = d*~n1,         e = e*~n1,         f = f*~n1/~bi    ],/*57*/       [ a = a*~n1,         b = b*~n1*~bi,    c = c*~n1/~bi,    d = d*~n1,         e = e*~n1*~bi,    f = f*~n1         ],/*58*/        [ a = a*~n1/~bi,    b = b*~n1,         c = c*~n1*~bi,    d = d*~n1/~bi,    e = e*~n1,         f = f*~n1*~bi    ],/*59*/ [ a = a*~n1*~bi,    b = b*~n1,         c = c*~n1/~bi,    d = d*~n1,         e = e*~n1,         f = f*~n1/~bi    ],/*60*/        [ a = a*~n1/~bi,    b = b*~n1,         c = c*~n1,         d = d*~n1,         e = e*~n1,         f = f*~n1*~bi    ],/*61*/       [ a = a*~n1*~bi,    b = b*~n1,         c = c*~n1,         d = d*~n1,         e = e*~n1,         f = f*~n1         ],/*62*/      [ a = a*~n1/~bi,    b = b*~n1/~bi,    c = c*~n1*~bi,    d = d*~n1*~bi,    e = e*~n1/~bi,    f = f*~n1/~bi    ],/*63*/   [ a = a*~n1,         b = b*~n1*~bi,    c = c*~n1/~bi,    d = d*~n1,         e = e*~n1,         f = f*~n1*~bi    ],/*64*/        [ a = a*~n1*~bi,    b = b*~n1/~bi,    c = c*~n1*~bi,    d = d*~n1/~bi,    e = e*~n1*~bi,    f = f*~n1/~bi    ]]};
372
373
374         //synthdefs
375
376         ~gsine = {
377
378                 SynthDef(\gsineicfld1, {arg graindur = 0.04, dur = 2000, atk = 0.007, rel = 0.01, gate = 1, amp = 1, i = 1, vol = ~vol, rate = 20, tune = 0,dseqval,
379                         a, b, c, d, e, f, pan=0, fc = 1;
380                         var s1, out, env1, s2, dseq;
381                         9.do(x = 0; {("n"++(x=x+1)).asSymbol.envirPut(~n_value1)}); //for custom values replace "~n_value1" with "[a, b, c, d, etc...].at(x-1)" with the variable amount the same as the #.do value - for all synthdefs
382                         dseq = Dseq(
383                                 case
384                                 {~kws_setting == 1}{~kws_setting_1_a.value;}
385                                 {~kws_setting == 2}{~kws_setting_2_a.value;}
386                                 {~kws_setting == 3}{~kws_setting_3_a.value;} ++ Array.fill((~gsinenum*~first_harmonic -1), {
387                                         case
388                                         {~kws_setting == 1}{~kws_setting_1_b.value;}
389                                         {~kws_setting == 2}{~kws_setting_2_b.value;}
390                                         {~kws_setting == 3}{~kws_setting_3_b.value;}}).flatten, inf);
391                         s1 = GrainSin.ar(1, Impulse.ar(dur), 1/(dur),Demand.ar(Impulse.ar(dur), 0, dseq));
392                         if(~low_pass_filter_on == 1, {s1 = BLowPass.ar(s1, ~low_pass_filter_freq_limit);}, {s1 = s1});
393                         OffsetOut.ar(0, s1.dup*vol);
394                 }, [\ir]).add;
395
396                 SynthDef(\gsineicrld1, {arg graindur = 0.04, dur = 2000, atk = 0.007, rel = 0.01, gate = 1, amp = 1, i = 1, vol = ~vol, rate = 20, tune = 0,dseqval,
397                         a, b, c, d, e, f, pan=0, fc = 1, id = -1;
398                         var s1, out, env1, s2, dseq;
399                         9.do(x = 0; {("n"++(x=x+1)).asSymbol.envirPut(~n_value1)});
400                         dseq = Dseq([
401                                 case
402                                 {~kws_setting == 1}{~kws_setting_1_a.value;}
403                                 {~kws_setting == 2}{~kws_setting_2_a.value;}
404                                 {~kws_setting == 3}{~kws_setting_3_a.value;} ++ Array.fill((~gsinenum*~first_harmonic -1), {
405                                         case
406                                         {~kws_setting == 1}{~kws_setting_1_b.value;}
407                                         {~kws_setting == 2}{~kws_setting_2_b.value;}
408                                         {~kws_setting == 3}{~kws_setting_3_b.value;}}).flatten].flatten.reverse, inf);
409                         s1 = GrainSin.ar(1, Impulse.ar(dur), 1/(dur), Demand.ar(Impulse.ar(dur), 0, dseq));
410                         if(~low_pass_filter_on == 1, {s1 = BLowPass.ar(s1, ~low_pass_filter_freq_limit);}, {s1 = s1});
411                         OffsetOut.ar(0, s1.dup*vol);
412                 }, [\ir]).add;
413
414                 SynthDef(\gsineicfld2, {arg graindur = 0.04, dur = 2000, atk = 0.007, rel = 0.01, gate = 1, amp = 1, i = 1, vol = ~vol, rate = 20, tune = 0,dseqval,
415                         a, b, c, d, e, f, pan=0, fc = 1;
416                         var s1, out, env1, s2, dseq;
417                         9.do(x = 0; {("n"++(x=x+1)).asSymbol.envirPut(~n_value2)});
418                         dseq = Dseq(
419                                 case
420                                 {~kws_setting == 1}{~kws_setting_1_a.value;}
421                                 {~kws_setting == 2}{~kws_setting_2_a.value;}
422                                 {~kws_setting == 3}{~kws_setting_3_a.value;} ++ Array.fill((~gsinenum*~second_harmonic -1), {
423                                         case
424                                         {~kws_setting == 1}{~kws_setting_1_b.value;}
425                                         {~kws_setting == 2}{~kws_setting_2_b.value;}
426                                         {~kws_setting == 3}{~kws_setting_3_b.value;}}).flatten, inf);
427                         s1 = GrainSin.ar(1, Impulse.ar(dur), 1/(dur),Demand.ar(Impulse.ar(dur), 0, dseq));
428                         if(~low_pass_filter_on == 1, {s1 = BLowPass.ar(s1, ~low_pass_filter_freq_limit);}, {s1 = s1});
429                         OffsetOut.ar(0, s1.dup*vol);
430                 }, [\ir]).add;
431
432                 SynthDef(\gsineicrld2, {arg graindur = 0.04, dur = 2000, atk = 0.007, rel = 0.01, gate = 1, amp = 1, i = 1, vol = ~vol, rate = 20, tune = 0,dseqval,
433                         a, b, c, d, e, f, pan=0, fc = 1, id = -1;
434                         var s1, out, env1, s2, dseq;
435                         9.do(x = 0; {("n"++(x=x+1)).asSymbol.envirPut(~n_value2)});
436                         dseq = Dseq([
437                                 case
438                                 {~kws_setting == 1}{~kws_setting_1_a.value;}
439                                 {~kws_setting == 2}{~kws_setting_2_a.value;}
440                                 {~kws_setting == 3}{~kws_setting_3_a.value;} ++ Array.fill((~gsinenum*~second_harmonic -1), {
441                                         case
442                                         {~kws_setting == 1}{~kws_setting_1_b.value;}
443                                         {~kws_setting == 2}{~kws_setting_2_b.value;}
444                                         {~kws_setting == 3}{~kws_setting_3_b.value;}}).flatten].flatten.reverse, inf);
445                         s1 = GrainSin.ar(1, Impulse.ar(dur), 1/(dur), Demand.ar(Impulse.ar(dur), 0, dseq));
446                         if(~low_pass_filter_on == 1, {s1 = BLowPass.ar(s1, ~low_pass_filter_freq_limit);}, {s1 = s1});
447                         OffsetOut.ar(0, s1.dup*vol);
448                 }, [\ir]).add;
449
450                 SynthDef(\gsineicfld6, {arg graindur = 0.04, dur = 2000, atk = 0.007, rel = 0.01, gate = 1, amp = 1, i = 1, vol = ~vol, rate = 20, tune = 0,dseqval,
451                         a, b, c, d, e, f, pan=0, fc = 1;
452                         var s1, out, env1, s2, dseq;
453                         9.do(x = 0; {("n"++(x=x+1)).asSymbol.envirPut(~n_value6)});
454                         dseq = Dseq(
455                                 case
456                                 {~kws_setting == 1}{~kws_setting_1_a.value;}
457                                 {~kws_setting == 2}{~kws_setting_2_a.value;}
458                                 {~kws_setting == 3}{~kws_setting_3_a.value;} ++ Array.fill((~gsinenum*~third_harmonic -1), {
459                                         case
460                                         {~kws_setting == 1}{~kws_setting_1_b.value;}
461                                         {~kws_setting == 2}{~kws_setting_2_b.value;}
462                                         {~kws_setting == 3}{~kws_setting_3_b.value;}}).flatten, inf);
463                         s1 = GrainSin.ar(1, Impulse.ar(dur), 1/(dur),Demand.ar(Impulse.ar(dur), 0, dseq));
464                         if(~low_pass_filter_on == 1, {s1 = BLowPass.ar(s1, ~low_pass_filter_freq_limit);}, {s1 = s1});
465                         OffsetOut.ar(0, s1.dup*vol);
466                 }, [\ir]).add;
467
468                 SynthDef(\gsineicrld6, {arg graindur = 0.04, dur = 2000, atk = 0.007, rel = 0.01, gate = 1, amp = 1, i = 1, vol = ~vol, rate = 20, tune = 0,dseqval,
469                         a, b, c, d, e, f, pan=0, fc = 1;
470                         var s1, out, env1, s2, dseq;
471                         9.do(x = 0; {("n"++(x=x+1)).asSymbol.envirPut(~n_value6)});
472                         dseq = Dseq([
473                                 case
474                                 {~kws_setting == 1}{~kws_setting_1_a.value;}
475                                 {~kws_setting == 2}{~kws_setting_2_a.value;}
476                                 {~kws_setting == 3}{~kws_setting_3_a.value;} ++ Array.fill((~gsinenum*~third_harmonic -1), {
477                                         case
478                                         {~kws_setting == 1}{~kws_setting_1_b.value;}
479                                         {~kws_setting == 2}{~kws_setting_2_b.value;}
480                                         {~kws_setting == 3}{~kws_setting_3_b.value;}}).flatten].flatten.reverse, inf);
481                         s1 = GrainSin.ar(1, Impulse.ar(dur), 1/(dur), Demand.ar(Impulse.ar(dur), 0, dseq));
482                         if(~low_pass_filter_on == 1, {s1 = BLowPass.ar(s1, ~low_pass_filter_freq_limit);}, {s1 = s1});
483                         OffsetOut.ar(0, s1.dup*vol);
484                 }, [\ir]).add;
485
486                 if(~sendreplysynthdef_on == 1, {
487
488                         ~synthflow_random_sendreply_answer_f1 = '/synthflow_random_sendreply_answer_f1';
489                         ~synthflow_random_sendreply_answer_f2 = '/synthflow_random_sendreply_answer_f2';
490                         ~synthflow_random_sendreply_answer_f3 = '/synthflow_random_sendreply_answer_f3';
491                         ~synthflow_random_sendreply_answer_f4 = '/synthflow_random_sendreply_answer_f4';
492                         ~synthflow_random_sendreply_answer_f5 = '/synthflow_random_sendreply_answer_f5';
493                         ~synthflow_random_sendreply_answer_f6 = '/synthflow_random_sendreply_answer_f6';
494                         ~synthflow_random_sendreply_answer_f7 = '/synthflow_random_sendreply_answer_f7';
495                         ~synthflow_random_sendreply_answer_f8 = '/synthflow_random_sendreply_answer_f8';
496                         ~synthflow_random_sendreply_answer_f9 = '/synthflow_random_sendreply_answer_f9';
497                         ~synthflow_random_sendreply_answer_f10 = '/synthflow_random_sendreply_answer_f10';
498                         ~synthflow_random_sendreply_answer_f11 = '/synthflow_random_sendreply_answer_f11';
499                         ~synthflow_random_sendreply_answer_f12 = '/synthflow_random_sendreply_answer_f12';
500
501                         12.do(~sendreply_x = 0; {
502
503                                 ~sendreply_x=~sendreply_x+1;
504
505                                 SynthDef(\gsineicfld6_f++(~sendreply_x), {arg graindur = 0.04, dur = 2000, atk = 0.007, rel = 0.01, gate = 1, amp = 1, i = 1, vol = ~vol, rate = 20, tune = 0,dseqval,
506                                         a, b, c, d, e, f, pan=0, fc = 1;
507                                         var s1, out, env1, s2, dseq;
508                                         9.do(x = 0; {("n"++(x=x+1)).asSymbol.envirPut(~n_value6)});
509                                         dseq = Dseq(
510                                                 case
511                                                 {~kws_setting == 1}{~kws_setting_1_a.value;}
512                                                 {~kws_setting == 2}{~kws_setting_2_a.value;}
513                                                 {~kws_setting == 3}{~kws_setting_3_a.value;} ++ Array.fill((~gsinenum*~third_harmonic -1), {
514                                                         case
515                                                         {~kws_setting == 1}{~kws_setting_1_b.value;}
516                                                         {~kws_setting == 2}{~kws_setting_2_b.value;}
517                                                         {~kws_setting == 3}{~kws_setting_3_b.value;}}).flatten, inf);
518                                         s1 = GrainSin.ar(1, Impulse.ar(dur), 1/(dur),Demand.ar(Impulse.ar(dur), 0, dseq));
519                                         if(~low_pass_filter_on == 1, {s1 = BLowPass.ar(s1, ~low_pass_filter_freq_limit);}, {s1 = s1});
520                                         OffsetOut.ar(0, s1.dup*vol);
521                                         SendReply.ar(PulseDivider.ar(Impulse.ar(dur), (~kws_setting_1_a.value.size*(~gsinenum*~third_harmonic))), ("synthflow_random_sendreply_answer_f"++(~sendreply_x)).asSymbol.envirGet, [ dseq]);
522                                 }, [\ir]).add;
523
524                         });
525                 });
526         };
527
528
529         //sendyreply functions
530
531         ~send_reply_func_western = {~freqmap.at(rrand(60, 91));};
532         ~send_reply_func_eastern = {(rrand(~freqmap.at(60), ~freqmap.at(91);))};
533
534         case
535         {~sendreplyfuncswitch == 1;}{~send_reply_func = ~send_reply_func_western;}
536         {~sendreplyfuncswitch == 2;}{~send_reply_func = ~send_reply_func_eastern;};
537
538         OSCFunc({~f1 = ~send_reply_func.value; AppClock.sched(0,{~synthflow.value;});}, '/synthflow_random_sendreply_answer_f1');
539         OSCFunc({~f2 = ~send_reply_func.value; AppClock.sched(0,{~synthflow.value;});}, '/synthflow_random_sendreply_answer_f2');
540         OSCFunc({~f3 = ~send_reply_func.value; AppClock.sched(0,{~synthflow.value;});}, '/synthflow_random_sendreply_answer_f3');
541         OSCFunc({~f4 = ~send_reply_func.value; AppClock.sched(0,{~synthflow.value;});}, '/synthflow_random_sendreply_answer_f4');
542         OSCFunc({~f5 = ~send_reply_func.value; AppClock.sched(0,{~synthflow.value;});}, '/synthflow_random_sendreply_answer_f5');
543         OSCFunc({~f6 = ~send_reply_func.value; AppClock.sched(0,{~synthflow.value;});}, '/synthflow_random_sendreply_answer_f6');
544         OSCFunc({~f7 = ~send_reply_func.value; AppClock.sched(0,{~synthflow.value;});}, '/synthflow_random_sendreply_answer_f7');
545         OSCFunc({~f8 = ~send_reply_func.value; AppClock.sched(0,{~synthflow.value;});}, '/synthflow_random_sendreply_answer_f8');
546         OSCFunc({~f9 = ~send_reply_func.value; AppClock.sched(0,{~synthflow.value;});}, '/synthflow_random_sendreply_answer_f9');
547         OSCFunc({~f10 = ~send_reply_func.value; AppClock.sched(0,{~synthflow.value;});}, '/synthflow_random_sendreply_answer_f10');
548         OSCFunc({~f11 = ~send_reply_func.value; AppClock.sched(0,{~synthflow.value;});}, '/synthflow_random_sendreply_answer_f11');
549         OSCFunc({~f12 = ~send_reply_func.value; AppClock.sched(0,{~synthflow.value;});}, '/synthflow_random_sendreply_answer_f12');
550
551
552         //set base (lowest) frequencies, set starting values for synthdef, and load synthdef on server boot
553
554         if((~gsinenum == nil) or: (~synthdef != "gsineicld"), {
555                 (
556                         if(~basefreq == nil, {~basefreq = ~base_frequency});
557                         ~fmult = 16;
558                         (#a,b,c,d,e,f = [ ~basefreq,~basefreq,~basefreq,~basefreq,~basefreq,~basefreq  ];
559                                 ~a = a; ~b = b; ~c =c; ~d = d; ~e = e;~f=f;);
560
561                         ~synthdef = "gsineicld"; ~gsinenum = ~synthdefnum;
562
563                         ~gsine.value;
564                 );
565         });
566
567
568         //generate GUI window
569
570         w = Window("Timewave Synth", Rect(0,0,Window.screenBounds.width,Window.screenBounds.height), border:true);
571
572         view = UserView(w, Window.screenBounds);
573         view.clearOnRefresh = false;
574         view.background = Color.black;
575
576         //vertical grid (inactive)
577
578         /*~b1 = Window.screenBounds.width/(12*4) /*25.462962962963*/; ~btu = 31; ~btd = 375; ~bw = 0.5; ~bh = 120; ~bcolor = Color.grey;
579         View(w, Rect(~b1, ~btu, ~bw, ~bh)).background = ~bcolor;
580         View(w, Rect(~b1, ~btd, ~bw, ~bh)).background = ~bcolor;
581         54.do({View(w, Rect(~b1 = ~b1+(Window.screenBounds.width/(12*4)), ~btu, ~bw, ~bh)).background = ~bcolor;});
582         ~b1 = Window.screenBounds.width/(12*4);
583         54.do({View(w, Rect(~b1 = ~b1+(Window.screenBounds.width/(12*4)), ~btd, ~bw, ~bh)).background = ~bcolor;});*/
584
585
586         //horizontal grid
587
588         ~nh = 2;
589         ~nw = ~nh*1.6180339887499;
590
591         ~tgrid = 30;
592         ~bgrid = Window.screenBounds.height-(Window.screenBounds.height/1.6180339887499)+30;
593
594         ~dc1 = ~tgrid-5; ~dc2 = ~bgrid-5; ~dca = 10;
595
596         13.do(x=~tgrid-10; {View(w, Rect(1, x=x+10, Window.screenBounds.width, 0.5)).background = Color.new255(51, 51, 51)});
597         13.do(x=~bgrid-10; {View(w, Rect(1, x=x+10, Window.screenBounds.width, 0.5)).background = Color.new255(51, 51, 51)});
598
599         ~z1 = (View(w, Rect((if(~f1 == nil, {f1.value},{~f1.value}).explin(~outmin1,~outmax1,0,Window.screenBounds.width)), ~dc1=~dc1+10, ~nw, 2)).background = Color.white;);
600         ~z2 = (View(w, Rect((if(~f2 == nil, {f2.value},{~f2.value}).explin(~outmin1,~outmax1,0,Window.screenBounds.width)), ~dc1=~dc1+10, ~nw, 2)).background = Color.white;);
601         ~z3 = (View(w, Rect((if(~f3 == nil, {f3.value},{~f3.value}).explin(~outmin1,~outmax1,0,Window.screenBounds.width)), ~dc1=~dc1+10, ~nw, 2)).background = Color.white;);
602         ~z4 = (View(w, Rect((if(~f4 == nil, {f4.value},{~f4.value}).explin(~outmin1,~outmax1,0,Window.screenBounds.width)), ~dc1=~dc1+10, ~nw, 2)).background = Color.white;);
603         ~z5 = (View(w, Rect((if(~f5 == nil, {f5.value},{~f5.value}).explin(~outmin1,~outmax1,0,Window.screenBounds.width)), ~dc1=~dc1+10, ~nw, 2)).background = Color.white;);
604         ~z6 = (View(w, Rect((if(~f6 == nil, {f6.value},{~f6.value}).explin(~outmin1,~outmax1,0,Window.screenBounds.width)), ~dc1=~dc1+10, ~nw, 2)).background = Color.white;);
605         ~z7 = (View(w, Rect((if(~f7 == nil, {f7.value},{~f7.value}).explin(~outmin1,~outmax1,0,Window.screenBounds.width)), ~dc1=~dc1+10, ~nw, 2)).background = Color.white;);
606         ~z8 = (View(w, Rect((if(~f8 == nil, {f8.value},{~f8.value}).explin(~outmin1,~outmax1,0,Window.screenBounds.width)), ~dc1=~dc1+10, ~nw, 2)).background = Color.white;);
607         ~z9 = (View(w, Rect((if(~f9 == nil, {f9.value},{~f9.value}).explin(~outmin1,~outmax1,0,Window.screenBounds.width)), ~dc1=~dc1+10, ~nw, 2)).background = Color.white;);
608         ~z10 = (View(w, Rect((if(~f10 == nil, {f10.value},{~f10.value}).explin(~outmin1,~outmax1,0,Window.screenBounds.width)), ~dc1=~dc1+10, ~nw, 2)).background = Color.white;);
609         ~z11 = (View(w, Rect((if(~f11 == nil, {f11.value},{~f11.value}).explin(~outmin1,~outmax1,0,Window.screenBounds.width)), ~dc1=~dc1+10, ~nw, 2)).background = Color.white;);
610         ~z12 = (View(w, Rect((if(~f12 == nil, {f12.value},{~f12.value}).explin(~outmin1,~outmax1,0,Window.screenBounds.width)), ~dc1=~dc1+10, ~nw, 2)).background = Color.white;);
611         ~zmid = (View(w, Rect(x, 280, ~nw, 2)).background = Color.clear;);
612         ~z25 = (View(w, Rect((if(~f1 == nil, {f1.value},{~f1.value}).explin(~outmin2,~outmax2,0,Window.screenBounds.width)), ~dc2=~dc2+10, ~nw, 2)).background = Color.white;);
613         ~z26 = (View(w, Rect((if(~f2 == nil, {f2.value},{~f2.value}).explin(~outmin2,~outmax2,0,Window.screenBounds.width)), ~dc2=~dc2+10, ~nw, 2)).background = Color.white;);
614         ~z27 = (View(w, Rect((if(~f3 == nil, {f3.value},{~f3.value}).explin(~outmin2,~outmax2,0,Window.screenBounds.width)), ~dc2=~dc2+10, ~nw, 2)).background = Color.white;);
615         ~z28 = (View(w, Rect((if(~f4 == nil, {f4.value},{~f4.value}).explin(~outmin2,~outmax2,0,Window.screenBounds.width)), ~dc2=~dc2+10, ~nw, 2)).background = Color.white;);
616         ~z29 = (View(w, Rect((if(~f5 == nil, {f5.value},{~f5.value}).explin(~outmin2,~outmax2,0,Window.screenBounds.width)), ~dc2=~dc2+10, ~nw, 2)).background = Color.white;);
617         ~z30 = (View(w, Rect((if(~f6 == nil, {f6.value},{~f6.value}).explin(~outmin2,~outmax2,0,Window.screenBounds.width)), ~dc2=~dc2+10, ~nw, 2)).background = Color.white;);
618         ~z31 = (View(w, Rect((if(~f7 == nil, {f7.value},{~f7.value}).explin(~outmin2,~outmax2,0,Window.screenBounds.width)), ~dc2=~dc2+10, ~nw, 2)).background = Color.white;);
619         ~z32 = (View(w, Rect((if(~f8 == nil, {f8.value},{~f8.value}).explin(~outmin2,~outmax2,0,Window.screenBounds.width)), ~dc2=~dc2+10, ~nw, 2)).background = Color.white;);
620         ~z33 = (View(w, Rect((if(~f9 == nil, {f9.value},{~f9.value}).explin(~outmin2,~outmax2,0,Window.screenBounds.width)), ~dc2=~dc2+10, ~nw, 2)).background = Color.white;);
621         ~z34 = (View(w, Rect((if(~f10 == nil, {f10.value},{~f10.value}).explin(~outmin2,~outmax2,0,Window.screenBounds.width)), ~dc2=~dc2+10, ~nw, 2)).background = Color.white;);
622         ~z35 = (View(w, Rect((if(~f11 == nil, {f11.value},{~f11.value}).explin(~outmin2,~outmax2,0,Window.screenBounds.width)), ~dc2=~dc2+10, ~nw, 2)).background = Color.white;);
623         ~z36 = (View(w, Rect((if(~f12 == nil, {f12.value},{~f12.value}).explin(~outmin2,~outmax2,0,Window.screenBounds.width)), ~dc2=~dc2+10, ~nw, 2)).background = Color.white;);
624
625
626         ~dc1 = ~tgrid-5; ~dc2 = ~bgrid-5; ~dca = 10;
627
628
629         //synth functions (open, flow, slide, pause, free)
630
631         ~synthopen = {
632                 case
633                 {((~l1a.isRunning == false) and: (~l1a1.isRunning == false)) or: ~l1a1.isRunning == true}{
634                         if(~l1a1.isRunning == true, {
635                                 (1.do({var vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8,vol9,vol10,vol11,vol12,s1,s2,s3,s4,s5,s6,f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12;
636                                         #vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8,vol9,vol10,vol11,vol12 = [~vol1,~vol2,~vol3,~vol4,~vol5,~vol6,~vol7,~vol8,~vol9,~vol10,~vol11,~vol12];
637                                         #f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12 = [ 0,0,0,0,0,0,0,0,0,0,0,0 ];
638                                         s.makeBundle(0, {
639                                                 ~l1a1.set(\dur, f1,     \vol, vol1);  ~l1b1.set(\dur, f1,  \vol, vol1);
640                                                 ~l1c1.set(\dur, f1/~icd3,       \vol, vol1);  ~l1d1.set(\dur, f1/~icd3,  \vol, vol1);
641                                                 ~l1e1.set(\dur, f1/~icd6,       \vol, vol1);  ~l1f1.set(\dur, f1/~icd6,  \vol, vol1);
642                                                 ~l2a1.set(\dur, f2,     \vol, vol2);          ~l2b1.set(\dur, f2,  \vol, vol2);
643                                                 ~l2c1.set(\dur, f2/~icd3,       \vol, vol2);  ~l2d1.set(\dur, f2/~icd3,  \vol, vol2);
644                                                 ~l2e1.set(\dur, f2/~icd6,       \vol, vol2);  ~l2f1.set(\dur, f2/~icd6,  \vol, vol2);
645                                                 ~l3a1.set(\dur, f3,     \vol, vol3);          ~l3b1.set(\dur, f3,  \vol, vol3);
646                                                 ~l3c1.set(\dur, f3/~icd3,       \vol, vol3);  ~l3d1.set(\dur, f3/~icd3,  \vol, vol3);
647                                                 ~l3e1.set(\dur, f3/~icd6,       \vol, vol3);  ~l3f1.set(\dur, f3/~icd6,  \vol, vol3);
648                                                 ~l4a1.set(\dur, f4,    \vol, vol4);           ~l4b1.set(\dur, f4,  \vol, vol4);
649                                                 ~l4c1.set(\dur, f4/~icd3,       \vol, vol4);  ~l4d1.set(\dur, f4/~icd3,  \vol, vol4);
650                                                 ~l4e1.set(\dur, f4/~icd6,       \vol, vol4);  ~l4f1.set(\dur, f4/~icd6,  \vol, vol4);
651                                                 ~l5a1.set(\dur, f5,    \vol, vol5);           ~l5b1.set(\dur, f5,  \vol, vol5);
652                                                 ~l5c1.set(\dur, f5/~icd3,       \vol, vol5);  ~l5d1.set(\dur, f5/~icd3,  \vol, vol5);
653                                                 ~l5e1.set(\dur, f5/~icd6,       \vol, vol5);  ~l5f1.set(\dur, f5/~icd6,  \vol, vol5);
654                                                 ~l6a1.set(\dur, f6,    \vol, vol6);           ~l6b1.set(\dur, f6,  \vol, vol6);
655                                                 ~l6c1.set(\dur, f6/~icd3,       \vol, vol6);  ~l6d1.set(\dur, f6/~icd3,  \vol, vol6);
656                                                 ~l6e1.set(\dur, f6/~icd6,       \vol, vol6);  ~l6f1.set(\dur, f6/~icd6,  \vol, vol6);
657                                                 ~l7a1.set(\dur, f7,    \vol, vol7);           ~l7b1.set(\dur, f7,  \vol, vol7);
658                                                 ~l7c1.set(\dur, f7/~icd3,       \vol, vol7);  ~l7d1.set(\dur, f7/~icd3,  \vol, vol7);
659                                                 ~l7e1.set(\dur, f7/~icd6,       \vol, vol7);  ~l7f1.set(\dur, f7/~icd6,  \vol, vol7);
660                                                 ~l8a1.set(\dur, f8,    \vol, vol8);           ~l8b1.set(\dur, f8,  \vol, vol8);
661                                                 ~l8c1.set(\dur, f8/~icd3,       \vol, vol8);  ~l8d1.set(\dur, f8/~icd3,  \vol, vol8);
662                                                 ~l8e1.set(\dur, f8/~icd6,       \vol, vol8);  ~l8f1.set(\dur, f8/~icd6,  \vol, vol8);
663                                                 ~l9a1.set(\dur, f9,    \vol, vol9);          ~l9b1.set(\dur, f9,  \vol, vol9);
664                                                 ~l9c1.set(\dur, f9/~icd3,       \vol, vol9); ~l9d1.set(\dur, f9/~icd3,  \vol, vol9);
665                                                 ~l9e1.set(\dur, f9/~icd6,       \vol, vol9); ~l9f1.set(\dur, f9/~icd6,  \vol, vol9);
666                                                 ~l10a1.set(\dur, f10,  \vol, vol10);         ~l10b1.set(\dur, f10,  \vol, vol10);
667                                                 ~l10c1.set(\dur, f10/~icd3,     \vol, vol10);~l10d1.set(\dur, f10/~icd3,  \vol, vol10);
668                                                 ~l10e1.set(\dur, f10/~icd6,     \vol, vol10);~l10f1.set(\dur, f10/~icd6,  \vol, vol10);
669                                                 ~l11a1.set(\dur, f11,  \vol, vol11);         ~l11b1.set(\dur, f11,  \vol, vol11);
670                                                 ~l11c1.set(\dur, f11/~icd3,     \vol, vol11);~l11d1.set(\dur, f11/~icd3,  \vol, vol11);
671                                                 ~l11e1.set(\dur, f11/~icd6,     \vol, vol11);~l11f1.set(\dur, f11/~icd6,  \vol, vol11);
672                                                 ~l12a1.set(\dur, f12,  \vol, vol12);         ~l12b1.set(\dur, f12,  \vol, vol12);
673                                                 ~l12c1.set(\dur, f12/~icd3,     \vol, vol12);~l12d1.set(\dur, f12/~icd3,  \vol, vol12);
674                                                 ~l12e1.set(\dur, f12/~icd6,     \vol, vol12);~l12f1.set(\dur, f12/~icd6,  \vol, vol12);
675                                         });
676                                 }););
677                         });
678
679                         (
680                                 1.do({var vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8,vol9,vol10,vol11,vol12,s1,s2,s3,s4,s5,s6,s1_1,s1_2,s1_3,s1_4,s1_5,s1_6,s1_7,s1_8,s1_9,s1_10,s1_11,s1_12;
681                                         #vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8,vol9,vol10,vol11,vol12 = [~vol1,~vol2,~vol3,~vol4,~vol5,~vol6,~vol7,~vol8,~vol9,~vol10,~vol11,~vol12];
682                                         #s1,s2,s3,s4,s5,s6 = [\gsineicfld6, \gsineicrld6, \gsineicfld2, \gsineicrld2, \gsineicfld1, \gsineicrld1];
683                                         case
684                                         {~sendreplysynthdef_on == 0}{#s1_1,s1_2,s1_3,s1_4,s1_5,s1_6,s1_7,s1_8,s1_9,s1_10,s1_11,s1_12 = \gsineicfld6!12;}
685                                         {~sendreplysynthdef_on == 1}{#s1_1,s1_2,s1_3,s1_4,s1_5,s1_6,s1_7,s1_8,s1_9,s1_10,s1_11,s1_12 =
686                                                 [\gsineicfld6_f1, \gsineicfld6_f2, \gsineicfld6_f3, \gsineicfld6_f4, \gsineicfld6_f5, \gsineicfld6_f6, \gsineicfld6_f7, \gsineicfld6_f8, \gsineicfld6_f9, \gsineicfld6_f10, \gsineicfld6_f11, \gsineicfld6_f12];};
687                                         s.makeBundle(0, {
688                                                 ~l1a = Synth(s1_1, [\dur, ~f1,    \vol, vol1]).register;    ~l1b = Synth(s2, [\dur, ~f1,    \vol, vol1]);
689                                                 ~l1c = Synth(s3, [\dur, ~f1/~icd3,  \vol, vol1]);   ~l1d = Synth(s4, [\dur, ~f1/~icd3,  \vol, vol1]);
690                                                 ~l1e = Synth(s5, [\dur, ~f1/~icd6,  \vol, vol1]);   ~l1f = Synth(s6, [\dur, ~f1/~icd6,  \vol, vol1]);
691                                                 ~l2a = Synth(s1_2, [\dur, ~f2,    \vol, vol2]);        ~l2b = Synth(s2, [\dur, ~f2,    \vol, vol2]);
692                                                 ~l2c = Synth(s3, [\dur, ~f2/~icd3,  \vol, vol2]);   ~l2d = Synth(s4, [\dur, ~f2/~icd3,  \vol, vol2]);
693                                                 ~l2e = Synth(s5, [\dur, ~f2/~icd6,  \vol, vol2]);   ~l2f = Synth(s6, [\dur, ~f2/~icd6,  \vol, vol2]);
694                                                 ~l3a = Synth(s1_3, [\dur, ~f3,    \vol, vol3]);        ~l3b = Synth(s2, [\dur, ~f3,   \vol, vol3]);
695                                                 ~l3c = Synth(s3, [\dur, ~f3/~icd3,  \vol, vol3]);   ~l3d = Synth(s4, [\dur, ~f3/~icd3, \vol, vol3]);
696                                                 ~l3e = Synth(s5, [\dur, ~f3/~icd6,  \vol, vol3]);   ~l3f = Synth(s6, [\dur, ~f3/~icd6, \vol, vol3]);
697                                                 ~l4a = Synth(s1_4, [\dur, ~f4,    \vol, vol4]);       ~l4b = Synth(s2, [\dur, ~f4,   \vol, vol4]);
698                                                 ~l4c = Synth(s3, [\dur, ~f4/~icd3,  \vol, vol4]);  ~l4d = Synth(s4, [\dur, ~f4/~icd3, \vol, vol4]);
699                                                 ~l4e = Synth(s5, [\dur, ~f4/~icd6,  \vol, vol4]);   ~l4f = Synth(s6, [\dur, ~f4/~icd6, \vol, vol4]);
700                                                 ~l5a = Synth(s1_5, [\dur, ~f5,    \vol, vol5]);       ~l5b = Synth(s2, [\dur, ~f5,   \vol, vol5]);
701                                                 ~l5c = Synth(s3, [\dur, ~f5/~icd3,  \vol, vol5]);   ~l5d = Synth(s4, [\dur, ~f5/~icd3, \vol, vol5]);
702                                                 ~l5e = Synth(s5, [\dur, ~f5/~icd6,  \vol, vol5]);   ~l5f = Synth(s6, [\dur, ~f5/~icd6, \vol, vol5]);
703                                                 ~l6a = Synth(s1_6, [\dur, ~f6,    \vol, vol6]);       ~l6b = Synth(s2, [\dur, ~f6,   \vol, vol6]);
704                                                 ~l6c = Synth(s3, [\dur, ~f6/~icd3,  \vol, vol6]);   ~l6d = Synth(s4, [\dur, ~f6/~icd3, \vol, vol6]);
705                                                 ~l6e = Synth(s5, [\dur, ~f6/~icd6,  \vol, vol6]);   ~l6f = Synth(s6, [\dur, ~f6/~icd6, \vol, vol6]);
706                                                 ~l7a = Synth(s1_7, [\dur, ~f7,    \vol, vol7]);       ~l7b = Synth(s2, [\dur, ~f7,   \vol, vol7]);
707                                                 ~l7c = Synth(s3, [\dur, ~f7/~icd3,  \vol, vol7]);   ~l7d = Synth(s4, [\dur, ~f7/~icd3, \vol, vol7]);
708                                                 ~l7e = Synth(s5, [\dur, ~f7/~icd6,  \vol, vol7]);   ~l7f = Synth(s6, [\dur, ~f7/~icd6, \vol, vol7]);
709                                                 ~l8a = Synth(s1_8, [\dur, ~f8,    \vol, vol8]);       ~l8b = Synth(s2, [\dur, ~f8,   \vol, vol8]);
710                                                 ~l8c = Synth(s3, [\dur, ~f8/~icd3,  \vol, vol8]);   ~l8d = Synth(s4, [\dur, ~f8/~icd3, \vol, vol8]);
711                                                 ~l8e = Synth(s5, [\dur, ~f8/~icd6,  \vol, vol8]);   ~l8f = Synth(s6, [\dur, ~f8/~icd6, \vol, vol8]);
712                                                 ~l9a = Synth(s1_9, [\dur, ~f9,    \vol, vol9]);       ~l9b = Synth(s2, [\dur, ~f9,   \vol, vol9]);
713                                                 ~l9c = Synth(s3, [\dur, ~f9/~icd3,  \vol, vol9]);   ~l9d = Synth(s4, [\dur, ~f9/~icd3, \vol, vol9]);
714                                                 ~l9e = Synth(s5, [\dur, ~f9/~icd6,  \vol, vol9]);   ~l9f = Synth(s6, [\dur, ~f9/~icd6, \vol, vol9]);
715                                                 ~l10a = Synth(s1_10, [\dur,~f10,  \vol, vol10]);       ~l10b = Synth(s2, [\dur, ~f10, \vol, vol10]);
716                                                 ~l10c = Synth(s3, [\dur, ~f10/~icd3,  \vol, vol10]);~l10d = Synth(s4, [\dur, ~f10/~icd3,  \vol, vol10]);
717                                                 ~l10e = Synth(s5, [\dur, ~f10/~icd6,  \vol, vol10]);~l10f = Synth(s6, [\dur, ~f10/~icd6,  \vol, vol10]);
718                                                 ~l11a = Synth(s1_11, [\dur,~f11,   \vol, vol11]);      ~l11b = Synth(s2, [\dur, ~f11,    \vol, vol11]);
719                                                 ~l11c = Synth(s3, [\dur, ~f11/~icd3,  \vol, vol11]);~l11d = Synth(s4, [\dur, ~f11/~icd3,  \vol, vol11]);
720                                                 ~l11e = Synth(s5, [\dur, ~f11/~icd6,  \vol, vol11]);~l11f = Synth(s6, [\dur, ~f11/~icd6,  \vol, vol11]);
721                                                 ~l12a = Synth(s1_12, [\dur,~f12,   \vol, vol12]);      ~l12b = Synth(s2, [\dur, ~f12,    \vol, vol12]);
722                                                 ~l12c = Synth(s3, [\dur, ~f12/~icd3,  \vol, vol12]);~l12d = Synth(s4, [\dur, ~f12/~icd3,  \vol, vol12]);
723                                                 ~l12e = Synth(s5, [\dur, ~f12/~icd6,  \vol, vol12]);~l12f = Synth(s6, [\dur, ~f12/~icd6,  \vol, vol12]);
724                                         });
725                                 });
726                         );
727                         if(~l1a1.isRunning == true, {
728                                 AppClock.sched(0.161803398875,{
729                                         ([~l1a1,~l1b1,~l1c1,~l1d1,~l1e1,~l1f1,~l2a1,~l2b1,~l2c1,~l2d1,~l2e1,~l2f1,~l3a1,~l3b1,~l3c1,~l3d1,~l3e1,~l3f1,~l4a1,~l4b1,~l4c1,~l4d1,~l4e1,~l4f1,~l5a1,~l5b1,~l5c1,~l5d1,~l5e1,~l5f1,~l6a1,~l6b1,~l6c1,~l6d1,~l6e1,~l6f1,~l7a1,~l7b1,~l7c1,~l7d1,~l7e1,~l7f1,~l8a1,~l8b1,~l8c1,~l8d1,~l8e1,~l8f1,~l9a1,~l9b1,~l9c1,~l9d1,~l9e1,~l9f1,~l10a1,~l10b1,~l10c1,~l10d1,~l10e1,~l10f1,~l11a1,~l11b1,~l11c1,~l11d1,~l11e1,~l11f1,~l12a1,~l12b1,~l12c1,~l12d1,~l12e1,~l12f1 ].do(_.free)); ~slideroutine.stop;
730                                 });
731                         });
732                 }
733                 {~l1a.isRunning == true}{
734                         (1.do({var vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8,vol9,vol10,vol11,vol12,s1,s2,s3,s4,s5,s6,f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12;
735                                 #vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8,vol9,vol10,vol11,vol12 = [~vol1,~vol2,~vol3,~vol4,~vol5,~vol6,~vol7,~vol8,~vol9,~vol10,~vol11,~vol12];
736                                 #f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12 = [ 0,0,0,0,0,0,0,0,0,0,0,0 ];
737                                 s.makeBundle(0, {
738                                         ~l1a.set(\dur, f1,     \vol, vol1);  ~l1b.set(\dur, f1,  \vol, vol1);
739                                         ~l1c.set(\dur, f1/~icd3,       \vol, vol1);  ~l1d.set(\dur, f1/~icd3,  \vol, vol1);
740                                         ~l1e.set(\dur, f1/~icd6,       \vol, vol1);  ~l1f.set(\dur, f1/~icd6,  \vol, vol1);
741                                         ~l2a.set(\dur, f2,     \vol, vol2);          ~l2b.set(\dur, f2,  \vol, vol2);
742                                         ~l2c.set(\dur, f2/~icd3,       \vol, vol2);  ~l2d.set(\dur, f2/~icd3,  \vol, vol2);
743                                         ~l2e.set(\dur, f2/~icd6,       \vol, vol2);  ~l2f.set(\dur, f2/~icd6,  \vol, vol2);
744                                         ~l3a.set(\dur, f3,     \vol, vol3);          ~l3b.set(\dur, f3,  \vol, vol3);
745                                         ~l3c.set(\dur, f3/~icd3,       \vol, vol3);  ~l3d.set(\dur, f3/~icd3,  \vol, vol3);
746                                         ~l3e.set(\dur, f3/~icd6,       \vol, vol3);  ~l3f.set(\dur, f3/~icd6,  \vol, vol3);
747                                         ~l4a.set(\dur, f4,    \vol, vol4);           ~l4b.set(\dur, f4,  \vol, vol4);
748                                         ~l4c.set(\dur, f4/~icd3,       \vol, vol4);  ~l4d.set(\dur, f4/~icd3,  \vol, vol4);
749                                         ~l4e.set(\dur, f4/~icd6,       \vol, vol4);  ~l4f.set(\dur, f4/~icd6,  \vol, vol4);
750                                         ~l5a.set(\dur, f5,    \vol, vol5);           ~l5b.set(\dur, f5,  \vol, vol5);
751                                         ~l5c.set(\dur, f5/~icd3,       \vol, vol5);  ~l5d.set(\dur, f5/~icd3,  \vol, vol5);
752                                         ~l5e.set(\dur, f5/~icd6,       \vol, vol5);  ~l5f.set(\dur, f5/~icd6,  \vol, vol5);
753                                         ~l6a.set(\dur, f6,    \vol, vol6);           ~l6b.set(\dur, f6,  \vol, vol6);
754                                         ~l6c.set(\dur, f6/~icd3,       \vol, vol6);  ~l6d.set(\dur, f6/~icd3,  \vol, vol6);
755                                         ~l6e.set(\dur, f6/~icd6,       \vol, vol6);  ~l6f.set(\dur, f6/~icd6,  \vol, vol6);
756                                         ~l7a.set(\dur, f7,    \vol, vol7);           ~l7b.set(\dur, f7,  \vol, vol7);
757                                         ~l7c.set(\dur, f7/~icd3,       \vol, vol7);  ~l7d.set(\dur, f7/~icd3,  \vol, vol7);
758                                         ~l7e.set(\dur, f7/~icd6,       \vol, vol7);  ~l7f.set(\dur, f7/~icd6,  \vol, vol7);
759                                         ~l8a.set(\dur, f8,    \vol, vol8);           ~l8b.set(\dur, f8,  \vol, vol8);
760                                         ~l8c.set(\dur, f8/~icd3,       \vol, vol8);  ~l8d.set(\dur, f8/~icd3,  \vol, vol8);
761                                         ~l8e.set(\dur, f8/~icd6,       \vol, vol8);  ~l8f.set(\dur, f8/~icd6,  \vol, vol8);
762                                         ~l9a.set(\dur, f9,    \vol, vol9);          ~l9b.set(\dur, f9,  \vol, vol9);
763                                         ~l9c.set(\dur, f9/~icd3,       \vol, vol9); ~l9d.set(\dur, f9/~icd3,  \vol, vol9);
764                                         ~l9e.set(\dur, f9/~icd6,       \vol, vol9); ~l9f.set(\dur, f9/~icd6,  \vol, vol9);
765                                         ~l10a.set(\dur, f10,  \vol, vol10);         ~l10b.set(\dur, f10,  \vol, vol10);
766                                         ~l10c.set(\dur, f10/~icd3,     \vol, vol10);~l10d.set(\dur, f10/~icd3,  \vol, vol10);
767                                         ~l10e.set(\dur, f10/~icd6,     \vol, vol10);~l10f.set(\dur, f10/~icd6,  \vol, vol10);
768                                         ~l11a.set(\dur, f11,  \vol, vol11);         ~l11b.set(\dur, f11,  \vol, vol11);
769                                         ~l11c.set(\dur, f11/~icd3,     \vol, vol11,);~l11d.set(\dur, f11/~icd3,  \vol, vol11);
770                                         ~l11e.set(\dur, f11/~icd6,     \vol, vol11);~l11f.set(\dur, f11/~icd6,  \vol, vol11);
771                                         ~l12a.set(\dur, f12,  \vol, vol12);         ~l12b.set(\dur, f12,  \vol, vol12);
772                                         ~l12c.set(\dur, f12/~icd3,     \vol, vol12,);~l12d.set(\dur, f12/~icd3,  \vol, vol12);
773                                         ~l12e.set(\dur, f12/~icd6,     \vol, vol12);~l12f.set(\dur, f12/~icd6,  \vol, vol12);
774                                 });
775                         }););
776
777                         (
778                                 1.do({var vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8,vol9,vol10,vol11,vol12,s1,s2,s3,s4,s5,s6,s1_1,s1_2,s1_3,s1_4,s1_5,s1_6,s1_7,s1_8,s1_9,s1_10,s1_11,s1_12;
779                                         #vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8,vol9,vol10,vol11,vol12 = [~vol1,~vol2,~vol3,~vol4,~vol5,~vol6,~vol7,~vol8,~vol9,~vol10,~vol11,~vol12];
780                                         #s1,s2,s3,s4,s5,s6 = [\gsineicfld6, \gsineicrld6, \gsineicfld2, \gsineicrld2, \gsineicfld1, \gsineicrld1];
781                                         case
782                                         {~sendreplysynthdef_on == 0}{#s1_1,s1_2,s1_3,s1_4,s1_5,s1_6,s1_7,s1_8,s1_9,s1_10,s1_11,s1_12 = \gsineicfld6!12;}
783                                         {~sendreplysynthdef_on == 1}{#s1_1,s1_2,s1_3,s1_4,s1_5,s1_6,s1_7,s1_8,s1_9,s1_10,s1_11,s1_12 =
784                                                 [\gsineicfld6_f1, \gsineicfld6_f2, \gsineicfld6_f3, \gsineicfld6_f4, \gsineicfld6_f5, \gsineicfld6_f6, \gsineicfld6_f7, \gsineicfld6_f8, \gsineicfld6_f9, \gsineicfld6_f10, \gsineicfld6_f11, \gsineicfld6_f12];};
785                                         s.makeBundle(0, {
786                                                 ~l1a1 = Synth(s1_1, [\dur, ~f1,    \vol, vol1]).register;    ~l1b1 = Synth(s2, [\dur, ~f1,    \vol, vol1]);
787                                                 ~l1c1 = Synth(s3, [\dur, ~f1/~icd3,  \vol, vol1]);   ~l1d1 = Synth(s4, [\dur, ~f1/~icd3,  \vol, vol1]);
788                                                 ~l1e1 = Synth(s5, [\dur, ~f1/~icd6,  \vol, vol1]);   ~l1f1 = Synth(s6, [\dur, ~f1/~icd6,  \vol, vol1]);
789                                                 ~l2a1 = Synth(s1_2, [\dur, ~f2,    \vol, vol2]);        ~l2b1 = Synth(s2, [\dur, ~f2,    \vol, vol2]);
790                                                 ~l2c1 = Synth(s3, [\dur, ~f2/~icd3,  \vol, vol2]);   ~l2d1 = Synth(s4, [\dur, ~f2/~icd3,  \vol, vol2]);
791                                                 ~l2e1 = Synth(s5, [\dur, ~f2/~icd6,  \vol, vol2]);   ~l2f1 = Synth(s6, [\dur, ~f2/~icd6,  \vol, vol2]);
792                                                 ~l3a1 = Synth(s1_3, [\dur, ~f3,    \vol, vol3]);        ~l3b1 = Synth(s2, [\dur, ~f3,   \vol, vol3]);
793                                                 ~l3c1 = Synth(s3, [\dur, ~f3/~icd3,  \vol, vol3]);   ~l3d1 = Synth(s4, [\dur, ~f3/~icd3, \vol, vol3]);
794                                                 ~l3e1 = Synth(s5, [\dur, ~f3/~icd6,  \vol, vol3]);   ~l3f1 = Synth(s6, [\dur, ~f3/~icd6, \vol, vol3]);
795                                                 ~l4a1 = Synth(s1_4, [\dur, ~f4,    \vol, vol4]);       ~l4b1 = Synth(s2, [\dur, ~f4,   \vol, vol4]);
796                                                 ~l4c1 = Synth(s3, [\dur, ~f4/~icd3,  \vol, vol4]);  ~l4d1 = Synth(s4, [\dur, ~f4/~icd3, \vol, vol4]);
797                                                 ~l4e1 = Synth(s5, [\dur, ~f4/~icd6,  \vol, vol4]);   ~l4f1 = Synth(s6, [\dur, ~f4/~icd6, \vol, vol4]);
798                                                 ~l5a1 = Synth(s1_5, [\dur, ~f5,    \vol, vol5]);       ~l5b1 = Synth(s2, [\dur, ~f5,   \vol, vol5]);
799                                                 ~l5c1 = Synth(s3, [\dur, ~f5/~icd3,  \vol, vol5]);   ~l5d1 = Synth(s4, [\dur, ~f5/~icd3, \vol, vol5]);
800                                                 ~l5e1 = Synth(s5, [\dur, ~f5/~icd6,  \vol, vol5]);   ~l5f1 = Synth(s6, [\dur, ~f5/~icd6, \vol, vol5]);
801                                                 ~l6a1 = Synth(s1_6, [\dur, ~f6,    \vol, vol6]);       ~l6b1 = Synth(s2, [\dur, ~f6,   \vol, vol6]);
802                                                 ~l6c1 = Synth(s3, [\dur, ~f6/~icd3,  \vol, vol6]);   ~l6d1 = Synth(s4, [\dur, ~f6/~icd3, \vol, vol6]);
803                                                 ~l6e1 = Synth(s5, [\dur, ~f6/~icd6,  \vol, vol6]);   ~l6f1 = Synth(s6, [\dur, ~f6/~icd6, \vol, vol6]);
804                                                 ~l7a1 = Synth(s1_7, [\dur, ~f7,    \vol, vol7]);       ~l7b1 = Synth(s2, [\dur, ~f7,   \vol, vol7]);
805                                                 ~l7c1 = Synth(s3, [\dur, ~f7/~icd3,  \vol, vol7]);   ~l7d1 = Synth(s4, [\dur, ~f7/~icd3, \vol, vol7]);
806                                                 ~l7e1 = Synth(s5, [\dur, ~f7/~icd6,  \vol, vol7]);   ~l7f1 = Synth(s6, [\dur, ~f7/~icd6, \vol, vol7]);
807                                                 ~l8a1 = Synth(s1_8, [\dur, ~f8,    \vol, vol8]);       ~l8b1 = Synth(s2, [\dur, ~f8,   \vol, vol8]);
808                                                 ~l8c1 = Synth(s3, [\dur, ~f8/~icd3,  \vol, vol8]);   ~l8d1 = Synth(s4, [\dur, ~f8/~icd3, \vol, vol8]);
809                                                 ~l8e1 = Synth(s5, [\dur, ~f8/~icd6,  \vol, vol8]);   ~l8f1 = Synth(s6, [\dur, ~f8/~icd6, \vol, vol8]);
810                                                 ~l9a1 = Synth(s1_9, [\dur, ~f9,    \vol, vol9]);       ~l9b1 = Synth(s2, [\dur, ~f9,   \vol, vol9]);
811                                                 ~l9c1 = Synth(s3, [\dur, ~f9/~icd3,  \vol, vol9]);   ~l9d1 = Synth(s4, [\dur, ~f9/~icd3, \vol, vol9]);
812                                                 ~l9e1 = Synth(s5, [\dur, ~f9/~icd6,  \vol, vol9]);   ~l9f1 = Synth(s6, [\dur, ~f9/~icd6, \vol, vol9]);
813                                                 ~l10a1 = Synth(s1_10, [\dur,~f10,  \vol, vol10]);       ~l10b1 = Synth(s2, [\dur, ~f10, \vol, vol10]);
814                                                 ~l10c1 = Synth(s3, [\dur, ~f10/~icd3,  \vol, vol10]);~l10d1 = Synth(s4, [\dur, ~f10/~icd3,  \vol, vol10]);
815                                                 ~l10e1 = Synth(s5, [\dur, ~f10/~icd6,  \vol, vol10]);~l10f1 = Synth(s6, [\dur, ~f10/~icd6,  \vol, vol10]);
816                                                 ~l11a1 = Synth(s1_11, [\dur,~f11,   \vol, vol11]);      ~l11b1 = Synth(s2, [\dur, ~f11,    \vol, vol11]);
817                                                 ~l11c1 = Synth(s3, [\dur, ~f11/~icd3,  \vol, vol11]);~l11d1 = Synth(s4, [\dur, ~f11/~icd3,  \vol, vol11]);
818                                                 ~l11e1 = Synth(s5, [\dur, ~f11/~icd6,  \vol, vol11]);~l11f1 = Synth(s6, [\dur, ~f11/~icd6,  \vol, vol11]);
819                                                 ~l12a1 = Synth(s1_12, [\dur,~f12,   \vol, vol12]);      ~l12b1 = Synth(s2, [\dur, ~f12,    \vol, vol12]);
820                                                 ~l12c1 = Synth(s3, [\dur, ~f12/~icd3,  \vol, vol12]);~l12d1 = Synth(s4, [\dur, ~f12/~icd3,  \vol, vol12]);
821                                                 ~l12e1 = Synth(s5, [\dur, ~f12/~icd6,  \vol, vol12]);~l12f1 = Synth(s6, [\dur, ~f12/~icd6,  \vol, vol12]);
822                                         });
823                                 });
824                         );
825                         AppClock.sched(0.161803398875,{
826                                 ([~l1a,~l1b,~l1c,~l1d,~l1e,~l1f,~l2a,~l2b,~l2c,~l2d,~l2e,~l2f,~l3a,~l3b,~l3c,~l3d,~l3e,~l3f,~l4a,~l4b,~l4c,~l4d,~l4e,~l4f,~l5a,~l5b,~l5c,~l5d,~l5e,~l5f,~l6a,~l6b,~l6c,~l6d,~l6e,~l6f,~l7a,~l7b,~l7c,~l7d,~l7e,~l7f,~l8a,~l8b,~l8c,~l8d,~l8e,~l8f,~l9a,~l9b,~l9c,~l9d,~l9e,~l9f,~l10a,~l10b,~l10c,~l10d,~l10e,~l10f,~l11a,~l11b,~l11c,~l11d,~l11e,~l11f,~l12a,~l12b,~l12c,~l12d,~l12e,~l12f].do(_.free)); ~slideroutine.stop;
827                         });
828                 };
829
830                 if((~f1 > ~outmaxa) or: (~f1 < ~outmina), {~z25.close;~z1.close;~z25 = (View(w, Rect((~f1.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+10, ~nw, 2)).background = Color.white;);}, {~z1.close;~z25.close;~z1 = (View(w, Rect((~f1.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+10, ~nw, 2)).background = Color.white;);});
831                 if((~f2 > ~outmaxa) or: (~f2 < ~outmina), {~z26.close;~z2.close;~z26 = (View(w, Rect((~f2.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+20, ~nw, 2)).background = Color.white;);}, {~z2.close;~z26.close;~z2 = (View(w, Rect((~f2.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+20, ~nw, 2)).background = Color.white;);});
832                 if((~f3 > ~outmaxa) or: (~f3 < ~outmina), {~z27.close;~z3.close;~z27 = (View(w, Rect((~f3.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+30, ~nw, 2)).background = Color.white;);}, {~z3.close;~z27.close;~z3 = (View(w, Rect((~f3.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+30, ~nw, 2)).background = Color.white;);});
833                 if((~f4 > ~outmaxa) or: (~f4 < ~outmina), {~z28.close;~z4.close;~z28 = (View(w, Rect((~f4.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+40, ~nw, 2)).background = Color.white;);}, {~z4.close;~z28.close;~z4 = (View(w, Rect((~f4.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+40, ~nw, 2)).background = Color.white;);});
834                 if((~f5 > ~outmaxa) or: (~f5 < ~outmina), {~z29.close;~z5.close;~z29 = (View(w, Rect((~f5.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+50, ~nw, 2)).background = Color.white;);}, {~z5.close;~z29.close;~z5 = (View(w, Rect((~f5.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+50, ~nw, 2)).background = Color.white;);});
835                 if((~f6 > ~outmaxa) or: (~f6 < ~outmina), {~z30.close;~z6.close;~z30 = (View(w, Rect((~f6.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+60, ~nw, 2)).background = Color.white;);}, {~z6.close;~z30.close;~z6 = (View(w, Rect((~f6.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+60, ~nw, 2)).background = Color.white;);});
836                 if((~f7 > ~outmaxa) or: (~f7 < ~outmina), {~z31.close;~z7.close;~z31 = (View(w, Rect((~f7.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+70, ~nw, 2)).background = Color.white;);}, {~z7.close;~z31.close;~z7 = (View(w, Rect((~f7.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+70, ~nw, 2)).background = Color.white;);});
837                 if((~f8 > ~outmaxa) or: (~f8 < ~outmina), {~z32.close;~z8.close;~z32 = (View(w, Rect((~f8.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+80, ~nw, 2)).background = Color.white;);}, {~z8.close;~z32.close;~z8 = (View(w, Rect((~f8.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+80, ~nw, 2)).background = Color.white;);});
838                 if((~f9 > ~outmaxa) or: (~f9 < ~outmina), {~z33.close;~z9.close;~z33 = (View(w, Rect((~f9.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+90, ~nw, 2)).background = Color.white;);}, {~z9.close;~z33.close;~z9 = (View(w, Rect((~f9.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+90, ~nw, 2)).background = Color.white;);});
839                 if((~f10 > ~outmaxa) or: (~f10 < ~outmina), {~z34.close;~z10.close;~z34 = (View(w, Rect((~f10.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+100, ~nw, 2)).background = Color.white;);}, {~z10.close;~z34.close;~z10 = (View(w, Rect((~f10.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+100, ~nw, 2)).background = Color.white;);});
840                 if((~f11 > ~outmaxa) or: (~f11 < ~outmina), {~z35.close;~z11.close;~z35 = (View(w, Rect((~f11.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+110, ~nw, 2)).background = Color.white;);}, {~z11.close;~z35.close;~z11 = (View(w, Rect((~f11.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+110, ~nw, 2)).background = Color.white;);});
841                 if((~f12 > ~outmaxa) or: (~f12 < ~outmina), {~z36.close;~z12.close;~z36 = (View(w, Rect((~f12.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+120, ~nw, 2)).background = Color.white;);}, {~z12.close;~z36.close;~z12 = (View(w, Rect((~f12.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+120, ~nw, 2)).background = Color.white;);});
842
843                 b3.value = 1;
844         };
845
846         ~synthflow = {
847                 case
848                 {~l1a1.isRunning == true}{
849                         (1.do({var vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8,vol9,vol10,vol11,vol12,s1,s2,s3,s4,s5,s6;
850                                 #vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8,vol9,vol10,vol11,vol12 = [~vol1,~vol2,~vol3,~vol4,~vol5,~vol6,~vol7,~vol8,~vol9,~vol10,~vol11,~vol12];
851                                 s.makeBundle(0, {
852                                         ~l1a1.set(\dur, ~f1,     \vol, vol1);  ~l1b1.set(\dur, ~f1,  \vol, vol1);
853                                         ~l1c1.set(\dur, ~f1/~icd3,       \vol, vol1);  ~l1d1.set(\dur, ~f1/~icd3,  \vol, vol1);
854                                         ~l1e1.set(\dur, ~f1/~icd6,       \vol, vol1);  ~l1f1.set(\dur, ~f1/~icd6,  \vol, vol1);
855                                         ~l2a1.set(\dur, ~f2,     \vol, vol2);          ~l2b1.set(\dur, ~f2,  \vol, vol2);
856                                         ~l2c1.set(\dur, ~f2/~icd3,       \vol, vol2);  ~l2d1.set(\dur, ~f2/~icd3,  \vol, vol2);
857                                         ~l2e1.set(\dur, ~f2/~icd6,       \vol, vol2);  ~l2f1.set(\dur, ~f2/~icd6,  \vol, vol2);
858                                         ~l3a1.set(\dur, ~f3,     \vol, vol3);          ~l3b1.set(\dur, ~f3,  \vol, vol3);
859                                         ~l3c1.set(\dur, ~f3/~icd3,       \vol, vol3);  ~l3d1.set(\dur, ~f3/~icd3,  \vol, vol3);
860                                         ~l3e1.set(\dur, ~f3/~icd6,       \vol, vol3);  ~l3f1.set(\dur, ~f3/~icd6,  \vol, vol3);
861                                         ~l4a1.set(\dur, ~f4,    \vol, vol4);           ~l4b1.set(\dur, ~f4,  \vol, vol4);
862                                         ~l4c1.set(\dur, ~f4/~icd3,       \vol, vol4);  ~l4d1.set(\dur, ~f4/~icd3,  \vol, vol4);
863                                         ~l4e1.set(\dur, ~f4/~icd6,       \vol, vol4);  ~l4f1.set(\dur, ~f4/~icd6,  \vol, vol4);
864                                         ~l5a1.set(\dur, ~f5,    \vol, vol5);           ~l5b1.set(\dur, ~f5,  \vol, vol5);
865                                         ~l5c1.set(\dur, ~f5/~icd3,       \vol, vol5);  ~l5d1.set(\dur, ~f5/~icd3,  \vol, vol5);
866                                         ~l5e1.set(\dur, ~f5/~icd6,       \vol, vol5);  ~l5f1.set(\dur, ~f5/~icd6,  \vol, vol5);
867                                         ~l6a1.set(\dur, ~f6,    \vol, vol6);           ~l6b1.set(\dur, ~f6,  \vol, vol6);
868                                         ~l6c1.set(\dur, ~f6/~icd3,       \vol, vol6);  ~l6d1.set(\dur, ~f6/~icd3,  \vol, vol6);
869                                         ~l6e1.set(\dur, ~f6/~icd6,       \vol, vol6);  ~l6f1.set(\dur, ~f6/~icd6,  \vol, vol6);
870                                         ~l7a1.set(\dur, ~f7,    \vol, vol7);           ~l7b1.set(\dur, ~f7,  \vol, vol7);
871                                         ~l7c1.set(\dur, ~f7/~icd3,       \vol, vol7);  ~l7d1.set(\dur, ~f7/~icd3,  \vol, vol7);
872                                         ~l7e1.set(\dur, ~f7/~icd6,       \vol, vol7);  ~l7f1.set(\dur, ~f7/~icd6,  \vol, vol7);
873                                         ~l8a1.set(\dur, ~f8,    \vol, vol8);           ~l8b1.set(\dur, ~f8,  \vol, vol8);
874                                         ~l8c1.set(\dur, ~f8/~icd3,       \vol, vol8);  ~l8d1.set(\dur, ~f8/~icd3,  \vol, vol8);
875                                         ~l8e1.set(\dur, ~f8/~icd6,       \vol, vol8);  ~l8f1.set(\dur, ~f8/~icd6,  \vol, vol8);
876                                         ~l9a1.set(\dur, ~f9,    \vol, vol9);          ~l9b1.set(\dur, ~f9,  \vol, vol9);
877                                         ~l9c1.set(\dur, ~f9/~icd3,       \vol, vol9); ~l9d1.set(\dur, ~f9/~icd3,  \vol, vol9);
878                                         ~l9e1.set(\dur, ~f9/~icd6,       \vol, vol9); ~l9f1.set(\dur, ~f9/~icd6,  \vol, vol9);
879                                         ~l10a1.set(\dur, ~f10,  \vol, vol10);         ~l10b1.set(\dur, ~f10,  \vol, vol10);
880                                         ~l10c1.set(\dur, ~f10/~icd3,     \vol, vol10);~l10d1.set(\dur, ~f10/~icd3,  \vol, vol10);
881                                         ~l10e1.set(\dur, ~f10/~icd6,     \vol, vol10);~l10f1.set(\dur, ~f10/~icd6,  \vol, vol10);
882                                         ~l11a1.set(\dur, ~f11,  \vol, vol11);         ~l11b1.set(\dur, ~f11,  \vol, vol11);
883                                         ~l11c1.set(\dur, ~f11/~icd3,     \vol, vol11);~l11d1.set(\dur, ~f11/~icd3,  \vol, vol11);
884                                         ~l11e1.set(\dur, ~f11/~icd6,     \vol, vol11);~l11f1.set(\dur, ~f11/~icd6,  \vol, vol11);
885                                         ~l12a1.set(\dur, ~f12,  \vol, vol12);         ~l12b1.set(\dur, ~f12,  \vol, vol12);
886                                         ~l12c1.set(\dur, ~f12/~icd3,     \vol, vol12);~l12d1.set(\dur, ~f12/~icd3,  \vol, vol12);
887                                         ~l12e1.set(\dur, ~f12/~icd6,     \vol, vol12);~l12f1.set(\dur, ~f12/~icd6,  \vol, vol12);
888                                 });
889                         }););
890                 }
891                 {~l1a.isRunning == true} {
892                         (1.do({var vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8,vol9,vol10,vol11,vol12,s1,s2,s3,s4,s5,s6;
893                                 #vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8,vol9,vol10,vol11,vol12 = [~vol1,~vol2,~vol3,~vol4,~vol5,~vol6,~vol7,~vol8,~vol9,~vol10,~vol11,~vol12];
894                                 s.makeBundle(0, {
895                                         ~l1a.set(\dur, ~f1,     \vol, vol1);  ~l1b.set(\dur, ~f1,  \vol, vol1);
896                                         ~l1c.set(\dur, ~f1/~icd3,       \vol, vol1);  ~l1d.set(\dur, ~f1/~icd3,  \vol, vol1);
897                                         ~l1e.set(\dur, ~f1/~icd6,       \vol, vol1);  ~l1f.set(\dur, ~f1/~icd6,  \vol, vol1);
898                                         ~l2a.set(\dur, ~f2,     \vol, vol2);          ~l2b.set(\dur, ~f2,  \vol, vol2);
899                                         ~l2c.set(\dur, ~f2/~icd3,       \vol, vol2);  ~l2d.set(\dur, ~f2/~icd3,  \vol, vol2);
900                                         ~l2e.set(\dur, ~f2/~icd6,       \vol, vol2);  ~l2f.set(\dur, ~f2/~icd6,  \vol, vol2);
901                                         ~l3a.set(\dur, ~f3,     \vol, vol3);          ~l3b.set(\dur, ~f3,  \vol, vol3);
902                                         ~l3c.set(\dur, ~f3/~icd3,       \vol, vol3);  ~l3d.set(\dur, ~f3/~icd3,  \vol, vol3);
903                                         ~l3e.set(\dur, ~f3/~icd6,       \vol, vol3);  ~l3f.set(\dur, ~f3/~icd6,  \vol, vol3);
904                                         ~l4a.set(\dur, ~f4,    \vol, vol4);           ~l4b.set(\dur, ~f4,  \vol, vol4);
905                                         ~l4c.set(\dur, ~f4/~icd3,       \vol, vol4);  ~l4d.set(\dur, ~f4/~icd3,  \vol, vol4);
906                                         ~l4e.set(\dur, ~f4/~icd6,       \vol, vol4);  ~l4f.set(\dur, ~f4/~icd6,  \vol, vol4);
907                                         ~l5a.set(\dur, ~f5,    \vol, vol5);           ~l5b.set(\dur, ~f5,  \vol, vol5);
908                                         ~l5c.set(\dur, ~f5/~icd3,       \vol, vol5);  ~l5d.set(\dur, ~f5/~icd3,  \vol, vol5);
909                                         ~l5e.set(\dur, ~f5/~icd6,       \vol, vol5);  ~l5f.set(\dur, ~f5/~icd6,  \vol, vol5);
910                                         ~l6a.set(\dur, ~f6,    \vol, vol6);           ~l6b.set(\dur, ~f6,  \vol, vol6);
911                                         ~l6c.set(\dur, ~f6/~icd3,       \vol, vol6);  ~l6d.set(\dur, ~f6/~icd3,  \vol, vol6);
912                                         ~l6e.set(\dur, ~f6/~icd6,       \vol, vol6);  ~l6f.set(\dur, ~f6/~icd6,  \vol, vol6);
913                                         ~l7a.set(\dur, ~f7,    \vol, vol7);           ~l7b.set(\dur, ~f7,  \vol, vol7);
914                                         ~l7c.set(\dur, ~f7/~icd3,       \vol, vol7);  ~l7d.set(\dur, ~f7/~icd3,  \vol, vol7);
915                                         ~l7e.set(\dur, ~f7/~icd6,       \vol, vol7);  ~l7f.set(\dur, ~f7/~icd6,  \vol, vol7);
916                                         ~l8a.set(\dur, ~f8,    \vol, vol8);           ~l8b.set(\dur, ~f8,  \vol, vol8);
917                                         ~l8c.set(\dur, ~f8/~icd3,       \vol, vol8);  ~l8d.set(\dur, ~f8/~icd3,  \vol, vol8);
918                                         ~l8e.set(\dur, ~f8/~icd6,       \vol, vol8);  ~l8f.set(\dur, ~f8/~icd6,  \vol, vol8);
919                                         ~l9a.set(\dur, ~f9,    \vol, vol9);          ~l9b.set(\dur, ~f9,  \vol, vol9);
920                                         ~l9c.set(\dur, ~f9/~icd3,       \vol, vol9); ~l9d.set(\dur, ~f9/~icd3,  \vol, vol9);
921                                         ~l9e.set(\dur, ~f9/~icd6,       \vol, vol9); ~l9f.set(\dur, ~f9/~icd6,  \vol, vol9);
922                                         ~l10a.set(\dur, ~f10,  \vol, vol10);         ~l10b.set(\dur, ~f10,  \vol, vol10);
923                                         ~l10c.set(\dur, ~f10/~icd3,     \vol, vol10);~l10d.set(\dur, ~f10/~icd3,  \vol, vol10);
924                                         ~l10e.set(\dur, ~f10/~icd6,     \vol, vol10);~l10f.set(\dur, ~f10/~icd6,  \vol, vol10);
925                                         ~l11a.set(\dur, ~f11,  \vol, vol11);         ~l11b.set(\dur, ~f11,  \vol, vol11);
926                                         ~l11c.set(\dur, ~f11/~icd3,     \vol, vol11);~l11d.set(\dur, ~f11/~icd3,  \vol, vol11);
927                                         ~l11e.set(\dur, ~f11/~icd6,     \vol, vol11);~l11f.set(\dur, ~f11/~icd6,  \vol, vol11);
928                                         ~l12a.set(\dur, ~f12,  \vol, vol12);         ~l12b.set(\dur, ~f12,  \vol, vol12);
929                                         ~l12c.set(\dur, ~f12/~icd3,     \vol, vol12);~l12d.set(\dur, ~f12/~icd3,  \vol, vol12);
930                                         ~l12e.set(\dur, ~f12/~icd6,     \vol, vol12);~l12f.set(\dur, ~f12/~icd6,  \vol, vol12);
931                                 });
932                         }););
933                 };
934
935                 if((~f1 > ~outmaxa) or: (~f1 < ~outmina), {~z25.close;~z1.close;~z25 = (View(w, Rect((~f1.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+10, ~nw, 2)).background = Color.white;);}, {~z1.close;~z25.close;~z1 = (View(w, Rect((~f1.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+10, ~nw, 2)).background = Color.white;);});
936                 if((~f2 > ~outmaxa) or: (~f2 < ~outmina), {~z26.close;~z2.close;~z26 = (View(w, Rect((~f2.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+20, ~nw, 2)).background = Color.white;);}, {~z2.close;~z26.close;~z2 = (View(w, Rect((~f2.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+20, ~nw, 2)).background = Color.white;);});
937                 if((~f3 > ~outmaxa) or: (~f3 < ~outmina), {~z27.close;~z3.close;~z27 = (View(w, Rect((~f3.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+30, ~nw, 2)).background = Color.white;);}, {~z3.close;~z27.close;~z3 = (View(w, Rect((~f3.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+30, ~nw, 2)).background = Color.white;);});
938                 if((~f4 > ~outmaxa) or: (~f4 < ~outmina), {~z28.close;~z4.close;~z28 = (View(w, Rect((~f4.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+40, ~nw, 2)).background = Color.white;);}, {~z4.close;~z28.close;~z4 = (View(w, Rect((~f4.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+40, ~nw, 2)).background = Color.white;);});
939                 if((~f5 > ~outmaxa) or: (~f5 < ~outmina), {~z29.close;~z5.close;~z29 = (View(w, Rect((~f5.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+50, ~nw, 2)).background = Color.white;);}, {~z5.close;~z29.close;~z5 = (View(w, Rect((~f5.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+50, ~nw, 2)).background = Color.white;);});
940                 if((~f6 > ~outmaxa) or: (~f6 < ~outmina), {~z30.close;~z6.close;~z30 = (View(w, Rect((~f6.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+60, ~nw, 2)).background = Color.white;);}, {~z6.close;~z30.close;~z6 = (View(w, Rect((~f6.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+60, ~nw, 2)).background = Color.white;);});
941                 if((~f7 > ~outmaxa) or: (~f7 < ~outmina), {~z31.close;~z7.close;~z31 = (View(w, Rect((~f7.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+70, ~nw, 2)).background = Color.white;);}, {~z7.close;~z31.close;~z7 = (View(w, Rect((~f7.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+70, ~nw, 2)).background = Color.white;);});
942                 if((~f8 > ~outmaxa) or: (~f8 < ~outmina), {~z32.close;~z8.close;~z32 = (View(w, Rect((~f8.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+80, ~nw, 2)).background = Color.white;);}, {~z8.close;~z32.close;~z8 = (View(w, Rect((~f8.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+80, ~nw, 2)).background = Color.white;);});
943                 if((~f9 > ~outmaxa) or: (~f9 < ~outmina), {~z33.close;~z9.close;~z33 = (View(w, Rect((~f9.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+90, ~nw, 2)).background = Color.white;);}, {~z9.close;~z33.close;~z9 = (View(w, Rect((~f9.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+90, ~nw, 2)).background = Color.white;);});
944                 if((~f10 > ~outmaxa) or: (~f10 < ~outmina), {~z34.close;~z10.close;~z34 = (View(w, Rect((~f10.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+100, ~nw, 2)).background = Color.white;);}, {~z10.close;~z34.close;~z10 = (View(w, Rect((~f10.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+100, ~nw, 2)).background = Color.white;);});
945                 if((~f11 > ~outmaxa) or: (~f11 < ~outmina), {~z35.close;~z11.close;~z35 = (View(w, Rect((~f11.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+110, ~nw, 2)).background = Color.white;);}, {~z11.close;~z35.close;~z11 = (View(w, Rect((~f11.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+110, ~nw, 2)).background = Color.white;);});
946                 if((~f12 > ~outmaxa) or: (~f12 < ~outmina), {~z36.close;~z12.close;~z36 = (View(w, Rect((~f12.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+120, ~nw, 2)).background = Color.white;);}, {~z12.close;~z36.close;~z12 = (View(w, Rect((~f12.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+120, ~nw, 2)).background = Color.white;);});
947
948         };
949
950         ~synthslide = {
951                 case
952                 {~l1a1.isRunning == true}{(//fprog
953                         ~slideroutine = Routine({1.do({var vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8,vol9,vol10,vol11,vol12,s1,s2,s3,s4,s5,s6;
954                                 #vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8,vol9,vol10,vol11,vol12 = [~vol1,~vol2,~vol3,~vol4,~vol5,~vol6,~vol7,~vol8,~vol9,~vol10,~vol11,~vol12];
955                                 ~slidedo.do({~slidecount=~slidecount-1;
956                                         (
957                                                 [ ~f1=~f1+g,~f2=~f2+h,~f3=~f3+i,~f4=~f4+j,~f5=~f5+k,~f6=~f6+l,~f7=~f7+m,~f8=~f8+n,~f9=~f9+o,~f10=~f10+p,~f11=~f11+q,~f12=~f12+r ];
958                                                 s.makeBundle(0, {
959                                                         ~l1a1.set(\dur, ~f1,     \vol, vol1);  ~l1b1.set(\dur, ~f1,  \vol, vol1);
960                                                         ~l1c1.set(\dur, ~f1/~icd3,       \vol, vol1);  ~l1d1.set(\dur, ~f1/~icd3,  \vol, vol1);
961                                                         ~l1e1.set(\dur, ~f1/~icd6,       \vol, vol1);  ~l1f1.set(\dur, ~f1/~icd6,  \vol, vol1);
962                                                         ~l2a1.set(\dur, ~f2,     \vol, vol2);          ~l2b1.set(\dur, ~f2,  \vol, vol2);
963                                                         ~l2c1.set(\dur, ~f2/~icd3,       \vol, vol2);  ~l2d1.set(\dur, ~f2/~icd3,  \vol, vol2);
964                                                         ~l2e1.set(\dur, ~f2/~icd6,       \vol, vol2);  ~l2f1.set(\dur, ~f2/~icd6,  \vol, vol2);
965                                                         ~l3a1.set(\dur, ~f3,     \vol, vol3);          ~l3b1.set(\dur, ~f3,  \vol, vol3);
966                                                         ~l3c1.set(\dur, ~f3/~icd3,       \vol, vol3);  ~l3d1.set(\dur, ~f3/~icd3,  \vol, vol3);
967                                                         ~l3e1.set(\dur, ~f3/~icd6,       \vol, vol3);  ~l3f1.set(\dur, ~f3/~icd6,  \vol, vol3);
968                                                         ~l4a1.set(\dur, ~f4,    \vol, vol4);           ~l4b1.set(\dur, ~f4,  \vol, vol4);
969                                                         ~l4c1.set(\dur, ~f4/~icd3,       \vol, vol4);  ~l4d1.set(\dur, ~f4/~icd3,  \vol, vol4);
970                                                         ~l4e1.set(\dur, ~f4/~icd6,       \vol, vol4);  ~l4f1.set(\dur, ~f4/~icd6,  \vol, vol4);
971                                                         ~l5a1.set(\dur, ~f5,    \vol, vol5);           ~l5b1.set(\dur, ~f5,  \vol, vol5);
972                                                         ~l5c1.set(\dur, ~f5/~icd3,       \vol, vol5);  ~l5d1.set(\dur, ~f5/~icd3,  \vol, vol5);
973                                                         ~l5e1.set(\dur, ~f5/~icd6,       \vol, vol5);  ~l5f1.set(\dur, ~f5/~icd6,  \vol, vol5);
974                                                         ~l6a1.set(\dur, ~f6,    \vol, vol6);           ~l6b1.set(\dur, ~f6,  \vol, vol6);
975                                                         ~l6c1.set(\dur, ~f6/~icd3,       \vol, vol6);  ~l6d1.set(\dur, ~f6/~icd3,  \vol, vol6);
976                                                         ~l6e1.set(\dur, ~f6/~icd6,       \vol, vol6);  ~l6f1.set(\dur, ~f6/~icd6,  \vol, vol6);
977                                                         ~l7a1.set(\dur, ~f7,    \vol, vol7);           ~l7b1.set(\dur, ~f7,  \vol, vol7);
978                                                         ~l7c1.set(\dur, ~f7/~icd3,       \vol, vol7);  ~l7d1.set(\dur, ~f7/~icd3,  \vol, vol7);
979                                                         ~l7e1.set(\dur, ~f7/~icd6,       \vol, vol7);  ~l7f1.set(\dur, ~f7/~icd6,  \vol, vol7);
980                                                         ~l8a1.set(\dur, ~f8,    \vol, vol8);           ~l8b1.set(\dur, ~f8,  \vol, vol8);
981                                                         ~l8c1.set(\dur, ~f8/~icd3,       \vol, vol8);  ~l8d1.set(\dur, ~f8/~icd3,  \vol, vol8);
982                                                         ~l8e1.set(\dur, ~f8/~icd6,       \vol, vol8);  ~l8f1.set(\dur, ~f8/~icd6,  \vol, vol8);
983                                                         ~l9a1.set(\dur, ~f9,    \vol, vol9);          ~l9b1.set(\dur, ~f9,  \vol, vol9);
984                                                         ~l9c1.set(\dur, ~f9/~icd3,       \vol, vol9); ~l9d1.set(\dur, ~f9/~icd3,  \vol, vol9);
985                                                         ~l9e1.set(\dur, ~f9/~icd6,       \vol, vol9); ~l9f1.set(\dur, ~f9/~icd6,  \vol, vol9);
986                                                         ~l10a1.set(\dur, ~f10,  \vol, vol10);         ~l10b1.set(\dur, ~f10,  \vol, vol10);
987                                                         ~l10c1.set(\dur, ~f10/~icd3,     \vol, vol10);~l10d1.set(\dur, ~f10/~icd3,  \vol, vol10);
988                                                         ~l10e1.set(\dur, ~f10/~icd6,     \vol, vol10);~l10f1.set(\dur, ~f10/~icd6,  \vol, vol10);
989                                                         ~l11a1.set(\dur, ~f11,  \vol, vol11);         ~l11b1.set(\dur, ~f11,  \vol, vol11);
990                                                         ~l11c1.set(\dur, ~f11/~icd3,     \vol, vol11);~l11d1.set(\dur, ~f11/~icd3,  \vol, vol11);
991                                                         ~l11e1.set(\dur, ~f11/~icd6,     \vol, vol11);~l11f1.set(\dur, ~f11/~icd6,  \vol, vol11);
992                                                         ~l12a1.set(\dur, ~f12,  \vol, vol12);         ~l12b1.set(\dur, ~f12,  \vol, vol12);
993                                                         ~l12c1.set(\dur, ~f12/~icd3,     \vol, vol12);~l12d1.set(\dur, ~f12/~icd3,  \vol, vol12);
994                                                         ~l12e1.set(\dur, ~f12/~icd6,     \vol, vol12);~l12f1.set(\dur, ~f12/~icd6,  \vol, vol12);
995                                                 });
996                                         );
997
998                                         {if(~slidecount==0,{
999                                                 if((~f1 > ~outmaxa) or: (~f1 < ~outmina), {~z25.close;~z1.close;~z25 = (View(w, Rect((~f1.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+10, ~nw, 2)).background = Color.white;);}, {~z1.close;~z25.close;~z1 = (View(w, Rect((~f1.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+10, ~nw, 2)).background = Color.white;);});
1000                                                 if((~f2 > ~outmaxa) or: (~f2 < ~outmina), {~z26.close;~z2.close;~z26 = (View(w, Rect((~f2.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+20, ~nw, 2)).background = Color.white;);}, {~z2.close;~z26.close;~z2 = (View(w, Rect((~f2.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+20, ~nw, 2)).background = Color.white;);});
1001                                                 if((~f3 > ~outmaxa) or: (~f3 < ~outmina), {~z27.close;~z3.close;~z27 = (View(w, Rect((~f3.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+30, ~nw, 2)).background = Color.white;);}, {~z3.close;~z27.close;~z3 = (View(w, Rect((~f3.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+30, ~nw, 2)).background = Color.white;);});
1002                                                 if((~f4 > ~outmaxa) or: (~f4 < ~outmina), {~z28.close;~z4.close;~z28 = (View(w, Rect((~f4.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+40, ~nw, 2)).background = Color.white;);}, {~z4.close;~z28.close;~z4 = (View(w, Rect((~f4.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+40, ~nw, 2)).background = Color.white;);});
1003                                                 if((~f5 > ~outmaxa) or: (~f5 < ~outmina), {~z29.close;~z5.close;~z29 = (View(w, Rect((~f5.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+50, ~nw, 2)).background = Color.white;);}, {~z5.close;~z29.close;~z5 = (View(w, Rect((~f5.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+50, ~nw, 2)).background = Color.white;);});
1004                                                 if((~f6 > ~outmaxa) or: (~f6 < ~outmina), {~z30.close;~z6.close;~z30 = (View(w, Rect((~f6.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+60, ~nw, 2)).background = Color.white;);}, {~z6.close;~z30.close;~z6 = (View(w, Rect((~f6.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+60, ~nw, 2)).background = Color.white;);});
1005                                                 if((~f7 > ~outmaxa) or: (~f7 < ~outmina), {~z31.close;~z7.close;~z31 = (View(w, Rect((~f7.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+70, ~nw, 2)).background = Color.white;);}, {~z7.close;~z31.close;~z7 = (View(w, Rect((~f7.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+70, ~nw, 2)).background = Color.white;);});
1006                                                 if((~f8 > ~outmaxa) or: (~f8 < ~outmina), {~z32.close;~z8.close;~z32 = (View(w, Rect((~f8.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+80, ~nw, 2)).background = Color.white;);}, {~z8.close;~z32.close;~z8 = (View(w, Rect((~f8.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+80, ~nw, 2)).background = Color.white;);});
1007                                                 if((~f9 > ~outmaxa) or: (~f9 < ~outmina), {~z33.close;~z9.close;~z33 = (View(w, Rect((~f9.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+90, ~nw, 2)).background = Color.white;);}, {~z9.close;~z33.close;~z9 = (View(w, Rect((~f9.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+90, ~nw, 2)).background = Color.white;);});
1008                                                 if((~f10 > ~outmaxa) or: (~f10 < ~outmina), {~z34.close;~z10.close;~z34 = (View(w, Rect((~f10.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+100, ~nw, 2)).background = Color.white;);}, {~z10.close;~z34.close;~z10 = (View(w, Rect((~f10.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+100, ~nw, 2)).background = Color.white;);});
1009                                                 if((~f11 > ~outmaxa) or: (~f11 < ~outmina), {~z35.close;~z11.close;~z35 = (View(w, Rect((~f11.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+110, ~nw, 2)).background = Color.white;);}, {~z11.close;~z35.close;~z11 = (View(w, Rect((~f11.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+110, ~nw, 2)).background = Color.white;);});
1010                                                 if((~f12 > ~outmaxa) or: (~f12 < ~outmina), {~z36.close;~z12.close;~z36 = (View(w, Rect((~f12.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+120, ~nw, 2)).background = Color.white;);}, {~z12.close;~z36.close;~z12 = (View(w, Rect((~f12.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+120, ~nw, 2)).background = Color.white;);});
1011                                         });}.defer;
1012
1013                                         (~slidetime/~slidedo).wait;});});}).play;);}
1014                 {~l1a.isRunning == true} {(//fprog
1015                         ~slideroutine = Routine({1.do({var vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8,vol9,vol10,vol11,vol12,s1,s2,s3,s4,s5,s6;
1016                                 #vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8,vol9,vol10,vol11,vol12 = [~vol1,~vol2,~vol3,~vol4,~vol5,~vol6,~vol7,~vol8,~vol9,~vol10,~vol11,~vol12];
1017                                 ~slidedo.do({~slidecount=~slidecount-1;
1018                                         (
1019                                                 [ ~f1=~f1+g,~f2=~f2+h,~f3=~f3+i,~f4=~f4+j,~f5=~f5+k,~f6=~f6+l,~f7=~f7+m,~f8=~f8+n,~f9=~f9+o,~f10=~f10+p,~f11=~f11+q,~f12=~f12+r ];
1020                                                 s.makeBundle(0, {
1021                                                         ~l1a.set(\dur, ~f1,     \vol, vol1);  ~l1b.set(\dur, ~f1,  \vol, vol1);
1022                                                         ~l1c.set(\dur, ~f1/~icd3,       \vol, vol1);  ~l1d.set(\dur, ~f1/~icd3,  \vol, vol1);
1023                                                         ~l1e.set(\dur, ~f1/~icd6,       \vol, vol1);  ~l1f.set(\dur, ~f1/~icd6,  \vol, vol1);
1024                                                         ~l2a.set(\dur, ~f2,     \vol, vol2);          ~l2b.set(\dur, ~f2,  \vol, vol2);
1025                                                         ~l2c.set(\dur, ~f2/~icd3,       \vol, vol2);  ~l2d.set(\dur, ~f2/~icd3,  \vol, vol2);
1026                                                         ~l2e.set(\dur, ~f2/~icd6,       \vol, vol2);  ~l2f.set(\dur, ~f2/~icd6,  \vol, vol2);
1027                                                         ~l3a.set(\dur, ~f3,     \vol, vol3);          ~l3b.set(\dur, ~f3,  \vol, vol3);
1028                                                         ~l3c.set(\dur, ~f3/~icd3,       \vol, vol3);  ~l3d.set(\dur, ~f3/~icd3,  \vol, vol3);
1029                                                         ~l3e.set(\dur, ~f3/~icd6,       \vol, vol3);  ~l3f.set(\dur, ~f3/~icd6,  \vol, vol3);
1030                                                         ~l4a.set(\dur, ~f4,    \vol, vol4);           ~l4b.set(\dur, ~f4,  \vol, vol4);
1031                                                         ~l4c.set(\dur, ~f4/~icd3,       \vol, vol4);  ~l4d.set(\dur, ~f4/~icd3,  \vol, vol4);
1032                                                         ~l4e.set(\dur, ~f4/~icd6,       \vol, vol4);  ~l4f.set(\dur, ~f4/~icd6,  \vol, vol4);
1033                                                         ~l5a.set(\dur, ~f5,    \vol, vol5);           ~l5b.set(\dur, ~f5,  \vol, vol5);
1034                                                         ~l5c.set(\dur, ~f5/~icd3,       \vol, vol5);  ~l5d.set(\dur, ~f5/~icd3,  \vol, vol5);
1035                                                         ~l5e.set(\dur, ~f5/~icd6,       \vol, vol5);  ~l5f.set(\dur, ~f5/~icd6,  \vol, vol5);
1036                                                         ~l6a.set(\dur, ~f6,    \vol, vol6);           ~l6b.set(\dur, ~f6,  \vol, vol6);
1037                                                         ~l6c.set(\dur, ~f6/~icd3,       \vol, vol6);  ~l6d.set(\dur, ~f6/~icd3,  \vol, vol6);
1038                                                         ~l6e.set(\dur, ~f6/~icd6,       \vol, vol6);  ~l6f.set(\dur, ~f6/~icd6,  \vol, vol6);
1039                                                         ~l7a.set(\dur, ~f7,    \vol, vol7);           ~l7b.set(\dur, ~f7,  \vol, vol7);
1040                                                         ~l7c.set(\dur, ~f7/~icd3,       \vol, vol7);  ~l7d.set(\dur, ~f7/~icd3,  \vol, vol7);
1041                                                         ~l7e.set(\dur, ~f7/~icd6,       \vol, vol7);  ~l7f.set(\dur, ~f7/~icd6,  \vol, vol7);
1042                                                         ~l8a.set(\dur, ~f8,    \vol, vol8);           ~l8b.set(\dur, ~f8,  \vol, vol8);
1043                                                         ~l8c.set(\dur, ~f8/~icd3,       \vol, vol8);  ~l8d.set(\dur, ~f8/~icd3,  \vol, vol8);
1044                                                         ~l8e.set(\dur, ~f8/~icd6,       \vol, vol8);  ~l8f.set(\dur, ~f8/~icd6,  \vol, vol8);
1045                                                         ~l9a.set(\dur, ~f9,    \vol, vol9);          ~l9b.set(\dur, ~f9,  \vol, vol9);
1046                                                         ~l9c.set(\dur, ~f9/~icd3,       \vol, vol9); ~l9d.set(\dur, ~f9/~icd3,  \vol, vol9);
1047                                                         ~l9e.set(\dur, ~f9/~icd6,       \vol, vol9); ~l9f.set(\dur, ~f9/~icd6,  \vol, vol9);
1048                                                         ~l10a.set(\dur, ~f10,  \vol, vol10);         ~l10b.set(\dur, ~f10,  \vol, vol10);
1049                                                         ~l10c.set(\dur, ~f10/~icd3,     \vol, vol10);~l10d.set(\dur, ~f10/~icd3,  \vol, vol10);
1050                                                         ~l10e.set(\dur, ~f10/~icd6,     \vol, vol10);~l10f.set(\dur, ~f10/~icd6,  \vol, vol10);
1051                                                         ~l11a.set(\dur, ~f11,  \vol, vol11);         ~l11b.set(\dur, ~f11,  \vol, vol11);
1052                                                         ~l11c.set(\dur, ~f11/~icd3,     \vol, vol11);~l11d.set(\dur, ~f11/~icd3,  \vol, vol11);
1053                                                         ~l11e.set(\dur, ~f11/~icd6,     \vol, vol11);~l11f.set(\dur, ~f11/~icd6,  \vol, vol11);
1054                                                         ~l12a.set(\dur, ~f12,  \vol, vol12);         ~l12b.set(\dur, ~f12,  \vol, vol12);
1055                                                         ~l12c.set(\dur, ~f12/~icd3,     \vol, vol12);~l12d.set(\dur, ~f12/~icd3,  \vol, vol12);
1056                                                         ~l12e.set(\dur, ~f12/~icd6,     \vol, vol12);~l12f.set(\dur, ~f12/~icd6,  \vol, vol12);
1057                                                 });
1058
1059                                         );
1060
1061                                         {if(~slidecount==0,{
1062                                                 if((~f1 > ~outmaxa) or: (~f1 < ~outmina), {~z25.close;~z1.close;~z25 = (View(w, Rect((~f1.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+10, ~nw, 2)).background = Color.white;);}, {~z1.close;~z25.close;~z1 = (View(w, Rect((~f1.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+10, ~nw, 2)).background = Color.white;);});
1063                                                 if((~f2 > ~outmaxa) or: (~f2 < ~outmina), {~z26.close;~z2.close;~z26 = (View(w, Rect((~f2.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+20, ~nw, 2)).background = Color.white;);}, {~z2.close;~z26.close;~z2 = (View(w, Rect((~f2.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+20, ~nw, 2)).background = Color.white;);});
1064                                                 if((~f3 > ~outmaxa) or: (~f3 < ~outmina), {~z27.close;~z3.close;~z27 = (View(w, Rect((~f3.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+30, ~nw, 2)).background = Color.white;);}, {~z3.close;~z27.close;~z3 = (View(w, Rect((~f3.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+30, ~nw, 2)).background = Color.white;);});
1065                                                 if((~f4 > ~outmaxa) or: (~f4 < ~outmina), {~z28.close;~z4.close;~z28 = (View(w, Rect((~f4.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+40, ~nw, 2)).background = Color.white;);}, {~z4.close;~z28.close;~z4 = (View(w, Rect((~f4.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+40, ~nw, 2)).background = Color.white;);});
1066                                                 if((~f5 > ~outmaxa) or: (~f5 < ~outmina), {~z29.close;~z5.close;~z29 = (View(w, Rect((~f5.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+50, ~nw, 2)).background = Color.white;);}, {~z5.close;~z29.close;~z5 = (View(w, Rect((~f5.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+50, ~nw, 2)).background = Color.white;);});
1067                                                 if((~f6 > ~outmaxa) or: (~f6 < ~outmina), {~z30.close;~z6.close;~z30 = (View(w, Rect((~f6.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+60, ~nw, 2)).background = Color.white;);}, {~z6.close;~z30.close;~z6 = (View(w, Rect((~f6.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+60, ~nw, 2)).background = Color.white;);});
1068                                                 if((~f7 > ~outmaxa) or: (~f7 < ~outmina), {~z31.close;~z7.close;~z31 = (View(w, Rect((~f7.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+70, ~nw, 2)).background = Color.white;);}, {~z7.close;~z31.close;~z7 = (View(w, Rect((~f7.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+70, ~nw, 2)).background = Color.white;);});
1069                                                 if((~f8 > ~outmaxa) or: (~f8 < ~outmina), {~z32.close;~z8.close;~z32 = (View(w, Rect((~f8.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+80, ~nw, 2)).background = Color.white;);}, {~z8.close;~z32.close;~z8 = (View(w, Rect((~f8.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+80, ~nw, 2)).background = Color.white;);});
1070                                                 if((~f9 > ~outmaxa) or: (~f9 < ~outmina), {~z33.close;~z9.close;~z33 = (View(w, Rect((~f9.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+90, ~nw, 2)).background = Color.white;);}, {~z9.close;~z33.close;~z9 = (View(w, Rect((~f9.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+90, ~nw, 2)).background = Color.white;);});
1071                                                 if((~f10 > ~outmaxa) or: (~f10 < ~outmina), {~z34.close;~z10.close;~z34 = (View(w, Rect((~f10.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+100, ~nw, 2)).background = Color.white;);}, {~z10.close;~z34.close;~z10 = (View(w, Rect((~f10.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+100, ~nw, 2)).background = Color.white;);});
1072                                                 if((~f11 > ~outmaxa) or: (~f11 < ~outmina), {~z35.close;~z11.close;~z35 = (View(w, Rect((~f11.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+110, ~nw, 2)).background = Color.white;);}, {~z11.close;~z35.close;~z11 = (View(w, Rect((~f11.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+110, ~nw, 2)).background = Color.white;);});
1073                                                 if((~f12 > ~outmaxa) or: (~f12 < ~outmina), {~z36.close;~z12.close;~z36 = (View(w, Rect((~f12.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+120, ~nw, 2)).background = Color.white;);}, {~z12.close;~z36.close;~z12 = (View(w, Rect((~f12.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+120, ~nw, 2)).background = Color.white;);});
1074                                         });}.defer;
1075
1076                                         (~slidetime/~slidedo).wait;});});}).play;);};
1077         };
1078
1079         ~synthpause = {(
1080                 case
1081                 {~l1a1.isRunning == true}{
1082                         (1.do({var vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8,vol9,vol10,vol11,vol12,s1,s2,s3,s4,s5,s6,f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12;
1083                                 #vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8,vol9,vol10,vol11,vol12 = [~vol1,~vol2,~vol3,~vol4,~vol5,~vol6,~vol7,~vol8,~vol9,~vol10,~vol11,~vol12];
1084                                 #f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12 = [ 0,0,0,0,0,0,0,0,0,0,0,0 ];
1085                                 s.makeBundle(0, {
1086                                         ~l1a1.set(\dur, f1,     \vol, vol1);          ~l1b1.set(\dur, f1,  \vol, vol1);
1087                                         ~l1c1.set(\dur, f1/~icd3,       \vol, vol1);  ~l1d1.set(\dur, f1/~icd3,  \vol, vol1);
1088                                         ~l1e1.set(\dur, f1/~icd6,       \vol, vol1);  ~l1f1.set(\dur, f1/~icd6,  \vol, vol1);
1089                                         ~l2a1.set(\dur, f2,     \vol, vol2);          ~l2b1.set(\dur, f2,  \vol, vol2);
1090                                         ~l2c1.set(\dur, f2/~icd3,       \vol, vol2);  ~l2d1.set(\dur, f2/~icd3,  \vol, vol2);
1091                                         ~l2e1.set(\dur, f2/~icd6,       \vol, vol2);  ~l2f1.set(\dur, f2/~icd6,  \vol, vol2);
1092                                         ~l3a1.set(\dur, f3,     \vol, vol3);          ~l3b1.set(\dur, f3,  \vol, vol3);
1093                                         ~l3c1.set(\dur, f3/~icd3,       \vol, vol3);  ~l3d1.set(\dur, f3/~icd3,  \vol, vol3);
1094                                         ~l3e1.set(\dur, f3/~icd6,       \vol, vol3);  ~l3f1.set(\dur, f3/~icd6,  \vol, vol3);
1095                                         ~l4a1.set(\dur, f4,    \vol, vol4);           ~l4b1.set(\dur, f4,  \vol, vol4);
1096                                         ~l4c1.set(\dur, f4/~icd3,       \vol, vol4);  ~l4d1.set(\dur, f4/~icd3,  \vol, vol4);
1097                                         ~l4e1.set(\dur, f4/~icd6,       \vol, vol4);  ~l4f1.set(\dur, f4/~icd6,  \vol, vol4);
1098                                         ~l5a1.set(\dur, f5,    \vol, vol5);           ~l5b1.set(\dur, f5,  \vol, vol5);
1099                                         ~l5c1.set(\dur, f5/~icd3,       \vol, vol5);  ~l5d1.set(\dur, f5/~icd3,  \vol, vol5);
1100                                         ~l5e1.set(\dur, f5/~icd6,       \vol, vol5);  ~l5f1.set(\dur, f5/~icd6,  \vol, vol5);
1101                                         ~l6a1.set(\dur, f6,    \vol, vol6);           ~l6b1.set(\dur, f6,  \vol, vol6);
1102                                         ~l6c1.set(\dur, f6/~icd3,       \vol, vol6);  ~l6d1.set(\dur, f6/~icd3,  \vol, vol6);
1103                                         ~l6e1.set(\dur, f6/~icd6,       \vol, vol6);  ~l6f1.set(\dur, f6/~icd6,  \vol, vol6);
1104                                         ~l7a1.set(\dur, f7,    \vol, vol7);           ~l7b1.set(\dur, f7,  \vol, vol7);
1105                                         ~l7c1.set(\dur, f7/~icd3,       \vol, vol7);  ~l7d1.set(\dur, f7/~icd3,  \vol, vol7);
1106                                         ~l7e1.set(\dur, f7/~icd6,       \vol, vol7);  ~l7f1.set(\dur, f7/~icd6,  \vol, vol7);
1107                                         ~l8a1.set(\dur, f8,    \vol, vol8);           ~l8b1.set(\dur, f8,  \vol, vol8);
1108                                         ~l8c1.set(\dur, f8/~icd3,       \vol, vol8);  ~l8d1.set(\dur, f8/~icd3,  \vol, vol8);
1109                                         ~l8e1.set(\dur, f8/~icd6,       \vol, vol8);  ~l8f1.set(\dur, f8/~icd6,  \vol, vol8);
1110                                         ~l9a1.set(\dur, f9,    \vol, vol9);          ~l9b1.set(\dur, f9,  \vol, vol9);
1111                                         ~l9c1.set(\dur, f9/~icd3,       \vol, vol9); ~l9d1.set(\dur, f9/~icd3,  \vol, vol9);
1112                                         ~l9e1.set(\dur, f9/~icd6,       \vol, vol9); ~l9f1.set(\dur, f9/~icd6,  \vol, vol9);
1113                                         ~l10a1.set(\dur, f10,  \vol, vol10);         ~l10b1.set(\dur, f10,  \vol, vol10);
1114                                         ~l10c1.set(\dur, f10/~icd3,     \vol, vol10);~l10d1.set(\dur, f10/~icd3,  \vol, vol10);
1115                                         ~l10e1.set(\dur, f10/~icd6,     \vol, vol10);~l10f1.set(\dur, f10/~icd6,  \vol, vol10);
1116                                         ~l11a1.set(\dur, f11,  \vol, vol11);         ~l11b1.set(\dur, f11,  \vol, vol11);
1117                                         ~l11c1.set(\dur, f11/~icd3,     \vol, vol11);~l11d1.set(\dur, f11/~icd3,  \vol, vol11);
1118                                         ~l11e1.set(\dur, f11/~icd6,     \vol, vol11);~l11f1.set(\dur, f11/~icd6,  \vol, vol11);
1119                                         ~l12a1.set(\dur, f12,  \vol, vol12);         ~l12b1.set(\dur, f12,  \vol, vol12);
1120                                         ~l12c1.set(\dur, f12/~icd3,     \vol, vol12);~l12d1.set(\dur, f12/~icd3,  \vol, vol12);
1121                                         ~l12e1.set(\dur, f12/~icd6,     \vol, vol12);~l12f1.set(\dur, f12/~icd6,  \vol, vol12);
1122                                 });
1123                         }););
1124                 }
1125                 {~l1a.isRunning == true} {
1126                         (1.do({var vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8,vol9,vol10,vol11,vol12,s1,s2,s3,s4,s5,s6,f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12;
1127                                 #vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8,vol9,vol10,vol11,vol12 = [~vol1,~vol2,~vol3,~vol4,~vol5,~vol6,~vol7,~vol8,~vol9,~vol10,~vol11,~vol12];
1128                                 #f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12 = [ 0,0,0,0,0,0,0,0,0,0,0,0 ];
1129                                 s.makeBundle(0, {
1130                                         ~l1a.set(\dur, f1,     \vol, vol1);  ~l1b.set(\dur, f1,  \vol, vol1);
1131                                         ~l1c.set(\dur, f1/~icd3,       \vol, vol1);  ~l1d.set(\dur, f1/~icd3,  \vol, vol1);
1132                                         ~l1e.set(\dur, f1/~icd6,       \vol, vol1);  ~l1f.set(\dur, f1/~icd6,  \vol, vol1);
1133                                         ~l2a.set(\dur, f2,     \vol, vol2);          ~l2b.set(\dur, f2,  \vol, vol2);
1134                                         ~l2c.set(\dur, f2/~icd3,       \vol, vol2);  ~l2d.set(\dur, f2/~icd3,  \vol, vol2);
1135                                         ~l2e.set(\dur, f2/~icd6,       \vol, vol2);  ~l2f.set(\dur, f2/~icd6,  \vol, vol2);
1136                                         ~l3a.set(\dur, f3,     \vol, vol3);          ~l3b.set(\dur, f3,  \vol, vol3);
1137                                         ~l3c.set(\dur, f3/~icd3,       \vol, vol3);  ~l3d.set(\dur, f3/~icd3,  \vol, vol3);
1138                                         ~l3e.set(\dur, f3/~icd6,       \vol, vol3);  ~l3f.set(\dur, f3/~icd6,  \vol, vol3);
1139                                         ~l4a.set(\dur, f4,    \vol, vol4);           ~l4b.set(\dur, f4,  \vol, vol4);
1140                                         ~l4c.set(\dur, f4/~icd3,       \vol, vol4);  ~l4d.set(\dur, f4/~icd3,  \vol, vol4);
1141                                         ~l4e.set(\dur, f4/~icd6,       \vol, vol4);  ~l4f.set(\dur, f4/~icd6,  \vol, vol4);
1142                                         ~l5a.set(\dur, f5,    \vol, vol5);           ~l5b.set(\dur, f5,  \vol, vol5);
1143                                         ~l5c.set(\dur, f5/~icd3,       \vol, vol5);  ~l5d.set(\dur, f5/~icd3,  \vol, vol5);
1144                                         ~l5e.set(\dur, f5/~icd6,       \vol, vol5);  ~l5f.set(\dur, f5/~icd6,  \vol, vol5);
1145                                         ~l6a.set(\dur, f6,    \vol, vol6);           ~l6b.set(\dur, f6,  \vol, vol6);
1146                                         ~l6c.set(\dur, f6/~icd3,       \vol, vol6);  ~l6d.set(\dur, f6/~icd3,  \vol, vol6);
1147                                         ~l6e.set(\dur, f6/~icd6,       \vol, vol6);  ~l6f.set(\dur, f6/~icd6,  \vol, vol6);
1148                                         ~l7a.set(\dur, f7,    \vol, vol7);           ~l7b.set(\dur, f7,  \vol, vol7);
1149                                         ~l7c.set(\dur, f7/~icd3,       \vol, vol7);  ~l7d.set(\dur, f7/~icd3,  \vol, vol7);
1150                                         ~l7e.set(\dur, f7/~icd6,       \vol, vol7);  ~l7f.set(\dur, f7/~icd6,  \vol, vol7);
1151                                         ~l8a.set(\dur, f8,    \vol, vol8);           ~l8b.set(\dur, f8,  \vol, vol8);
1152                                         ~l8c.set(\dur, f8/~icd3,       \vol, vol8);  ~l8d.set(\dur, f8/~icd3,  \vol, vol8);
1153                                         ~l8e.set(\dur, f8/~icd6,       \vol, vol8);  ~l8f.set(\dur, f8/~icd6,  \vol, vol8);
1154                                         ~l9a.set(\dur, f9,    \vol, vol9);          ~l9b.set(\dur, f9,  \vol, vol9);
1155                                         ~l9c.set(\dur, f9/~icd3,       \vol, vol9); ~l9d.set(\dur, f9/~icd3,  \vol, vol9);
1156                                         ~l9e.set(\dur, f9/~icd6,       \vol, vol9); ~l9f.set(\dur, f9/~icd6,  \vol, vol9);
1157                                         ~l10a.set(\dur, f10,  \vol, vol10);         ~l10b.set(\dur, f10,  \vol, vol10);
1158                                         ~l10c.set(\dur, f10/~icd3,     \vol, vol10);~l10d.set(\dur, f10/~icd3,  \vol, vol10);
1159                                         ~l10e.set(\dur, f10/~icd6,     \vol, vol10);~l10f.set(\dur, f10/~icd6,  \vol, vol10);
1160                                         ~l11a.set(\dur, f11,  \vol, vol11);         ~l11b.set(\dur, f11,  \vol, vol11);
1161                                         ~l11c.set(\dur, f11/~icd3,     \vol, vol11);~l11d.set(\dur, f11/~icd3,  \vol, vol11);
1162                                         ~l11e.set(\dur, f11/~icd6,     \vol, vol11);~l11f.set(\dur, f11/~icd6,  \vol, vol11);
1163                                         ~l12a.set(\dur, f12,  \vol, vol12);         ~l12b.set(\dur, f12,  \vol, vol12);
1164                                         ~l12c.set(\dur, f12/~icd3,     \vol, vol12);~l12d.set(\dur, f12/~icd3,  \vol, vol12);
1165                                         ~l12e.set(\dur, f12/~icd6,     \vol, vol12);~l12f.set(\dur, f12/~icd6,  \vol, vol12);
1166                                 });
1167                         }););
1168                 };
1169         );
1170         };
1171
1172         ~synthfree = {
1173                 (
1174                         case
1175                         {~l1a1.isRunning == true}{
1176                                 (1.do({var vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8,vol9,vol10,vol11,vol12,s1,s2,s3,s4,s5,s6,f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12;
1177                                         #vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8,vol9,vol10,vol11,vol12 = [~vol1,~vol2,~vol3,~vol4,~vol5,~vol6,~vol7,~vol8,~vol9,~vol10,~vol11,~vol12];
1178                                         #f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12 = [ 0,0,0,0,0,0,0,0,0,0,0,0 ];
1179                                         s.makeBundle(0, {
1180                                                 ~l1a1.set(\dur, f1,     \vol, vol1);  ~l1b1.set(\dur, f1,  \vol, vol1);
1181                                                 ~l1c1.set(\dur, f1/~icd3,       \vol, vol1);  ~l1d1.set(\dur, f1/~icd3,  \vol, vol1);
1182                                                 ~l1e1.set(\dur, f1/~icd6,       \vol, vol1);  ~l1f1.set(\dur, f1/~icd6,  \vol, vol1);
1183                                                 ~l2a1.set(\dur, f2,     \vol, vol2);          ~l2b1.set(\dur, f2,  \vol, vol2);
1184                                                 ~l2c1.set(\dur, f2/~icd3,       \vol, vol2);  ~l2d1.set(\dur, f2/~icd3,  \vol, vol2);
1185                                                 ~l2e1.set(\dur, f2/~icd6,       \vol, vol2);  ~l2f1.set(\dur, f2/~icd6,  \vol, vol2);
1186                                                 ~l3a1.set(\dur, f3,     \vol, vol3);          ~l3b1.set(\dur, f3,  \vol, vol3);
1187                                                 ~l3c1.set(\dur, f3/~icd3,       \vol, vol3);  ~l3d1.set(\dur, f3/~icd3,  \vol, vol3);
1188                                                 ~l3e1.set(\dur, f3/~icd6,       \vol, vol3);  ~l3f1.set(\dur, f3/~icd6,  \vol, vol3);
1189                                                 ~l4a1.set(\dur, f4,    \vol, vol4);           ~l4b1.set(\dur, f4,  \vol, vol4);
1190                                                 ~l4c1.set(\dur, f4/~icd3,       \vol, vol4);  ~l4d1.set(\dur, f4/~icd3,  \vol, vol4);
1191                                                 ~l4e1.set(\dur, f4/~icd6,       \vol, vol4);  ~l4f1.set(\dur, f4/~icd6,  \vol, vol4);
1192                                                 ~l5a1.set(\dur, f5,    \vol, vol5);           ~l5b1.set(\dur, f5,  \vol, vol5);
1193                                                 ~l5c1.set(\dur, f5/~icd3,       \vol, vol5);  ~l5d1.set(\dur, f5/~icd3,  \vol, vol5);
1194                                                 ~l5e1.set(\dur, f5/~icd6,       \vol, vol5);  ~l5f1.set(\dur, f5/~icd6,  \vol, vol5);
1195                                                 ~l6a1.set(\dur, f6,    \vol, vol6);           ~l6b1.set(\dur, f6,  \vol, vol6);
1196                                                 ~l6c1.set(\dur, f6/~icd3,       \vol, vol6);  ~l6d1.set(\dur, f6/~icd3,  \vol, vol6);
1197                                                 ~l6e1.set(\dur, f6/~icd6,       \vol, vol6);  ~l6f1.set(\dur, f6/~icd6,  \vol, vol6);
1198                                                 ~l7a1.set(\dur, f7,    \vol, vol7);           ~l7b1.set(\dur, f7,  \vol, vol7);
1199                                                 ~l7c1.set(\dur, f7/~icd3,       \vol, vol7);  ~l7d1.set(\dur, f7/~icd3,  \vol, vol7);
1200                                                 ~l7e1.set(\dur, f7/~icd6,       \vol, vol7);  ~l7f1.set(\dur, f7/~icd6,  \vol, vol7);
1201                                                 ~l8a1.set(\dur, f8,    \vol, vol8);           ~l8b1.set(\dur, f8,  \vol, vol8);
1202                                                 ~l8c1.set(\dur, f8/~icd3,       \vol, vol8);  ~l8d1.set(\dur, f8/~icd3,  \vol, vol8);
1203                                                 ~l8e1.set(\dur, f8/~icd6,       \vol, vol8);  ~l8f1.set(\dur, f8/~icd6,  \vol, vol8);
1204                                                 ~l9a1.set(\dur, f9,    \vol, vol9);          ~l9b1.set(\dur, f9,  \vol, vol9);
1205                                                 ~l9c1.set(\dur, f9/~icd3,       \vol, vol9); ~l9d1.set(\dur, f9/~icd3,  \vol, vol9);
1206                                                 ~l9e1.set(\dur, f9/~icd6,       \vol, vol9); ~l9f1.set(\dur, f9/~icd6,  \vol, vol9);
1207                                                 ~l10a1.set(\dur, f10,  \vol, vol10);         ~l10b1.set(\dur, f10,  \vol, vol10);
1208                                                 ~l10c1.set(\dur, f10/~icd3,     \vol, vol10);~l10d1.set(\dur, f10/~icd3,  \vol, vol10);
1209                                                 ~l10e1.set(\dur, f10/~icd6,     \vol, vol10);~l10f1.set(\dur, f10/~icd6,  \vol, vol10);
1210                                                 ~l11a1.set(\dur, f11,  \vol, vol11);         ~l11b1.set(\dur, f11,  \vol, vol11);
1211                                                 ~l11c1.set(\dur, f11/~icd3,     \vol, vol11);~l11d1.set(\dur, f11/~icd3,  \vol, vol11);
1212                                                 ~l11e1.set(\dur, f11/~icd6,     \vol, vol11);~l11f1.set(\dur, f11/~icd6,  \vol, vol11);
1213                                                 ~l12a1.set(\dur, f12,  \vol, vol12);         ~l12b1.set(\dur, f12,  \vol, vol12);
1214                                                 ~l12c1.set(\dur, f12/~icd3,     \vol, vol12);~l12d1.set(\dur, f12/~icd3,  \vol, vol12);
1215                                                 ~l12e1.set(\dur, f12/~icd6,     \vol, vol12);~l12f1.set(\dur, f12/~icd6,  \vol, vol12);
1216                                         });
1217                                 }););
1218                                 AppClock.sched(0.161803398875,{
1219                                         ([~l1a1,~l1b1,~l1c1,~l1d1,~l1e1,~l1f1,~l2a1,~l2b1,~l2c1,~l2d1,~l2e1,~l2f1,~l3a1,~l3b1,~l3c1,~l3d1,~l3e1,~l3f1,~l4a1,~l4b1,~l4c1,~l4d1,~l4e1,~l4f1,~l5a1,~l5b1,~l5c1,~l5d1,~l5e1,~l5f1,~l6a1,~l6b1,~l6c1,~l6d1,~l6e1,~l6f1,~l7a1,~l7b1,~l7c1,~l7d1,~l7e1,~l7f1,~l8a1,~l8b1,~l8c1,~l8d1,~l8e1,~l8f1,~l9a1,~l9b1,~l9c1,~l9d1,~l9e1,~l9f1,~l10a1,~l10b1,~l10c1,~l10d1,~l10e1,~l10f1,~l11a1,~l11b1,~l11c1,~l11d1,~l11e1,~l11f1,~l12a1,~l12b1,~l12c1,~l12d1,~l12e1,~l12f1 ].do(_.free)); ~slideroutine.stop;
1220                                 });
1221                         }
1222                         {~l1a.isRunning == true}{
1223                                 (1.do({var vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8,vol9,vol10,vol11,vol12,s1,s2,s3,s4,s5,s6,f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12;
1224                                         #vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8,vol9,vol10,vol11,vol12 = [~vol1,~vol2,~vol3,~vol4,~vol5,~vol6,~vol7,~vol8,~vol9,~vol10,~vol11,~vol12];
1225                                         #f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12 = [ 0,0,0,0,0,0,0,0,0,0,0,0 ];
1226                                         s.makeBundle(0, {
1227                                                 ~l1a.set(\dur, f1,     \vol, vol1);  ~l1b.set(\dur, f1,  \vol, vol1);
1228                                                 ~l1c.set(\dur, f1/~icd3,       \vol, vol1);  ~l1d.set(\dur, f1/~icd3,  \vol, vol1);
1229                                                 ~l1e.set(\dur, f1/~icd6,       \vol, vol1);  ~l1f.set(\dur, f1/~icd6,  \vol, vol1);
1230                                                 ~l2a.set(\dur, f2,     \vol, vol2);          ~l2b.set(\dur, f2,  \vol, vol2);
1231                                                 ~l2c.set(\dur, f2/~icd3,       \vol, vol2);  ~l2d.set(\dur, f2/~icd3,  \vol, vol2);
1232                                                 ~l2e.set(\dur, f2/~icd6,       \vol, vol2);  ~l2f.set(\dur, f2/~icd6,  \vol, vol2);
1233                                                 ~l3a.set(\dur, f3,     \vol, vol3);          ~l3b.set(\dur, f3,  \vol, vol3);
1234                                                 ~l3c.set(\dur, f3/~icd3,       \vol, vol3);  ~l3d.set(\dur, f3/~icd3,  \vol, vol3);
1235                                                 ~l3e.set(\dur, f3/~icd6,       \vol, vol3);  ~l3f.set(\dur, f3/~icd6,  \vol, vol3);
1236                                                 ~l4a.set(\dur, f4,    \vol, vol4);           ~l4b.set(\dur, f4,  \vol, vol4);
1237                                                 ~l4c.set(\dur, f4/~icd3,       \vol, vol4);  ~l4d.set(\dur, f4/~icd3,  \vol, vol4);
1238                                                 ~l4e.set(\dur, f4/~icd6,       \vol, vol4);  ~l4f.set(\dur, f4/~icd6,  \vol, vol4);
1239                                                 ~l5a.set(\dur, f5,    \vol, vol5);           ~l5b.set(\dur, f5,  \vol, vol5);
1240                                                 ~l5c.set(\dur, f5/~icd3,       \vol, vol5);  ~l5d.set(\dur, f5/~icd3,  \vol, vol5);
1241                                                 ~l5e.set(\dur, f5/~icd6,       \vol, vol5);  ~l5f.set(\dur, f5/~icd6,  \vol, vol5);
1242                                                 ~l6a.set(\dur, f6,    \vol, vol6);           ~l6b.set(\dur, f6,  \vol, vol6);
1243                                                 ~l6c.set(\dur, f6/~icd3,       \vol, vol6);  ~l6d.set(\dur, f6/~icd3,  \vol, vol6);
1244                                                 ~l6e.set(\dur, f6/~icd6,       \vol, vol6);  ~l6f.set(\dur, f6/~icd6,  \vol, vol6);
1245                                                 ~l7a.set(\dur, f7,    \vol, vol7);           ~l7b.set(\dur, f7,  \vol, vol7);
1246                                                 ~l7c.set(\dur, f7/~icd3,       \vol, vol7);  ~l7d.set(\dur, f7/~icd3,  \vol, vol7);
1247                                                 ~l7e.set(\dur, f7/~icd6,       \vol, vol7);  ~l7f.set(\dur, f7/~icd6,  \vol, vol7);
1248                                                 ~l8a.set(\dur, f8,    \vol, vol8);           ~l8b.set(\dur, f8,  \vol, vol8);
1249                                                 ~l8c.set(\dur, f8/~icd3,       \vol, vol8);  ~l8d.set(\dur, f8/~icd3,  \vol, vol8);
1250                                                 ~l8e.set(\dur, f8/~icd6,       \vol, vol8);  ~l8f.set(\dur, f8/~icd6,  \vol, vol8);
1251                                                 ~l9a.set(\dur, f9,    \vol, vol9);          ~l9b.set(\dur, f9,  \vol, vol9);
1252                                                 ~l9c.set(\dur, f9/~icd3,       \vol, vol9); ~l9d.set(\dur, f9/~icd3,  \vol, vol9);
1253                                                 ~l9e.set(\dur, f9/~icd6,       \vol, vol9); ~l9f.set(\dur, f9/~icd6,  \vol, vol9);
1254                                                 ~l10a.set(\dur, f10,  \vol, vol10);         ~l10b.set(\dur, f10,  \vol, vol10);
1255                                                 ~l10c.set(\dur, f10/~icd3,     \vol, vol10);~l10d.set(\dur, f10/~icd3,  \vol, vol10);
1256                                                 ~l10e.set(\dur, f10/~icd6,     \vol, vol10);~l10f.set(\dur, f10/~icd6,  \vol, vol10);
1257                                                 ~l11a.set(\dur, f11,  \vol, vol11);         ~l11b.set(\dur, f11,  \vol, vol11);
1258                                                 ~l11c.set(\dur, f11/~icd3,     \vol, vol11);~l11d.set(\dur, f11/~icd3,  \vol, vol11);
1259                                                 ~l11e.set(\dur, f11/~icd6,     \vol, vol11);~l11f.set(\dur, f11/~icd6,  \vol, vol11);
1260                                                 ~l12a.set(\dur, f12,  \vol, vol12);         ~l12b.set(\dur, f12,  \vol, vol12);
1261                                                 ~l12c.set(\dur, f12/~icd3,     \vol, vol12);~l12d.set(\dur, f12/~icd3,  \vol, vol12);
1262                                                 ~l12e.set(\dur, f12/~icd6,     \vol, vol12);~l12f.set(\dur, f12/~icd6,  \vol, vol12);
1263                                         });
1264                                 }););
1265                                 AppClock.sched(0.161803398875,{
1266                                         ([~l1a,~l1b,~l1c,~l1d,~l1e,~l1f,~l2a,~l2b,~l2c,~l2d,~l2e,~l2f,~l3a,~l3b,~l3c,~l3d,~l3e,~l3f,~l4a,~l4b,~l4c,~l4d,~l4e,~l4f,~l5a,~l5b,~l5c,~l5d,~l5e,~l5f,~l6a,~l6b,~l6c,~l6d,~l6e,~l6f,~l7a,~l7b,~l7c,~l7d,~l7e,~l7f,~l8a,~l8b,~l8c,~l8d,~l8e,~l8f,~l9a,~l9b,~l9c,~l9d,~l9e,~l9f,~l10a,~l10b,~l10c,~l10d,~l10e,~l10f,~l11a,~l11b,~l11c,~l11d,~l11e,~l11f,~l12a,~l12b,~l12c,~l12d,~l12e,~l12f].do(_.free)); ~slideroutine.stop;
1267                                 });
1268                         };
1269                 );
1270         };
1271
1272
1273         //timer values
1274
1275         case
1276         {~slot1 == nil}{""}
1277         {~slot2 == nil}{""}
1278         {~slot3 == nil}{""}
1279         {~slot4 == nil}{""}
1280         {~slot5 == nil}{""}
1281         {~slot6 == nil}{""}
1282         {~slot7 == nil}{""}
1283         {~slot8 == nil}{""};
1284
1285         ~timevals = {(~tst = TextView(w, Rect(~tspl,~tspt, ~tspw, ~tsph)).background_(Color.black);
1286                 (~tst.string =
1287                         "o1:_"++~time1o.value.asString++"_f1:_"++~time1f.value.asString++"_s1:_"++~time1s.value.asString++"\n" ++
1288                         "o2:_"++~time2o.value.asString++"_f2:_"++~time2f.value.asString++"_s2:_"++~time2s.value.asString++"\n" ++
1289                         "o3:_"++~time3o.value.asString++"_f3:_"++~time3f.value.asString++"_s3:_"++~time3s.value.asString++"\n" ++
1290                         "o4:_"++~time4o.value.asString++"_f4:_"++~time4f.value.asString++"_s4:_"++~time4s.value.asString++"\n" ++
1291                         "o5:_"++~time5o.value.asString++"_f5:_"++~time5f.value.asString++"_s5:_"++~time5s.value.asString++"\n" ++
1292                         "o6:_"++~time6o.value.asString++"_f6:_"++~time6f.value.asString++"_s6:_"++~time6s.value.asString++"\n" ++
1293                         "o7:_"++~time7o.value.asString++"_f7:_"++~time7f.value.asString++"_s7:_"++~time7s.value.asString++"\n" ++
1294                         "o8:_"++~time8o.value.asString++"_f8:_"++~time8f.value.asString++"_s8:_"++~time8s.value.asString++"\n" ++"\n" ++
1295                         if(~slot8 != ~slot, {
1296                                 (~slot1 = ~slot2).asString++"\n" ++
1297                                 (~slot2 = ~slot3).asString++"\n" ++
1298                                 (~slot3 = ~slot4).asString++"\n" ++
1299                                 (~slot4 = ~slot5).asString++"\n" ++
1300                                 (~slot5 = ~slot6).asString++"\n" ++
1301                                 (~slot6 = ~slot7).asString++"\n" ++
1302                                 (~slot7 = ~slot8).asString++"\n" ++
1303                                 (~slot8 = ~slot).asString;
1304                         },{
1305                                 (~slot1).asString++"\n" ++
1306                                 (~slot2).asString++"\n" ++
1307                                 (~slot3).asString++"\n" ++
1308                                 (~slot4).asString++"\n" ++
1309                                 (~slot5).asString++"\n" ++
1310                                 (~slot6).asString++"\n" ++
1311                                 (~slot7).asString++"\n" ++
1312                                 (~slot8).asString;
1313                         });
1314
1315                 );
1316                 ~tst.stringColor = Color.white;
1317         )};
1318
1319
1320         //monitoring number of synths function
1321
1322         ~numsynthsfunc = {
1323                 if((~numsynths != nil) or: (~numsynths.isPlaying == true), {~numsynths.stop;});
1324                 ~numsynths = Routine({inf.do({if((s.numSynths > 73) and: (3.wait; s.numSynths > 73) and: (6.wait; s.numSynths > 73), {
1325
1326                         AppClock.sched(0, {
1327                                 if(~numsynthmessage != nil, {~numsynthmessage.close;});
1328                                 ~numsynthmessage = View(w, Rect(Window.screenBounds.width-(340+46),Window.screenBounds.height-(340+46/1.6180339887499)-110,340+46,340+46/1.6180339887499)).background_(Color.black).front;
1329                                 ~numsynthmessagestring = StaticText(~numsynthmessage, Rect(0,0,340+46,340+46/1.6180339887499)).background_(Color.black);
1330                                 ~numsynthmessagestring.align = \topLeft;
1331                                 ~numsynthmessagestring.string ="Warning:"++"\n"++"\n"++"More than the normal amount of synths are currently running. It is recommended to free the server by pressing "+"ctrl/cmd - period".quote+" and then pressing the "+"ok".quote+" button. Otherwise, you can press the "+"cancel".quote+" button to allow the synths to keep running. If you press the "+"cancel".quote+" button this message will not show again unless "+"synth0".quote+" has been pressed.";
1332                                 ~numsynthmessagestring.stringColor = Color.white;
1333                                 ~numsynthmessagebutton1 = Button.new(~numsynthmessage,Rect(120-46,340/1.6180339887499-30,46,46/1.6180339887499)).states_([["ok",Color.white,Color.black]]).action_({AppClock.sched(0, {~numsynthmessage.close; ~numsynths.play; ~midifunc.value;});});
1334                                 ~numsynthmessagebutton2 = Button.new(~numsynthmessage,Rect(320+46-100,340/1.6180339887499-30,46,46/1.6180339887499)).states_([["cancel",Color.white,Color.black]]).action_({AppClock.sched(0, {~numsynths.stop; ~numsynthmessage.close;});});
1335                                 ~numsynthmessage.front;
1336                         });
1337                 }); 1.wait;});}).play;
1338         };
1339
1340         ~numsynthsfunc.value;
1341
1342
1343         //mouse down action
1344
1345         view.mouseDownAction = {
1346                 |v, x, y, mod, butNum|
1347                 point = [x,y];
1348                 if(butNum == 0, { v.refresh;
1349
1350                         //generate dots on mouse down action
1351
1352                         ~tgrid = 30;
1353                         ~bgrid = Window.screenBounds.height-(Window.screenBounds.height/1.6180339887499)+30;
1354
1355                         case
1356                         {y<~tgrid} {nil}
1357                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z1.close;~z1 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1358                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z2.close;~z2 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1359                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z3.close;~z3 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1360                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z4.close;~z4 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1361                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z5.close;~z5 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1362                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z6.close;~z6 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1363                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z7.close;~z7 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1364                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z8.close;~z8 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1365                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z9.close;~z9 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1366                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z10.close;~z10 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1367                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z11.close;~z11 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1368                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z12.close;~z12 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1369                         {y>~tgrid and: y<~bgrid} {nil}
1370                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z1.close;~z1 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1371                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z2.close;~z2 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1372                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z3.close;~z3 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1373                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z4.close;~z4 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1374                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z5.close;~z5 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1375                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z6.close;~z6 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1376                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z7.close;~z7 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1377                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z8.close;~z8 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1378                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z9.close;~z9 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1379                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z10.close;~z10 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1380                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z11.close;~z11 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1381                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z12.close;~z12 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1382                 }, {});
1383
1384                 ~tgrid = 30;
1385                 ~bgrid = Window.screenBounds.height-(Window.screenBounds.height/1.6180339887499)+30;
1386
1387                 //set synth values on mouse down action
1388
1389                 case
1390                 {~l1a.isRunning == true}{
1391                         case
1392                         {y<~tgrid} {nil}
1393                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1394                                 ~l1a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1395                                 ~l1b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f1=q.value; ~undof1=~f1;
1396                                 ~l1c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1397                                 ~l1d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1398                                 ~l1e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1399                                 ~l1f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1400                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1401                                 ~l2a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1402                                 ~l2b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f2=q.value; ~undof2=~f2;
1403                                 ~l2c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1404                                 ~l2d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1405                                 ~l2e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1406                                 ~l2f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1407                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1408                                 ~l3a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1409                                 ~l3b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f3=q.value; ~undof3=~f3;
1410                                 ~l3c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1411                                 ~l3d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1412                                 ~l3e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1413                                 ~l3f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1414                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1415                                 ~l4a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1416                                 ~l4b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f4=q.value; ~undof4=~f4;
1417                                 ~l4c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1418                                 ~l4d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1419                                 ~l4e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1420                                 ~l4f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1421                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1422                                 ~l5a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1423                                 ~l5b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f5=q.value; ~undof5=~f5;
1424                                 ~l5c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1425                                 ~l5d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1426                                 ~l5e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1427                                 ~l5f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1428                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1429                                 ~l6a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1430                                 ~l6b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f6=q.value; ~undof6=~f6;
1431                                 ~l6c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1432                                 ~l6d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1433                                 ~l6e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1434                                 ~l6f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1435                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1436                                 ~l7a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1437                                 ~l7b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f7=q.value; ~undof7=~f7;
1438                                 ~l7c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1439                                 ~l7d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1440                                 ~l7e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1441                                 ~l7f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1442                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1443                                 ~l8a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1444                                 ~l8b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f8=q.value; ~undof8=~f8;
1445                                 ~l8c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1446                                 ~l8d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1447                                 ~l8e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1448                                 ~l8f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1449                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1450                                 ~l9a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1451                                 ~l9b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f9=q.value; ~undof9=~f9;
1452                                 ~l9c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1453                                 ~l9d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1454                                 ~l9e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1455                                 ~l9f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1456                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1457                                 ~l10a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1458                                 ~l10b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f10=q.value; ~undof10=~f10;
1459                                 ~l10c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1460                                 ~l10d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1461                                 ~l10e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1462                                 ~l10f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1463                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1464                                 ~l11a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1465                                 ~l11b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f11=q.value; ~undof11=~f11;
1466                                 ~l11c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1467                                 ~l11d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1468                                 ~l11e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1469                                 ~l11f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1470                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1471                                 ~l12a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1472                                 ~l12b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f12=q.value; ~undof12=~f12;
1473                                 ~l12c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1474                                 ~l12d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1475                                 ~l12e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1476                                 ~l12f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1477                         {y>~tgrid and: y<~bgrid} {nil}
1478                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1479                                 ~l1a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1480                                 ~l1b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f1=q.value; ~undof1=~f1;
1481                                 ~l1c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1482                                 ~l1d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1483                                 ~l1e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1484                                 ~l1f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1485                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1486                                 ~l2a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1487                                 ~l2b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f2=q.value; ~undof2=~f2;
1488                                 ~l2c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1489                                 ~l2d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1490                                 ~l2e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1491                                 ~l2f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1492                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1493                                 ~l3a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1494                                 ~l3b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f3=q.value; ~undof3=~f3;
1495                                 ~l3c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1496                                 ~l3d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1497                                 ~l3e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1498                                 ~l3f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1499                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1500                                 ~l4a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1501                                 ~l4b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f4=q.value; ~undof4=~f4;
1502                                 ~l4c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1503                                 ~l4d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1504                                 ~l4e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1505                                 ~l4f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1506                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1507                                 ~l5a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1508                                 ~l5b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f5=q.value; ~undof5=~f5;
1509                                 ~l5c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1510                                 ~l5d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1511                                 ~l5e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1512                                 ~l5f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1513                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1514                                 ~l6a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1515                                 ~l6b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f6=q.value; ~undof6=~f6;
1516                                 ~l6c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1517                                 ~l6d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1518                                 ~l6e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1519                                 ~l6f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1520                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1521                                 ~l7a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1522                                 ~l7b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f7=q.value; ~undof7=~f7;
1523                                 ~l7c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1524                                 ~l7d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1525                                 ~l7e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1526                                 ~l7f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1527                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1528                                 ~l8a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1529                                 ~l8b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f8=q.value; ~undof8=~f8;
1530                                 ~l8c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1531                                 ~l8d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1532                                 ~l8e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1533                                 ~l8f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1534                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1535                                 ~l9a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1536                                 ~l9b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f9=q.value; ~undof9=~f9;
1537                                 ~l9c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1538                                 ~l9d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1539                                 ~l9e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1540                                 ~l9f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1541                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1542                                 ~l10a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1543                                 ~l10b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f10=q.value; ~undof10=~f10;
1544                                 ~l10c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1545                                 ~l10d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1546                                 ~l10e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1547                                 ~l10f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1548                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1549                                 ~l11a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1550                                 ~l11b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f11=q.value; ~undof11=~f11;
1551                                 ~l11c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1552                                 ~l11d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1553                                 ~l11e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1554                                 ~l11f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1555                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1556                                 ~l12a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1557                                 ~l12b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f12=q.value; ~undof12=~f12;
1558                                 ~l12c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1559                                 ~l12d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1560                                 ~l12e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1561                                 ~l12f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);};
1562                 }
1563                 {~l1a1.isRunning == true}{
1564                         case
1565                         {y<~tgrid} {nil}
1566                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1567                                 ~l1a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1568                                 ~l1b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f1=q.value; ~undof1=~f1;
1569                                 ~l1c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1570                                 ~l1d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1571                                 ~l1e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1572                                 ~l1f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1573                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1574                                 ~l2a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1575                                 ~l2b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f2=q.value; ~undof2=~f2;
1576                                 ~l2c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1577                                 ~l2d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1578                                 ~l2e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1579                                 ~l2f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1580                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1581                                 ~l3a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1582                                 ~l3b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f3=q.value; ~undof3=~f3;
1583                                 ~l3c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1584                                 ~l3d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1585                                 ~l3e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1586                                 ~l3f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1587                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1588                                 ~l4a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1589                                 ~l4b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f4=q.value; ~undof4=~f4;
1590                                 ~l4c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1591                                 ~l4d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1592                                 ~l4e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1593                                 ~l4f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1594                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1595                                 ~l5a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1596                                 ~l5b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f5=q.value; ~undof5=~f5;
1597                                 ~l5c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1598                                 ~l5d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1599                                 ~l5e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1600                                 ~l5f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1601                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1602                                 ~l6a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1603                                 ~l6b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f6=q.value; ~undof6=~f6;
1604                                 ~l6c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1605                                 ~l6d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1606                                 ~l6e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1607                                 ~l6f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1608                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1609                                 ~l7a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1610                                 ~l7b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f7=q.value; ~undof7=~f7;
1611                                 ~l7c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1612                                 ~l7d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1613                                 ~l7e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1614                                 ~l7f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1615                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1616                                 ~l8a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1617                                 ~l8b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f8=q.value; ~undof8=~f8;
1618                                 ~l8c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1619                                 ~l8d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1620                                 ~l8e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1621                                 ~l8f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1622                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1623                                 ~l9a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1624                                 ~l9b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f9=q.value; ~undof9=~f9;
1625                                 ~l9c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1626                                 ~l9d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1627                                 ~l9e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1628                                 ~l9f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1629                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1630                                 ~l10a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1631                                 ~l10b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f10=q.value; ~undof10=~f10;
1632                                 ~l10c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1633                                 ~l10d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1634                                 ~l10e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1635                                 ~l10f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1636                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1637                                 ~l11a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1638                                 ~l11b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f11=q.value; ~undof11=~f11;
1639                                 ~l11c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1640                                 ~l11d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1641                                 ~l11e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1642                                 ~l11f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1643                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1644                                 ~l12a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1645                                 ~l12b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f12=q.value; ~undof12=~f12;
1646                                 ~l12c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1647                                 ~l12d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1648                                 ~l12e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1649                                 ~l12f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1650                         {y>~tgrid and: y<~bgrid} {nil}
1651                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1652                                 ~l1a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1653                                 ~l1b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f1=q.value; ~undof1=~f1;
1654                                 ~l1c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1655                                 ~l1d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1656                                 ~l1e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1657                                 ~l1f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1658                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1659                                 ~l2a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1660                                 ~l2b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f2=q.value; ~undof2=~f2;
1661                                 ~l2c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1662                                 ~l2d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1663                                 ~l2e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1664                                 ~l2f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1665                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1666                                 ~l3a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1667                                 ~l3b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f3=q.value; ~undof3=~f3;
1668                                 ~l3c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1669                                 ~l3d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1670                                 ~l3e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1671                                 ~l3f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1672                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1673                                 ~l4a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1674                                 ~l4b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f4=q.value; ~undof4=~f4;
1675                                 ~l4c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1676                                 ~l4d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1677                                 ~l4e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1678                                 ~l4f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1679                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1680                                 ~l5a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1681                                 ~l5b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f5=q.value; ~undof5=~f5;
1682                                 ~l5c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1683                                 ~l5d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1684                                 ~l5e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1685                                 ~l5f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1686                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1687                                 ~l6a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1688                                 ~l6b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f6=q.value; ~undof6=~f6;
1689                                 ~l6c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1690                                 ~l6d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1691                                 ~l6e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1692                                 ~l6f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1693                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1694                                 ~l7a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1695                                 ~l7b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f7=q.value; ~undof7=~f7;
1696                                 ~l7c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1697                                 ~l7d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1698                                 ~l7e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1699                                 ~l7f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1700                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1701                                 ~l8a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1702                                 ~l8b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f8=q.value; ~undof8=~f8;
1703                                 ~l8c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1704                                 ~l8d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1705                                 ~l8e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1706                                 ~l8f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1707                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1708                                 ~l9a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1709                                 ~l9b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f9=q.value; ~undof9=~f9;
1710                                 ~l9c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1711                                 ~l9d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1712                                 ~l9e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1713                                 ~l9f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1714                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1715                                 ~l10a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1716                                 ~l10b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f10=q.value; ~undof10=~f10;
1717                                 ~l10c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1718                                 ~l10d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1719                                 ~l10e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1720                                 ~l10f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1721                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1722                                 ~l11a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1723                                 ~l11b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f11=q.value; ~undof11=~f11;
1724                                 ~l11c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1725                                 ~l11d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1726                                 ~l11e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1727                                 ~l11f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1728                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1729                                 ~l12a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1730                                 ~l12b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f12=q.value; ~undof12=~f12;
1731                                 ~l12c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1732                                 ~l12d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1733                                 ~l12e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1734                                 ~l12f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);};
1735                 };
1736         };
1737
1738
1739         //mouse move action
1740
1741         view.mouseMoveAction = {
1742                 |v, x, y|
1743
1744                 ~nh = 2;
1745                 ~nw = ~nh*1.6180339887499;
1746
1747                 //generate dots on mouse move action
1748
1749                 ~tgrid = 30;
1750                 ~bgrid = Window.screenBounds.height-(Window.screenBounds.height/1.6180339887499)+30;
1751
1752                 case
1753                 {y<~tgrid} {nil}
1754                 {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z1.close;~z25.close;~z1 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1755                 {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z2.close;~z26.close;~z2 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1756                 {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z3.close;~z27.close;~z3 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1757                 {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z4.close;~z28.close;~z4 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1758                 {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z5.close;~z29.close;~z5 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1759                 {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z6.close;~z30.close;~z6 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1760                 {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z7.close;~z31.close;~z7 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1761                 {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z8.close;~z32.close;~z8 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1762                 {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z9.close;~z33.close;~z9 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1763                 {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z10.close;~z34.close;~z10 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1764                 {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z11.close;~z35.close;~z11 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1765                 {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z12.close;~z36.close;~z12 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1766                 {y>~tgrid and: y<~bgrid} {nil}
1767                 {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z1.close;~z25.close;~z1 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1768                 {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z2.close;~z26.close;~z2 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1769                 {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z3.close;~z27.close;~z3 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1770                 {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z4.close;~z28.close;~z4 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1771                 {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z5.close;~z29.close;~z5 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1772                 {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z6.close;~z30.close;~z6 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1773                 {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z7.close;~z31.close;~z7 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1774                 {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z8.close;~z32.close;~z8 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1775                 {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z9.close;~z33.close;~z9 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1776                 {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z10.close;~z34.close;~z10 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1777                 {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z11.close;~z35.close;~z11 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1778                 {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z12.close;~z36.close;~z12 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)};
1779                 w.refresh;
1780
1781                 ~tgrid = 30;
1782                 ~bgrid = Window.screenBounds.height-(Window.screenBounds.height/1.6180339887499)+30;
1783
1784                 //set synth values on mouse move action
1785
1786                 case
1787                 {~l1a.isRunning == true}{
1788                         case
1789                         {y<~tgrid} {nil}
1790                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1791                                 ~l1a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1792                                 ~l1b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f1=q.value; ~undof1=~f1;
1793                                 ~l1c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1794                                 ~l1d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1795                                 ~l1e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1796                                 ~l1f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1797                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1798                                 ~l2a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1799                                 ~l2b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f2=q.value; ~undof2=~f2;
1800                                 ~l2c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1801                                 ~l2d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1802                                 ~l2e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1803                                 ~l2f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1804                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1805                                 ~l3a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1806                                 ~l3b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f3=q.value; ~undof3=~f3;
1807                                 ~l3c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1808                                 ~l3d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1809                                 ~l3e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1810                                 ~l3f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1811                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1812                                 ~l4a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1813                                 ~l4b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f4=q.value; ~undof4=~f4;
1814                                 ~l4c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1815                                 ~l4d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1816                                 ~l4e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1817                                 ~l4f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1818                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1819                                 ~l5a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1820                                 ~l5b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f5=q.value; ~undof5=~f5;
1821                                 ~l5c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1822                                 ~l5d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1823                                 ~l5e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1824                                 ~l5f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1825                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1826                                 ~l6a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1827                                 ~l6b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f6=q.value; ~undof6=~f6;
1828                                 ~l6c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1829                                 ~l6d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1830                                 ~l6e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1831                                 ~l6f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1832                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1833                                 ~l7a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1834                                 ~l7b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f7=q.value; ~undof7=~f7;
1835                                 ~l7c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1836                                 ~l7d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1837                                 ~l7e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1838                                 ~l7f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1839                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1840                                 ~l8a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1841                                 ~l8b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f8=q.value; ~undof8=~f8;
1842                                 ~l8c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1843                                 ~l8d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1844                                 ~l8e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1845                                 ~l8f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1846                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1847                                 ~l9a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1848                                 ~l9b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f9=q.value; ~undof9=~f9;
1849                                 ~l9c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1850                                 ~l9d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1851                                 ~l9e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1852                                 ~l9f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1853                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1854                                 ~l10a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1855                                 ~l10b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f10=q.value; ~undof10=~f10;
1856                                 ~l10c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1857                                 ~l10d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1858                                 ~l10e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1859                                 ~l10f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1860                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1861                                 ~l11a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1862                                 ~l11b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f11=q.value; ~undof11=~f11;
1863                                 ~l11c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1864                                 ~l11d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1865                                 ~l11e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1866                                 ~l11f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1867                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1868                                 ~l12a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1869                                 ~l12b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f12=q.value; ~undof12=~f12;
1870                                 ~l12c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1871                                 ~l12d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1872                                 ~l12e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1873                                 ~l12f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1874                         {y>~tgrid and: y<~bgrid} {nil}
1875                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1876                                 ~l1a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1877                                 ~l1b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f1=q.value; ~undof1=~f1;
1878                                 ~l1c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1879                                 ~l1d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1880                                 ~l1e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1881                                 ~l1f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1882                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1883                                 ~l2a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1884                                 ~l2b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f2=q.value; ~undof2=~f2;
1885                                 ~l2c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1886                                 ~l2d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1887                                 ~l2e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1888                                 ~l2f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1889                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1890                                 ~l3a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1891                                 ~l3b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f3=q.value; ~undof3=~f3;
1892                                 ~l3c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1893                                 ~l3d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1894                                 ~l3e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1895                                 ~l3f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1896                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1897                                 ~l4a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1898                                 ~l4b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f4=q.value; ~undof4=~f4;
1899                                 ~l4c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1900                                 ~l4d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1901                                 ~l4e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1902                                 ~l4f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1903                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1904                                 ~l5a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1905                                 ~l5b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f5=q.value; ~undof5=~f5;
1906                                 ~l5c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1907                                 ~l5d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1908                                 ~l5e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1909                                 ~l5f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1910                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1911                                 ~l6a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1912                                 ~l6b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f6=q.value; ~undof6=~f6;
1913                                 ~l6c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1914                                 ~l6d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1915                                 ~l6e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1916                                 ~l6f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1917                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1918                                 ~l7a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1919                                 ~l7b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f7=q.value; ~undof7=~f7;
1920                                 ~l7c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1921                                 ~l7d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1922                                 ~l7e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1923                                 ~l7f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1924                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1925                                 ~l8a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1926                                 ~l8b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f8=q.value; ~undof8=~f8;
1927                                 ~l8c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1928                                 ~l8d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1929                                 ~l8e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1930                                 ~l8f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1931                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1932                                 ~l9a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1933                                 ~l9b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f9=q.value; ~undof9=~f9;
1934                                 ~l9c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1935                                 ~l9d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1936                                 ~l9e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1937                                 ~l9f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1938                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1939                                 ~l10a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1940                                 ~l10b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f10=q.value; ~undof10=~f10;
1941                                 ~l10c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1942                                 ~l10d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1943                                 ~l10e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1944                                 ~l10f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1945                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1946                                 ~l11a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1947                                 ~l11b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f11=q.value; ~undof11=~f11;
1948                                 ~l11c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1949                                 ~l11d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1950                                 ~l11e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1951                                 ~l11f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1952                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1953                                 ~l12a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1954                                 ~l12b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f12=q.value; ~undof12=~f12;
1955                                 ~l12c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1956                                 ~l12d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1957                                 ~l12e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1958                                 ~l12f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);};
1959                 }
1960                 {~l1a1.isRunning == true}{
1961                         case
1962                         {y<~tgrid} {nil}
1963                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1964                                 ~l1a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1965                                 ~l1b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f1=q.value; ~undof1=~f1;
1966                                 ~l1c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1967                                 ~l1d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1968                                 ~l1e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1969                                 ~l1f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1970                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1971                                 ~l2a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1972                                 ~l2b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f2=q.value; ~undof2=~f2;
1973                                 ~l2c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1974                                 ~l2d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1975                                 ~l2e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1976                                 ~l2f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1977                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1978                                 ~l3a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1979                                 ~l3b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f3=q.value; ~undof3=~f3;
1980                                 ~l3c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1981                                 ~l3d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1982                                 ~l3e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1983                                 ~l3f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1984                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1985                                 ~l4a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1986                                 ~l4b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f4=q.value; ~undof4=~f4;
1987                                 ~l4c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1988                                 ~l4d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1989                                 ~l4e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1990                                 ~l4f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1991                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1992                                 ~l5a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1993                                 ~l5b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f5=q.value; ~undof5=~f5;
1994                                 ~l5c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1995                                 ~l5d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1996                                 ~l5e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1997                                 ~l5f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1998                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1999                                 ~l6a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
2000                                 ~l6b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f6=q.value; ~undof6=~f6;
2001                                 ~l6c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
2002                                 ~l6d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
2003                                 ~l6e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
2004                                 ~l6f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
2005                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
2006                                 ~l7a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
2007                                 ~l7b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f7=q.value; ~undof7=~f7;
2008                                 ~l7c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
2009                                 ~l7d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
2010                                 ~l7e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
2011                                 ~l7f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
2012                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
2013                                 ~l8a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
2014                                 ~l8b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f8=q.value; ~undof8=~f8;
2015                                 ~l8c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
2016                                 ~l8d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
2017                                 ~l8e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
2018                                 ~l8f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
2019                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
2020                                 ~l9a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
2021                                 ~l9b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f9=q.value; ~undof9=~f9;
2022                                 ~l9c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
2023                                 ~l9d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
2024                                 ~l9e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
2025                                 ~l9f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
2026                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
2027                                 ~l10a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
2028                                 ~l10b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f10=q.value; ~undof10=~f10;
2029                                 ~l10c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
2030                                 ~l10d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
2031                                 ~l10e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
2032                                 ~l10f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
2033                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
2034                                 ~l11a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
2035                                 ~l11b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f11=q.value; ~undof11=~f11;
2036                                 ~l11c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
2037                                 ~l11d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
2038                                 ~l11e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
2039                                 ~l11f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
2040                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
2041                                 ~l12a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
2042                                 ~l12b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f12=q.value; ~undof12=~f12;
2043                                 ~l12c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
2044                                 ~l12d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
2045                                 ~l12e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
2046                                 ~l12f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
2047                         {y>~tgrid and: y<~bgrid} {nil}
2048                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
2049                                 ~l1a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
2050                                 ~l1b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f1=q.value; ~undof1=~f1;
2051                                 ~l1c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
2052                                 ~l1d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
2053                                 ~l1e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
2054                                 ~l1f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
2055                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
2056                                 ~l2a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
2057                                 ~l2b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f2=q.value; ~undof2=~f2;
2058                                 ~l2c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
2059                                 ~l2d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
2060                                 ~l2e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
2061                                 ~l2f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
2062                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
2063                                 ~l3a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
2064                                 ~l3b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f3=q.value; ~undof3=~f3;
2065                                 ~l3c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
2066                                 ~l3d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
2067                                 ~l3e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
2068                                 ~l3f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
2069                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
2070                                 ~l4a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
2071                                 ~l4b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f4=q.value; ~undof4=~f4;
2072                                 ~l4c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
2073                                 ~l4d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
2074                                 ~l4e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
2075                                 ~l4f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
2076                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
2077                                 ~l5a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
2078                                 ~l5b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f5=q.value; ~undof5=~f5;
2079                                 ~l5c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
2080                                 ~l5d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
2081                                 ~l5e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
2082                                 ~l5f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
2083                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
2084                                 ~l6a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
2085                                 ~l6b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f6=q.value; ~undof6=~f6;
2086                                 ~l6c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
2087                                 ~l6d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
2088                                 ~l6e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
2089                                 ~l6f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
2090                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
2091                                 ~l7a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
2092                                 ~l7b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f7=q.value; ~undof7=~f7;
2093                                 ~l7c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
2094                                 ~l7d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
2095                                 ~l7e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
2096                                 ~l7f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
2097                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
2098                                 ~l8a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
2099                                 ~l8b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f8=q.value; ~undof8=~f8;
2100                                 ~l8c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
2101                                 ~l8d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
2102                                 ~l8e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
2103                                 ~l8f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
2104                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
2105                                 ~l9a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
2106                                 ~l9b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f9=q.value; ~undof9=~f9;
2107                                 ~l9c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
2108                                 ~l9d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
2109                                 ~l9e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
2110                                 ~l9f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
2111                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
2112                                 ~l10a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
2113                                 ~l10b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f10=q.value; ~undof10=~f10;
2114                                 ~l10c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
2115                                 ~l10d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
2116                                 ~l10e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
2117                                 ~l10f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
2118                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
2119                                 ~l11a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
2120                                 ~l11b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f11=q.value; ~undof11=~f11;
2121                                 ~l11c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
2122                                 ~l11d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
2123                                 ~l11e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
2124                                 ~l11f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
2125                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
2126                                 ~l12a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
2127                                 ~l12b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f12=q.value; ~undof12=~f12;
2128                                 ~l12c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
2129                                 ~l12d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
2130                                 ~l12e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
2131                                 ~l12f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);};
2132                 };
2133         };
2134
2135         ~tgrid = 30;
2136         ~bgrid = Window.screenBounds.height-(Window.screenBounds.height/1.6180339887499)+30;
2137         ~dc1 = ~tgrid-5; ~dc2 = ~bgrid-5; ~dca = 10;
2138
2139         ~bpl = Window.screenBounds.width-340;
2140         ~bpt = Window.screenBounds.height-88;
2141         ~bph = 40;
2142         ~bpw = 40/1.6180339887499;
2143
2144
2145         //copy button
2146
2147         b = Button.new(w,Rect(Window.screenBounds.width*0+80,Window.screenBounds.height-52,60,60/1.6180339887499)).states_([["copy",Color.white,Color.black],["copy",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
2148                 if(button.value == 1, {
2149
2150                         ~tsc = TextView(w, Rect(0,5, Window.screenBounds.width, 354)).background_(Color.black);
2151                         (~tsc.string =
2152
2153                                 "current chord/frequencies: "++"\n"++"\n"++
2154
2155                                 "[~f1="++~f1.asString++",~f2="++~f2.asString++",~f3="++~f3.asString++",~f4="++~f4.asString++",~f5="++~f5.asString++",~f6="++~f6.asString++",~f7="++~f7.asString++",~f8="++~f8.asString++",~f9="++~f9.asString++",~f10="++~f10.asString++",~f11="++~f11.asString++",~f12="++~f12.asString++"]"++"\n"++"\n"++
2156
2157                                 "saved open/flow 1-8 frequencies (in script format): "++"\n"++"\n"++
2158
2159                                 "[~f1="++~fp1.asString++",~f2="++~fp2.asString++",~f3="++~fp3.asString++",~f4="++~fp4.asString++",~f5="++~fp5.asString++",~f6="++~fp6.asString++",~f7="++~fp7.asString++",~f8="++~fp8.asString++",~f9="++~fp9.asString++",~f10="++~fp10.asString++",~f11="++~fp11.asString++",~f12="++~fp12.asString++"];"++" "++"~synthopen.value; ~trace.value; (a).wait;"++"\n"++
2160                                 "[~f1="++~fp1b.asString++",~f2="++~fp2b.asString++",~f3="++~fp3b.asString++",~f4="++~fp4b.asString++",~f5="++~fp5b.asString++",~f6="++~fp6b.asString++",~f7="++~fp7b.asString++",~f8="++~fp8b.asString++",~f9="++~fp9b.asString++",~f10="++~fp10b.asString++",~f11="++~fp11b.asString++",~f12="++~fp12b.asString++"];"++" "++"~synthflow.value; ~trace.value; (a).wait;"++"\n"++
2161                                 "[~f1="++~fp1c.asString++",~f2="++~fp2c.asString++",~f3="++~fp3c.asString++",~f4="++~fp4c.asString++",~f5="++~fp5c.asString++",~f6="++~fp6c.asString++",~f7="++~fp7c.asString++",~f8="++~fp8c.asString++",~f9="++~fp9c.asString++",~f10="++~fp10c.asString++",~f11="++~fp11c.asString++",~f12="++~fp12c.asString++"];"++" "++"~synthflow.value; ~trace.value; (a).wait;"++"\n"++
2162                                 "[~f1="++~fp1d.asString++",~f2="++~fp2d.asString++",~f3="++~fp3d.asString++",~f4="++~fp4d.asString++",~f5="++~fp5d.asString++",~f6="++~fp6d.asString++",~f7="++~fp7d.asString++",~f8="++~fp8d.asString++",~f9="++~fp9d.asString++",~f10="++~fp10d.asString++",~f11="++~fp11d.asString++",~f12="++~fp12d.asString++"];"++" "++"~synthflow.value; ~trace.value; (a).wait;"++"\n"++
2163                                 "[~f1="++~fp1e.asString++",~f2="++~fp2e.asString++",~f3="++~fp3e.asString++",~f4="++~fp4e.asString++",~f5="++~fp5e.asString++",~f6="++~fp6e.asString++",~f7="++~fp7e.asString++",~f8="++~fp8e.asString++",~f9="++~fp9e.asString++",~f10="++~fp10e.asString++",~f11="++~fp11e.asString++",~f12="++~fp12e.asString++"];"++" "++"~synthflow.value; ~trace.value; (a).wait;"++"\n"++
2164                                 "[~f1="++~fp1f.asString++",~f2="++~fp2f.asString++",~f3="++~fp3f.asString++",~f4="++~fp4f.asString++",~f5="++~fp5f.asString++",~f6="++~fp6f.asString++",~f7="++~fp7f.asString++",~f8="++~fp8f.asString++",~f9="++~fp9f.asString++",~f10="++~fp10f.asString++",~f11="++~fp11f.asString++",~f12="++~fp12f.asString++"];"++" "++"~synthflow.value; ~trace.value; (a).wait;"++"\n"++
2165                                 "[~f1="++~fp1g.asString++",~f2="++~fp2g.asString++",~f3="++~fp3g.asString++",~f4="++~fp4g.asString++",~f5="++~fp5g.asString++",~f6="++~fp6g.asString++",~f7="++~fp7g.asString++",~f8="++~fp8g.asString++",~f9="++~fp9g.asString++",~f10="++~fp10g.asString++",~f11="++~fp11g.asString++",~f12="++~fp12g.asString++"];"++" "++"~synthflow.value; ~trace.value; (a).wait;"++"\n"++
2166                                 "[~f1="++~fp1h.asString++",~f2="++~fp2h.asString++",~f3="++~fp3h.asString++",~f4="++~fp4h.asString++",~f5="++~fp5h.asString++",~f6="++~fp6h.asString++",~f7="++~fp7h.asString++",~f8="++~fp8h.asString++",~f9="++~fp9h.asString++",~f10="++~fp10h.asString++",~f11="++~fp11h.asString++",~f12="++~fp12h.asString++"];"++" "++"~synthflow.value; ~trace.value; (a).wait;"++"\n"++"\n"++
2167
2168                                 "saved slide 1-8 frequencies (in script format): "++"\n"++"\n"++
2169
2170                                 "#o,p,q,r,s,t,u,v,w,x,y,z = [ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ]; [~f1="++~fp1.asString++",~f2="++~fp2.asString++",~f3="++~fp3.asString++",~f4="++~fp4.asString++",~f5="++~fp5.asString++",~f6="++~fp6.asString++",~f7="++~fp7.asString++",~f8="++~fp8.asString++",~f9="++~fp9.asString++",~f10="++~fp10.asString++",~f11="++~fp11.asString++",~f12="++~fp12.asString++"];"++" "++"~slidetime = 1; ~slidedo = 432; ~synthslide.value; ~trace.value; (a).wait;"++"\n"++
2171                                 "#o,p,q,r,s,t,u,v,w,x,y,z = [ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ]; [~f1="++~fp1b.asString++",~f2="++~fp2b.asString++",~f3="++~fp3b.asString++",~f4="++~fp4b.asString++",~f5="++~fp5b.asString++",~f6="++~fp6b.asString++",~f7="++~fp7b.asString++",~f8="++~fp8b.asString++",~f9="++~fp9b.asString++",~f10="++~fp10b.asString++",~f11="++~fp11b.asString++",~f12="++~fp12b.asString++"];"++" "++"~slidetime = 1; ~slidedo = 432; ~synthslide.value; ~trace.value; (a).wait;"++"\n"++
2172                                 "#o,p,q,r,s,t,u,v,w,x,y,z = [ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ]; [~f1="++~fp1c.asString++",~f2="++~fp2c.asString++",~f3="++~fp3c.asString++",~f4="++~fp4c.asString++",~f5="++~fp5c.asString++",~f6="++~fp6c.asString++",~f7="++~fp7c.asString++",~f8="++~fp8c.asString++",~f9="++~fp9c.asString++",~f10="++~fp10c.asString++",~f11="++~fp11c.asString++",~f12="++~fp12c.asString++"];"++" "++"~slidetime = 1; ~slidedo = 432; ~synthslide.value; ~trace.value; (a).wait;"++"\n"++
2173                                 "#o,p,q,r,s,t,u,v,w,x,y,z = [ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ]; [~f1="++~fp1d.asString++",~f2="++~fp2d.asString++",~f3="++~fp3d.asString++",~f4="++~fp4d.asString++",~f5="++~fp5d.asString++",~f6="++~fp6d.asString++",~f7="++~fp7d.asString++",~f8="++~fp8d.asString++",~f9="++~fp9d.asString++",~f10="++~fp10d.asString++",~f11="++~fp11d.asString++",~f12="++~fp12d.asString++"];"++" "++"~slidetime = 1; ~slidedo = 432; ~synthslide.value; ~trace.value; (a).wait;"++"\n"++
2174                                 "#o,p,q,r,s,t,u,v,w,x,y,z = [ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ]; [~f1="++~fp1e.asString++",~f2="++~fp2e.asString++",~f3="++~fp3e.asString++",~f4="++~fp4e.asString++",~f5="++~fp5e.asString++",~f6="++~fp6e.asString++",~f7="++~fp7e.asString++",~f8="++~fp8e.asString++",~f9="++~fp9e.asString++",~f10="++~fp10e.asString++",~f11="++~fp11e.asString++",~f12="++~fp12e.asString++"];"++" "++"~slidetime = 1; ~slidedo = 432; ~synthslide.value; ~trace.value; (a).wait;"++"\n"++
2175                                 "#o,p,q,r,s,t,u,v,w,x,y,z = [ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ]; [~f1="++~fp1f.asString++",~f2="++~fp2f.asString++",~f3="++~fp3f.asString++",~f4="++~fp4f.asString++",~f5="++~fp5f.asString++",~f6="++~fp6f.asString++",~f7="++~fp7f.asString++",~f8="++~fp8f.asString++",~f9="++~fp9f.asString++",~f10="++~fp10f.asString++",~f11="++~fp11f.asString++",~f12="++~fp12f.asString++"];"++" "++"~slidetime = 1; ~slidedo = 432; ~synthslide.value; ~trace.value; (a).wait;"++"\n"++
2176                                 "#o,p,q,r,s,t,u,v,w,x,y,z = [ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ]; [~f1="++~fp1g.asString++",~f2="++~fp2g.asString++",~f3="++~fp3g.asString++",~f4="++~fp4g.asString++",~f5="++~fp5g.asString++",~f6="++~fp6g.asString++",~f7="++~fp7g.asString++",~f8="++~fp8g.asString++",~f9="++~fp9g.asString++",~f10="++~fp10g.asString++",~f11="++~fp11g.asString++",~f12="++~fp12g.asString++"];"++" "++"~slidetime = 1; ~slidedo = 432; ~synthslide.value; ~trace.value; (a).wait;"++"\n"++
2177                                 "#o,p,q,r,s,t,u,v,w,x,y,z = [ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ]; [~f1="++~fp1h.asString++",~f2="++~fp2h.asString++",~f3="++~fp3h.asString++",~f4="++~fp4h.asString++",~f5="++~fp5h.asString++",~f6="++~fp6h.asString++",~f7="++~fp7h.asString++",~f8="++~fp8h.asString++",~f9="++~fp9h.asString++",~f10="++~fp10h.asString++",~f11="++~fp11h.asString++",~f12="++~fp12h.asString++"];"++" "++"~slidetime = 1; ~slidedo = 432; ~synthslide.value; ~trace.value; (a).wait;"
2178                         );
2179                         ~tsc.stringColor = Color.white;
2180                         [ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ].postln;},
2181                 {~tsc.close;});
2182         });
2183
2184
2185         /*//stop timer button
2186
2187         sts = Button.new(w,Rect(Window.screenBounds.width-20-20-20-20,~bpt+69+5,20,20/1.6180339887499)).states_([["st",Color.white,Color.black],["st",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
2188         if(~timer.isPlaying == true, {
2189         if(~tst.value == nil, {~timer.stop; ~systemclock.stop; ~systemclock.clear;},{~tst.close;
2190         ~timevals.value;
2191         ~timer.stop; ~systemclock.stop; ~systemclock.clear;});
2192         });
2193         });*/
2194
2195
2196         //timer button
2197
2198         ~ts = Button.new(w,Rect(Window.screenBounds.width*0+20,Window.screenBounds.height-52,60,60/1.6180339887499)).states_([["tsynth0",Color.white,Color.black],["tsynth1",Color.white,Color.black]]).action_({arg synthbutton; synthbutton.value.postln}).action_({arg synthbutton; if(synthbutton.value == 1, {
2199
2200                 ~sts = Button.new(w,Rect(~bp01l-90,~bp01t,80,20)).states_([["stop timer",Color.white,Color.black],["stop timer",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
2201                         if(~timer.isPlaying == true, {
2202                                 if(~tst.value == nil, {~timer.stop; ~systemclock.stop; ~systemclock.clear;},{~tst.close;
2203                                         ~timevals.value;
2204                                         ~timer.stop; ~systemclock.stop; ~systemclock.clear;});
2205                         });
2206                 });
2207
2208                 if(~tst != nil, {~tst.close});
2209                 ~timevals.value;
2210                 ~timer.stop; ~systemclock.stop; ~systemclock.clear;},{if(~tst.value == nil, {~timer.stop; ~systemclock.stop; ~systemclock.clear;},{~timer.stop; ~systemclock.stop; ~systemclock.clear; ~tst.close; ~sts.close;})});
2211
2212         });
2213
2214
2215         //start/stop synth button
2216
2217         b3 = Button.new(w,Rect(Window.screenBounds.width*0+20,Window.screenBounds.height-88,60,60/1.6180339887499)).states_([["synth0",Color.white,Color.black],["synth1",Color.white,Color.black]]).action_({arg synthbutton; synthbutton.value.postln}).action_({
2218                 arg synthbutton; if(synthbutton.value == 1, {
2219                         ~l1a = Synth(\gsineicfld, [\dur, 432]).register;~l1a1 = Synth(\gsineicfld, [\dur, 432]).register;[~l1a, ~l1a1].do(_.free);~l1a = Synth(\gsineicfld, [\dur, 432]).register;~l1a1 = Synth(\gsineicfld, [\dur, 432]).register;[~l1a, ~l1a1].do(_.free);
2220                         ~synthopen.value;
2221                         ~numsynths.stop; ~numsynthsfunc.value;
2222                         if(~midifunc != nil, {~midifunc.value});
2223                 },
2224                 {~synthfree.value; b4.value = 0;})
2225         });
2226
2227
2228         //pause/unpause button
2229
2230         b4 = Button.new(w,Rect(Window.screenBounds.width*0+80,Window.screenBounds.height-88,60,60/1.6180339887499)).states_([["pause0",Color.white,Color.black],["pause1",Color.white,Color.black]]).action_({arg synthbutton; synthbutton.value.postln}).action_({
2231                 arg synthbutton; if(synthbutton.value == 1, {~synthpause.value; if(~ts.value == 1, {~timer.stop;});},
2232                         {~synthflow.value; if(~ts.value != 1, {nil}, {SystemClock.play(~timer);})})
2233         });
2234
2235
2236         //generate values for number of KW(King Wen) sequences in a timewave half-cycle (or amplitude x2) pop-up menu
2237
2238         x=0;
2239         ~menu2values = Array.fill(24, {(x=x+1).asString++" kws"});
2240
2241
2242         //number of KW(King Wen) sequences in a timewave half-cycle (or amplitude x2) upon starting value
2243
2244         case
2245         {~gsinenum == nil}{~menu2start = ~menu2values.at(~synthdefnum-1)}
2246         {~gsinenum == 1}{~menu2start = ~menu2values.at(0)}
2247         {~gsinenum == 2}{~menu2start = ~menu2values.at(1)}
2248         {~gsinenum == 3}{~menu2start = ~menu2values.at(2)}
2249         {~gsinenum == 4}{~menu2start = ~menu2values.at(3)}
2250         {~gsinenum == 5}{~menu2start = ~menu2values.at(4)}
2251         {~gsinenum == 6}{~menu2start = ~menu2values.at(5)}
2252         {~gsinenum == 7}{~menu2start = ~menu2values.at(6)}
2253         {~gsinenum == 8}{~menu2start = ~menu2values.at(7)}
2254         {~gsinenum == 9}{~menu2start = ~menu2values.at(8)}
2255         {~gsinenum == 10}{~menu2start = ~menu2values.at(9)}
2256         {~gsinenum == 11}{~menu2start = ~menu2values.at(10)}
2257         {~gsinenum == 12}{~menu2start = ~menu2values.at(11)}
2258         {~gsinenum == 13}{~menu2start = ~menu2values.at(12)}
2259         {~gsinenum == 14}{~menu2start = ~menu2values.at(13)}
2260         {~gsinenum == 15}{~menu2start = ~menu2values.at(14)}
2261         {~gsinenum == 16}{~menu2start = ~menu2values.at(15)}
2262         {~gsinenum == 17}{~menu2start = ~menu2values.at(16)}
2263         {~gsinenum == 18}{~menu2start = ~menu2values.at(17)}
2264         {~gsinenum == 19}{~menu2start = ~menu2values.at(18)}
2265         {~gsinenum == 20}{~menu2start = ~menu2values.at(19)}
2266         {~gsinenum == 21}{~menu2start = ~menu2values.at(20)}
2267         {~gsinenum == 22}{~menu2start = ~menu2values.at(21)}
2268         {~gsinenum == 23}{~menu2start = ~menu2values.at(22)}
2269         {~gsinenum == 24}{~menu2start = ~menu2values.at(23)};
2270         if(~menu2synthdefstart.value == nil, {~menu2synthdefstart = ~synthdefnum}, {~menu2synthdefstart = ~gsinenum});
2271
2272         if(~low_pass_filter_set_value == nil, {~low_pass_filter_set_value = ~low_pass_filter_freq_limit});
2273         if(~low_pass_filter_set_value != ~low_pass_filter_freq_limit, {~low_pass_filter_set_value = ~low_pass_filter_freq_limit});
2274
2275
2276         //settings function
2277
2278         ~settingsbutton = Button.new(w,Rect(20+60*2+15+25,Window.screenBounds.height-88+(30/1.6180339887499*0),60,60/1.6180339887499)).states_([["settings",Color.white,Color.black],["settings",Color.white,Color.black]]).action_({arg button;
2279
2280                 if(button.value == 1, {
2281
2282                         ({
2283                                 arg  top = 0,width=150, revertwidth=75, height = 25,  heightbox = 25, lefttime = 0 , lefttimebox = width+5,  widthbox=165, leftdo = lefttimebox+widthbox+5, leftdobox = leftdo+57, inc=0, lw = 0,  uw = 0, numw = 40;
2284                                 var tall, stall, iall, siall, st1, st2, st3, st4, st5, st6, st7, st8, st9, st10, st11, st12, si1, si2, si3, si4, si5, si6, si7, si8, t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,i1,i2,i3,i4,i5,i6,i7,i8,i9,i10,i11,i12;
2285                                 ~settingsview = View(w, Rect(20+60*2+15+25,Window.screenBounds.height-340,340,340/1.6180339887499)).front;
2286                                 /*w.view.decorator=FlowLayout(w.view.bounds);
2287                                 w.view.decorator.gap=2@2;*/
2288
2289                                 top = 0;
2290
2291                                 t1 = StaticText(~settingsview, Rect(lefttime , top=top, width, height)).background_(Color.black).string_("KWS number").stringColor_(Color.white);
2292                                 t2 = StaticText(~settingsview, Rect(lefttime , top=top+height+5, width, height)).background_(Color.black).string_("base(lowest) freq(hz)").stringColor_(Color.white);
2293                                 t3 = StaticText(~settingsview, Rect(lefttime , top=top+height+5, width, height)).background_(Color.black).string_("synthdef type").stringColor_(Color.white);
2294                                 t4 = StaticText(~settingsview, Rect(lefttime , top=top+height+5, width, height)).background_(Color.black).string_("lp filter limit(hz)").stringColor_(Color.white);
2295                                 t5 = StaticText(~settingsview, Rect(lefttime , top=top+height+5, width, height)).background_(Color.black).string_("automate").stringColor_(Color.white);
2296
2297
2298                                 top = 0;
2299
2300
2301                                 //number of KW(King Wen) sequences in a timewave half-cycle (or amplitude x2) pop-up menu
2302
2303                                 ~menu2 = PopUpMenu(~settingsview,Rect(lefttimebox , top=top, widthbox, heightbox)).items_(~mvalue = (-1); [~menu2start.asString]++Array.fill(24, {~menu2values.at(~mvalue = ~mvalue+1);});).background_(Color.black).stringColor_(Color.white).action_({arg button;
2304
2305                                         if(~st != nil, {~st.close});
2306                                         ~st = StaticText(~settingsview, Rect(lefttime, top, 200, 20)).background_(Color.black);
2307                                         ~st.stringColor = Color.white;
2308                                         ~st.string = "# of kws in halfcycle selected";
2309                                         AppClock.sched(~gm,{~st.close;});
2310                                 });
2311
2312
2313                                 //pop-menu for timewave base (lowest) frequency
2314
2315                                 ~bfreqstart = ~basefreq;
2316                                 ~bfreq = PopUpMenu(~settingsview, Rect(lefttimebox , top=top+heightbox+5, widthbox, heightbox)).items_(~bfreqv = (-1); [~basefreq.asString]++Array.fill(140, {~freqmap.at(~bfreqv=~bfreqv+1).asString})).background_(Color.black).stringColor_(Color.white).action_({arg button;
2317
2318                                         if(~st != nil, {~st.close});
2319                                         ~st = StaticText(~settingsview, Rect(lefttime, top, 200, 20)).background_(Color.black);
2320                                         ~st.stringColor = Color.white;
2321                                         ~st.string = "basefreq selected";
2322                                         AppClock.sched(~gm,{~st.close;});
2323                                 });
2324
2325
2326                                 //synthdef pop-up menu
2327
2328                                 ~gsinemenu = PopUpMenu(~settingsview, Rect(lefttimebox , top=top+heightbox+5, widthbox, heightbox)).items_(["psine1","psine2","psine3","hsine1","hsine2","hsine3","psineuf1","psineuf2","psineuf3","hsineuf1","hsineuf2","hsineuf3"]).background_(Color.black).stringColor_(Color.white).action_({arg button;
2329
2330                                         if(~gsinemenu.value == 0,  {~kws_setting = 1; ~ratio_setting = "psine1"; ~low_pass_filter_on = 1; ~gs = 0;});
2331                                         if(~gsinemenu.value == 1,  {~kws_setting = 2; ~ratio_setting = "psine2"; ~low_pass_filter_on = 1; ~gs = 1;});
2332                                         if(~gsinemenu.value == 2,  {~kws_setting = 3; ~ratio_setting = "psine3"; ~low_pass_filter_on = 1; ~gs = 2;});
2333                                         if(~gsinemenu.value == 3,  {~kws_setting = 1; ~ratio_setting = "hsine1"; ~low_pass_filter_on = 1; ~gs = 3;});
2334                                         if(~gsinemenu.value == 4,  {~kws_setting = 2; ~ratio_setting = "hsine2"; ~low_pass_filter_on = 1; ~gs = 4;});
2335                                         if(~gsinemenu.value == 5,  {~kws_setting = 3; ~ratio_setting = "hsine3"; ~low_pass_filter_on = 1; ~gs = 5;});
2336                                         if(~gsinemenu.value == 6,  {~kws_setting = 1; ~ratio_setting = "psine1"; ~low_pass_filter_on = 0; ~gs = 6;});
2337                                         if(~gsinemenu.value == 7,  {~kws_setting = 2; ~ratio_setting = "psine2"; ~low_pass_filter_on = 0; ~gs = 7;});
2338                                         if(~gsinemenu.value == 8,  {~kws_setting = 3; ~ratio_setting = "psine3"; ~low_pass_filter_on = 0; ~gs = 8;});
2339                                         if(~gsinemenu.value == 9,  {~kws_setting = 1; ~ratio_setting = "hsine1"; ~low_pass_filter_on = 0; ~gs = 9;});
2340                                         if(~gsinemenu.value == 10, {~kws_setting = 2; ~ratio_setting = "hsine2"; ~low_pass_filter_on = 0; ~gs = 10;});
2341                                         if(~gsinemenu.value == 11, {~kws_setting = 3; ~ratio_setting = "hsine3"; ~low_pass_filter_on = 0; ~gs = 11;});
2342
2343                                         if(~st != nil, {~st.close});
2344                                         ~st = StaticText(~settingsview, Rect(lefttime, top, 200, 20)).background_(Color.black);
2345                                         ~st.stringColor = Color.white;
2346                                         ~st.string = "synthdef setting selected";
2347                                         AppClock.sched(~gm,{~st.close;});
2348                                 });
2349
2350                                 if(~gs == nil, {~gs = 0;});
2351
2352                                 case
2353                                 {~gs == 0}{~gsinemenu.value = 0;}
2354                                 {~gs == 1}{~gsinemenu.value = 1;}
2355                                 {~gs == 2}{~gsinemenu.value = 2;}
2356                                 {~gs == 3}{~gsinemenu.value = 3;}
2357                                 {~gs == 4}{~gsinemenu.value = 4;}
2358                                 {~gs == 5}{~gsinemenu.value = 5;}
2359                                 {~gs == 0}{~gsinemenu.value = 6;}
2360                                 {~gs == 1}{~gsinemenu.value = 7;}
2361                                 {~gs == 2}{~gsinemenu.value = 8;}
2362                                 {~gs == 3}{~gsinemenu.value = 9;}
2363                                 {~gs == 4}{~gsinemenu.value = 10;}
2364                                 {~gs == 5}{~gsinemenu.value = 11;};
2365
2366
2367                                 //set low-pass filter frequency limit
2368
2369                                 ~low_pass_filter_textfield = TextField(~settingsview, Rect(lefttimebox , top=top+heightbox+5, widthbox, heightbox));
2370                                 ~low_pass_filter_textfield.string = ~low_pass_filter_set_value.asString;
2371                                 ~low_pass_filter_textfield.background_(Color.black);
2372                                 ~low_pass_filter_textfield.stringColor_(Color.white);
2373                                 ~low_pass_filter_textfield.action = {arg value; ~freqsetvalue = value.value;
2374
2375                                         ~freqset_textfield_func.value; //this function is found after line 2900
2376
2377                                         ~low_pass_filter_set_value = ~freqsetvalue.value;
2378
2379                                         ~low_pass_filter_textfield.string = ~low_pass_filter_set_value.asString;
2380
2381                                         if(~low_pass_filter_set_value != 0, {
2382                                                 if(~st != nil, {~st.close});
2383                                                 ~st = StaticText(~settingsview, Rect(lefttime, top, 240, 20)).background_(Color.black);
2384                                                 ~st.stringColor = Color.white;
2385                                                 ~st.string = "low-pass filter freq limit selected";
2386                                                 AppClock.sched(~gm,{~st.close;});
2387                                         }, {~low_pass_filter_set_value = ~low_pass_filter_freq_limit; ~low_pass_filter_textfield.string = ~low_pass_filter_set_value.asString;});
2388                                 };
2389
2390
2391                                 //switch to sendreply functions
2392
2393                                 ~sendreplymenu = PopUpMenu(~settingsview,Rect(lefttimebox , top=top+heightbox+5, widthbox, heightbox)).items_(["off","western scale","eastern scale"]).background_(Color.black).stringColor_(Color.white).action_({arg button;
2394
2395                                         case
2396                                         {button.value == 0;}{~sendreplymenu_value = 0;}
2397                                         {button.value == 1;}{~sendreplymenu_value = 1;}
2398                                         {button.value == 2;}{~sendreplymenu_value = 2;};
2399
2400                                         if(~st != nil, {~st.close});
2401                                         ~st = StaticText(~settingsview, Rect(lefttime, top, 200, 20)).background_(Color.black);
2402                                         ~st.stringColor = Color.white;
2403                                         ~st.string = "automate setting selected";
2404                                         AppClock.sched(~gm,{~st.close;});
2405                                 });
2406
2407                                 if(~sendreplymenu_value == nil, {~sendreplymenu_value = 0;});
2408
2409                                 case
2410                                 {~sendreplymenu_value == 0}{~sendreplymenu.value = 0;}
2411                                 {~sendreplymenu_value == 1}{~sendreplymenu.value = 1;}
2412                                 {~sendreplymenu_value == 2}{~sendreplymenu.value = 2;};
2413
2414
2415                                 //set button for all settings
2416
2417                                 ~set1=Button(~settingsview,Rect(lefttimebox+widthbox-60, top=top+height+20, 60, 60/~gm)).states_([["set",Color.white,Color.black]]).mouseDownAction_({
2418
2419                                         if(~bfreq.value > 0, {~basefreq = ~freqmap.at(~bfreq.value - 1)}, {~basefreq = ~bfreqstart});
2420
2421                                         (#a,b,c,d,e,f = [ ~basefreq,~basefreq,~basefreq,~basefreq,~basefreq,~basefreq  ]; ~a = a; ~b = b; ~c =c; ~d = d; ~e = e;~f=f;);
2422
2423                                         ~low_pass_filter_freq_limit = ~low_pass_filter_set_value;
2424
2425
2426                                         //set n1-n9 values
2427
2428                                         case
2429                                         {~ratio_setting == "psine1";}{~n_value1 = ~gm;    ~n_value2 = ~gm2;   ~n_value6 = ~gm6;}
2430                                         {~ratio_setting == "psine2";}{~n_value1 = ~ngm1;  ~n_value2 = ~ngm2;  ~n_value6 = ~ngm6;}
2431                                         {~ratio_setting == "psine3";}{~n_value1 = ~nngm1; ~n_value2 = ~nngm2; ~n_value6 = ~nngm6;}
2432                                         {~ratio_setting == "hsine1";}{~n_value1 = ~h1;    ~n_value2 = ~h2;    ~n_value6 = ~h6;}
2433                                         {~ratio_setting == "hsine2";}{~n_value1 = ~nh1;   ~n_value2 = ~nh2;   ~n_value6 = ~nh6;}
2434                                         {~ratio_setting == "hsine3";}{~n_value1 = ~nnh1;  ~n_value2 = ~nnh2;  ~n_value6 = ~nnh6;};
2435
2436
2437                                         //sendyreply values
2438
2439                                         case
2440                                         {~sendreplymenu.value ==  0}{~sendreplysynthdef_on = 0;}
2441                                         {~sendreplymenu.value ==  1}{~sendreplysynthdef_on = 1; ~send_reply_func = ~send_reply_func_western; ~sendreplyfuncswitch = 1;}
2442                                         {~sendreplymenu.value ==  2}{~sendreplysynthdef_on = 1; ~send_reply_func = ~send_reply_func_eastern; ~sendreplyfuncswitch = 2;};
2443
2444
2445                                         //evaluate synthdefs(gsine)
2446
2447                                         case
2448                                         {~menu2.value == 0}{~gsinenum = ~menu2synthdefstart; ~gsine.value;}
2449                                         {~menu2.value == 1}{~gsinenum = 1; ~gsine.value;}
2450                                         {~menu2.value == 2}{~gsinenum = 2; ~gsine.value;}
2451                                         {~menu2.value == 3}{~gsinenum = 3; ~gsine.value;}
2452                                         {~menu2.value == 4}{~gsinenum = 4; ~gsine.value;}
2453                                         {~menu2.value == 5}{~gsinenum = 5; ~gsine.value;}
2454                                         {~menu2.value == 6}{~gsinenum = 6; ~gsine.value;}
2455                                         {~menu2.value == 7}{~gsinenum = 7; ~gsine.value;}
2456                                         {~menu2.value == 8}{~gsinenum = 8; ~gsine.value;}
2457                                         {~menu2.value == 9}{~gsinenum = 9; ~gsine.value;}
2458                                         {~menu2.value == 10}{~gsinenum = 10; ~gsine.value;}
2459                                         {~menu2.value == 11}{~gsinenum = 11; ~gsine.value;}
2460                                         {~menu2.value == 12}{~gsinenum = 12; ~gsine.value;}
2461                                         {~menu2.value == 13}{~gsinenum = 13; ~gsine.value;}
2462                                         {~menu2.value == 14}{~gsinenum = 14; ~gsine.value;}
2463                                         {~menu2.value == 15}{~gsinenum = 15; ~gsine.value;}
2464                                         {~menu2.value == 16}{~gsinenum = 16; ~gsine.value;}
2465                                         {~menu2.value == 17}{~gsinenum = 17; ~gsine.value;}
2466                                         {~menu2.value == 18}{~gsinenum = 18; ~gsine.value;}
2467                                         {~menu2.value == 19}{~gsinenum = 19; ~gsine.value;}
2468                                         {~menu2.value == 20}{~gsinenum = 20; ~gsine.value;}
2469                                         {~menu2.value == 21}{~gsinenum = 21; ~gsine.value;}
2470                                         {~menu2.value == 22}{~gsinenum = 22; ~gsine.value;}
2471                                         {~menu2.value == 23}{~gsinenum = 23; ~gsine.value;}
2472                                         {~menu2.value == 24}{~gsinenum = 24; ~gsine.value;};
2473
2474                                         if(~st != nil, {~st.close});
2475                                         ~st = StaticText(~settingsview, Rect(lefttime, top, 200, 20)).background_(Color.black);
2476                                         ~st.stringColor = Color.white;
2477                                         ~st.string = "loaded.";
2478                                         AppClock.sched(~gm,{~st.close;});
2479
2480                                 });
2481
2482                                 ~settingsview.background_(Color.black);
2483
2484                                 /*~closessettingsbutton = Button.new(~settingsview,Rect(lefttimebox+widthbox-40, top, 40, 40/~gm)).states_([["close",Color.white,Color.black]]).action_({arg button;
2485
2486                                 ~settingsview.close; ~settingsbutton.value = 0;
2487                                 });*/
2488
2489
2490                         }.value);
2491
2492                         ~settingsview.front;
2493                 }, {~settingsview.close});
2494         });
2495
2496
2497         //open/flow/slide buttons coordinate values
2498
2499         ~bph = 26;
2500         ~bpw = 26/1.6180339887499;
2501         ~bpl = Window.screenBounds.width-(~bph*8)-20;
2502         ~bpt = Window.screenBounds.height-88;
2503
2504         ~bp01l = ~bpl;
2505         ~bp02l = ~bpl+(~bph*1);
2506         ~bp03l = ~bpl+(~bph*2);
2507         ~bp04l = ~bpl+(~bph*3);
2508         ~bp05l = ~bpl+(~bph*4);
2509         ~bp06l = ~bpl+(~bph*5);
2510         ~bp07l = ~bpl+(~bph*6);
2511         ~bp08l = ~bpl+(~bph*7);
2512         ~bpf1l = ~bpl;
2513         ~bpf2l = ~bpl+(~bph*1);
2514         ~bpf3l = ~bpl+(~bph*2);
2515         ~bpf4l = ~bpl+(~bph*3);
2516         ~bpf5l = ~bpl+(~bph*4);
2517         ~bpf6l = ~bpl+(~bph*5);
2518         ~bpf7l = ~bpl+(~bph*6);
2519         ~bpf8l = ~bpl+(~bph*7);
2520
2521         ~bp01t = ~bpt;
2522         ~bp02t = ~bpt;
2523         ~bp03t = ~bpt;
2524         ~bp04t = ~bpt;
2525         ~bp05t = ~bpt;
2526         ~bp06t = ~bpt;
2527         ~bp07t = ~bpt;
2528         ~bp08t = ~bpt;
2529         ~bpf1t = ~bpt+~bpw;
2530         ~bpf2t = ~bpt+~bpw;
2531         ~bpf3t = ~bpt+~bpw;
2532         ~bpf4t = ~bpt+~bpw;
2533         ~bpf5t = ~bpt+~bpw;
2534         ~bpf6t = ~bpt+~bpw;
2535         ~bpf7t = ~bpt+~bpw;
2536         ~bpf8t = ~bpt+~bpw;
2537
2538         ~bp01h = ~bph;
2539         ~bp02h = ~bph;
2540         ~bp03h = ~bph;
2541         ~bp04h = ~bph;
2542         ~bp05h = ~bph;
2543         ~bp06h = ~bph;
2544         ~bp07h = ~bph;
2545         ~bp08h = ~bph;
2546         ~bpf1h = ~bph;
2547         ~bpf2h = ~bph;
2548         ~bpf3h = ~bph;
2549         ~bpf4h = ~bph;
2550         ~bpf5h = ~bph;
2551         ~bpf6h = ~bph;
2552         ~bpf7h = ~bph;
2553         ~bpf8h = ~bph;
2554
2555         ~bp01w = ~bpw;
2556         ~bp02w = ~bpw;
2557         ~bp03w = ~bpw;
2558         ~bp04w = ~bpw;
2559         ~bp05w = ~bpw;
2560         ~bp06w = ~bpw;
2561         ~bp07w = ~bpw;
2562         ~bp08w = ~bpw;
2563         ~bpf1w = ~bpw;
2564         ~bpf2w = ~bpw;
2565         ~bpf3w = ~bpw;
2566         ~bpf4w = ~bpw;
2567         ~bpf5w = ~bpw;
2568         ~bpf6w = ~bpw;
2569         ~bpf7w = ~bpw;
2570         ~bpf8w = ~bpw;
2571
2572         ~tspw=280+210;
2573         ~tsph=280+210/~gm;
2574         ~tspl=Window.screenBounds.width-~tspw;
2575         ~tspt=~bpt-310;
2576
2577
2578         //synthopen 1-8 buttons
2579
2580         ~bplaceo1 = Button.new(w,Rect(~bp01l,~bp01t,~bp01h,~bp01w)).states_([["o1",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
2581
2582                 [~f1=~fp1,~f2=~fp2,~f3=~fp3,~f4=~fp4,~f5=~fp5,~f6=~fp6,~f7=~fp7,~f8=~fp8,~f9=~fp9,~f10=~fp10,~f11=~fp11,~f12=~fp12];
2583
2584                 ~synthopen.value;
2585                 ~currentsynth = "o1"; ~synthmonitorfunc.value;
2586
2587                 if(~ts.value == 1,
2588                         {if(~tst == nil, {nil}, {~tst.close;});
2589                                 ~timevals.value;
2590                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time1o = 0;
2591                                 ~timer = Routine({inf.do({
2592                                         ~time1o =
2593                                         ~time1o+0.01; ~slot = "o1_"+~time1o.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
2594                         {nil});
2595         });
2596
2597         ~bplaceo2 = Button.new(w,Rect(~bp02l,~bp02t,~bp02h,~bp02w)).states_([["o2",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
2598
2599                 [~f1=~fp1b,~f2=~fp2b,~f3=~fp3b,~f4=~fp4b,~f5=~fp5b,~f6=~fp6b,~f7=~fp7b,~f8=~fp8b,~f9=~fp9b,~f10=~fp10b,~f11=~fp11b,~f12=~fp12b];
2600
2601                 ~synthopen.value;
2602                 ~currentsynth = "o2"; ~synthmonitorfunc.value;
2603
2604                 if(~ts.value == 1,
2605                         {if(~tst == nil, {nil}, {~tst.close;});
2606                                 ~timevals.value;
2607                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time2o = 0;
2608                                 ~timer = Routine({inf.do({
2609                                         ~time2o =
2610                                         ~time2o+0.01; ~slot = "o2_"+~time2o.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
2611                         {nil});
2612         });
2613         ~bplaceo3 = Button.new(w,Rect(~bp03l,~bp03t,~bp03h,~bp03w)).states_([["o3",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
2614
2615                 [~f1=~fp1c,~f2=~fp2c,~f3=~fp3c,~f4=~fp4c,~f5=~fp5c,~f6=~fp6c,~f7=~fp7c,~f8=~fp8c,~f9=~fp9c,~f10=~fp10c,~f11=~fp11c,~f12=~fp12c];
2616
2617                 ~synthopen.value;
2618                 ~currentsynth = "o3"; ~synthmonitorfunc.value;
2619
2620                 if(~ts.value == 1,
2621                         {if(~tst == nil, {nil}, {~tst.close;});
2622                                 ~timevals.value;
2623                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time3o = 0;
2624                                 ~timer = Routine({inf.do({
2625                                         ~time3o =
2626                                         ~time3o+0.01; ~slot = "o3_"+~time3o.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
2627                         {nil});
2628         });
2629         ~bplaceo4 = Button.new(w,Rect(~bp04l,~bp04t,~bp04h,~bp04w)).states_([["o4",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
2630
2631                 [~f1=~fp1d,~f2=~fp2d,~f3=~fp3d,~f4=~fp4d,~f5=~fp5d,~f6=~fp6d,~f7=~fp7d,~f8=~fp8d,~f9=~fp9d,~f10=~fp10d,~f11=~fp11d,~f12=~fp12d];
2632
2633                 ~synthopen.value;
2634                 ~currentsynth = "o4"; ~synthmonitorfunc.value;
2635
2636                 if(~ts.value == 1,
2637                         {if(~tst == nil, {nil}, {~tst.close;});
2638                                 ~timevals.value;
2639                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time4o = 0;
2640                                 ~timer = Routine({inf.do({
2641                                         ~time4o =
2642                                         ~time4o+0.01; ~slot = "o4_"+~time4o.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
2643                         {nil});
2644
2645         });
2646
2647         ~bplaceo5 = Button.new(w,Rect(~bp05l,~bp05t,~bp05h,~bp05w)).states_([["o5",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
2648
2649                 [~f1=~fp1e,~f2=~fp2e,~f3=~fp3e,~f4=~fp4e,~f5=~fp5e,~f6=~fp6e,~f7=~fp7e,~f8=~fp8e,~f9=~fp9e,~f10=~fp10e,~f11=~fp11e,~f12=~fp12e];
2650
2651                 ~synthopen.value;
2652                 ~currentsynth = "o5"; ~synthmonitorfunc.value;
2653
2654                 if(~ts.value == 1,
2655                         {if(~tst == nil, {nil}, {~tst.close;});
2656                                 ~timevals.value;
2657                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time5o = 0;
2658                                 ~timer = Routine({inf.do({
2659                                         ~time5o =
2660                                         ~time5o+0.01; ~slot = "o5_"+~time5o.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
2661                         {nil});
2662
2663         });
2664         ~bplaceo6 = Button.new(w,Rect(~bp06l,~bp06t,~bp06h,~bp06w)).states_([["o6",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
2665
2666                 [~f1=~fp1f,~f2=~fp2f,~f3=~fp3f,~f4=~fp4f,~f5=~fp5f,~f6=~fp6f,~f7=~fp7f,~f8=~fp8f,~f9=~fp9f,~f10=~fp10f,~f11=~fp11f,~f12=~fp12f];
2667
2668                 ~synthopen.value;
2669                 ~currentsynth = "o6"; ~synthmonitorfunc.value;
2670
2671                 if(~ts.value == 1,
2672                         {if(~tst == nil, {nil}, {~tst.close;});
2673                                 ~timevals.value;
2674                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time6o = 0;
2675                                 ~timer = Routine({inf.do({
2676                                         ~time6o =
2677                                         ~time6o+0.01; ~slot = "o6_"+~time6o.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
2678                         {nil});
2679         });
2680         ~bplaceo7 = Button.new(w,Rect(~bp07l,~bp07t,~bp07h,~bp07w)).states_([["o7",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
2681
2682                 [~f1=~fp1g,~f2=~fp2g,~f3=~fp3g,~f4=~fp4g,~f5=~fp5g,~f6=~fp6g,~f7=~fp7g,~f8=~fp8g,~f9=~fp9g,~f10=~fp10g,~f11=~fp11g,~f12=~fp12g];
2683
2684                 ~synthopen.value;
2685                 ~currentsynth = "o7"; ~synthmonitorfunc.value;
2686
2687                 if(~ts.value == 1,
2688                         {if(~tst == nil, {nil}, {~tst.close;});
2689                                 ~timevals.value;
2690                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time7o = 0;
2691                                 ~timer = Routine({inf.do({
2692                                         ~time7o =
2693                                         ~time7o+0.01; ~slot = "o7_"+~time7o.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
2694                         {nil});
2695         });
2696         ~bplaceo8 = Button.new(w,Rect(~bp08l,~bp08t,~bp08h,~bp08w)).states_([["o8",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
2697
2698                 [~f1=~fp1h,~f2=~fp2h,~f3=~fp3h,~f4=~fp4h,~f5=~fp5h,~f6=~fp6h,~f7=~fp7h,~f8=~fp8h,~f9=~fp9h,~f10=~fp10h,~f11=~fp11h,~f12=~fp12h];
2699
2700                 ~synthopen.value;
2701                 ~currentsynth = "o8"; ~synthmonitorfunc.value;
2702
2703                 if(~ts.value == 1,
2704                         {if(~tst == nil, {nil}, {~tst.close;});
2705                                 ~timevals.value;
2706                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time8o = 0;
2707                                 ~timer = Routine({inf.do({
2708                                         ~time8o =
2709                                         ~time8o+0.01; ~slot = "o8_"+~time8o.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
2710                         {nil});
2711         });
2712
2713
2714         //synthflow 1-8 buttons
2715
2716         ~bplacef1 = Button.new(w,Rect(~bpf1l,~bpf1t,~bpf1h,~bpf1w)).states_([["f1",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
2717
2718                 [~f1=~fp1,~f2=~fp2,~f3=~fp3,~f4=~fp4,~f5=~fp5,~f6=~fp6,~f7=~fp7,~f8=~fp8,~f9=~fp9,~f10=~fp10,~f11=~fp11,~f12=~fp12];
2719
2720                 ~synthflow.value;
2721                 ~currentsynth = "f1"; ~synthmonitorfunc.value;
2722
2723                 if(~ts.value == 1,
2724                         {if(~tst == nil, {nil}, {~tst.close;});
2725                                 ~timevals.value;
2726                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time1f = 0;
2727                                 ~timer = Routine({inf.do({
2728                                         ~time1f =
2729                                         ~time1f+0.01; ~slot = "f1_"+~time1f.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
2730                         {nil});
2731         });
2732         ~bplacef2 = Button.new(w,Rect(~bpf2l,~bpf2t,~bpf2h,~bpf2w)).states_([["f2",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
2733
2734                 [~f1=~fp1b,~f2=~fp2b,~f3=~fp3b,~f4=~fp4b,~f5=~fp5b,~f6=~fp6b,~f7=~fp7b,~f8=~fp8b,~f9=~fp9b,~f10=~fp10b,~f11=~fp11b,~f12=~fp12b];
2735
2736                 ~synthflow.value;
2737                 ~currentsynth = "f2"; ~synthmonitorfunc.value;
2738
2739                 if(~ts.value == 1,
2740                         {if(~tst == nil, {nil}, {~tst.close;});
2741                                 ~timevals.value;
2742                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time2f = 0;
2743                                 ~timer = Routine({inf.do({
2744                                         ~time2f =
2745                                         ~time2f+0.01; ~slot = "f2_"+~time2f.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
2746                         {nil});
2747         });
2748
2749         ~bplacef3 = Button.new(w,Rect(~bpf3l,~bpf3t,~bpf3h,~bpf3w)).states_([["f3",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
2750
2751                 [~f1=~fp1c,~f2=~fp2c,~f3=~fp3c,~f4=~fp4c,~f5=~fp5c,~f6=~fp6c,~f7=~fp7c,~f8=~fp8c,~f9=~fp9c,~f10=~fp10c,~f11=~fp11c,~f12=~fp12c];
2752
2753                 ~synthflow.value;
2754                 ~currentsynth = "f3"; ~synthmonitorfunc.value;
2755
2756                 if(~ts.value == 1,
2757                         {if(~tst == nil, {nil}, {~tst.close;});
2758                                 ~timevals.value;
2759                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time3f = 0;
2760                                 ~timer = Routine({inf.do({
2761                                         ~time3f =
2762                                         ~time3f+0.01; ~slot = "f3_"+~time3f.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
2763                         {nil});
2764         });
2765         ~bplacef4 = Button.new(w,Rect(~bpf4l,~bpf4t,~bpf4h,~bpf4w)).states_([["f4",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
2766
2767                 [~f1=~fp1d,~f2=~fp2d,~f3=~fp3d,~f4=~fp4d,~f5=~fp5d,~f6=~fp6d,~f7=~fp7d,~f8=~fp8d,~f9=~fp9d,~f10=~fp10d,~f11=~fp11d,~f12=~fp12d];
2768
2769                 ~synthflow.value;
2770                 ~currentsynth = "f4"; ~synthmonitorfunc.value;
2771
2772                 if(~ts.value == 1,
2773                         {if(~tst == nil, {nil}, {~tst.close;});
2774                                 ~timevals.value;
2775                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time4f = 0;
2776                                 ~timer = Routine({inf.do({
2777                                         ~time4f =
2778                                         ~time4f+0.01; ~slot = "f4_"+~time4f.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
2779                         {nil});
2780         });
2781
2782         ~bplacef5 = Button.new(w,Rect(~bpf5l,~bpf5t,~bpf5h,~bpf5w)).states_([["f5",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
2783
2784                 [~f1=~fp1e,~f2=~fp2e,~f3=~fp3e,~f4=~fp4e,~f5=~fp5e,~f6=~fp6e,~f7=~fp7e,~f8=~fp8e,~f9=~fp9e,~f10=~fp10e,~f11=~fp11e,~f12=~fp12e];
2785
2786                 ~synthflow.value;
2787                 ~currentsynth = "f5"; ~synthmonitorfunc.value;
2788
2789                 if(~ts.value == 1,
2790                         {if(~tst == nil, {nil}, {~tst.close;});
2791                                 ~timevals.value;
2792                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time5f = 0;
2793                                 ~timer = Routine({inf.do({
2794                                         ~time5f =
2795                                         ~time5f+0.01; ~slot = "f5_"+~time5f.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
2796                         {nil});
2797         });
2798
2799         ~bplacef6 = Button.new(w,Rect(~bpf6l,~bpf6t,~bpf6h,~bpf6w)).states_([["f6",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
2800
2801                 [~f1=~fp1f,~f2=~fp2f,~f3=~fp3f,~f4=~fp4f,~f5=~fp5f,~f6=~fp6f,~f7=~fp7f,~f8=~fp8f,~f9=~fp9f,~f10=~fp10f,~f11=~fp11f,~f12=~fp12f];
2802
2803                 ~synthflow.value;
2804                 ~currentsynth = "f6"; ~synthmonitorfunc.value;
2805
2806                 if(~ts.value == 1,
2807                         {if(~tst == nil, {nil}, {~tst.close;});
2808                                 ~timevals.value;
2809                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time6f = 0;
2810                                 ~timer = Routine({inf.do({
2811                                         ~time6f =
2812                                         ~time6f+0.01; ~slot = "f6_"+~time6f.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
2813                         {nil});
2814         });
2815
2816
2817         ~bplacef7 = Button.new(w,Rect(~bpf7l,~bpf7t,~bpf7h,~bpf7w)).states_([["f7",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
2818
2819                 [~f1=~fp1g,~f2=~fp2g,~f3=~fp3g,~f4=~fp4g,~f5=~fp5g,~f6=~fp6g,~f7=~fp7g,~f8=~fp8g,~f9=~fp9g,~f10=~fp10g,~f11=~fp11g,~f12=~fp12g];
2820
2821                 ~synthflow.value;
2822                 ~currentsynth = "f7"; ~synthmonitorfunc.value;
2823
2824                 if(~ts.value == 1,
2825                         {if(~tst == nil, {nil}, {~tst.close;});
2826                                 ~timevals.value;
2827                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time7f = 0;
2828                                 ~timer = Routine({inf.do({
2829                                         ~time7f =
2830                                         ~time7f+0.01; ~slot = "f7_"+~time7f.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
2831                         {nil});
2832         });
2833         ~bplacef8 = Button.new(w,Rect(~bpf8l,~bpf8t,~bpf8h,~bpf8w)).states_([["f8",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
2834
2835                 [~f1=~fp1h,~f2=~fp2h,~f3=~fp3h,~f4=~fp4h,~f5=~fp5h,~f6=~fp6h,~f7=~fp7h,~f8=~fp8h,~f9=~fp9h,~f10=~fp10h,~f11=~fp11h,~f12=~fp12h];
2836
2837                 ~synthflow.value;
2838                 ~currentsynth = "f8"; ~synthmonitorfunc.value;
2839
2840                 if(~ts.value == 1,
2841                         {if(~tst == nil, {nil}, {~tst.close;});
2842                                 ~timevals.value;
2843                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time8f = 0;
2844                                 ~timer = Routine({inf.do({
2845                                         ~time8f =
2846                                         ~time8f+0.01; ~slot = "f8_"+~time8f.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
2847                         {nil});
2848         });
2849
2850
2851         //synthslide 1-8 buttons
2852
2853         ~bplaces1 = Button.new(w,Rect(~bpf1l,~bpf1t+~bpf1w,~bpf1h,~bpf1w)).states_([["s1",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
2854
2855                 if(~slidetime1 == nil, {~slidetime1 = 4}); if(~slidedo1 == nil, {~slidedo1 = 2000;}); ~slidecount = ~slidedo1;
2856                 #g,h,i,j,k,l,m,n,o,p,q,r = (([ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ]-
2857                         [ ~fp1,~fp2,~fp3,~fp4,~fp5,~fp6,~fp7,~fp8,~fp9,~fp10,~fp11,~fp12 ])*(-1)/~slidedo1);
2858
2859                 ~slidetime =~slidetime1; ~slidedo = ~slidedo1;
2860
2861                 ~slideroutine.stop;
2862
2863                 ~synthslide.value;
2864                 ~currentsynth = "s1"; ~synthmonitorfunc.value;
2865
2866                 if(~ts.value == 1,
2867                         {if(~tst == nil, {nil}, {~tst.close;});
2868                                 ~timevals.value;
2869                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time1s = 0;
2870                                 ~timer = Routine({inf.do({
2871                                         ~time1s =
2872                                         ~time1s+0.01; ~slot = "s1_"+~time1s.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
2873                         {nil});
2874
2875         });
2876         ~bplaces2 = Button.new(w,Rect(~bpf2l,~bpf2t+~bpf2w,~bpf2h,~bpf2w)).states_([["s2",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
2877
2878                 if(~slidetime2 == nil, {~slidetime2 = 4}); if(~slidedo2 == nil, {~slidedo2 = 2000;}); ~slidecount = ~slidedo2;
2879                 #g,h,i,j,k,l,m,n,o,p,q,r = (([ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ]-
2880                         [ ~fp1b,~fp2b,~fp3b,~fp4b,~fp5b,~fp6b,~fp7b,~fp8b,~fp9b,~fp10b,~fp11b,~fp12b ])*(-1)/~slidedo2);
2881
2882                 ~slidetime = ~slidetime2; ~slidedo = ~slidedo2;
2883
2884                 ~slideroutine.stop;
2885
2886                 ~synthslide.value;
2887                 ~currentsynth = "s2"; ~synthmonitorfunc.value;
2888
2889                 if(~ts.value == 1,
2890                         {if(~tst == nil, {nil}, {~tst.close;});
2891                                 ~timevals.value;
2892                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time2s = 0;
2893                                 ~timer = Routine({inf.do({
2894                                         ~time2s =
2895                                         ~time2s+0.01; ~slot = "s2_"+~time2s.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
2896                         {nil});
2897
2898         });
2899         ~bplaces3 = Button.new(w,Rect(~bpf3l,~bpf3t+~bpf3w,~bpf3h,~bpf3w)).states_([["s3",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
2900
2901                 if(~slidetime3 == nil, {~slidetime3 = 4}); if(~slidedo3 == nil, {~slidedo3 = 2000;}); ~slidecount = ~slidedo3;
2902                 #g,h,i,j,k,l,m,n,o,p,q,r = (([ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ]-
2903                         [ ~fp1c,~fp2c,~fp3c,~fp4c,~fp5c,~fp6c,~fp7c,~fp8c,~fp9c,~fp10c,~fp11c,~fp12c ])*(-1)/~slidedo3);
2904
2905                 ~slidetime = ~slidetime3; ~slidedo = ~slidedo3;
2906
2907                 ~slideroutine.stop;
2908
2909                 ~synthslide.value;
2910                 ~currentsynth = "s3"; ~synthmonitorfunc.value;
2911
2912                 if(~ts.value == 1,
2913                         {if(~tst == nil, {nil}, {~tst.close;});
2914                                 ~timevals.value;
2915                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time3s = 0;
2916                                 ~timer = Routine({inf.do({
2917                                         ~time3s =
2918                                         ~time3s+0.01; ~slot = "s3_"+~time3s.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
2919                         {nil});
2920
2921         });
2922         ~bplaces4 = Button.new(w,Rect(~bpf4l,~bpf4t+~bpf4w,~bpf4h,~bpf4w)).states_([["s4",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
2923
2924                 if(~slidetime4 == nil, {~slidetime4 = 4}); if(~slidedo4 == nil, {~slidedo4 = 2000;}); ~slidecount = ~slidedo4;
2925                 #g,h,i,j,k,l,m,n,o,p,q,r = (([ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ]-
2926                         [ ~fp1d,~fp2d,~fp3d,~fp4d,~fp5d,~fp6d,~fp7d,~fp8d,~fp9d,~fp10d,~fp11d,~fp12d ])*(-1)/~slidedo4);
2927
2928                 ~slidetime = ~slidetime4; ~slidedo = ~slidedo4;
2929
2930                 ~slideroutine.stop;
2931
2932                 ~synthslide.value;
2933                 ~currentsynth = "s4"; ~synthmonitorfunc.value;
2934
2935                 if(~ts.value == 1,
2936                         {if(~tst == nil, {nil}, {~tst.close;});
2937                                 ~timevals.value;
2938                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time4s = 0;
2939                                 ~timer = Routine({inf.do({
2940                                         ~time4s =
2941                                         ~time4s+0.01; ~slot = "s4_"+~time4s.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
2942                         {nil});
2943         });
2944         ~bplaces5 = Button.new(w,Rect(~bpf5l,~bpf5t+~bpf5w,~bpf5h,~bpf5w)).states_([["s5",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
2945
2946                 if(~slidetime5 == nil, {~slidetime5 = 4}); if(~slidedo5 == nil, {~slidedo5 = 2000;}); ~slidecount = ~slidedo5;
2947                 #g,h,i,j,k,l,m,n,o,p,q,r = (([ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ]-
2948                         [ ~fp1e,~fp2e,~fp3e,~fp4e,~fp5e,~fp6e,~fp7e,~fp8e,~fp9e,~fp10e,~fp11e,~fp12e ])*(-1)/~slidedo5);
2949
2950                 ~slidetime = ~slidetime5; ~slidedo = ~slidedo5;
2951
2952                 ~slideroutine.stop;
2953
2954                 ~synthslide.value;
2955                 ~currentsynth = "s5"; ~synthmonitorfunc.value;
2956
2957                 if(~ts.value == 1,
2958                         {if(~tst == nil, {nil}, {~tst.close;});
2959                                 ~timevals.value;
2960                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time5s = 0;
2961                                 ~timer = Routine({inf.do({
2962                                         ~time5s =
2963                                         ~time5s+0.01; ~slot = "s5_"+~time5s.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
2964                         {nil});
2965
2966         });
2967         ~bplaces6 = Button.new(w,Rect(~bpf6l,~bpf6t+~bpf6w,~bpf6h,~bpf6w)).states_([["s6",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
2968
2969                 if(~slidetime6 == nil, {~slidetime6 = 4}); if(~slidedo6 == nil, {~slidedo6 = 2000;}); ~slidecount = ~slidedo6;
2970                 #g,h,i,j,k,l,m,n,o,p,q,r = (([ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ]-
2971                         [ ~fp1f,~fp2f,~fp3f,~fp4f,~fp5f,~fp6f,~fp7f,~fp8f,~fp9f,~fp10f,~fp11f,~fp12f ])*(-1)/~slidedo6);
2972
2973                 ~slidetime = ~slidetime6; ~slidedo = ~slidedo6;
2974                 ~slideroutine.stop;
2975
2976                 ~synthslide.value;
2977                 ~currentsynth = "s6"; ~synthmonitorfunc.value;
2978
2979                 if(~ts.value == 1,
2980                         {if(~tst == nil, {nil}, {~tst.close;});
2981                                 ~timevals.value;
2982                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time6s = 0;
2983                                 ~timer = Routine({inf.do({
2984                                         ~time6s =
2985                                         ~time6s+0.01; ~slot = "s6_"+~time6s.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
2986                         {nil});
2987
2988         });
2989         ~bplaces7 = Button.new(w,Rect(~bpf7l,~bpf7t+~bpf7w,~bpf7h,~bpf7w)).states_([["s7",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
2990
2991                 if(~slidetime7 == nil, {~slidetime7 = 4}); if(~slidedo7 == nil, {~slidedo7 = 2000;}); ~slidecount = ~slidedo7;
2992                 #g,h,i,j,k,l,m,n,o,p,q,r = (([ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ]-
2993                         [ ~fp1g,~fp2g,~fp3g,~fp4g,~fp5g,~fp6g,~fp7g,~fp8g,~fp9g,~fp10g,~fp11g,~fp12g ])*(-1)/~slidedo7);
2994
2995                 ~slidetime = ~slidetime7; ~slidedo = ~slidedo7;
2996                 ~slideroutine.stop;
2997
2998                 ~synthslide.value;
2999                 ~currentsynth = "s7"; ~synthmonitorfunc.value;
3000
3001                 if(~ts.value == 1,
3002                         {if(~tst == nil, {nil}, {~tst.close;});
3003                                 ~timevals.value;
3004                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time7s = 0;
3005                                 ~timer = Routine({inf.do({
3006                                         ~time7s =
3007                                         ~time7s+0.01; ~slot = "s7_"+~time7s.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
3008                         {nil});
3009
3010         });
3011         ~bplaces8 = Button.new(w,Rect(~bpf8l,~bpf8t+~bpf8w,~bpf8h,~bpf8w)).states_([["s8",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
3012
3013                 if(~slidetime8 == nil, {~slidetime8 = 4}); if(~slidedo8 == nil, {~slidedo8 = 2000;}); ~slidecount = ~slidedo8;
3014                 #g,h,i,j,k,l,m,n,o,p,q,r = (([ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ]-
3015                         [ ~fp1h,~fp2h,~fp3h,~fp4h,~fp5h,~fp6h,~fp7h,~fp8h,~fp9h,~fp10h,~fp11h,~fp12h ])*(-1)/~slidedo8);
3016
3017                 ~slidetime = ~slidetime8; ~slidedo = ~slidedo8;
3018
3019                 ~slideroutine.stop;
3020
3021                 ~synthslide.value;
3022                 ~currentsynth = "s8"; ~synthmonitorfunc.value;
3023
3024                 if(~ts.value == 1,
3025                         {if(~tst == nil, {nil}, {~tst.close;});
3026                                 ~timevals.value;
3027                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time8s = 0;
3028                                 ~timer = Routine({inf.do({
3029                                         ~time8s =
3030                                         ~time8s+0.01; ~slot = "s8_"+~time8s.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
3031                         {nil});
3032         });
3033
3034
3035         //if slidetime/slidedo is nil
3036
3037         if(~slidetimeall == nil, {~slidetimeall = 1});
3038         if(~slidetime1 == nil, {~slidetime1 = 1});
3039         if(~slidetime2 == nil, {~slidetime2 = 1});
3040         if(~slidetime3 == nil, {~slidetime3 = 1});
3041         if(~slidetime4 == nil, {~slidetime4 = 1});
3042         if(~slidetime5 == nil, {~slidetime5 = 1});
3043         if(~slidetime6 == nil, {~slidetime6 = 1});
3044         if(~slidetime7 == nil, {~slidetime7 = 1});
3045         if(~slidetime8 == nil, {~slidetime8 = 1});
3046
3047         if(~slidedoall == nil, {~slidedoall = 432});
3048         if(~slidedo1 == nil, {~slidedo1 = 432});
3049         if(~slidedo2 == nil, {~slidedo2 = 432});
3050         if(~slidedo3 == nil, {~slidedo3 = 432});
3051         if(~slidedo4 == nil, {~slidedo4 = 432});
3052         if(~slidedo5 == nil, {~slidedo5 = 432});
3053         if(~slidedo6 == nil, {~slidedo6 = 432});
3054         if(~slidedo7 == nil, {~slidedo7 = 432});
3055         if(~slidedo8 == nil, {~slidedo8 = 432});
3056
3057
3058         //frequency set function
3059
3060         ~freqset_textfield_func = {
3061                 ~freqsetvalue = ~freqsetvalue.asString;
3062                 ~freqsetvalue = ~freqsetvalue.separate;
3063                 ~freqsetvalue = ~freqsetvalue.reject{arg item;
3064                         (item != "1") and:
3065                         (item != "2") and:
3066                         (item != "3") and:
3067                         (item != "4") and:
3068                         (item != "5") and:
3069                         (item != "6") and:
3070                         (item != "7") and:
3071                         (item != "8") and:
3072                         (item != "9") and:
3073                         (item != "0") and:
3074                         (item != ".") and:
3075                         (item != "+") and:
3076                         (item != "-") and:
3077                         (item != "*") and:
3078                         (item != "/") and:
3079                         (item != "**") and:
3080                         (item != "%")
3081                 };
3082                 ~freqsetvalue = ~freqsetvalue.join.asString.interpret;
3083         };
3084
3085
3086         //extra options button
3087
3088         ~extraoptions = Button.new(w,Rect(Window.screenBounds.width-20-20-20,~bpt+69+5,20,20/1.6180339887499)).states_([["eo",Color.white,Color.black],["eo",Color.white,Color.black]]).action_({arg button;
3089
3090                 if(button.value == 1, {
3091
3092                         ~extraoptionsview = View(w, Rect(Window.screenBounds.width-(540),Window.screenBounds.height-(340+46/1.6180339887499)-150,340+46,380+46/1.6180339887499)).front;
3093                         ~extraoptionsview.background_(Color.black);
3094
3095                         //set slide values button
3096
3097                         ~slidevals = Button.new(~extraoptionsview,Rect(0,25,120,20)).states_([["slide values",Color.white,Color.black],["slide values",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
3098
3099                                 if(button.value == 1, {
3100                                         ({
3101                                                 arg lefttime = 0 , lefttimebox = 52, leftdo = lefttimebox+widthbox+6, leftdobox = leftdo+57, top = 0,width=52, height = 16,  widthbox=52, heightbox = 16, inc=0, lw = 0,  uw = 0, numw = 40;
3102                                                 var tall, stall, iall, siall, st1, st2, st3, st4, st5, st6, st7, st8, si1, si2, si3, si4, si5, si6, si7, si8, t1,t2,t3,t4,t5,t6,t7,t8,i1,i2,i3,i4,i5,i6,i7,i8;
3103                                                 ~slideview = View(w, Rect(Window.screenBounds.width-(340+46),Window.screenBounds.height-(340+46/1.6180339887499)-150,340+46,380+46/1.6180339887499)).front;
3104                                                 /*w.view.decorator=FlowLayout(w.view.bounds);
3105                                                 w.view.decorator.gap=2@2;*/
3106
3107                                                 tall = StaticText(~slideview, Rect(lefttime , top=top, width, height)).background_(Color.black).string_("all time").stringColor_(Color.white);
3108                                                 t1 = StaticText(~slideview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("s1 time").stringColor_(Color.white);
3109                                                 t2 = StaticText(~slideview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("s2 time").stringColor_(Color.white);
3110                                                 t3 = StaticText(~slideview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("s3 time").stringColor_(Color.white);
3111                                                 t4 = StaticText(~slideview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("s4 time").stringColor_(Color.white);
3112                                                 t5 = StaticText(~slideview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("s5 time").stringColor_(Color.white);
3113                                                 t6 = StaticText(~slideview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("s6 time").stringColor_(Color.white);
3114                                                 t7 = StaticText(~slideview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("s7 time").stringColor_(Color.white);
3115                                                 t8 = StaticText(~slideview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("s8 time").stringColor_(Color.white);
3116
3117                                                 top = 0;
3118
3119                                                 stall=NumberBox(~slideview, Rect(lefttimebox , top=top, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~slidetimeall).maxDecimals_(9);
3120                                                 st1=NumberBox(~slideview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~slidetime1).maxDecimals_(9);
3121                                                 st2=NumberBox(~slideview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~slidetime2).maxDecimals_(9);
3122                                                 st3=NumberBox(~slideview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~slidetime3).maxDecimals_(9);
3123                                                 st4=NumberBox(~slideview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~slidetime4).maxDecimals_(9);
3124                                                 st5=NumberBox(~slideview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~slidetime5).maxDecimals_(9);
3125                                                 st6=NumberBox(~slideview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~slidetime6).maxDecimals_(9);
3126                                                 st7=NumberBox(~slideview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~slidetime7).maxDecimals_(9);
3127                                                 st8=NumberBox(~slideview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~slidetime8).maxDecimals_(9);
3128
3129                                                 top = 0;
3130
3131                                                 iall = StaticText(~slideview, Rect(leftdo , top=top, width, height)).background_(Color.black).string_("all incr").stringColor_(Color.white);
3132                                                 i1 = StaticText(~slideview, Rect(leftdo , top=top+height, width, height)).background_(Color.black).string_("s1 incr").stringColor_(Color.white);
3133                                                 i2 = StaticText(~slideview, Rect(leftdo , top=top+height, width, height)).background_(Color.black).string_("s2 incr").stringColor_(Color.white);
3134                                                 i3 = StaticText(~slideview, Rect(leftdo , top=top+height, width, height)).background_(Color.black).string_("s3 incr").stringColor_(Color.white);
3135                                                 i4 = StaticText(~slideview, Rect(leftdo , top=top+height, width, height)).background_(Color.black).string_("s4 incr").stringColor_(Color.white);
3136                                                 i5 = StaticText(~slideview, Rect(leftdo , top=top+height, width, height)).background_(Color.black).string_("s5 incr").stringColor_(Color.white);
3137                                                 i6 = StaticText(~slideview, Rect(leftdo , top=top+height, width, height)).background_(Color.black).string_("s6 incr").stringColor_(Color.white);
3138                                                 i7 = StaticText(~slideview, Rect(leftdo , top=top+height, width, height)).background_(Color.black).string_("s7 incr").stringColor_(Color.white);
3139                                                 i8 = StaticText(~slideview, Rect(leftdo , top=top+height, width, height)).background_(Color.black).string_("s8 incr").stringColor_(Color.white);
3140
3141                                                 top = 0;
3142
3143                                                 siall=NumberBox(~slideview, Rect(leftdobox , top=top, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~slidedoall);
3144                                                 si1=NumberBox(~slideview, Rect(leftdobox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~slidedo1);
3145                                                 si2=NumberBox(~slideview, Rect(leftdobox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~slidedo2);
3146                                                 si3=NumberBox(~slideview, Rect(leftdobox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~slidedo3);
3147                                                 si4=NumberBox(~slideview, Rect(leftdobox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~slidedo4);
3148                                                 si5=NumberBox(~slideview, Rect(leftdobox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~slidedo5);
3149                                                 si6=NumberBox(~slideview, Rect(leftdobox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~slidedo6);
3150                                                 si7=NumberBox(~slideview, Rect(leftdobox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~slidedo7);
3151                                                 si8=NumberBox(~slideview, Rect(leftdobox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~slidedo8);
3152
3153                                                 stall.action_({arg val;
3154                                                         ~slidetimeall = val.value;
3155                                                         ~slidetime1 = val.value;
3156                                                         ~slidetime2 = val.value;
3157                                                         ~slidetime3 = val.value;
3158                                                         ~slidetime4 = val.value;
3159                                                         ~slidetime5 = val.value;
3160                                                         ~slidetime6 = val.value;
3161                                                         ~slidetime7 = val.value;
3162                                                         ~slidetime8 = val.value;
3163                                                         ~slideview.close; ~slidevals.valueAction_(1);
3164                                                 });
3165                                                 st1.action_({arg val; ~slidetime1 = val.value;});
3166                                                 st2.action_({arg val; ~slidetime2 = val.value;});
3167                                                 st3.action_({arg val; ~slidetime3 = val.value;});
3168                                                 st4.action_({arg val; ~slidetime4 = val.value;});
3169                                                 st5.action_({arg val; ~slidetime5 = val.value;});
3170                                                 st6.action_({arg val; ~slidetime6 = val.value;});
3171                                                 st7.action_({arg val; ~slidetime7 = val.value;});
3172                                                 st8.action_({arg val; ~slidetime8 = val.value;});
3173
3174                                                 siall.action_({arg val;
3175                                                         ~slidedoall = val.value;
3176                                                         ~slidedo1 = val.value;
3177                                                         ~slidedo2 = val.value;
3178                                                         ~slidedo3 = val.value;
3179                                                         ~slidedo4 = val.value;
3180                                                         ~slidedo5 = val.value;
3181                                                         ~slidedo6 = val.value;
3182                                                         ~slidedo7 = val.value;
3183                                                         ~slidedo8 = val.value;
3184                                                         ~slideview.close; ~slidevals.valueAction_(1);
3185                                                 });
3186                                                 si1.action_({arg val; ~slidedo1 = val.value;});
3187                                                 si2.action_({arg val; ~slidedo2 = val.value;});
3188                                                 si3.action_({arg val; ~slidedo3 = val.value;});
3189                                                 si4.action_({arg val; ~slidedo4 = val.value;});
3190                                                 si5.action_({arg val; ~slidedo5 = val.value;});
3191                                                 si6.action_({arg val; ~slidedo6 = val.value;});
3192                                                 si7.action_({arg val; ~slidedo7 = val.value;});
3193                                                 si8.action_({arg val; ~slidedo8 = val.value;});
3194
3195                                                 ~slideview.background_(Color.black);
3196
3197                                                 ~closeslidebutton = Button.new(~slideview,Rect(leftdobox+widthbox-40, top+40, 40, 40/~gm)).states_([["close",Color.white,Color.black]]).action_({arg button;
3198
3199                                                         ~slideview.close; ~slidevals.value = 0;
3200                                                 });
3201
3202                                         }.value);
3203
3204                                         ~slideview.front;
3205                                 }, {~slideview.close;});
3206                         });
3207
3208
3209                         //set individual or all synth frequencies button
3210
3211                         ~beforefreqsetfreqs = [ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ];
3212
3213                         ~synthfreqset = Button.new(~extraoptionsview,Rect(0,0,120,20)).states_([["set frequencies",Color.white,Color.black],["set frequencies",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
3214
3215                                 if(button.value == 1, {
3216                                         ({
3217                                                 arg  top = 0,width=88, revertwidth=75, height = 16,  heightbox = 16, lefttime = 0 , lefttimebox = width+5,  widthbox=140, leftdo = lefttimebox+widthbox+5, leftdobox = leftdo+57, inc=0, lw = 0,  uw = 0, numw = 40;
3218                                                 var tall, stall, iall, siall, st1, st2, st3, st4, st5, st6, st7, st8, st9, st10, st11, st12, si1, si2, si3, si4, si5, si6, si7, si8, t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,i1,i2,i3,i4,i5,i6,i7,i8,i9,i10,i11,i12;
3219                                                 ~synthfreqsetview = View(w, Rect(Window.screenBounds.width-(340+46),Window.screenBounds.height-(340+46/1.6180339887499)-150,340+46,380+46/1.6180339887499)).front;
3220                                                 /*w.view.decorator=FlowLayout(w.view.bounds);
3221                                                 w.view.decorator.gap=2@2;*/
3222
3223                                                 t1 = StaticText(~synthfreqsetview, Rect(lefttime , top=top, width, height)).background_(Color.black).string_("freq 1 (f1)").stringColor_(Color.white);
3224                                                 t2 = StaticText(~synthfreqsetview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("freq 2 (f2)").stringColor_(Color.white);
3225                                                 t3 = StaticText(~synthfreqsetview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("freq 3 (f3)").stringColor_(Color.white);
3226                                                 t4 = StaticText(~synthfreqsetview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("freq 4 (f4)").stringColor_(Color.white);
3227                                                 t5 = StaticText(~synthfreqsetview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("freq 5 (f5)").stringColor_(Color.white);
3228                                                 t6 = StaticText(~synthfreqsetview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("freq 6 (f6)").stringColor_(Color.white);
3229                                                 t7 = StaticText(~synthfreqsetview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("freq 7 (f7)").stringColor_(Color.white);
3230                                                 t8 = StaticText(~synthfreqsetview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("freq 8 (f8)").stringColor_(Color.white);
3231                                                 t9 = StaticText(~synthfreqsetview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("freq 9 (f9)").stringColor_(Color.white);
3232                                                 t10 = StaticText(~synthfreqsetview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("freq 10 (f10)").stringColor_(Color.white);
3233                                                 t11 = StaticText(~synthfreqsetview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("freq 11 (f11)").stringColor_(Color.white);
3234                                                 t12 = StaticText(~synthfreqsetview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("freq 12 (f12)").stringColor_(Color.white);
3235                                                 tall = StaticText(~synthfreqsetview, Rect(lefttime , top=top+height+10, width, height)).background_(Color.black).string_("all freqs").stringColor_(Color.white);
3236
3237                                                 top = 0;
3238
3239                                                 st1=TextField(~synthfreqsetview, Rect(lefttimebox , top=top, widthbox, heightbox)).background_(Color.black).stringColor_(Color.white).value_(~f1);
3240                                                 st2=TextField(~synthfreqsetview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).stringColor_(Color.white).value_(~f2);
3241                                                 st3=TextField(~synthfreqsetview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).stringColor_(Color.white).value_(~f3);
3242                                                 st4=TextField(~synthfreqsetview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).stringColor_(Color.white).value_(~f4);
3243                                                 st5=TextField(~synthfreqsetview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).stringColor_(Color.white).value_(~f5);
3244                                                 st6=TextField(~synthfreqsetview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).stringColor_(Color.white).value_(~f6);
3245                                                 st7=TextField(~synthfreqsetview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).stringColor_(Color.white).value_(~f7);
3246                                                 st8=TextField(~synthfreqsetview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).stringColor_(Color.white).value_(~f8);
3247                                                 st9=TextField(~synthfreqsetview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).stringColor_(Color.white).value_(~f9);
3248                                                 st10=TextField(~synthfreqsetview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).stringColor_(Color.white).value_(~f10);
3249                                                 st11=TextField(~synthfreqsetview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).stringColor_(Color.white).value_(~f11);
3250                                                 st12=TextField(~synthfreqsetview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).stringColor_(Color.white).value_(~f12);
3251                                                 stall=TextField(~synthfreqsetview, Rect(lefttimebox , top=top+heightbox+10, widthbox, heightbox)).background_(Color.black).stringColor_(Color.white).value_(~f1);
3252
3253                                                 top = 0;
3254
3255                                                 i1 = Button.new(~synthfreqsetview, Rect(leftdo , top=top, revertwidth, height)).states_([["f1 revert",Color.white,Color.black],["f1 revert",Color.white,Color.black]]).action_({arg button; if(~f1_revert != nil, {if(~f1 != ~f1_revert, {~f1_un_revert = ~f1; ~f1 = ~f1_revert;}, {if(~f1_un_revert != nil, {~f1 = ~f1_un_revert;});}); ~synthflow.value; st1.string = ~f1.asString;});});
3256                                                 i2 = Button.new(~synthfreqsetview, Rect(leftdo , top=top+height, revertwidth, height)).states_([["f2 revert",Color.white,Color.black],["f2 revert",Color.white,Color.black]]).action_({arg button; if(~f2_revert != nil, {if(~f2 != ~f2_revert, {~f2_un_revert = ~f2; ~f2 = ~f2_revert;}, {if(~f2_un_revert != nil, {~f2 = ~f2_un_revert;});}); ~synthflow.value; st2.string = ~f2.asString;});});
3257                                                 i3 = Button.new(~synthfreqsetview, Rect(leftdo , top=top+height, revertwidth, height)).states_([["f3 revert",Color.white,Color.black],["f3 revert",Color.white,Color.black]]).action_({arg button; if(~f3_revert != nil, {if(~f3 != ~f3_revert, {~f3_un_revert = ~f3; ~f3 = ~f3_revert;}, {if(~f3_un_revert != nil, {~f3 = ~f3_un_revert;});}); ~synthflow.value; st3.string = ~f3.asString;});});
3258                                                 i4 = Button.new(~synthfreqsetview, Rect(leftdo , top=top+height, revertwidth, height)).states_([["f4 revert",Color.white,Color.black],["f4 revert",Color.white,Color.black]]).action_({arg button; if(~f4_revert != nil, {if(~f4 != ~f4_revert, {~f4_un_revert = ~f4; ~f4 = ~f4_revert;}, {if(~f4_un_revert != nil, {~f4 = ~f4_un_revert;});}); ~synthflow.value; st4.string = ~f4.asString;});});
3259                                                 i5 = Button.new(~synthfreqsetview, Rect(leftdo , top=top+height, revertwidth, height)).states_([["f5 revert",Color.white,Color.black],["f5 revert",Color.white,Color.black]]).action_({arg button; if(~f5_revert != nil, {if(~f5 != ~f5_revert, {~f5_un_revert = ~f5; ~f5 = ~f5_revert;}, {if(~f5_un_revert != nil, {~f5 = ~f5_un_revert;});}); ~synthflow.value; st5.string = ~f5.asString;});});
3260                                                 i6 = Button.new(~synthfreqsetview, Rect(leftdo , top=top+height, revertwidth, height)).states_([["f6 revert",Color.white,Color.black],["f6 revert",Color.white,Color.black]]).action_({arg button; if(~f6_revert != nil, {if(~f6 != ~f6_revert, {~f6_un_revert = ~f6; ~f6 = ~f6_revert;}, {if(~f6_un_revert != nil, {~f6 = ~f6_un_revert;});}); ~synthflow.value; st6.string = ~f6.asString;});});
3261                                                 i7 = Button.new(~synthfreqsetview, Rect(leftdo , top=top+height, revertwidth, height)).states_([["f7 revert",Color.white,Color.black],["f7 revert",Color.white,Color.black]]).action_({arg button; if(~f7_revert != nil, {if(~f7 != ~f7_revert, {~f7_un_revert = ~f7; ~f7 = ~f7_revert;}, {if(~f7_un_revert != nil, {~f7 = ~f7_un_revert;});}); ~synthflow.value; st7.string = ~f7.asString;});});
3262                                                 i8 = Button.new(~synthfreqsetview, Rect(leftdo , top=top+height, revertwidth, height)).states_([["f8 revert",Color.white,Color.black],["f8 revert",Color.white,Color.black]]).action_({arg button; if(~f8_revert != nil, {if(~f8 != ~f8_revert, {~f8_un_revert = ~f8; ~f8 = ~f8_revert;}, {if(~f8_un_revert != nil, {~f8 = ~f8_un_revert;});}); ~synthflow.value; st8.string = ~f8.asString;});});
3263                                                 i9 = Button.new(~synthfreqsetview, Rect(leftdo , top=top+height, revertwidth, height)).states_([["f9 revert",Color.white,Color.black],["f9 revert",Color.white,Color.black]]).action_({arg button; if(~f9_revert != nil, {if(~f9 != ~f9_revert, {~f9_un_revert = ~f9; ~f9 = ~f9_revert;}, {if(~f9_un_revert != nil, {~f9 = ~f9_un_revert;});}); ~synthflow.value; st9.string = ~f9.asString;});});
3264                                                 i10 = Button.new(~synthfreqsetview, Rect(leftdo , top=top+height, revertwidth, height)).states_([["f10 revert",Color.white,Color.black],["f10 revert",Color.white,Color.black]]).action_({arg button; if(~f10_revert != nil, {if(~f10 != ~f10_revert, {~f10_un_revert = ~f10; ~f10 = ~f10_revert;}, {if(~f10_un_revert != nil, {~f10 = ~f10_un_revert;});}); ~synthflow.value; st10.string = ~f10.asString;});});
3265                                                 i11 = Button.new(~synthfreqsetview, Rect(leftdo , top=top+height, revertwidth, height)).states_([["f11 revert",Color.white,Color.black],["f11 revert",Color.white,Color.black]]).action_({arg button; if(~f11_revert != nil, {if(~f11 != ~f11_revert, {~f11_un_revert = ~f11; ~f11 = ~f11_revert;}, {if(~f11_un_revert != nil, {~f11 = ~f11_un_revert;});}); ~synthflow.value; st11.string = ~f11.asString;});});
3266                                                 i12 = Button.new(~synthfreqsetview, Rect(leftdo , top=top+height, revertwidth, height)).states_([["f12 revert",Color.white,Color.black],["f12 revert",Color.white,Color.black]]).action_({arg button; if(~f12_revert != nil, {if(~f12 != ~f12_revert, {~f12_un_revert = ~f12; ~f12 = ~f12_revert;}, {if(~f12_un_revert != nil, {~f12 = ~f12_un_revert;});}); ~synthflow.value; st12.string = ~f12.asString;});});
3267                                                 iall = Button.new(~synthfreqsetview, Rect(leftdo , top=top+height+10, revertwidth, height)).states_([["all revert",Color.white,Color.black],["all revert",Color.white,Color.black]]).action_({arg button; if(~f_all_revert != nil, {if([ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ] != ~f_all_revert.flatten, {~f_all_un_revert = [ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ].flatten; 12.do(x = 0; {("f"++(x=x+1)).asSymbol.envirPut(~f_all_revert.flatten.at(x-1);)});}, {if(~f_all_un_revert != nil, {12.do(x = 0; {("f"++(x=x+1)).asSymbol.envirPut(~f_all_un_revert.flatten.at(x-1);)});});}); ~synthflow.value; stall.string = ~f1.asString;});});
3268
3269
3270                                                 stall.action_({arg val; ~freqsetvalue = val.value; ~freqset_textfield_func.value; ~f_all_revert = [ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ]; 12.do(x = 0; {("f"++(x=x+1)).asSymbol.envirPut(~freqsetvalue;)}); ~synthflow.value; stall.string = ~freqsetvalue.asString;});
3271                                                 st1.action_({arg val; ~freqsetvalue = val.value; ~freqset_textfield_func.value; ~f1_revert = ~f1; ~f1 = ~freqsetvalue; ~synthflow.value; st1.string = ~freqsetvalue.asString;});
3272                                                 st2.action_({arg val; ~freqsetvalue = val.value; ~freqset_textfield_func.value; ~f2_revert = ~f2; ~f2 = ~freqsetvalue; ~synthflow.value; st2.string = ~freqsetvalue.asString;});
3273                                                 st3.action_({arg val; ~freqsetvalue = val.value; ~freqset_textfield_func.value; ~f3_revert = ~f3; ~f3 = ~freqsetvalue; ~synthflow.value; st3.string = ~freqsetvalue.asString;});
3274                                                 st4.action_({arg val; ~freqsetvalue = val.value; ~freqset_textfield_func.value; ~f4_revert = ~f4; ~f4 = ~freqsetvalue; ~synthflow.value; st4.string = ~freqsetvalue.asString;});
3275                                                 st5.action_({arg val; ~freqsetvalue = val.value; ~freqset_textfield_func.value; ~f5_revert = ~f5; ~f5 = ~freqsetvalue; ~synthflow.value; st5.string = ~freqsetvalue.asString;});
3276                                                 st6.action_({arg val; ~freqsetvalue = val.value; ~freqset_textfield_func.value; ~f6_revert = ~f6; ~f6 = ~freqsetvalue; ~synthflow.value; st6.string = ~freqsetvalue.asString;});
3277                                                 st7.action_({arg val; ~freqsetvalue = val.value; ~freqset_textfield_func.value; ~f7_revert = ~f7; ~f7 = ~freqsetvalue; ~synthflow.value; st7.string = ~freqsetvalue.asString;});
3278                                                 st8.action_({arg val; ~freqsetvalue = val.value; ~freqset_textfield_func.value; ~f8_revert = ~f8; ~f8 = ~freqsetvalue; ~synthflow.value; st8.string = ~freqsetvalue.asString;});
3279                                                 st9.action_({arg val; ~freqsetvalue = val.value; ~freqset_textfield_func.value; ~f9_revert = ~f9; ~f9 = ~freqsetvalue; ~synthflow.value; st9.string = ~freqsetvalue.asString;});
3280                                                 st10.action_({arg val; ~freqsetvalue = val.value; ~freqset_textfield_func.value; ~f10_revert = ~f10; ~f10 = ~freqsetvalue; ~synthflow.value; st10.string = ~freqsetvalue.asString;});
3281                                                 st11.action_({arg val; ~freqsetvalue = val.value; ~freqset_textfield_func.value; ~f11_revert = ~f11; ~f11 = ~freqsetvalue; ~synthflow.value; st11.string = ~freqsetvalue.asString;});
3282                                                 st12.action_({arg val; ~freqsetvalue = val.value; ~freqset_textfield_func.value; ~f12_revert = ~f12; ~f12 = ~freqsetvalue; ~synthflow.value; st12.string = ~freqsetvalue.asString;});
3283
3284
3285                                                 ~synthfreqsetview.background_(Color.black);
3286
3287                                                 ~closesfreqsetbutton = Button.new(~synthfreqsetview,Rect(leftdo+revertwidth-40, top=top+height+20, 40, 40/~gm)).states_([["close",Color.white,Color.black]]).action_({arg button;
3288
3289                                                         ~synthfreqsetview.close;
3290                                                 });
3291
3292                                                 ~beforefreqsetrevert = Button.new(~synthfreqsetview,Rect(lefttime, top+(40/~gm)-height, revertwidth+150, height)).states_([["restore freqs before opening eo",Color.white,Color.black],["revert",Color.white,Color.black]]).action_({arg button;
3293
3294                                                         if([ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ] != ~beforefreqsetfreqs.flatten, {~beforefreqsetfreqs_unrestore = [ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ]; 12.do(x = 0; {("f"++(x=x+1)).asSymbol.envirPut(~beforefreqsetfreqs.flatten.at(x-1);)});}, {if(~beforefreqsetfreqs_unrestore != nil, {12.do(x = 0; {("f"++(x=x+1)).asSymbol.envirPut(~beforefreqsetfreqs_unrestore.flatten.at(x-1);)});});}); ~synthflow.value;
3295                                                 });
3296
3297
3298                                         }.value);
3299
3300                                         ~synthfreqsetview.front;
3301                                 }, {~synthfreqsetview.close});
3302                         });
3303
3304
3305                         Button.new(~extraoptionsview,Rect(0,80,120,20)).states_([["close eo",Color.white,Color.black],["close eo",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
3306
3307                                 ~extraoptionsview.close; ~slideview.close; ~synthfreqsetview.close; ~extraoptions.value = 0;
3308
3309                         });
3310
3311                 }, {~extraoptionsview.close; ~slideview.close; ~synthfreqset.close;});
3312         });
3313
3314
3315         //mute/unmute 1-8 buttons
3316
3317         mute1 = Button.new(w,Rect(~bpl+(0),~bpt+69+5-(16/1.6180339887499),16,16/1.6180339887499)).states_([["1",Color.white,Color.black],["",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
3318                 case
3319                 {~l1a1.isRunning == true}{
3320                         if(button.value == 0, {
3321                                 (~vol1 = ~vol;
3322                                         1.do({
3323                                                 ~l1a1.set(\vol, ~vol1);  ~l1b1.set(\vol, ~vol1);
3324                                                 ~l1c1.set(\vol, ~vol1);  ~l1d1.set(\vol, ~vol1);
3325                                                 ~l1e1.set(\vol, ~vol1);  ~l1f1.set(\vol, ~vol1);
3326
3327                                 }););
3328                         }, {(~vol1 = 0;
3329                                 1.do({
3330                                         ~l1a1.set(\vol, ~vol1);  ~l1b1.set(\vol, ~vol1);
3331                                         ~l1c1.set(\vol, ~vol1);  ~l1d1.set(\vol, ~vol1);
3332                                         ~l1e1.set(\vol, ~vol1);  ~l1f1.set(\vol, ~vol1);
3333
3334                         }););
3335                         });
3336                 }
3337                 {~l1a.isRunning == true}{
3338                         if(button.value == 0, {
3339                                 (~vol1 = ~vol;
3340                                         1.do({
3341                                                 ~l1a.set(\vol, ~vol1);  ~l1b.set(\vol, ~vol1);
3342                                                 ~l1c.set(\vol, ~vol1);  ~l1d.set(\vol, ~vol1);
3343                                                 ~l1e.set(\vol, ~vol1);  ~l1f.set(\vol, ~vol1);
3344
3345                                 }););
3346                         }, {(~vol1 = 0;
3347                                 1.do({
3348                                         ~l1a.set(\vol, ~vol1);  ~l1b.set(\vol, ~vol1);
3349                                         ~l1c.set(\vol, ~vol1);  ~l1d.set(\vol, ~vol1);
3350                                         ~l1e.set(\vol, ~vol1);  ~l1f.set(\vol, ~vol1);
3351
3352                         }););
3353                         });
3354                 };
3355         });
3356
3357         mute2 = Button.new(w,Rect(~bpl+(16*1),~bpt+69+5-(16/1.6180339887499),16,16/1.6180339887499)).states_([["2",Color.white,Color.black],["",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
3358                 case
3359                 {~l1a1.isRunning == true}{
3360                         if(button.value == 0, {
3361                                 (~vol2 = ~vol;
3362                                         1.do({
3363                                                 ~l2a1.set(\vol, ~vol2);  ~l2b1.set(\vol, ~vol2);
3364                                                 ~l2c1.set(\vol, ~vol2);  ~l2d1.set(\vol, ~vol2);
3365                                                 ~l2e1.set(\vol, ~vol2);  ~l2f1.set(\vol, ~vol2);
3366
3367                                 }););
3368                         }, {(~vol2 = 0;
3369                                 1.do({
3370                                         ~l2a1.set(\vol, ~vol2);  ~l2b1.set(\vol, ~vol2);
3371                                         ~l2c1.set(\vol, ~vol2);  ~l2d1.set(\vol, ~vol2);
3372                                         ~l2e1.set(\vol, ~vol2);  ~l2f1.set(\vol, ~vol2);
3373
3374                         }););
3375                         });
3376                 }
3377                 {~l1a.isRunning == true}{
3378                         if(button.value == 0, {
3379                                 (~vol2 = ~vol;
3380                                         1.do({
3381                                                 ~l2a.set(\vol, ~vol2);  ~l2b.set(\vol, ~vol2);
3382                                                 ~l2c.set(\vol, ~vol2);  ~l2d.set(\vol, ~vol2);
3383                                                 ~l2e.set(\vol, ~vol2);  ~l2f.set(\vol, ~vol2);
3384
3385                                 }););
3386                         }, {(~vol2 = 0;
3387                                 1.do({
3388                                         ~l2a.set(\vol, ~vol2);  ~l2b.set(\vol, ~vol2);
3389                                         ~l2c.set(\vol, ~vol2);  ~l2d.set(\vol, ~vol2);
3390                                         ~l2e.set(\vol, ~vol2);  ~l2f.set(\vol, ~vol2);
3391
3392                         }););
3393                         });
3394                 };
3395         });
3396         mute3 = Button.new(w,Rect(~bpl+(16*2),~bpt+69+5-(16/1.6180339887499),16,16/1.6180339887499)).states_([["3",Color.white,Color.black],["",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
3397                 case
3398                 {~l1a1.isRunning == true}{
3399                         if(button.value == 0, {
3400                                 (~vol3 = ~vol;
3401                                         1.do({
3402                                                 ~l3a1.set(\vol, ~vol3);  ~l3b1.set(\vol, ~vol3);
3403                                                 ~l3c1.set(\vol, ~vol3);  ~l3d1.set(\vol, ~vol3);
3404                                                 ~l3e1.set(\vol, ~vol3);  ~l3f1.set(\vol, ~vol3);
3405
3406                                 }););
3407                         }, {(~vol3 = 0;
3408                                 1.do({
3409                                         ~l3a1.set(\vol, ~vol3);  ~l3b1.set(\vol, ~vol3);
3410                                         ~l3c1.set(\vol, ~vol3);  ~l3d1.set(\vol, ~vol3);
3411                                         ~l3e1.set(\vol, ~vol3);  ~l3f1.set(\vol, ~vol3);
3412
3413                         }););
3414                         });
3415                 }
3416                 {~l1a.isRunning == true}{
3417                         if(button.value == 0, {
3418                                 (~vol3 = ~vol;
3419                                         1.do({
3420                                                 ~l3a.set(\vol, ~vol3);  ~l3b.set(\vol, ~vol3);
3421                                                 ~l3c.set(\vol, ~vol3);  ~l3d.set(\vol, ~vol3);
3422                                                 ~l3e.set(\vol, ~vol3);  ~l3f.set(\vol, ~vol3);
3423
3424                                 }););
3425                         }, {(~vol3 = 0;
3426                                 1.do({
3427                                         ~l3a.set(\vol, ~vol3);  ~l3b.set(\vol, ~vol3);
3428                                         ~l3c.set(\vol, ~vol3);  ~l3d.set(\vol, ~vol3);
3429                                         ~l3e.set(\vol, ~vol3);  ~l3f.set(\vol, ~vol3);
3430
3431                         }););
3432                         });
3433                 };
3434         });
3435         mute4 = Button.new(w,Rect(~bpl+(16*3),~bpt+69+5-(16/1.6180339887499),16,16/1.6180339887499)).states_([["4",Color.white,Color.black],["",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
3436                 case
3437                 {~l1a1.isRunning == true}{
3438                         if(button.value == 0, {
3439                                 (~vol4 = ~vol;
3440                                         1.do({
3441                                                 ~l4a1.set(\vol, ~vol4);  ~l4b1.set(\vol, ~vol4);
3442                                                 ~l4c1.set(\vol, ~vol4);  ~l4d1.set(\vol, ~vol4);
3443                                                 ~l4e1.set(\vol, ~vol4);  ~l4f1.set(\vol, ~vol4);
3444
3445                                 }););
3446                         }, {(~vol4 = 0;
3447                                 1.do({
3448                                         ~l4a1.set(\vol, ~vol4);  ~l4b1.set(\vol, ~vol4);
3449                                         ~l4c1.set(\vol, ~vol4);  ~l4d1.set(\vol, ~vol4);
3450                                         ~l4e1.set(\vol, ~vol4);  ~l4f1.set(\vol, ~vol4);
3451
3452                         }););
3453                         });
3454                 }
3455                 {~l1a.isRunning == true}{
3456                         if(button.value == 0, {
3457                                 (~vol4 = ~vol;
3458                                         1.do({
3459                                                 ~l4a.set(\vol, ~vol4);  ~l4b.set(\vol, ~vol4);
3460                                                 ~l4c.set(\vol, ~vol4);  ~l4d.set(\vol, ~vol4);
3461                                                 ~l4e.set(\vol, ~vol4);  ~l4f.set(\vol, ~vol4);
3462
3463                                 }););
3464                         }, {(~vol4 = 0;
3465                                 1.do({
3466                                         ~l4a.set(\vol, ~vol4);  ~l4b.set(\vol, ~vol4);
3467                                         ~l4c.set(\vol, ~vol4);  ~l4d.set(\vol, ~vol4);
3468                                         ~l4e.set(\vol, ~vol4);  ~l4f.set(\vol, ~vol4);
3469
3470                         }););
3471                         });
3472                 };
3473         });
3474         mute5 = Button.new(w,Rect(~bpl+(16*4),~bpt+69+5-(16/1.6180339887499),16,16/1.6180339887499)).states_([["5",Color.white,Color.black],["",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
3475                 case
3476                 {~l1a1.isRunning == true}{
3477                         if(button.value == 0, {
3478                                 (~vol5 = ~vol;
3479                                         1.do({
3480                                                 ~l5a1.set(\vol, ~vol5);  ~l5b1.set(\vol, ~vol5);
3481                                                 ~l5c1.set(\vol, ~vol5);  ~l5d1.set(\vol, ~vol5);
3482                                                 ~l5e1.set(\vol, ~vol5);  ~l5f1.set(\vol, ~vol5);
3483
3484                                 }););
3485                         }, {(~vol5 = 0;
3486                                 1.do({
3487                                         ~l5a1.set(\vol, ~vol5);  ~l5b1.set(\vol, ~vol5);
3488                                         ~l5c1.set(\vol, ~vol5);  ~l5d1.set(\vol, ~vol5);
3489                                         ~l5e1.set(\vol, ~vol5);  ~l5f1.set(\vol, ~vol5);
3490
3491                         }););
3492                         });
3493                 }
3494                 {~l1a.isRunning == true}{
3495                         if(button.value == 0, {
3496                                 (~vol5 = ~vol;
3497                                         1.do({
3498                                                 ~l5a.set(\vol, ~vol5);  ~l5b.set(\vol, ~vol5);
3499                                                 ~l5c.set(\vol, ~vol5);  ~l5d.set(\vol, ~vol5);
3500                                                 ~l5e.set(\vol, ~vol5);  ~l5f.set(\vol, ~vol5);
3501
3502                                 }););
3503                         }, {(~vol5 = 0;
3504                                 1.do({
3505                                         ~l5a.set(\vol, ~vol5);  ~l5b.set(\vol, ~vol5);
3506                                         ~l5c.set(\vol, ~vol5);  ~l5d.set(\vol, ~vol5);
3507                                         ~l5e.set(\vol, ~vol5);  ~l5f.set(\vol, ~vol5);
3508
3509                         }););
3510                         });
3511                 };
3512         });
3513         mute6 = Button.new(w,Rect(~bpl+(16*5),~bpt+69+5-(16/1.6180339887499),16,16/1.6180339887499)).states_([["6",Color.white,Color.black],["",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
3514                 case
3515                 {~l1a1.isRunning == true}{
3516                         if(button.value == 0, {
3517                                 (~vol6 = ~vol;
3518                                         1.do({
3519                                                 ~l6a1.set(\vol, ~vol6);  ~l6b1.set(\vol, ~vol6);
3520                                                 ~l6c1.set(\vol, ~vol6);  ~l6d1.set(\vol, ~vol6);
3521                                                 ~l6e1.set(\vol, ~vol6);  ~l6f1.set(\vol, ~vol6);
3522
3523                                 }););
3524                         }, {(~vol6 = 0;
3525                                 1.do({
3526                                         ~l6a1.set(\vol, ~vol6);  ~l6b1.set(\vol, ~vol6);
3527                                         ~l6c1.set(\vol, ~vol6);  ~l6d1.set(\vol, ~vol6);
3528                                         ~l6e1.set(\vol, ~vol6);  ~l6f1.set(\vol, ~vol6);
3529
3530                         }););
3531                         });
3532                 }
3533                 {~l1a.isRunning == true}{
3534                         if(button.value == 0, {
3535                                 (~vol6 = ~vol;
3536                                         1.do({
3537                                                 ~l6a.set(\vol, ~vol6);  ~l6b.set(\vol, ~vol6);
3538                                                 ~l6c.set(\vol, ~vol6);  ~l6d.set(\vol, ~vol6);
3539                                                 ~l6e.set(\vol, ~vol6);  ~l6f.set(\vol, ~vol6);
3540
3541                                 }););
3542                         }, {(~vol6 = 0;
3543                                 1.do({
3544                                         ~l6a.set(\vol, ~vol6);  ~l6b.set(\vol, ~vol6);
3545                                         ~l6c.set(\vol, ~vol6);  ~l6d.set(\vol, ~vol6);
3546                                         ~l6e.set(\vol, ~vol6);  ~l6f.set(\vol, ~vol6);
3547
3548                         }););
3549                         });
3550                 };
3551
3552         });
3553         mute7 = Button.new(w,Rect(~bpl+(16*6),~bpt+69+5-(16/1.6180339887499),16,16/1.6180339887499)).states_([["7",Color.white,Color.black],["",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
3554                 case
3555                 {~l1a1.isRunning == true}{
3556                         if(button.value == 0, {
3557                                 (~vol7 = ~vol;
3558                                         1.do({
3559                                                 ~l7a1.set(\vol, ~vol7);  ~l7b1.set(\vol, ~vol7);
3560                                                 ~l7c1.set(\vol, ~vol7);  ~l7d1.set(\vol, ~vol7);
3561                                                 ~l7e1.set(\vol, ~vol7);  ~l7f1.set(\vol, ~vol7);
3562
3563                                 }););
3564                         }, {(~vol7 = 0;
3565                                 1.do({
3566                                         ~l7a1.set(\vol, ~vol7);  ~l7b1.set(\vol, ~vol7);
3567                                         ~l7c1.set(\vol, ~vol7);  ~l7d1.set(\vol, ~vol7);
3568                                         ~l7e1.set(\vol, ~vol7);  ~l7f1.set(\vol, ~vol7);
3569
3570                         }););
3571                         });
3572                 }
3573                 {~l1a.isRunning == true}{
3574                         if(button.value == 0, {
3575                                 (~vol7 = ~vol;
3576                                         1.do({
3577                                                 ~l7a.set(\vol, ~vol7);  ~l7b.set(\vol, ~vol7);
3578                                                 ~l7c.set(\vol, ~vol7);  ~l7d.set(\vol, ~vol7);
3579                                                 ~l7e.set(\vol, ~vol7);  ~l7f.set(\vol, ~vol7);
3580
3581                                 }););
3582                         }, {(~vol7 = 0;
3583                                 1.do({
3584                                         ~l7a.set(\vol, ~vol7);  ~l7b.set(\vol, ~vol7);
3585                                         ~l7c.set(\vol, ~vol7);  ~l7d.set(\vol, ~vol7);
3586                                         ~l7e.set(\vol, ~vol7);  ~l7f.set(\vol, ~vol7);
3587
3588                         }););
3589                         });
3590                 };
3591         });
3592         mute8 = Button.new(w,Rect(~bpl+(16*7),~bpt+69+5-(16/1.6180339887499),16,16/1.6180339887499)).states_([["8",Color.white,Color.black],["",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
3593                 case
3594                 {~l1a1.isRunning == true}{
3595                         if(button.value == 0, {
3596                                 (~vol8 = ~vol;
3597                                         1.do({
3598                                                 ~l8a1.set(\vol, ~vol8);  ~l8b1.set(\vol, ~vol8);
3599                                                 ~l8c1.set(\vol, ~vol8);  ~l8d1.set(\vol, ~vol8);
3600                                                 ~l8e1.set(\vol, ~vol8);  ~l8f1.set(\vol, ~vol8);
3601
3602                                 }););
3603                         }, {(~vol8 = 0;
3604                                 1.do({
3605                                         ~l8a1.set(\vol, ~vol8);  ~l8b1.set(\vol, ~vol8);
3606                                         ~l8c1.set(\vol, ~vol8);  ~l8d1.set(\vol, ~vol8);
3607                                         ~l8e1.set(\vol, ~vol8);  ~l8f1.set(\vol, ~vol8);
3608
3609                         }););
3610                         });
3611                 }
3612                 {~l1a.isRunning == true}{
3613                         if(button.value == 0, {
3614                                 (~vol8 = ~vol;
3615                                         1.do({
3616                                                 ~l8a.set(\vol, ~vol8);  ~l8b.set(\vol, ~vol8);
3617                                                 ~l8c.set(\vol, ~vol8);  ~l8d.set(\vol, ~vol8);
3618                                                 ~l8e.set(\vol, ~vol8);  ~l8f.set(\vol, ~vol8);
3619
3620                                 }););
3621                         }, {(~vol8 = 0;
3622                                 1.do({
3623                                         ~l8a.set(\vol, ~vol8);  ~l8b.set(\vol, ~vol8);
3624                                         ~l8c.set(\vol, ~vol8);  ~l8d.set(\vol, ~vol8);
3625                                         ~l8e.set(\vol, ~vol8);  ~l8f.set(\vol, ~vol8);
3626
3627                         }););
3628                         });
3629                 };
3630         });
3631         mute9 = Button.new(w,Rect(~bpl+(16*8),~bpt+69+5-(16/1.6180339887499),16,16/1.6180339887499)).states_([["9",Color.white,Color.black],["",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
3632                 case
3633                 {~l1a1.isRunning == true}{
3634                         if(button.value == 0, {
3635                                 (~vol9 = ~vol;
3636                                         1.do({
3637                                                 ~l9a1.set(\vol, ~vol9);  ~l9b1.set(\vol, ~vol9);
3638                                                 ~l9c1.set(\vol, ~vol9);  ~l9d1.set(\vol, ~vol9);
3639                                                 ~l9e1.set(\vol, ~vol9);  ~l9f1.set(\vol, ~vol9);
3640
3641                                 }););
3642                         }, {(~vol9 = 0;
3643                                 1.do({
3644                                         ~l9a1.set(\vol, ~vol9);  ~l9b1.set(\vol, ~vol9);
3645                                         ~l9c1.set(\vol, ~vol9);  ~l9d1.set(\vol, ~vol9);
3646                                         ~l9e1.set(\vol, ~vol9);  ~l9f1.set(\vol, ~vol9);
3647
3648                         }););
3649                         });
3650                 }
3651                 {~l1a.isRunning == true}{
3652                         if(button.value == 0, {
3653                                 (~vol9 = ~vol;
3654                                         1.do({
3655                                                 ~l9a.set(\vol, ~vol9);  ~l9b.set(\vol, ~vol9);
3656                                                 ~l9c.set(\vol, ~vol9);  ~l9d.set(\vol, ~vol9);
3657                                                 ~l9e.set(\vol, ~vol9);  ~l9f.set(\vol, ~vol9);
3658
3659                                 }););
3660                         }, {(~vol9 = 0;
3661                                 1.do({
3662                                         ~l9a.set(\vol, ~vol9);  ~l9b.set(\vol, ~vol9);
3663                                         ~l9c.set(\vol, ~vol9);  ~l9d.set(\vol, ~vol9);
3664                                         ~l9e.set(\vol, ~vol9);  ~l9f.set(\vol, ~vol9);
3665
3666                         }););
3667                         });
3668                 };
3669         });
3670         mute10 = Button.new(w,Rect(~bpl+(0),~bpt+69+5,16,16/1.6180339887499)).states_([["10",Color.white,Color.black],["",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
3671                 case
3672                 {~l1a1.isRunning == true}{
3673                         if(button.value == 0, {
3674                                 (~vol10 = ~vol;
3675                                         1.do({
3676                                                 ~l10a1.set(\vol, ~vol10);  ~l10b1.set(\vol, ~vol10);
3677                                                 ~l10c1.set(\vol, ~vol10);  ~l10d1.set(\vol, ~vol10);
3678                                                 ~l10e1.set(\vol, ~vol10);  ~l10f1.set(\vol, ~vol10);
3679
3680                                 }););
3681                         }, {(~vol10 = 0;
3682                                 1.do({
3683                                         ~l10a1.set(\vol, ~vol10);  ~l10b1.set(\vol, ~vol10);
3684                                         ~l10c1.set(\vol, ~vol10);  ~l10d1.set(\vol, ~vol10);
3685                                         ~l10e1.set(\vol, ~vol10);  ~l10f1.set(\vol, ~vol10);
3686
3687                         }););
3688                         });
3689                 }
3690                 {~l1a.isRunning == true}{
3691                         if(button.value == 0, {
3692                                 (~vol10 = ~vol;
3693                                         1.do({
3694                                                 ~l10a.set(\vol, ~vol10);  ~l10b.set(\vol, ~vol10);
3695                                                 ~l10c.set(\vol, ~vol10);  ~l10d.set(\vol, ~vol10);
3696                                                 ~l10e.set(\vol, ~vol10);  ~l10f.set(\vol, ~vol10);
3697
3698                                 }););
3699                         }, {(~vol10 = 0;
3700                                 1.do({
3701                                         ~l10a.set(\vol, ~vol10);  ~l10b.set(\vol, ~vol10);
3702                                         ~l10c.set(\vol, ~vol10);  ~l10d.set(\vol, ~vol10);
3703                                         ~l10e.set(\vol, ~vol10);  ~l10f.set(\vol, ~vol10);
3704
3705                         }););
3706                         });
3707                 };
3708         });
3709         mute11 = Button.new(w,Rect(~bpl+(16),~bpt+69+5,16,16/1.6180339887499)).states_([["11",Color.white,Color.black],["",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
3710                 case
3711                 {~l1a1.isRunning == true}{
3712                         if(button.value == 0, {
3713                                 (~vol11 = ~vol;
3714                                         1.do({
3715                                                 ~l11a1.set(\vol, ~vol11);  ~l11b1.set(\vol, ~vol11);
3716                                                 ~l11c1.set(\vol, ~vol11);  ~l11d1.set(\vol, ~vol11);
3717                                                 ~l11e1.set(\vol, ~vol11);  ~l11f1.set(\vol, ~vol11);
3718
3719                                 }););
3720                         }, {(~vol11 = 0;
3721                                 1.do({
3722                                         ~l11a1.set(\vol, ~vol11);  ~l8b1.set(\vol, ~vol11);
3723                                         ~l11c1.set(\vol, ~vol11);  ~l8d1.set(\vol, ~vol11);
3724                                         ~l11e1.set(\vol, ~vol11);  ~l8f1.set(\vol, ~vol11);
3725
3726                         }););
3727                         });
3728                 }
3729                 {~l1a.isRunning == true}{
3730                         if(button.value == 0, {
3731                                 (~vol11 = ~vol;
3732                                         1.do({
3733                                                 ~l11a.set(\vol, ~vol11);  ~l11b.set(\vol, ~vol11);
3734                                                 ~l11c.set(\vol, ~vol11);  ~l11d.set(\vol, ~vol11);
3735                                                 ~l11e.set(\vol, ~vol11);  ~l11f.set(\vol, ~vol11);
3736
3737                                 }););
3738                         }, {(~vol11 = 0;
3739                                 1.do({
3740                                         ~l11a.set(\vol, ~vol11);  ~l11b.set(\vol, ~vol11);
3741                                         ~l11c.set(\vol, ~vol11);  ~l11d.set(\vol, ~vol11);
3742                                         ~l11e.set(\vol, ~vol11);  ~l11f.set(\vol, ~vol11);
3743
3744                         }););
3745                         });
3746                 };
3747         });
3748         mute12 = Button.new(w,Rect(~bpl+(16*2),~bpt+69+5,16,16/1.6180339887499)).states_([["12",Color.white,Color.black],["",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
3749                 case
3750                 {~l1a1.isRunning == true}{
3751                         if(button.value == 0, {
3752                                 (~vol12 = ~vol;
3753                                         1.do({
3754                                                 ~l12a1.set(\vol, ~vol12);  ~l12b1.set(\vol, ~vol12);
3755                                                 ~l12c1.set(\vol, ~vol12);  ~l12d1.set(\vol, ~vol12);
3756                                                 ~l12e1.set(\vol, ~vol12);  ~l12f1.set(\vol, ~vol12);
3757
3758                                 }););
3759                         }, {(~vol12 = 0;
3760                                 1.do({
3761                                         ~l12a1.set(\vol, ~vol12);  ~l12b1.set(\vol, ~vol12);
3762                                         ~l12c1.set(\vol, ~vol12);  ~l12d1.set(\vol, ~vol12);
3763                                         ~l12e1.set(\vol, ~vol12);  ~l12f1.set(\vol, ~vol12);
3764
3765                         }););
3766                         });
3767                 }
3768                 {~l1a.isRunning == true}{
3769                         if(button.value == 0, {
3770                                 (~vol12 = ~vol;
3771                                         1.do({
3772                                                 ~l12a.set(\vol, ~vol12);  ~l12b.set(\vol, ~vol12);
3773                                                 ~l12c.set(\vol, ~vol12);  ~l12d.set(\vol, ~vol12);
3774                                                 ~l12e.set(\vol, ~vol12);  ~l12f.set(\vol, ~vol12);
3775
3776                                 }););
3777                         }, {(~vol12 = 0;
3778                                 1.do({
3779                                         ~l12a.set(\vol, ~vol12);  ~l12b.set(\vol, ~vol12);
3780                                         ~l12c.set(\vol, ~vol12);  ~l12d.set(\vol, ~vol12);
3781                                         ~l12e.set(\vol, ~vol12);  ~l12f.set(\vol, ~vol12);
3782
3783                         }););
3784                         });
3785                 };
3786         });
3787
3788
3789         //mute/unmute all button
3790
3791         muteall = Button.new(w,Rect(~bpl+(16*3),~bpt+69+5,16,16/1.6180339887499)).states_([["m",Color.white,Color.black],["u",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
3792
3793                 if(button.value == 0, {
3794                         mute1.value = 0;
3795                         mute2.value = 0;
3796                         mute3.value = 0;
3797                         mute4.value = 0;
3798                         mute5.value = 0;
3799                         mute6.value = 0;
3800                         mute7.value = 0;
3801                         mute8.value = 0;
3802                         mute9.value = 0;
3803                         mute10.value = 0;
3804                         mute11.value = 0;
3805                         mute12.value = 0;
3806
3807                         ~vol1 = ~vol;
3808                         ~vol2 = ~vol;
3809                         ~vol3 = ~vol;
3810                         ~vol4 = ~vol;
3811                         ~vol5 = ~vol;
3812                         ~vol6 = ~vol;
3813                         ~vol7 = ~vol;
3814                         ~vol8 = ~vol;
3815                         ~vol9 = ~vol;
3816                         ~vol10 = ~vol;
3817                         ~vol11 = ~vol;
3818                         ~vol12 = ~vol;
3819                 },
3820                 {
3821                         mute1.value = 1;
3822                         mute2.value = 1;
3823                         mute3.value = 1;
3824                         mute4.value = 1;
3825                         mute5.value = 1;
3826                         mute6.value = 1;
3827                         mute7.value = 1;
3828                         mute8.value = 1;
3829                         mute9.value = 1;
3830                         mute10.value = 1;
3831                         mute11.value = 1;
3832                         mute12.value = 1;
3833
3834                         ~vol1 = 0;
3835                         ~vol2 = 0;
3836                         ~vol3 = 0;
3837                         ~vol4 = 0;
3838                         ~vol5 = 0;
3839                         ~vol6 = 0;
3840                         ~vol7 = 0;
3841                         ~vol8 = 0;
3842                         ~vol9 = 0;
3843                         ~vol10 = 0;
3844                         ~vol11 = 0;
3845                         ~vol12 = 0;
3846                 });
3847                 ~synthflow.value;
3848         });
3849
3850
3851         //keyboard number buttons to choose synth
3852
3853         keycodeb = Button.new(w,Rect(Window.screenBounds.width-20-16,~bpt+160,16,16/1.6180339887499)).states_([
3854                 ["1",Color.white,Color.black],
3855                 ["2",Color.white,Color.black],
3856                 ["3",Color.white,Color.black],
3857                 ["4",Color.white,Color.black],
3858                 ["5",Color.white,Color.black],
3859                 ["6",Color.white,Color.black],
3860                 ["7",Color.white,Color.black],
3861                 ["8",Color.white,Color.black],
3862                 ["9",Color.white,Color.black],
3863                 ["10",Color.white,Color.black],
3864                 ["11",Color.white,Color.black],
3865                 ["12",Color.white,Color.black]]).action_({arg button;
3866
3867                 case
3868                 {button.value == 0}{
3869                         ~z25.background = Color.green; ~z1.background = Color.green;
3870                         ~z26.background = Color.white; ~z2.background = Color.white;
3871                         ~z27.background = Color.white; ~z3.background = Color.white;
3872                         ~z28.background = Color.white; ~z4.background = Color.white;
3873                         ~z29.background = Color.white; ~z5.background = Color.white;
3874                         ~z30.background = Color.white; ~z6.background = Color.white;
3875                         ~z31.background = Color.white; ~z7.background = Color.white;
3876                         ~z32.background = Color.white; ~z8.background = Color.white;
3877                         ~z33.background = Color.white; ~z9.background = Color.white;
3878                         ~z34.background = Color.white; ~z10.background = Color.white;
3879                         ~z35.background = Color.white; ~z11.background = Color.white;
3880                         ~z36.background = Color.white; ~z12.background = Color.white;
3881                 }
3882                 {button.value == 1}{
3883                         ~z25.background = Color.white; ~z1.background = Color.white;
3884                         ~z26.background = Color.green; ~z2.background = Color.green;
3885                         ~z27.background = Color.white; ~z3.background = Color.white;
3886                         ~z28.background = Color.white; ~z4.background = Color.white;
3887                         ~z29.background = Color.white; ~z5.background = Color.white;
3888                         ~z30.background = Color.white; ~z6.background = Color.white;
3889                         ~z31.background = Color.white; ~z7.background = Color.white;
3890                         ~z32.background = Color.white; ~z8.background = Color.white;
3891                         ~z33.background = Color.white; ~z9.background = Color.white;
3892                         ~z34.background = Color.white; ~z10.background = Color.white;
3893                         ~z35.background = Color.white; ~z11.background = Color.white;
3894                         ~z36.background = Color.white; ~z12.background = Color.white;
3895                 }
3896                 {button.value == 2}{
3897                         ~z25.background = Color.white; ~z1.background = Color.white;
3898                         ~z26.background = Color.white; ~z2.background = Color.white;
3899                         ~z27.background = Color.green; ~z3.background = Color.green;
3900                         ~z28.background = Color.white; ~z4.background = Color.white;
3901                         ~z29.background = Color.white; ~z5.background = Color.white;
3902                         ~z30.background = Color.white; ~z6.background = Color.white;
3903                         ~z31.background = Color.white; ~z7.background = Color.white;
3904                         ~z32.background = Color.white; ~z8.background = Color.white;
3905                         ~z33.background = Color.white; ~z9.background = Color.white;
3906                         ~z34.background = Color.white; ~z10.background = Color.white;
3907                         ~z35.background = Color.white; ~z11.background = Color.white;
3908                         ~z36.background = Color.white; ~z12.background = Color.white;
3909                 }
3910                 {button.value == 3}{
3911                         ~z25.background = Color.white; ~z1.background = Color.white;
3912                         ~z26.background = Color.white; ~z2.background = Color.white;
3913                         ~z27.background = Color.white; ~z3.background = Color.white;
3914                         ~z28.background = Color.green; ~z4.background = Color.green;
3915                         ~z29.background = Color.white; ~z5.background = Color.white;
3916                         ~z30.background = Color.white; ~z6.background = Color.white;
3917                         ~z31.background = Color.white; ~z7.background = Color.white;
3918                         ~z32.background = Color.white; ~z8.background = Color.white;
3919                         ~z33.background = Color.white; ~z9.background = Color.white;
3920                         ~z34.background = Color.white; ~z10.background = Color.white;
3921                         ~z35.background = Color.white; ~z11.background = Color.white;
3922                         ~z36.background = Color.white; ~z12.background = Color.white;
3923                 }
3924                 {button.value == 4}{
3925                         ~z25.background = Color.white; ~z1.background = Color.white;
3926                         ~z26.background = Color.white; ~z2.background = Color.white;
3927                         ~z27.background = Color.white; ~z3.background = Color.white;
3928                         ~z28.background = Color.white; ~z4.background = Color.white;
3929                         ~z29.background = Color.green; ~z5.background = Color.green;
3930                         ~z30.background = Color.white; ~z6.background = Color.white;
3931                         ~z31.background = Color.white; ~z7.background = Color.white;
3932                         ~z32.background = Color.white; ~z8.background = Color.white;
3933                         ~z33.background = Color.white; ~z9.background = Color.white;
3934                         ~z34.background = Color.white; ~z10.background = Color.white;
3935                         ~z35.background = Color.white; ~z11.background = Color.white;
3936                         ~z36.background = Color.white; ~z12.background = Color.white;
3937                 }
3938                 {button.value == 5}{
3939                         ~z25.background = Color.white; ~z1.background = Color.white;
3940                         ~z26.background = Color.white; ~z2.background = Color.white;
3941                         ~z27.background = Color.white; ~z3.background = Color.white;
3942                         ~z28.background = Color.white; ~z4.background = Color.white;
3943                         ~z29.background = Color.white; ~z5.background = Color.white;
3944                         ~z30.background = Color.green; ~z6.background = Color.green;
3945                         ~z31.background = Color.white; ~z7.background = Color.white;
3946                         ~z32.background = Color.white; ~z8.background = Color.white;
3947                         ~z33.background = Color.white; ~z9.background = Color.white;
3948                         ~z34.background = Color.white; ~z10.background = Color.white;
3949                         ~z35.background = Color.white; ~z11.background = Color.white;
3950                         ~z36.background = Color.white; ~z12.background = Color.white;
3951                 }
3952                 {button.value == 6}{
3953                         ~z25.background = Color.white; ~z1.background = Color.white;
3954                         ~z26.background = Color.white; ~z2.background = Color.white;
3955                         ~z27.background = Color.white; ~z3.background = Color.white;
3956                         ~z28.background = Color.white; ~z4.background = Color.white;
3957                         ~z29.background = Color.white; ~z5.background = Color.white;
3958                         ~z30.background = Color.white; ~z6.background = Color.white;
3959                         ~z31.background = Color.green; ~z7.background = Color.green;
3960                         ~z32.background = Color.white; ~z8.background = Color.white;
3961                         ~z33.background = Color.white; ~z9.background = Color.white;
3962                         ~z34.background = Color.white; ~z10.background = Color.white;
3963                         ~z35.background = Color.white; ~z11.background = Color.white;
3964                         ~z36.background = Color.white; ~z12.background = Color.white;
3965                 }
3966                 {button.value == 7}{
3967                         ~z25.background = Color.white; ~z1.background = Color.white;
3968                         ~z26.background = Color.white; ~z2.background = Color.white;
3969                         ~z27.background = Color.white; ~z3.background = Color.white;
3970                         ~z28.background = Color.white; ~z4.background = Color.white;
3971                         ~z29.background = Color.white; ~z5.background = Color.white;
3972                         ~z30.background = Color.white; ~z6.background = Color.white;
3973                         ~z31.background = Color.white; ~z7.background = Color.white;
3974                         ~z32.background = Color.green; ~z8.background = Color.green;
3975                         ~z33.background = Color.white; ~z9.background = Color.white;
3976                         ~z34.background = Color.white; ~z10.background = Color.white;
3977                         ~z35.background = Color.white; ~z11.background = Color.white;
3978                         ~z36.background = Color.white; ~z12.background = Color.white;
3979                 }
3980                 {button.value == 8}{
3981                         ~z25.background = Color.white; ~z1.background = Color.white;
3982                         ~z26.background = Color.white; ~z2.background = Color.white;
3983                         ~z27.background = Color.white; ~z3.background = Color.white;
3984                         ~z28.background = Color.white; ~z4.background = Color.white;
3985                         ~z29.background = Color.white; ~z5.background = Color.white;
3986                         ~z30.background = Color.white; ~z6.background = Color.white;
3987                         ~z31.background = Color.white; ~z7.background = Color.white;
3988                         ~z32.background = Color.white; ~z8.background = Color.white;
3989                         ~z33.background = Color.green; ~z9.background = Color.green;
3990                         ~z34.background = Color.white; ~z10.background = Color.white;
3991                         ~z35.background = Color.white; ~z11.background = Color.white;
3992                         ~z36.background = Color.white; ~z12.background = Color.white;
3993                 }
3994                 {button.value == 9}{
3995                         ~z25.background = Color.white; ~z1.background = Color.white;
3996                         ~z26.background = Color.white; ~z2.background = Color.white;
3997                         ~z27.background = Color.white; ~z3.background = Color.white;
3998                         ~z28.background = Color.white; ~z4.background = Color.white;
3999                         ~z29.background = Color.white; ~z5.background = Color.white;
4000                         ~z30.background = Color.white; ~z6.background = Color.white;
4001                         ~z31.background = Color.white; ~z7.background = Color.white;
4002                         ~z32.background = Color.white; ~z8.background = Color.white;
4003                         ~z33.background = Color.white; ~z9.background = Color.white;
4004                         ~z34.background = Color.green; ~z10.background = Color.green;
4005                         ~z35.background = Color.white; ~z11.background = Color.white;
4006                         ~z36.background = Color.white; ~z12.background = Color.white;
4007                 }
4008                 {button.value == 10}{
4009                         ~z25.background = Color.white; ~z1.background = Color.white;
4010                         ~z26.background = Color.white; ~z2.background = Color.white;
4011                         ~z27.background = Color.white; ~z3.background = Color.white;
4012                         ~z28.background = Color.white; ~z4.background = Color.white;
4013                         ~z29.background = Color.white; ~z5.background = Color.white;
4014                         ~z30.background = Color.white; ~z6.background = Color.white;
4015                         ~z31.background = Color.white; ~z7.background = Color.white;
4016                         ~z32.background = Color.white; ~z8.background = Color.white;
4017                         ~z33.background = Color.white; ~z9.background = Color.white;
4018                         ~z34.background = Color.white; ~z10.background = Color.white;
4019                         ~z35.background = Color.green; ~z11.background = Color.green;
4020                         ~z36.background = Color.white; ~z12.background = Color.white;
4021                 }
4022                 {button.value == 11}{
4023                         ~z25.background = Color.white; ~z1.background = Color.white;
4024                         ~z26.background = Color.white; ~z2.background = Color.white;
4025                         ~z27.background = Color.white; ~z3.background = Color.white;
4026                         ~z28.background = Color.white; ~z4.background = Color.white;
4027                         ~z29.background = Color.white; ~z5.background = Color.white;
4028                         ~z30.background = Color.white; ~z6.background = Color.white;
4029                         ~z31.background = Color.white; ~z7.background = Color.white;
4030                         ~z32.background = Color.white; ~z8.background = Color.white;
4031                         ~z33.background = Color.white; ~z9.background = Color.white;
4032                         ~z34.background = Color.white; ~z10.background = Color.white;
4033                         ~z35.background = Color.white; ~z11.background = Color.white;
4034                         ~z36.background = Color.green; ~z12.background = Color.green;
4035                 }
4036
4037         });
4038
4039
4040         //misc. keyboard buttons
4041
4042         w.view.keyDownAction = { arg view, char, modifiers, unicode, keycode;
4043                 [char, modifiers, unicode, keycode];
4044
4045                 //copy
4046                 if(unicode == ~c_unicode, {
4047                         case
4048                         {b.value == 0}{b.valueAction = 1}
4049                         {b.value == 1}{b.valueAction = 0};
4050                 });
4051
4052                 //start/stop synth
4053                 if(unicode == ~s_unicode, {
4054                         case
4055                         {b3.value == 0}{b3.valueAction = 1}
4056                         {b3.value == 1}{b3.valueAction = 0};
4057                 });
4058
4059                 //pause/unpause synth
4060                 if(unicode == ~spacebar_unicode, {
4061                         case
4062                         {b4.value == 0}{b4.valueAction = 1}
4063                         {b4.value == 1}{b4.valueAction = 0};
4064                 });
4065
4066                 //timer function
4067                 if(unicode == ~t_unicode, {
4068                         case
4069                         {~ts.value == 0}{~ts.valueAction = 1}
4070                         {~ts.value == 1}{~ts.valueAction = 0};
4071                 });
4072
4073                 //routine function
4074                 if(unicode == ~r_unicode, {
4075                         case
4076                         {~rviewbutton.value == 0}{~rviewbutton.valueAction = 1}
4077                         {~rviewbutton.value == 1}{~rviewbutton.valueAction = 0};
4078                 });
4079
4080                 //mute/unmute all synths
4081                 if(unicode == ~m_unicode, {
4082                         case
4083                         {muteall.value == 0}{muteall.valueAction = 1}
4084                         {muteall.value == 1}{muteall.valueAction = 0};
4085                 });
4086
4087                 //minimize GUI window
4088                 if(unicode == ~escape_unicode, {w.minimize;
4089
4090                         ~fullscreen_correct = {w.fullScreen};
4091                         ~fscview = UserView(w, Rect(0,0, Window.screenBounds.width-100, Window.screenBounds.height;));
4092                         ~fullscreen_button = Button.new(w,Rect(Window.screenBounds.width/2-35,Window.screenBounds.height/2+120,150,20)).states_([["re-adjust to fullscreen",Color.white,Color.black]]).action_({arg button; w.fullScreen; ~fullscreen_button.close; ~fullscreen_button = nil;});
4093                         ~fscview.mouseEnterAction_{|v, x, y| ~fullscreen_correct.value; ~fullscreen_correct = nil; ~fscview.close; ~fscview = nil; ~fullscreen_button.close; ~fullscreen_button = nil;};
4094                 });
4095
4096                 /*if((unicode == ~escape_unicode) and: (info.isClosed == false), {info.close;});
4097                 if((unicode == ~escape_unicode) and: (b.isClosed == false), {b.close;});
4098
4099                 //minimize GUI window
4100                 if((unicode == ~escape_unicode) and: (((b.isClosed == true) and: (info.isClosed == true)) or: ((b.isClosed == true)) or: (info.isClosed == true)), {w.minimize;});
4101                 */
4102                 /*if(unicode == ~escape_unicode , {
4103                 if((b.isClosed == true) and: (info.isClosed == true), {~min.value});
4104                 if(info.isClosed == false, {info.valueAction  = 0;});
4105                 if(b.isClosed == false, {b.valueAction = 0;});
4106                 });*/
4107
4108
4109                 //keyboard number actions
4110
4111                 case
4112                 {unicode == ~one_unicode}{keycodeb.valueAction_(0)}
4113                 {unicode == ~two_unicode}{keycodeb.valueAction_(1)}
4114                 {unicode == ~three_unicode}{keycodeb.valueAction_(2)}
4115                 {unicode == ~four_unicode}{keycodeb.valueAction_(3)}
4116                 {unicode == ~five_unicode}{keycodeb.valueAction_(4)}
4117                 {unicode == ~six_unicode}{keycodeb.valueAction_(5)}
4118                 {unicode == ~seven_unicode}{keycodeb.valueAction_(6)}
4119                 {unicode == ~eight_unicode}{keycodeb.valueAction_(7)}
4120                 {unicode == ~nine_unicode}{keycodeb.valueAction_(8)}
4121                 {unicode == ~ten_unicode}{keycodeb.valueAction_(9)}
4122                 {unicode == ~eleven_unicode}{keycodeb.valueAction_(10)}
4123                 {unicode == ~twelve_unicode}{keycodeb.valueAction_(11)}
4124
4125
4126                 //keyboard up/down arrow actions
4127
4128                 {(keycode == ~uparrow_keycode) or: (unicode == ~i_unicode)}{keycodeb.valueAction_(keycodeb.value-1)}
4129                 {(keycode == ~downarrow_keycode) or: (unicode == ~k_unicode)}{keycodeb.valueAction_(keycodeb.value+1)};
4130
4131
4132                 //set synth frequency using left/right arrow keys or j/l keys
4133
4134                 if((~f1 >= ~freqmap.at(127)), {~freqmap.at(127)},
4135                         {if((keycodeb.value == 0) and: (((keycode == ~rightarrow_keycode) or: (keycode == ~rightarrow_keycode1)) or: (unicode == ~l_unicode)), {
4136                                 ~freqmapval1 = ~f1.cpsmidi.round;
4137                                 case
4138                                 {~l1a.isRunning == true}{
4139                                         ~l1a.set(\dur, ~f1 = ~freqmap.at(~freqmapval1 = ~freqmapval1.value+1));
4140                                         ~l1b.set(\dur, ~f1);
4141                                         ~l1c.set(\dur, ~f1/~icd3);
4142                                         ~l1d.set(\dur, ~f1/~icd3);
4143                                         ~l1e.set(\dur, ~f1/~icd6);
4144                                         ~l1f.set(\dur, ~f1/~icd6);
4145                                 }
4146                                 {~l1a1.isRunning == true}{
4147                                         ~l1a1.set(\dur, ~f1 = ~freqmap.at(~freqmapval1 = ~freqmapval1.value+1));
4148                                         ~l1b1.set(\dur, ~f1);
4149                                         ~l1c1.set(\dur, ~f1/~icd3);
4150                                         ~l1d1.set(\dur, ~f1/~icd3);
4151                                         ~l1e1.set(\dur, ~f1/~icd6);
4152                                         ~l1f1.set(\dur, ~f1/~icd6);
4153                                 };
4154                                 if((~f1 > ~outmaxa) or: (~f1 < ~outmina), {~z25.close;~z1.close;~z25 = (View(w, Rect((~f1.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+10, ~nw, 2)).background = Color.white;);}, {~z1.close;~z25.close;~z1 = (View(w, Rect((~f1.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+10, ~nw, 2)).background = Color.white;);});
4155                                 ~z25.background = Color.green; ~z1.background = Color.green;
4156                                 ~z26.background = Color.white; ~z2.background = Color.white;
4157                                 ~z27.background = Color.white; ~z3.background = Color.white;
4158                                 ~z28.background = Color.white; ~z4.background = Color.white;
4159                                 ~z29.background = Color.white; ~z5.background = Color.white;
4160                                 ~z30.background = Color.white; ~z6.background = Color.white;
4161                                 ~z31.background = Color.white; ~z7.background = Color.white;
4162                                 ~z32.background = Color.white; ~z8.background = Color.white;
4163                                 ~z33.background = Color.white; ~z9.background = Color.white;
4164                                 ~z34.background = Color.white; ~z10.background = Color.white;
4165                                 ~z35.background = Color.white; ~z11.background = Color.white;
4166                                 ~z36.background = Color.white; ~z12.background = Color.white;
4167                 });});
4168                 if((~f1 <= ~freqmap.at(0)), {~freqmap.at(0)},
4169                         {if((keycodeb.value == 0) and: (((keycode == ~leftarrow_keycode) or: (keycode == ~leftarrow_keycode1)) or: (unicode == ~j_unicode)), {
4170                                 ~freqmapval1 = ~f1.cpsmidi.round;
4171                                 case
4172                                 {~l1a.isRunning == true}{
4173                                         ~l1a.set(\dur, ~f1 = ~freqmap.at(~freqmapval1 = ~freqmapval1.value-1));
4174                                         ~l1b.set(\dur, ~f1);
4175                                         ~l1c.set(\dur, ~f1/~icd3);
4176                                         ~l1d.set(\dur, ~f1/~icd3);
4177                                         ~l1e.set(\dur, ~f1/~icd6);
4178                                         ~l1f.set(\dur, ~f1/~icd6);
4179                                 }
4180                                 {~l1a1.isRunning == true}{
4181                                         ~l1a1.set(\dur, ~f1 = ~freqmap.at(~freqmapval1 = ~freqmapval1.value-1));
4182                                         ~l1b1.set(\dur, ~f1);
4183                                         ~l1c1.set(\dur, ~f1/~icd3);
4184                                         ~l1d1.set(\dur, ~f1/~icd3);
4185                                         ~l1e1.set(\dur, ~f1/~icd6);
4186                                         ~l1f1.set(\dur, ~f1/~icd6);
4187                                 };
4188                                 if((~f1 > ~outmaxa) or: (~f1 < ~outmina), {~z25.close;~z1.close;~z25 = (View(w, Rect((~f1.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+10, ~nw, 2)).background = Color.white;);}, {~z1.close;~z25.close;~z1 = (View(w, Rect((~f1.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+10, ~nw, 2)).background = Color.white;);});
4189
4190                                 ~z25.background = Color.green; ~z1.background = Color.green;
4191                                 ~z26.background = Color.white; ~z2.background = Color.white;
4192                                 ~z27.background = Color.white; ~z3.background = Color.white;
4193                                 ~z28.background = Color.white; ~z4.background = Color.white;
4194                                 ~z29.background = Color.white; ~z5.background = Color.white;
4195                                 ~z30.background = Color.white; ~z6.background = Color.white;
4196                                 ~z31.background = Color.white; ~z7.background = Color.white;
4197                                 ~z32.background = Color.white; ~z8.background = Color.white;
4198                                 ~z33.background = Color.white; ~z9.background = Color.white;
4199                                 ~z34.background = Color.white; ~z10.background = Color.white;
4200                                 ~z35.background = Color.white; ~z11.background = Color.white;
4201                                 ~z36.background = Color.white; ~z12.background = Color.white;
4202                 });});
4203
4204                 if((~f2 >= ~freqmap.at(127)), {~freqmap.at(127)},
4205                         {if((keycodeb.value == 1) and: (((keycode == ~rightarrow_keycode) or: (keycode == ~rightarrow_keycode1)) or: (unicode == ~l_unicode)), {
4206                                 ~freqmapval2 = ~f2.cpsmidi.round;
4207                                 case
4208                                 {~l1a.isRunning == true}{
4209                                         ~l2a.set(\dur, ~f2 = ~freqmap.at(~freqmapval2 = ~freqmapval2.value+1));
4210                                         ~l2b.set(\dur, ~f2);
4211                                         ~l2c.set(\dur, ~f2/~icd3);
4212                                         ~l2d.set(\dur, ~f2/~icd3);
4213                                         ~l2e.set(\dur, ~f2/~icd6);
4214                                         ~l2f.set(\dur, ~f2/~icd6);
4215                                 }
4216                                 {~l1a1.isRunning == true}{
4217                                         ~l2a1.set(\dur, ~f2 = ~freqmap.at(~freqmapval2 = ~freqmapval2.value+1));
4218                                         ~l2b1.set(\dur, ~f2);
4219                                         ~l2c1.set(\dur, ~f2/~icd3);
4220                                         ~l2d1.set(\dur, ~f2/~icd3);
4221                                         ~l2e1.set(\dur, ~f2/~icd6);
4222                                         ~l2f1.set(\dur, ~f2/~icd6);
4223                                 };
4224                                 if((~f2 > ~outmaxa) or: (~f2 < ~outmina), {~z26.close;~z2.close;~z26 = (View(w, Rect((~f2.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+20, ~nw, 2)).background = Color.white;);}, {~z2.close;~z26.close;~z2 = (View(w, Rect((~f2.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+20, ~nw, 2)).background = Color.white;);});
4225                                 ~z25.background = Color.white; ~z1.background = Color.white;
4226                                 ~z26.background = Color.green; ~z2.background = Color.green;
4227                                 ~z27.background = Color.white; ~z3.background = Color.white;
4228                                 ~z28.background = Color.white; ~z4.background = Color.white;
4229                                 ~z29.background = Color.white; ~z5.background = Color.white;
4230                                 ~z30.background = Color.white; ~z6.background = Color.white;
4231                                 ~z31.background = Color.white; ~z7.background = Color.white;
4232                                 ~z32.background = Color.white; ~z8.background = Color.white;
4233                                 ~z33.background = Color.white; ~z9.background = Color.white;
4234                                 ~z34.background = Color.white; ~z10.background = Color.white;
4235                                 ~z35.background = Color.white; ~z11.background = Color.white;
4236                                 ~z36.background = Color.white; ~z12.background = Color.white;
4237                 });});
4238                 if((~f2 <= ~freqmap.at(0)), {~freqmap.at(0)},
4239                         {if((keycodeb.value == 1) and: (((keycode == ~leftarrow_keycode) or: (keycode == ~leftarrow_keycode1)) or: (unicode == ~j_unicode)), {
4240                                 ~freqmapval2 = ~f2.cpsmidi.round;
4241                                 case
4242                                 {~l1a.isRunning == true}{
4243                                         ~l2a.set(\dur, ~f2 = ~freqmap.at(~freqmapval2 = ~freqmapval2.value-1));
4244                                         ~l2b.set(\dur, ~f2);
4245                                         ~l2c.set(\dur, ~f2/~icd3);
4246                                         ~l2d.set(\dur, ~f2/~icd3);
4247                                         ~l2e.set(\dur, ~f2/~icd6);
4248                                         ~l2f.set(\dur, ~f2/~icd6);
4249                                 }
4250                                 {~l1a1.isRunning == true}{
4251                                         ~l2a1.set(\dur, ~f2 = ~freqmap.at(~freqmapval2 = ~freqmapval2.value-1));
4252                                         ~l2b1.set(\dur, ~f2);
4253                                         ~l2c1.set(\dur, ~f2/~icd3);
4254                                         ~l2d1.set(\dur, ~f2/~icd3);
4255                                         ~l2e1.set(\dur, ~f2/~icd6);
4256                                         ~l2f1.set(\dur, ~f2/~icd6);
4257                                 };
4258                                 if((~f2 > ~outmaxa) or: (~f2 < ~outmina), {~z26.close;~z2.close;~z26 = (View(w, Rect((~f2.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+20, ~nw, 2)).background = Color.white;);}, {~z2.close;~z26.close;~z2 = (View(w, Rect((~f2.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+20, ~nw, 2)).background = Color.white;);});
4259
4260                                 ~z25.background = Color.white; ~z1.background = Color.white;
4261                                 ~z26.background = Color.green; ~z2.background = Color.green;
4262                                 ~z27.background = Color.white; ~z3.background = Color.white;
4263                                 ~z28.background = Color.white; ~z4.background = Color.white;
4264                                 ~z29.background = Color.white; ~z5.background = Color.white;
4265                                 ~z30.background = Color.white; ~z6.background = Color.white;
4266                                 ~z31.background = Color.white; ~z7.background = Color.white;
4267                                 ~z32.background = Color.white; ~z8.background = Color.white;
4268                                 ~z33.background = Color.white; ~z9.background = Color.white;
4269                                 ~z34.background = Color.white; ~z10.background = Color.white;
4270                                 ~z35.background = Color.white; ~z11.background = Color.white;
4271                                 ~z36.background = Color.white; ~z12.background = Color.white;
4272                 });});
4273
4274                 if((~f3 >= ~freqmap.at(127)), {~freqmap.at(127)},
4275                         {if((keycodeb.value == 2) and: (((keycode == ~rightarrow_keycode) or: (keycode == ~rightarrow_keycode1)) or: (unicode == ~l_unicode)), {
4276                                 ~freqmapval3 = ~f3.cpsmidi.round;
4277                                 case
4278                                 {~l1a.isRunning == true}{
4279                                         ~l3a.set(\dur, ~f3 = ~freqmap.at(~freqmapval3 = ~freqmapval3.value+1));
4280                                         ~l3b.set(\dur, ~f3);
4281                                         ~l3c.set(\dur, ~f3/~icd3);
4282                                         ~l3d.set(\dur, ~f3/~icd3);
4283                                         ~l3e.set(\dur, ~f3/~icd6);
4284                                         ~l3f.set(\dur, ~f3/~icd6);
4285                                 }
4286                                 {~l1a1.isRunning == true}{
4287                                         ~l3a1.set(\dur, ~f3 = ~freqmap.at(~freqmapval3 = ~freqmapval3.value+1));
4288                                         ~l3b1.set(\dur, ~f3);
4289                                         ~l3c1.set(\dur, ~f3/~icd3);
4290                                         ~l3d1.set(\dur, ~f3/~icd3);
4291                                         ~l3e1.set(\dur, ~f3/~icd6);
4292                                         ~l3f1.set(\dur, ~f3/~icd6);
4293                                 };
4294                                 if((~f3 > ~outmaxa) or: (~f3 < ~outmina), {~z27.close;~z3.close;~z27 = (View(w, Rect((~f3.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+30, ~nw, 2)).background = Color.white;);}, {~z3.close;~z27.close;~z3 = (View(w, Rect((~f3.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+30, ~nw, 2)).background = Color.white;);});
4295                                 ~z25.background = Color.white; ~z1.background = Color.white;
4296                                 ~z26.background = Color.white; ~z2.background = Color.white;
4297                                 ~z27.background = Color.green; ~z3.background = Color.green;
4298                                 ~z28.background = Color.white; ~z4.background = Color.white;
4299                                 ~z29.background = Color.white; ~z5.background = Color.white;
4300                                 ~z30.background = Color.white; ~z6.background = Color.white;
4301                                 ~z31.background = Color.white; ~z7.background = Color.white;
4302                                 ~z32.background = Color.white; ~z8.background = Color.white;
4303                                 ~z33.background = Color.white; ~z9.background = Color.white;
4304                                 ~z34.background = Color.white; ~z10.background = Color.white;
4305                                 ~z35.background = Color.white; ~z11.background = Color.white;
4306                                 ~z36.background = Color.white; ~z12.background = Color.white;
4307                 });});
4308                 if((~f3 <= ~freqmap.at(0)), {~freqmap.at(0)},
4309                         {if((keycodeb.value == 2) and: (((keycode == ~leftarrow_keycode) or: (keycode == ~leftarrow_keycode1)) or: (unicode == ~j_unicode)), {
4310                                 ~freqmapval3 = ~f3.cpsmidi.round;
4311                                 case
4312                                 {~l1a.isRunning == true}{
4313                                         ~l3a.set(\dur, ~f3 = ~freqmap.at(~freqmapval3 = ~freqmapval3.value-1));
4314                                         ~l3b.set(\dur, ~f3);
4315                                         ~l3c.set(\dur, ~f3/~icd3);
4316                                         ~l3d.set(\dur, ~f3/~icd3);
4317                                         ~l3e.set(\dur, ~f3/~icd6);
4318                                         ~l3f.set(\dur, ~f3/~icd6);
4319                                 }
4320                                 {~l1a1.isRunning == true}{
4321                                         ~l3a1.set(\dur, ~f3 = ~freqmap.at(~freqmapval3 = ~freqmapval3.value-1));
4322                                         ~l3b1.set(\dur, ~f3);
4323                                         ~l3c1.set(\dur, ~f3/~icd3);
4324                                         ~l3d1.set(\dur, ~f3/~icd3);
4325                                         ~l3e1.set(\dur, ~f3/~icd6);
4326                                         ~l3f1.set(\dur, ~f3/~icd6);
4327                                 };
4328                                 if((~f3 > ~outmaxa) or: (~f3 < ~outmina), {~z27.close;~z3.close;~z27 = (View(w, Rect((~f3.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+30, ~nw, 2)).background = Color.white;);}, {~z3.close;~z27.close;~z3 = (View(w, Rect((~f3.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+30, ~nw, 2)).background = Color.white;);});
4329
4330                                 ~z25.background = Color.white; ~z1.background = Color.white;
4331                                 ~z26.background = Color.white; ~z2.background = Color.white;
4332                                 ~z27.background = Color.green; ~z3.background = Color.green;
4333                                 ~z28.background = Color.white; ~z4.background = Color.white;
4334                                 ~z29.background = Color.white; ~z5.background = Color.white;
4335                                 ~z30.background = Color.white; ~z6.background = Color.white;
4336                                 ~z31.background = Color.white; ~z7.background = Color.white;
4337                                 ~z32.background = Color.white; ~z8.background = Color.white;
4338                                 ~z33.background = Color.white; ~z9.background = Color.white;
4339                                 ~z34.background = Color.white; ~z10.background = Color.white;
4340                                 ~z35.background = Color.white; ~z11.background = Color.white;
4341                                 ~z36.background = Color.white; ~z12.background = Color.white;
4342                 });});
4343
4344                 if((~f4 >= ~freqmap.at(127)), {~freqmap.at(127)},
4345                         {if((keycodeb.value == 3) and: (((keycode == ~rightarrow_keycode) or: (keycode == ~rightarrow_keycode1)) or: (unicode == ~l_unicode)), {
4346                                 ~freqmapval4 = ~f4.cpsmidi.round;
4347                                 case
4348                                 {~l1a.isRunning == true}{
4349                                         ~l4a.set(\dur, ~f4 = ~freqmap.at(~freqmapval4 = ~freqmapval4.value+1));
4350                                         ~l4b.set(\dur, ~f4);
4351                                         ~l4c.set(\dur, ~f4/~icd3);
4352                                         ~l4d.set(\dur, ~f4/~icd3);
4353                                         ~l4e.set(\dur, ~f4/~icd6);
4354                                         ~l4f.set(\dur, ~f4/~icd6);
4355                                 }
4356                                 {~l1a1.isRunning == true}{
4357                                         ~l4a1.set(\dur, ~f4 = ~freqmap.at(~freqmapval4 = ~freqmapval4.value+1));
4358                                         ~l4b1.set(\dur, ~f4);
4359                                         ~l4c1.set(\dur, ~f4/~icd3);
4360                                         ~l4d1.set(\dur, ~f4/~icd3);
4361                                         ~l4e1.set(\dur, ~f4/~icd6);
4362                                         ~l4f1.set(\dur, ~f4/~icd6);
4363                                 };
4364                                 if((~f4 > ~outmaxa) or: (~f4 < ~outmina), {~z28.close;~z4.close;~z28 = (View(w, Rect((~f4.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+40, ~nw, 2)).background = Color.white;);}, {~z4.close;~z28.close;~z4 = (View(w, Rect((~f4.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+40, ~nw, 2)).background = Color.white;);});
4365                                 ~z25.background = Color.white; ~z1.background = Color.white;
4366                                 ~z26.background = Color.white; ~z2.background = Color.white;
4367                                 ~z27.background = Color.white; ~z3.background = Color.white;
4368                                 ~z28.background = Color.green; ~z4.background = Color.green;
4369                                 ~z29.background = Color.white; ~z5.background = Color.white;
4370                                 ~z30.background = Color.white; ~z6.background = Color.white;
4371                                 ~z31.background = Color.white; ~z7.background = Color.white;
4372                                 ~z32.background = Color.white; ~z8.background = Color.white;
4373                                 ~z33.background = Color.white; ~z9.background = Color.white;
4374                                 ~z34.background = Color.white; ~z10.background = Color.white;
4375                                 ~z35.background = Color.white; ~z11.background = Color.white;
4376                                 ~z36.background = Color.white; ~z12.background = Color.white;
4377                 });});
4378                 if((~f4 <= ~freqmap.at(0)), {~freqmap.at(0)},
4379                         {if((keycodeb.value == 3) and: (((keycode == ~leftarrow_keycode) or: (keycode == ~leftarrow_keycode1)) or: (unicode == ~j_unicode)), {
4380                                 ~freqmapval4 = ~f4.cpsmidi.round;
4381                                 case
4382                                 {~l1a.isRunning == true}{
4383                                         ~l4a.set(\dur, ~f4 = ~freqmap.at(~freqmapval4 = ~freqmapval4.value-1));
4384                                         ~l4b.set(\dur, ~f4);
4385                                         ~l4c.set(\dur, ~f4/~icd3);
4386                                         ~l4d.set(\dur, ~f4/~icd3);
4387                                         ~l4e.set(\dur, ~f4/~icd6);
4388                                         ~l4f.set(\dur, ~f4/~icd6);
4389                                 }
4390                                 {~l1a1.isRunning == true}{
4391                                         ~l4a1.set(\dur, ~f4 = ~freqmap.at(~freqmapval4 = ~freqmapval4.value-1));
4392                                         ~l4b1.set(\dur, ~f4);
4393                                         ~l4c1.set(\dur, ~f4/~icd3);
4394                                         ~l4d1.set(\dur, ~f4/~icd3);
4395                                         ~l4e1.set(\dur, ~f4/~icd6);
4396                                         ~l4f1.set(\dur, ~f4/~icd6);
4397                                 };
4398                                 if((~f4 > ~outmaxa) or: (~f4 < ~outmina), {~z28.close;~z4.close;~z28 = (View(w, Rect((~f4.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+40, ~nw, 2)).background = Color.white;);}, {~z4.close;~z28.close;~z4 = (View(w, Rect((~f4.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+40, ~nw, 2)).background = Color.white;);});
4399
4400                                 ~z25.background = Color.white; ~z1.background = Color.white;
4401                                 ~z26.background = Color.white; ~z2.background = Color.white;
4402                                 ~z27.background = Color.white; ~z3.background = Color.white;
4403                                 ~z28.background = Color.green; ~z4.background = Color.green;
4404                                 ~z29.background = Color.white; ~z5.background = Color.white;
4405                                 ~z30.background = Color.white; ~z6.background = Color.white;
4406                                 ~z31.background = Color.white; ~z7.background = Color.white;
4407                                 ~z32.background = Color.white; ~z8.background = Color.white;
4408                                 ~z33.background = Color.white; ~z9.background = Color.white;
4409                                 ~z34.background = Color.white; ~z10.background = Color.white;
4410                                 ~z35.background = Color.white; ~z11.background = Color.white;
4411                                 ~z36.background = Color.white; ~z12.background = Color.white;
4412                 });});
4413
4414                 if((~f5 >= ~freqmap.at(127)), {~freqmap.at(127)},
4415                         {if((keycodeb.value == 4) and: (((keycode == ~rightarrow_keycode) or: (keycode == ~rightarrow_keycode1)) or: (unicode == ~l_unicode)), {
4416                                 ~freqmapval5 = ~f5.cpsmidi.round;
4417                                 case
4418                                 {~l1a.isRunning == true}{
4419                                         ~l5a.set(\dur, ~f5 = ~freqmap.at(~freqmapval5 = ~freqmapval5.value+1));
4420                                         ~l5b.set(\dur, ~f5);
4421                                         ~l5c.set(\dur, ~f5/~icd3);
4422                                         ~l5d.set(\dur, ~f5/~icd3);
4423                                         ~l5e.set(\dur, ~f5/~icd6);
4424                                         ~l5f.set(\dur, ~f5/~icd6);
4425                                 }
4426                                 {~l1a1.isRunning == true}{
4427                                         ~l5a1.set(\dur, ~f5 = ~freqmap.at(~freqmapval5 = ~freqmapval5.value+1));
4428                                         ~l5b1.set(\dur, ~f5);
4429                                         ~l5c1.set(\dur, ~f5/~icd3);
4430                                         ~l5d1.set(\dur, ~f5/~icd3);
4431                                         ~l5e1.set(\dur, ~f5/~icd6);
4432                                         ~l5f1.set(\dur, ~f5/~icd6);
4433                                 };
4434                                 if((~f5 > ~outmaxa) or: (~f5 < ~outmina), {~z29.close;~z5.close;~z29 = (View(w, Rect((~f5.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+50, ~nw, 2)).background = Color.white;);}, {~z5.close;~z29.close;~z5 = (View(w, Rect((~f5.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+50, ~nw, 2)).background = Color.white;);});
4435                                 ~z25.background = Color.white; ~z1.background = Color.white;
4436                                 ~z26.background = Color.white; ~z2.background = Color.white;
4437                                 ~z27.background = Color.white; ~z3.background = Color.white;
4438                                 ~z28.background = Color.white; ~z4.background = Color.white;
4439                                 ~z29.background = Color.green; ~z5.background = Color.green;
4440                                 ~z30.background = Color.white; ~z6.background = Color.white;
4441                                 ~z31.background = Color.white; ~z7.background = Color.white;
4442                                 ~z32.background = Color.white; ~z8.background = Color.white;
4443                                 ~z33.background = Color.white; ~z9.background = Color.white;
4444                                 ~z34.background = Color.white; ~z10.background = Color.white;
4445                                 ~z35.background = Color.white; ~z11.background = Color.white;
4446                                 ~z36.background = Color.white; ~z12.background = Color.white;
4447                 });});
4448                 if((~f5 <= ~freqmap.at(0)), {~freqmap.at(0)},
4449                         {if((keycodeb.value == 4) and: (((keycode == ~leftarrow_keycode) or: (keycode == ~leftarrow_keycode1)) or: (unicode == ~j_unicode)), {
4450                                 ~freqmapval5 = ~f5.cpsmidi.round;
4451                                 case
4452                                 {~l1a.isRunning == true}{
4453                                         ~l5a.set(\dur, ~f5 = ~freqmap.at(~freqmapval5 = ~freqmapval5.value-1));
4454                                         ~l5b.set(\dur, ~f5);
4455                                         ~l5c.set(\dur, ~f5/~icd3);
4456                                         ~l5d.set(\dur, ~f5/~icd3);
4457                                         ~l5e.set(\dur, ~f5/~icd6);
4458                                         ~l5f.set(\dur, ~f5/~icd6);
4459                                 }
4460                                 {~l1a1.isRunning == true}{
4461                                         ~l5a1.set(\dur, ~f5 = ~freqmap.at(~freqmapval5 = ~freqmapval5.value-1));
4462                                         ~l5b1.set(\dur, ~f5);
4463                                         ~l5c1.set(\dur, ~f5/~icd3);
4464                                         ~l5d1.set(\dur, ~f5/~icd3);
4465                                         ~l5e1.set(\dur, ~f5/~icd6);
4466                                         ~l5f1.set(\dur, ~f5/~icd6);
4467                                 };
4468                                 if((~f5 > ~outmaxa) or: (~f5 < ~outmina), {~z29.close;~z5.close;~z29 = (View(w, Rect((~f5.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+50, ~nw, 2)).background = Color.white;);}, {~z5.close;~z29.close;~z5 = (View(w, Rect((~f5.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+50, ~nw, 2)).background = Color.white;);});
4469
4470                                 ~z25.background = Color.white; ~z1.background = Color.white;
4471                                 ~z26.background = Color.white; ~z2.background = Color.white;
4472                                 ~z27.background = Color.white; ~z3.background = Color.white;
4473                                 ~z28.background = Color.white; ~z4.background = Color.white;
4474                                 ~z29.background = Color.green; ~z5.background = Color.green;
4475                                 ~z30.background = Color.white; ~z6.background = Color.white;
4476                                 ~z31.background = Color.white; ~z7.background = Color.white;
4477                                 ~z32.background = Color.white; ~z8.background = Color.white;
4478                                 ~z33.background = Color.white; ~z9.background = Color.white;
4479                                 ~z34.background = Color.white; ~z10.background = Color.white;
4480                                 ~z35.background = Color.white; ~z11.background = Color.white;
4481                                 ~z36.background = Color.white; ~z12.background = Color.white;
4482                 });});
4483
4484                 if((~f6 >= ~freqmap.at(127)), {~freqmap.at(127)},
4485                         {if((keycodeb.value == 5) and: (((keycode == ~rightarrow_keycode) or: (keycode == ~rightarrow_keycode1)) or: (unicode == ~l_unicode)), {
4486                                 ~freqmapval6 = ~f6.cpsmidi.round;
4487                                 case
4488                                 {~l1a.isRunning == true}{
4489                                         ~l6a.set(\dur, ~f6 = ~freqmap.at(~freqmapval6 = ~freqmapval6.value+1));
4490                                         ~l6b.set(\dur, ~f6);
4491                                         ~l6c.set(\dur, ~f6/~icd3);
4492                                         ~l6d.set(\dur, ~f6/~icd3);
4493                                         ~l6e.set(\dur, ~f6/~icd6);
4494                                         ~l6f.set(\dur, ~f6/~icd6);
4495                                 }
4496                                 {~l1a1.isRunning == true}{
4497                                         ~l6a1.set(\dur, ~f6 = ~freqmap.at(~freqmapval6 = ~freqmapval6.value+1));
4498                                         ~l6b1.set(\dur, ~f6);
4499                                         ~l6c1.set(\dur, ~f6/~icd3);
4500                                         ~l6d1.set(\dur, ~f6/~icd3);
4501                                         ~l6e1.set(\dur, ~f6/~icd6);
4502                                         ~l6f1.set(\dur, ~f6/~icd6);
4503                                 };
4504                                 if((~f6 > ~outmaxa) or: (~f6 < ~outmina), {~z30.close;~z6.close;~z30 = (View(w, Rect((~f6.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+60, ~nw, 2)).background = Color.white;);}, {~z6.close;~z30.close;~z6 = (View(w, Rect((~f6.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+60, ~nw, 2)).background = Color.white;);});
4505                                 ~z25.background = Color.white; ~z1.background = Color.white;
4506                                 ~z26.background = Color.white; ~z2.background = Color.white;
4507                                 ~z27.background = Color.white; ~z3.background = Color.white;
4508                                 ~z28.background = Color.white; ~z4.background = Color.white;
4509                                 ~z29.background = Color.white; ~z5.background = Color.white;
4510                                 ~z30.background = Color.green; ~z6.background = Color.green;
4511                                 ~z31.background = Color.white; ~z7.background = Color.white;
4512                                 ~z32.background = Color.white; ~z8.background = Color.white;
4513                                 ~z33.background = Color.white; ~z9.background = Color.white;
4514                                 ~z34.background = Color.white; ~z10.background = Color.white;
4515                                 ~z35.background = Color.white; ~z11.background = Color.white;
4516                                 ~z36.background = Color.white; ~z12.background = Color.white;
4517                 });});
4518                 if((~f6 <= ~freqmap.at(0)), {~freqmap.at(0)},
4519                         {if((keycodeb.value == 5) and: (((keycode == ~leftarrow_keycode) or: (keycode == ~leftarrow_keycode1)) or: (unicode == ~j_unicode)), {
4520                                 ~freqmapval6 = ~f6.cpsmidi.round;
4521                                 case
4522                                 {~l1a.isRunning == true}{
4523                                         ~l6a.set(\dur, ~f6 = ~freqmap.at(~freqmapval6 = ~freqmapval6.value-1));
4524                                         ~l6b.set(\dur, ~f6);
4525                                         ~l6c.set(\dur, ~f6/~icd3);
4526                                         ~l6d.set(\dur, ~f6/~icd3);
4527                                         ~l6e.set(\dur, ~f6/~icd6);
4528                                         ~l6f.set(\dur, ~f6/~icd6);
4529                                 }
4530                                 {~l1a1.isRunning == true}{
4531                                         ~l6a1.set(\dur, ~f6 = ~freqmap.at(~freqmapval6 = ~freqmapval6.value-1));
4532                                         ~l6b1.set(\dur, ~f6);
4533                                         ~l6c1.set(\dur, ~f6/~icd3);
4534                                         ~l6d1.set(\dur, ~f6/~icd3);
4535                                         ~l6e1.set(\dur, ~f6/~icd6);
4536                                         ~l6f1.set(\dur, ~f6/~icd6);
4537                                 };
4538                                 if((~f6 > ~outmaxa) or: (~f6 < ~outmina), {~z30.close;~z6.close;~z30 = (View(w, Rect((~f6.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+60, ~nw, 2)).background = Color.white;);}, {~z6.close;~z30.close;~z6 = (View(w, Rect((~f6.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+60, ~nw, 2)).background = Color.white;);});
4539
4540                                 ~z25.background = Color.white; ~z1.background = Color.white;
4541                                 ~z26.background = Color.white; ~z2.background = Color.white;
4542                                 ~z27.background = Color.white; ~z3.background = Color.white;
4543                                 ~z28.background = Color.white; ~z4.background = Color.white;
4544                                 ~z29.background = Color.white; ~z5.background = Color.white;
4545                                 ~z30.background = Color.green; ~z6.background = Color.green;
4546                                 ~z31.background = Color.white; ~z7.background = Color.white;
4547                                 ~z32.background = Color.white; ~z8.background = Color.white;
4548                                 ~z33.background = Color.white; ~z9.background = Color.white;
4549                                 ~z34.background = Color.white; ~z10.background = Color.white;
4550                                 ~z35.background = Color.white; ~z11.background = Color.white;
4551                                 ~z36.background = Color.white; ~z12.background = Color.white;
4552                 });});
4553
4554                 if((~f7 >= ~freqmap.at(127)), {~freqmap.at(127)},
4555                         {if((keycodeb.value == 6) and: (((keycode == ~rightarrow_keycode) or: (keycode == ~rightarrow_keycode1)) or: (unicode == ~l_unicode)), {
4556                                 ~freqmapval7 = ~f7.cpsmidi.round;
4557                                 case
4558                                 {~l1a.isRunning == true}{
4559                                         ~l7a.set(\dur, ~f7 = ~freqmap.at(~freqmapval7 = ~freqmapval7.value+1));
4560                                         ~l7b.set(\dur, ~f7);
4561                                         ~l7c.set(\dur, ~f7/~icd3);
4562                                         ~l7d.set(\dur, ~f7/~icd3);
4563                                         ~l7e.set(\dur, ~f7/~icd6);
4564                                         ~l7f.set(\dur, ~f7/~icd6);
4565                                 }
4566                                 {~l1a1.isRunning == true}{
4567                                         ~l7a1.set(\dur, ~f7 = ~freqmap.at(~freqmapval7 = ~freqmapval7.value+1));
4568                                         ~l7b1.set(\dur, ~f7);
4569                                         ~l7c1.set(\dur, ~f7/~icd3);
4570                                         ~l7d1.set(\dur, ~f7/~icd3);
4571                                         ~l7e1.set(\dur, ~f7/~icd6);
4572                                         ~l7f1.set(\dur, ~f7/~icd6);
4573                                 };
4574                                 if((~f7 > ~outmaxa) or: (~f7 < ~outmina), {~z31.close;~z7.close;~z31 = (View(w, Rect((~f7.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+70, ~nw, 2)).background = Color.white;);}, {~z7.close;~z31.close;~z7 = (View(w, Rect((~f7.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+70, ~nw, 2)).background = Color.white;);});
4575                                 ~z25.background = Color.white; ~z1.background = Color.white;
4576                                 ~z26.background = Color.white; ~z2.background = Color.white;
4577                                 ~z27.background = Color.white; ~z3.background = Color.white;
4578                                 ~z28.background = Color.white; ~z4.background = Color.white;
4579                                 ~z29.background = Color.white; ~z5.background = Color.white;
4580                                 ~z30.background = Color.white; ~z6.background = Color.white;
4581                                 ~z31.background = Color.green; ~z7.background = Color.green;
4582                                 ~z32.background = Color.white; ~z8.background = Color.white;
4583                                 ~z33.background = Color.white; ~z9.background = Color.white;
4584                                 ~z34.background = Color.white; ~z10.background = Color.white;
4585                                 ~z35.background = Color.white; ~z11.background = Color.white;
4586                                 ~z36.background = Color.white; ~z12.background = Color.white;
4587                 });});
4588                 if((~f7 <= ~freqmap.at(0)), {~freqmap.at(0)},
4589                         {if((keycodeb.value == 6) and: (((keycode == ~leftarrow_keycode) or: (keycode == ~leftarrow_keycode1)) or: (unicode == ~j_unicode)), {
4590                                 ~freqmapval7 = ~f7.cpsmidi.round;
4591                                 case
4592                                 {~l1a.isRunning == true}{
4593                                         ~l7a.set(\dur, ~f7 = ~freqmap.at(~freqmapval7 = ~freqmapval7.value-1));
4594                                         ~l7b.set(\dur, ~f7);
4595                                         ~l7c.set(\dur, ~f7/~icd3);
4596                                         ~l7d.set(\dur, ~f7/~icd3);
4597                                         ~l7e.set(\dur, ~f7/~icd6);
4598                                         ~l7f.set(\dur, ~f7/~icd6);
4599                                 }
4600                                 {~l1a1.isRunning == true}{
4601                                         ~l7a1.set(\dur, ~f7 = ~freqmap.at(~freqmapval7 = ~freqmapval7.value-1));
4602                                         ~l7b1.set(\dur, ~f7);
4603                                         ~l7c1.set(\dur, ~f7/~icd3);
4604                                         ~l7d1.set(\dur, ~f7/~icd3);
4605                                         ~l7e1.set(\dur, ~f7/~icd6);
4606                                         ~l7f1.set(\dur, ~f7/~icd6);
4607                                 };
4608                                 if((~f7 > ~outmaxa) or: (~f7 < ~outmina), {~z31.close;~z7.close;~z31 = (View(w, Rect((~f7.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+70, ~nw, 2)).background = Color.white;);}, {~z7.close;~z31.close;~z7 = (View(w, Rect((~f7.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+70, ~nw, 2)).background = Color.white;);});
4609
4610                                 ~z25.background = Color.white; ~z1.background = Color.white;
4611                                 ~z26.background = Color.white; ~z2.background = Color.white;
4612                                 ~z27.background = Color.white; ~z3.background = Color.white;
4613                                 ~z28.background = Color.white; ~z4.background = Color.white;
4614                                 ~z29.background = Color.white; ~z5.background = Color.white;
4615                                 ~z30.background = Color.white; ~z6.background = Color.white;
4616                                 ~z31.background = Color.green; ~z7.background = Color.green;
4617                                 ~z32.background = Color.white; ~z8.background = Color.white;
4618                                 ~z33.background = Color.white; ~z9.background = Color.white;
4619                                 ~z34.background = Color.white; ~z10.background = Color.white;
4620                                 ~z35.background = Color.white; ~z11.background = Color.white;
4621                                 ~z36.background = Color.white; ~z12.background = Color.white;
4622                 });});
4623
4624                 if((~f8 >= ~freqmap.at(127)), {~freqmap.at(127)},
4625                         {if((keycodeb.value == 7) and: (((keycode == ~rightarrow_keycode) or: (keycode == ~rightarrow_keycode1)) or: (unicode == ~l_unicode)), {
4626                                 ~freqmapval8 = ~f8.cpsmidi.round;
4627                                 case
4628                                 {~l1a.isRunning == true}{
4629                                         ~l8a.set(\dur, ~f8 = ~freqmap.at(~freqmapval8 = ~freqmapval8.value+1));
4630                                         ~l8b.set(\dur, ~f8);
4631                                         ~l8c.set(\dur, ~f8/~icd3);
4632                                         ~l8d.set(\dur, ~f8/~icd3);
4633                                         ~l8e.set(\dur, ~f8/~icd6);
4634                                         ~l8f.set(\dur, ~f8/~icd6);
4635                                 }
4636                                 {~l1a1.isRunning == true}{
4637                                         ~l8a1.set(\dur, ~f8 = ~freqmap.at(~freqmapval8 = ~freqmapval8.value+1));
4638                                         ~l8b1.set(\dur, ~f8);
4639                                         ~l8c1.set(\dur, ~f8/~icd3);
4640                                         ~l8d1.set(\dur, ~f8/~icd3);
4641                                         ~l8e1.set(\dur, ~f8/~icd6);
4642                                         ~l8f1.set(\dur, ~f8/~icd6);
4643                                 };
4644                                 if((~f8 > ~outmaxa) or: (~f8 < ~outmina), {~z32.close;~z8.close;~z32 = (View(w, Rect((~f8.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+80, ~nw, 2)).background = Color.white;);}, {~z8.close;~z32.close;~z8 = (View(w, Rect((~f8.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+80, ~nw, 2)).background = Color.white;);});
4645                                 ~z25.background = Color.white; ~z1.background = Color.white;
4646                                 ~z26.background = Color.white; ~z2.background = Color.white;
4647                                 ~z27.background = Color.white; ~z3.background = Color.white;
4648                                 ~z28.background = Color.white; ~z4.background = Color.white;
4649                                 ~z29.background = Color.white; ~z5.background = Color.white;
4650                                 ~z30.background = Color.white; ~z6.background = Color.white;
4651                                 ~z31.background = Color.white; ~z7.background = Color.white;
4652                                 ~z32.background = Color.green; ~z8.background = Color.green;
4653                                 ~z33.background = Color.white; ~z9.background = Color.white;
4654                                 ~z34.background = Color.white; ~z10.background = Color.white;
4655                                 ~z35.background = Color.white; ~z11.background = Color.white;
4656                                 ~z36.background = Color.white; ~z12.background = Color.white;
4657                 });});
4658                 if((~f8 <= ~freqmap.at(0)), {~freqmap.at(0)},
4659                         {if((keycodeb.value == 7) and: (((keycode == ~leftarrow_keycode) or: (keycode == ~leftarrow_keycode1)) or: (unicode == ~j_unicode)), {
4660                                 ~freqmapval8 = ~f8.cpsmidi.round;
4661                                 case
4662                                 {~l1a.isRunning == true}{
4663                                         ~l8a.set(\dur, ~f8 = ~freqmap.at(~freqmapval8 = ~freqmapval8.value-1));
4664                                         ~l8b.set(\dur, ~f8);
4665                                         ~l8c.set(\dur, ~f8/~icd3);
4666                                         ~l8d.set(\dur, ~f8/~icd3);
4667                                         ~l8e.set(\dur, ~f8/~icd6);
4668                                         ~l8f.set(\dur, ~f8/~icd6);
4669                                 }
4670                                 {~l1a1.isRunning == true}{
4671                                         ~l8a1.set(\dur, ~f8 = ~freqmap.at(~freqmapval8 = ~freqmapval8.value-1));
4672                                         ~l8b1.set(\dur, ~f8);
4673                                         ~l8c1.set(\dur, ~f8/~icd3);
4674                                         ~l8d1.set(\dur, ~f8/~icd3);
4675                                         ~l8e1.set(\dur, ~f8/~icd6);
4676                                         ~l8f1.set(\dur, ~f8/~icd6);
4677                                 };
4678                                 if((~f8 > ~outmaxa) or: (~f8 < ~outmina), {~z32.close;~z8.close;~z32 = (View(w, Rect((~f8.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+80, ~nw, 2)).background = Color.white;);}, {~z8.close;~z32.close;~z8 = (View(w, Rect((~f8.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+80, ~nw, 2)).background = Color.white;);});
4679
4680                                 ~z25.background = Color.white; ~z1.background = Color.white;
4681                                 ~z26.background = Color.white; ~z2.background = Color.white;
4682                                 ~z27.background = Color.white; ~z3.background = Color.white;
4683                                 ~z28.background = Color.white; ~z4.background = Color.white;
4684                                 ~z29.background = Color.white; ~z5.background = Color.white;
4685                                 ~z30.background = Color.white; ~z6.background = Color.white;
4686                                 ~z31.background = Color.white; ~z7.background = Color.white;
4687                                 ~z32.background = Color.green; ~z8.background = Color.green;
4688                                 ~z33.background = Color.white; ~z9.background = Color.white;
4689                                 ~z34.background = Color.white; ~z10.background = Color.white;
4690                                 ~z35.background = Color.white; ~z11.background = Color.white;
4691                                 ~z36.background = Color.white; ~z12.background = Color.white;
4692                 });});
4693
4694                 if((~f9 >= ~freqmap.at(127)), {~freqmap.at(127)},
4695                         {if((keycodeb.value == 8) and: (((keycode == ~rightarrow_keycode) or: (keycode == ~rightarrow_keycode1)) or: (unicode == ~l_unicode)), {
4696                                 ~freqmapval9 = ~f9.cpsmidi.round;
4697                                 case
4698                                 {~l1a.isRunning == true}{
4699                                         ~l9a.set(\dur, ~f9 = ~freqmap.at(~freqmapval9 = ~freqmapval9.value+1));
4700                                         ~l9b.set(\dur, ~f9);
4701                                         ~l9c.set(\dur, ~f9/~icd3);
4702                                         ~l9d.set(\dur, ~f9/~icd3);
4703                                         ~l9e.set(\dur, ~f9/~icd6);
4704                                         ~l9f.set(\dur, ~f9/~icd6);
4705                                 }
4706                                 {~l1a1.isRunning == true}{
4707                                         ~l9a1.set(\dur, ~f9 = ~freqmap.at(~freqmapval9 = ~freqmapval9.value+1));
4708                                         ~l9b1.set(\dur, ~f9);
4709                                         ~l9c1.set(\dur, ~f9/~icd3);
4710                                         ~l9d1.set(\dur, ~f9/~icd3);
4711                                         ~l9e1.set(\dur, ~f9/~icd6);
4712                                         ~l9f1.set(\dur, ~f9/~icd6);
4713                                 };
4714                                 if((~f9 > ~outmaxa) or: (~f9 < ~outmina), {~z33.close;~z9.close;~z33 = (View(w, Rect((~f9.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+90, ~nw, 2)).background = Color.white;);}, {~z9.close;~z33.close;~z9 = (View(w, Rect((~f9.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+90, ~nw, 2)).background = Color.white;);});
4715                                 ~z25.background = Color.white; ~z1.background = Color.white;
4716                                 ~z26.background = Color.white; ~z2.background = Color.white;
4717                                 ~z27.background = Color.white; ~z3.background = Color.white;
4718                                 ~z28.background = Color.white; ~z4.background = Color.white;
4719                                 ~z29.background = Color.white; ~z5.background = Color.white;
4720                                 ~z30.background = Color.white; ~z6.background = Color.white;
4721                                 ~z31.background = Color.white; ~z7.background = Color.white;
4722                                 ~z32.background = Color.white; ~z8.background = Color.white;
4723                                 ~z33.background = Color.green; ~z9.background = Color.green;
4724                                 ~z34.background = Color.white; ~z10.background = Color.white;
4725                                 ~z35.background = Color.white; ~z11.background = Color.white;
4726                                 ~z36.background = Color.white; ~z12.background = Color.white;
4727                 });});
4728                 if((~f9 <= ~freqmap.at(0)), {~freqmap.at(0)},
4729                         {if((keycodeb.value == 8) and: (((keycode == ~leftarrow_keycode) or: (keycode == ~leftarrow_keycode1)) or: (unicode == ~j_unicode)), {
4730                                 ~freqmapval9 = ~f9.cpsmidi.round;
4731                                 case
4732                                 {~l1a.isRunning == true}{
4733                                         ~l9a.set(\dur, ~f9 = ~freqmap.at(~freqmapval9 = ~freqmapval9.value-1));
4734                                         ~l9b.set(\dur, ~f9);
4735                                         ~l9c.set(\dur, ~f9/~icd3);
4736                                         ~l9d.set(\dur, ~f9/~icd3);
4737                                         ~l9e.set(\dur, ~f9/~icd6);
4738                                         ~l9f.set(\dur, ~f9/~icd6);
4739                                 }
4740                                 {~l1a1.isRunning == true}{
4741                                         ~l9a1.set(\dur, ~f9 = ~freqmap.at(~freqmapval9 = ~freqmapval9.value-1));
4742                                         ~l9b1.set(\dur, ~f9);
4743                                         ~l9c1.set(\dur, ~f9/~icd3);
4744                                         ~l9d1.set(\dur, ~f9/~icd3);
4745                                         ~l9e1.set(\dur, ~f9/~icd6);
4746                                         ~l9f1.set(\dur, ~f9/~icd6);
4747                                 };
4748                                 if((~f9 > ~outmaxa) or: (~f9 < ~outmina), {~z33.close;~z9.close;~z33 = (View(w, Rect((~f9.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+90, ~nw, 2)).background = Color.white;);}, {~z9.close;~z33.close;~z9 = (View(w, Rect((~f9.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+90, ~nw, 2)).background = Color.white;);});
4749
4750                                 ~z25.background = Color.white; ~z1.background = Color.white;
4751                                 ~z26.background = Color.white; ~z2.background = Color.white;
4752                                 ~z27.background = Color.white; ~z3.background = Color.white;
4753                                 ~z28.background = Color.white; ~z4.background = Color.white;
4754                                 ~z29.background = Color.white; ~z5.background = Color.white;
4755                                 ~z30.background = Color.white; ~z6.background = Color.white;
4756                                 ~z31.background = Color.white; ~z7.background = Color.white;
4757                                 ~z32.background = Color.white; ~z8.background = Color.white;
4758                                 ~z33.background = Color.green; ~z9.background = Color.green;
4759                                 ~z34.background = Color.white; ~z10.background = Color.white;
4760                                 ~z35.background = Color.white; ~z11.background = Color.white;
4761                                 ~z36.background = Color.white; ~z12.background = Color.white;
4762                 });});
4763
4764                 if((~f10 >= ~freqmap.at(127)), {~freqmap.at(127)},
4765                         {if((keycodeb.value == 9) and: (((keycode == ~rightarrow_keycode) or: (keycode == ~rightarrow_keycode1)) or: (unicode == ~l_unicode)), {
4766                                 ~freqmapval10 = ~f10.cpsmidi.round;
4767                                 case
4768                                 {~l1a.isRunning == true}{
4769                                         ~l10a.set(\dur, ~f10 = ~freqmap.at(~freqmapval10 = ~freqmapval10.value+1));
4770                                         ~l10b.set(\dur, ~f10);
4771                                         ~l10c.set(\dur, ~f10/~icd3);
4772                                         ~l10d.set(\dur, ~f10/~icd3);
4773                                         ~l10e.set(\dur, ~f10/~icd6);
4774                                         ~l10f.set(\dur, ~f10/~icd6);
4775                                 }
4776                                 {~l1a1.isRunning == true}{
4777                                         ~l10a1.set(\dur, ~f10 = ~freqmap.at(~freqmapval10 = ~freqmapval10.value+1));
4778                                         ~l10b1.set(\dur, ~f10);
4779                                         ~l10c1.set(\dur, ~f10/~icd3);
4780                                         ~l10d1.set(\dur, ~f10/~icd3);
4781                                         ~l10e1.set(\dur, ~f10/~icd6);
4782                                         ~l10f1.set(\dur, ~f10/~icd6);
4783                                 };
4784                                 if((~f10 > ~outmaxa) or: (~f10 < ~outmina), {~z34.close;~z10.close;~z34 = (View(w, Rect((~f10.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+100, ~nw, 2)).background = Color.white;);}, {~z10.close;~z34.close;~z10 = (View(w, Rect((~f10.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+100, ~nw, 2)).background = Color.white;);});
4785                                 ~z25.background = Color.white; ~z1.background = Color.white;
4786                                 ~z26.background = Color.white; ~z2.background = Color.white;
4787                                 ~z27.background = Color.white; ~z3.background = Color.white;
4788                                 ~z28.background = Color.white; ~z4.background = Color.white;
4789                                 ~z29.background = Color.white; ~z5.background = Color.white;
4790                                 ~z30.background = Color.white; ~z6.background = Color.white;
4791                                 ~z31.background = Color.white; ~z7.background = Color.white;
4792                                 ~z32.background = Color.white; ~z8.background = Color.white;
4793                                 ~z33.background = Color.white; ~z9.background = Color.white;
4794                                 ~z34.background = Color.green; ~z10.background = Color.green;
4795                                 ~z35.background = Color.white; ~z11.background = Color.white;
4796                                 ~z36.background = Color.white; ~z12.background = Color.white;
4797                 });});
4798                 if((~f10 <= ~freqmap.at(0)), {~freqmap.at(0)},
4799                         {if((keycodeb.value == 9) and: (((keycode == ~leftarrow_keycode) or: (keycode == ~leftarrow_keycode1)) or: (unicode == ~j_unicode)), {
4800                                 ~freqmapval10 = ~f10.cpsmidi.round;
4801                                 case
4802                                 {~l1a.isRunning == true}{
4803                                         ~l10a.set(\dur, ~f10 = ~freqmap.at(~freqmapval10 = ~freqmapval10.value-1));
4804                                         ~l10b.set(\dur, ~f10);
4805                                         ~l10c.set(\dur, ~f10/~icd3);
4806                                         ~l10d.set(\dur, ~f10/~icd3);
4807                                         ~l10e.set(\dur, ~f10/~icd6);
4808                                         ~l10f.set(\dur, ~f10/~icd6);
4809                                 }
4810                                 {~l1a1.isRunning == true}{
4811                                         ~l10a1.set(\dur, ~f10 = ~freqmap.at(~freqmapval10 = ~freqmapval10.value-1));
4812                                         ~l10b1.set(\dur, ~f10);
4813                                         ~l10c1.set(\dur, ~f10/~icd3);
4814                                         ~l10d1.set(\dur, ~f10/~icd3);
4815                                         ~l10e1.set(\dur, ~f10/~icd6);
4816                                         ~l10f1.set(\dur, ~f10/~icd6);
4817                                 };
4818                                 if((~f10 > ~outmaxa) or: (~f10 < ~outmina), {~z34.close;~z10.close;~z34 = (View(w, Rect((~f10.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+100, ~nw, 2)).background = Color.white;);}, {~z10.close;~z34.close;~z10 = (View(w, Rect((~f10.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+100, ~nw, 2)).background = Color.white;);});
4819
4820                                 ~z25.background = Color.white; ~z1.background = Color.white;
4821                                 ~z26.background = Color.white; ~z2.background = Color.white;
4822                                 ~z27.background = Color.white; ~z3.background = Color.white;
4823                                 ~z28.background = Color.white; ~z4.background = Color.white;
4824                                 ~z29.background = Color.white; ~z5.background = Color.white;
4825                                 ~z30.background = Color.white; ~z6.background = Color.white;
4826                                 ~z31.background = Color.white; ~z7.background = Color.white;
4827                                 ~z32.background = Color.white; ~z8.background = Color.white;
4828                                 ~z33.background = Color.white; ~z9.background = Color.white;
4829                                 ~z34.background = Color.green; ~z10.background = Color.green;
4830                                 ~z35.background = Color.white; ~z11.background = Color.white;
4831                                 ~z36.background = Color.white; ~z12.background = Color.white;
4832                 });});
4833
4834                 if((~f11 >= ~freqmap.at(127)), {~freqmap.at(127)},
4835                         {if((keycodeb.value == 10) and: (((keycode == ~rightarrow_keycode) or: (keycode == ~rightarrow_keycode1)) or: (unicode == ~l_unicode)), {
4836                                 ~freqmapval11 = ~f11.cpsmidi.round;
4837                                 case
4838                                 {~l1a.isRunning == true}{
4839                                         ~l11a.set(\dur, ~f11 = ~freqmap.at(~freqmapval11 = ~freqmapval11.value+1));
4840                                         ~l11b.set(\dur, ~f11);
4841                                         ~l11c.set(\dur, ~f11/~icd3);
4842                                         ~l11d.set(\dur, ~f11/~icd3);
4843                                         ~l11e.set(\dur, ~f11/~icd6);
4844                                         ~l11f.set(\dur, ~f11/~icd6);
4845                                 }
4846                                 {~l1a1.isRunning == true}{
4847                                         ~l11a1.set(\dur, ~f11 = ~freqmap.at(~freqmapval11 = ~freqmapval11.value+1));
4848                                         ~l11b1.set(\dur, ~f11);
4849                                         ~l11c1.set(\dur, ~f11/~icd3);
4850                                         ~l11d1.set(\dur, ~f11/~icd3);
4851                                         ~l11e1.set(\dur, ~f11/~icd6);
4852                                         ~l11f1.set(\dur, ~f11/~icd6);
4853                                 };
4854                                 if((~f11 > ~outmaxa) or: (~f11 < ~outmina), {~z35.close;~z11.close;~z35 = (View(w, Rect((~f11.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+110, ~nw, 2)).background = Color.white;);}, {~z11.close;~z35.close;~z11 = (View(w, Rect((~f11.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+110, ~nw, 2)).background = Color.white;);});
4855                                 ~z25.background = Color.white; ~z1.background = Color.white;
4856                                 ~z26.background = Color.white; ~z2.background = Color.white;
4857                                 ~z27.background = Color.white; ~z3.background = Color.white;
4858                                 ~z28.background = Color.white; ~z4.background = Color.white;
4859                                 ~z29.background = Color.white; ~z5.background = Color.white;
4860                                 ~z30.background = Color.white; ~z6.background = Color.white;
4861                                 ~z31.background = Color.white; ~z7.background = Color.white;
4862                                 ~z32.background = Color.white; ~z8.background = Color.white;
4863                                 ~z33.background = Color.white; ~z9.background = Color.white;
4864                                 ~z34.background = Color.white; ~z10.background = Color.white;
4865                                 ~z35.background = Color.green; ~z11.background = Color.green;
4866                                 ~z36.background = Color.white; ~z12.background = Color.white;
4867                 });});
4868                 if((~f11 <= ~freqmap.at(0)), {~freqmap.at(0)},
4869                         {if((keycodeb.value == 10) and: (((keycode == ~leftarrow_keycode) or: (keycode == ~leftarrow_keycode1)) or: (unicode == ~j_unicode)), {
4870                                 ~freqmapval11 = ~f11.cpsmidi.round;
4871                                 case
4872                                 {~l1a.isRunning == true}{
4873                                         ~l11a.set(\dur, ~f11 = ~freqmap.at(~freqmapval11 = ~freqmapval11.value-1));
4874                                         ~l11b.set(\dur, ~f11);
4875                                         ~l11c.set(\dur, ~f11/~icd3);
4876                                         ~l11d.set(\dur, ~f11/~icd3);
4877                                         ~l11e.set(\dur, ~f11/~icd6);
4878                                         ~l11f.set(\dur, ~f11/~icd6);
4879                                 }
4880                                 {~l1a1.isRunning == true}{
4881                                         ~l11a1.set(\dur, ~f11 = ~freqmap.at(~freqmapval11 = ~freqmapval11.value-1));
4882                                         ~l11b1.set(\dur, ~f11);
4883                                         ~l11c1.set(\dur, ~f11/~icd3);
4884                                         ~l11d1.set(\dur, ~f11/~icd3);
4885                                         ~l11e1.set(\dur, ~f11/~icd6);
4886                                         ~l11f1.set(\dur, ~f11/~icd6);
4887                                 };
4888                                 if((~f11 > ~outmaxa) or: (~f11 < ~outmina), {~z35.close;~z11.close;~z35 = (View(w, Rect((~f11.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+110, ~nw, 2)).background = Color.white;);}, {~z11.close;~z35.close;~z11 = (View(w, Rect((~f11.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+110, ~nw, 2)).background = Color.white;);});
4889
4890                                 ~z25.background = Color.white; ~z1.background = Color.white;
4891                                 ~z26.background = Color.white; ~z2.background = Color.white;
4892                                 ~z27.background = Color.white; ~z3.background = Color.white;
4893                                 ~z28.background = Color.white; ~z4.background = Color.white;
4894                                 ~z29.background = Color.white; ~z5.background = Color.white;
4895                                 ~z30.background = Color.white; ~z6.background = Color.white;
4896                                 ~z31.background = Color.white; ~z7.background = Color.white;
4897                                 ~z32.background = Color.white; ~z8.background = Color.white;
4898                                 ~z33.background = Color.white; ~z9.background = Color.white;
4899                                 ~z34.background = Color.white; ~z10.background = Color.white;
4900                                 ~z35.background = Color.green; ~z11.background = Color.green;
4901                                 ~z36.background = Color.white; ~z12.background = Color.white;
4902                 });});
4903
4904                 if((~f12 >= ~freqmap.at(127)), {~freqmap.at(127)},
4905                         {if((keycodeb.value == 11) and: (((keycode == ~rightarrow_keycode) or: (keycode == ~rightarrow_keycode1)) or: (unicode == ~l_unicode)), {
4906                                 ~freqmapval12 = ~f12.cpsmidi.round;
4907                                 case
4908                                 {~l1a.isRunning == true}{
4909                                         ~l12a.set(\dur, ~f12 = ~freqmap.at(~freqmapval12 = ~freqmapval12.value+1));
4910                                         ~l12b.set(\dur, ~f12);
4911                                         ~l12c.set(\dur, ~f12/~icd3);
4912                                         ~l12d.set(\dur, ~f12/~icd3);
4913                                         ~l12e.set(\dur, ~f12/~icd6);
4914                                         ~l12f.set(\dur, ~f12/~icd6);
4915                                 }
4916                                 {~l1a1.isRunning == true}{
4917                                         ~l12a1.set(\dur, ~f12 = ~freqmap.at(~freqmapval12 = ~freqmapval12.value+1));
4918                                         ~l12b1.set(\dur, ~f12);
4919                                         ~l12c1.set(\dur, ~f12/~icd3);
4920                                         ~l12d1.set(\dur, ~f12/~icd3);
4921                                         ~l12e1.set(\dur, ~f12/~icd6);
4922                                         ~l12f1.set(\dur, ~f12/~icd6);
4923                                 };
4924                                 if((~f12 > ~outmaxa) or: (~f12 < ~outmina), {~z36.close;~z12.close;~z36 = (View(w, Rect((~f12.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+120, ~nw, 2)).background = Color.white;);}, {~z12.close;~z36.close;~z12 = (View(w, Rect((~f12.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+120, ~nw, 2)).background = Color.white;);});
4925                                 ~z25.background = Color.white; ~z1.background = Color.white;
4926                                 ~z26.background = Color.white; ~z2.background = Color.white;
4927                                 ~z27.background = Color.white; ~z3.background = Color.white;
4928                                 ~z28.background = Color.white; ~z4.background = Color.white;
4929                                 ~z29.background = Color.white; ~z5.background = Color.white;
4930                                 ~z30.background = Color.white; ~z6.background = Color.white;
4931                                 ~z31.background = Color.white; ~z7.background = Color.white;
4932                                 ~z32.background = Color.white; ~z8.background = Color.white;
4933                                 ~z33.background = Color.white; ~z9.background = Color.white;
4934                                 ~z34.background = Color.white; ~z10.background = Color.white;
4935                                 ~z35.background = Color.white; ~z11.background = Color.white;
4936                                 ~z36.background = Color.green; ~z12.background = Color.green;
4937                 });});
4938                 if((~f12 <= ~freqmap.at(0)), {~freqmap.at(0)},
4939                         {if((keycodeb.value == 11) and: (((keycode == ~leftarrow_keycode) or: (keycode == ~leftarrow_keycode1)) or: (unicode == ~j_unicode)), {
4940                                 ~freqmapval12 = ~f12.cpsmidi.round;
4941                                 case
4942                                 {~l1a.isRunning == true}{
4943                                         ~l12a.set(\dur, ~f12 = ~freqmap.at(~freqmapval12 = ~freqmapval12.value-1));
4944                                         ~l12b.set(\dur, ~f12);
4945                                         ~l12c.set(\dur, ~f12/~icd3);
4946                                         ~l12d.set(\dur, ~f12/~icd3);
4947                                         ~l12e.set(\dur, ~f12/~icd6);
4948                                         ~l12f.set(\dur, ~f12/~icd6);
4949                                 }
4950                                 {~l1a1.isRunning == true}{
4951                                         ~l12a1.set(\dur, ~f12 = ~freqmap.at(~freqmapval12 = ~freqmapval12.value-1));
4952                                         ~l12b1.set(\dur, ~f12);
4953                                         ~l12c1.set(\dur, ~f12/~icd3);
4954                                         ~l12d1.set(\dur, ~f12/~icd3);
4955                                         ~l12e1.set(\dur, ~f12/~icd6);
4956                                         ~l12f1.set(\dur, ~f12/~icd6);
4957                                 };
4958                                 if((~f12 > ~outmaxa) or: (~f12 < ~outmina), {~z36.close;~z12.close;~z36 = (View(w, Rect((~f12.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+120, ~nw, 2)).background = Color.white;);}, {~z12.close;~z36.close;~z12 = (View(w, Rect((~f12.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+120, ~nw, 2)).background = Color.white;);});
4959
4960                                 ~z25.background = Color.white; ~z1.background = Color.white;
4961                                 ~z26.background = Color.white; ~z2.background = Color.white;
4962                                 ~z27.background = Color.white; ~z3.background = Color.white;
4963                                 ~z28.background = Color.white; ~z4.background = Color.white;
4964                                 ~z29.background = Color.white; ~z5.background = Color.white;
4965                                 ~z30.background = Color.white; ~z6.background = Color.white;
4966                                 ~z31.background = Color.white; ~z7.background = Color.white;
4967                                 ~z32.background = Color.white; ~z8.background = Color.white;
4968                                 ~z33.background = Color.white; ~z9.background = Color.white;
4969                                 ~z34.background = Color.white; ~z10.background = Color.white;
4970                                 ~z35.background = Color.white; ~z11.background = Color.white;
4971                                 ~z36.background = Color.green; ~z12.background = Color.green;
4972                 });});
4973
4974
4975
4976         };
4977
4978
4979         //if routine function values are nil
4980
4981         if(~rslot1a == nil, {~rslot1a = ~bplaceo1;}); if(~rslot1b == nil, {~rslot1b = ~bplacef1;});
4982         if(~rslot2 == nil, {~rslot2 = ~bplacef2;});
4983         if(~rslot3 == nil, {~rslot3 = ~bplacef3;});
4984         if(~rslot4 == nil, {~rslot4 = ~bplacef4;});
4985         if(~rslot5 == nil, {~rslot5 = ~bplacef5;});
4986         if(~rslot6 == nil, {~rslot6 = ~bplacef6;});
4987         if(~rslot7 == nil, {~rslot7 = ~bplacef7;});
4988         if(~rslot8 == nil, {~rslot8 = ~bplacef8;});
4989         if(~rtimeall == nil, {~rtimeall = 4;});
4990         if(~rtime1 == nil, {~rtime1 = 4;});
4991         if(~rtime2 == nil, {~rtime2 = 4;});
4992         if(~rtime3 == nil, {~rtime3 = 4;});
4993         if(~rtime4 == nil, {~rtime4 = 4;});
4994         if(~rtime5 == nil, {~rtime5 = 4;});
4995         if(~rtime6 == nil, {~rtime6 = 4;});
4996         if(~rtime7 == nil, {~rtime7 = 4;});
4997         if(~rtime8 == nil, {~rtime8 = 4;});
4998         if(~rdoall == nil, {~rdoall = 1;});
4999         if(~rdo1a == nil, {~rdo1a = "o1";}); if(~rdo1b == nil, {~rdo1b = "f1";});
5000         if(~rdo2 == nil, {~rdo2 = "f2";});
5001         if(~rdo3 == nil, {~rdo3 = "f3";});
5002         if(~rdo4 == nil, {~rdo4 = "f4";});
5003         if(~rdo5 == nil, {~rdo5 = "f5";});
5004         if(~rdo6 == nil, {~rdo6 = "f6";});
5005         if(~rdo7 == nil, {~rdo7 = "f7";});
5006         if(~rdo8 == nil, {~rdo8 = "f8";});
5007
5008
5009         //misc. routine button functions (see below)
5010
5011         ~si1aset = {
5012                 if(~si1a.value == "o1", {~rslot1a = ~bplaceo1; ~rdo1a = ~si1a.value;});
5013                 if(~si1a.value == "f1", {~rslot1a = ~bplacef1; ~rdo1a = ~si1a.value;});
5014                 if(~si1a.value == "s1", {~rslot1a = ~bplaces1; ~rdo1a = ~si1a.value;});
5015                 if(~si1a.value == "o2", {~rslot1a = ~bplaceo2; ~rdo1a = ~si1a.value;});
5016                 if(~si1a.value == "f2", {~rslot1a = ~bplacef2; ~rdo1a = ~si1a.value;});
5017                 if(~si1a.value == "s2", {~rslot1a = ~bplaces2; ~rdo1a = ~si1a.value;});
5018                 if(~si1a.value == "o3", {~rslot1a = ~bplaceo3; ~rdo1a = ~si1a.value;});
5019                 if(~si1a.value == "f3", {~rslot1a = ~bplacef3; ~rdo1a = ~si1a.value;});
5020                 if(~si1a.value == "s3", {~rslot1a = ~bplaces3; ~rdo1a = ~si1a.value;});
5021                 if(~si1a.value == "o4", {~rslot1a = ~bplaceo4; ~rdo1a = ~si1a.value;});
5022                 if(~si1a.value == "f4", {~rslot1a = ~bplacef4; ~rdo1a = ~si1a.value;});
5023                 if(~si1a.value == "s4", {~rslot1a = ~bplaces4; ~rdo1a = ~si1a.value;});
5024                 if(~si1a.value == "o5", {~rslot1a = ~bplaceo5; ~rdo1a = ~si1a.value;});
5025                 if(~si1a.value == "f5", {~rslot1a = ~bplacef5; ~rdo1a = ~si1a.value;});
5026                 if(~si1a.value == "s5", {~rslot1a = ~bplaces5; ~rdo1a = ~si1a.value;});
5027                 if(~si1a.value == "o6", {~rslot1a = ~bplaceo6; ~rdo1a = ~si1a.value;});
5028                 if(~si1a.value == "f6", {~rslot1a = ~bplacef6; ~rdo1a = ~si1a.value;});
5029                 if(~si1a.value == "s6", {~rslot1a = ~bplaces6; ~rdo1a = ~si1a.value;});
5030                 if(~si1a.value == "o7", {~rslot1a = ~bplaceo7; ~rdo1a = ~si1a.value;});
5031                 if(~si1a.value == "f7", {~rslot1a = ~bplacef7; ~rdo1a = ~si1a.value;});
5032                 if(~si1a.value == "s7", {~rslot1a = ~bplaces7; ~rdo1a = ~si1a.value;});
5033                 if(~si1a.value == "o8", {~rslot1a = ~bplaceo8; ~rdo1a = ~si1a.value;});
5034                 if(~si1a.value == "f8", {~rslot1a = ~bplacef8; ~rdo1a = ~si1a.value;});
5035                 if(~si1a.value == "s8", {~rslot1a = ~bplaces8; ~rdo1a = ~si1a.value;});
5036         };
5037         ~si1bset = {
5038                 if(~si1b.value == "o1", {~rslot1b = ~bplaceo1; ~rdo1b = ~si1b.value;});
5039                 if(~si1b.value == "f1", {~rslot1b = ~bplacef1; ~rdo1b = ~si1b.value;});
5040                 if(~si1b.value == "s1", {~rslot1b = ~bplaces1; ~rdo1b = ~si1b.value;});
5041                 if(~si1b.value == "o2", {~rslot1b = ~bplaceo2; ~rdo1b = ~si1b.value;});
5042                 if(~si1b.value == "f2", {~rslot1b = ~bplacef2; ~rdo1b = ~si1b.value;});
5043                 if(~si1b.value == "s2", {~rslot1b = ~bplaces2; ~rdo1b = ~si1b.value;});
5044                 if(~si1b.value == "o3", {~rslot1b = ~bplaceo3; ~rdo1b = ~si1b.value;});
5045                 if(~si1b.value == "f3", {~rslot1b = ~bplacef3; ~rdo1b = ~si1b.value;});
5046                 if(~si1b.value == "s3", {~rslot1b = ~bplaces3; ~rdo1b = ~si1b.value;});
5047                 if(~si1b.value == "o4", {~rslot1b = ~bplaceo4; ~rdo1b = ~si1b.value;});
5048                 if(~si1b.value == "f4", {~rslot1b = ~bplacef4; ~rdo1b = ~si1b.value;});
5049                 if(~si1b.value == "s4", {~rslot1b = ~bplaces4; ~rdo1b = ~si1b.value;});
5050                 if(~si1b.value == "o5", {~rslot1b = ~bplaceo5; ~rdo1b = ~si1b.value;});
5051                 if(~si1b.value == "f5", {~rslot1b = ~bplacef5; ~rdo1b = ~si1b.value;});
5052                 if(~si1b.value == "s5", {~rslot1b = ~bplaces5; ~rdo1b = ~si1b.value;});
5053                 if(~si1b.value == "o6", {~rslot1b = ~bplaceo6; ~rdo1b = ~si1b.value;});
5054                 if(~si1b.value == "f6", {~rslot1b = ~bplacef6; ~rdo1b = ~si1b.value;});
5055                 if(~si1b.value == "s6", {~rslot1b = ~bplaces6; ~rdo1b = ~si1b.value;});
5056                 if(~si1b.value == "o7", {~rslot1b = ~bplaceo7; ~rdo1b = ~si1b.value;});
5057                 if(~si1b.value == "f7", {~rslot1b = ~bplacef7; ~rdo1b = ~si1b.value;});
5058                 if(~si1b.value == "s7", {~rslot1b = ~bplaces7; ~rdo1b = ~si1b.value;});
5059                 if(~si1b.value == "o8", {~rslot1b = ~bplaceo8; ~rdo1b = ~si1b.value;});
5060                 if(~si1b.value == "f8", {~rslot1b = ~bplacef8; ~rdo1b = ~si1b.value;});
5061                 if(~si1b.value == "s8", {~rslot1b = ~bplaces8; ~rdo1b = ~si1b.value;});
5062         };
5063         ~si2set = {
5064                 if(~si2.value == "o1", {~rslot2 = ~bplaceo1; ~rdo2 = ~si2.value;});
5065                 if(~si2.value == "f1", {~rslot2 = ~bplacef1; ~rdo2 = ~si2.value;});
5066                 if(~si2.value == "s1", {~rslot2 = ~bplaces1; ~rdo2 = ~si2.value;});
5067                 if(~si2.value == "o2", {~rslot2 = ~bplaceo2; ~rdo2 = ~si2.value;});
5068                 if(~si2.value == "f2", {~rslot2 = ~bplacef2; ~rdo2 = ~si2.value;});
5069                 if(~si2.value == "s2", {~rslot2 = ~bplaces2; ~rdo2 = ~si2.value;});
5070                 if(~si2.value == "o3", {~rslot2 = ~bplaceo3; ~rdo2 = ~si2.value;});
5071                 if(~si2.value == "f3", {~rslot2 = ~bplacef3; ~rdo2 = ~si2.value;});
5072                 if(~si2.value == "s3", {~rslot2 = ~bplaces3; ~rdo2 = ~si2.value;});
5073                 if(~si2.value == "o4", {~rslot2 = ~bplaceo4; ~rdo2 = ~si2.value;});
5074                 if(~si2.value == "f4", {~rslot2 = ~bplacef4; ~rdo2 = ~si2.value;});
5075                 if(~si2.value == "s4", {~rslot2 = ~bplaces4; ~rdo2 = ~si2.value;});
5076                 if(~si2.value == "o5", {~rslot2 = ~bplaceo5; ~rdo2 = ~si2.value;});
5077                 if(~si2.value == "f5", {~rslot2 = ~bplacef5; ~rdo2 = ~si2.value;});
5078                 if(~si2.value == "s5", {~rslot2 = ~bplaces5; ~rdo2 = ~si2.value;});
5079                 if(~si2.value == "o6", {~rslot2 = ~bplaceo6; ~rdo2 = ~si2.value;});
5080                 if(~si2.value == "f6", {~rslot2 = ~bplacef6; ~rdo2 = ~si2.value;});
5081                 if(~si2.value == "s6", {~rslot2 = ~bplaces6; ~rdo2 = ~si2.value;});
5082                 if(~si2.value == "o7", {~rslot2 = ~bplaceo7; ~rdo2 = ~si2.value;});
5083                 if(~si2.value == "f7", {~rslot2 = ~bplacef7; ~rdo2 = ~si2.value;});
5084                 if(~si2.value == "s7", {~rslot2 = ~bplaces7; ~rdo2 = ~si2.value;});
5085                 if(~si2.value == "o8", {~rslot2 = ~bplaceo8; ~rdo2 = ~si2.value;});
5086                 if(~si2.value == "f8", {~rslot2 = ~bplacef8; ~rdo2 = ~si2.value;});
5087                 if(~si2.value == "s8", {~rslot2 = ~bplaces8; ~rdo2 = ~si2.value;});
5088         };
5089         ~si3set = {
5090                 if(~si3.value == "o1", {~rslot3 = ~bplaceo1; ~rdo3 = ~si3.value;});
5091                 if(~si3.value == "f1", {~rslot3 = ~bplacef1; ~rdo3 = ~si3.value;});
5092                 if(~si3.value == "s1", {~rslot3 = ~bplaces1; ~rdo3 = ~si3.value;});
5093                 if(~si3.value == "o2", {~rslot3 = ~bplaceo2; ~rdo3 = ~si3.value;});
5094                 if(~si3.value == "f2", {~rslot3 = ~bplacef2; ~rdo3 = ~si3.value;});
5095                 if(~si3.value == "s2", {~rslot3 = ~bplaces2; ~rdo3 = ~si3.value;});
5096                 if(~si3.value == "o3", {~rslot3 = ~bplaceo3; ~rdo3 = ~si3.value;});
5097                 if(~si3.value == "f3", {~rslot3 = ~bplacef3; ~rdo3 = ~si3.value;});
5098                 if(~si3.value == "s3", {~rslot3 = ~bplaces3; ~rdo3 = ~si3.value;});
5099                 if(~si3.value == "o4", {~rslot3 = ~bplaceo4; ~rdo3 = ~si3.value;});
5100                 if(~si3.value == "f4", {~rslot3 = ~bplacef4; ~rdo3 = ~si3.value;});
5101                 if(~si3.value == "s4", {~rslot3 = ~bplaces4; ~rdo3 = ~si3.value;});
5102                 if(~si3.value == "o5", {~rslot3 = ~bplaceo5; ~rdo3 = ~si3.value;});
5103                 if(~si3.value == "f5", {~rslot3 = ~bplacef5; ~rdo3 = ~si3.value;});
5104                 if(~si3.value == "s5", {~rslot3 = ~bplaces5; ~rdo3 = ~si3.value;});
5105                 if(~si3.value == "o6", {~rslot3 = ~bplaceo6; ~rdo3 = ~si3.value;});
5106                 if(~si3.value == "f6", {~rslot3 = ~bplacef6; ~rdo3 = ~si3.value;});
5107                 if(~si3.value == "s6", {~rslot3 = ~bplaces6; ~rdo3 = ~si3.value;});
5108                 if(~si3.value == "o7", {~rslot3 = ~bplaceo7; ~rdo3 = ~si3.value;});
5109                 if(~si3.value == "f7", {~rslot3 = ~bplacef7; ~rdo3 = ~si3.value;});
5110                 if(~si3.value == "s7", {~rslot3 = ~bplaces7; ~rdo3 = ~si3.value;});
5111                 if(~si3.value == "o8", {~rslot3 = ~bplaceo8; ~rdo3 = ~si3.value;});
5112                 if(~si3.value == "f8", {~rslot3 = ~bplacef8; ~rdo3 = ~si3.value;});
5113                 if(~si3.value == "s8", {~rslot3 = ~bplaces8; ~rdo3 = ~si3.value;});
5114         };
5115         ~si4set = {
5116                 if(~si4.value == "o1", {~rslot4 = ~bplaceo1; ~rdo4 = ~si4.value;});
5117                 if(~si4.value == "f1", {~rslot4 = ~bplacef1; ~rdo4 = ~si4.value;});
5118                 if(~si4.value == "s1", {~rslot4 = ~bplaces1; ~rdo4 = ~si4.value;});
5119                 if(~si4.value == "o2", {~rslot4 = ~bplaceo2; ~rdo4 = ~si4.value;});
5120                 if(~si4.value == "f2", {~rslot4 = ~bplacef2; ~rdo4 = ~si4.value;});
5121                 if(~si4.value == "s2", {~rslot4 = ~bplaces2; ~rdo4 = ~si4.value;});
5122                 if(~si4.value == "o3", {~rslot4 = ~bplaceo3; ~rdo4 = ~si4.value;});
5123                 if(~si4.value == "f3", {~rslot4 = ~bplacef3; ~rdo4 = ~si4.value;});
5124                 if(~si4.value == "s3", {~rslot4 = ~bplaces3; ~rdo4 = ~si4.value;});
5125                 if(~si4.value == "o4", {~rslot4 = ~bplaceo4; ~rdo4 = ~si4.value;});
5126                 if(~si4.value == "f4", {~rslot4 = ~bplacef4; ~rdo4 = ~si4.value;});
5127                 if(~si4.value == "s4", {~rslot4 = ~bplaces4; ~rdo4 = ~si4.value;});
5128                 if(~si4.value == "o5", {~rslot4 = ~bplaceo5; ~rdo4 = ~si4.value;});
5129                 if(~si4.value == "f5", {~rslot4 = ~bplacef5; ~rdo4 = ~si4.value;});
5130                 if(~si4.value == "s5", {~rslot4 = ~bplaces5; ~rdo4 = ~si4.value;});
5131                 if(~si4.value == "o6", {~rslot4 = ~bplaceo6; ~rdo4 = ~si4.value;});
5132                 if(~si4.value == "f6", {~rslot4 = ~bplacef6; ~rdo4 = ~si4.value;});
5133                 if(~si4.value == "s6", {~rslot4 = ~bplaces6; ~rdo4 = ~si4.value;});
5134                 if(~si4.value == "o7", {~rslot4 = ~bplaceo7; ~rdo4 = ~si4.value;});
5135                 if(~si4.value == "f7", {~rslot4 = ~bplacef7; ~rdo4 = ~si4.value;});
5136                 if(~si4.value == "s7", {~rslot4 = ~bplaces7; ~rdo4 = ~si4.value;});
5137                 if(~si4.value == "o8", {~rslot4 = ~bplaceo8; ~rdo4 = ~si4.value;});
5138                 if(~si4.value == "f8", {~rslot4 = ~bplacef8; ~rdo4 = ~si4.value;});
5139                 if(~si4.value == "s8", {~rslot4 = ~bplaces8; ~rdo4 = ~si4.value;});
5140         };
5141         ~si5set = {
5142                 if(~si5.value == "o1", {~rslot5 = ~bplaceo1; ~rdo5 = ~si5.value;});
5143                 if(~si5.value == "f1", {~rslot5 = ~bplacef1; ~rdo5 = ~si5.value;});
5144                 if(~si5.value == "s1", {~rslot5 = ~bplaces1; ~rdo5 = ~si5.value;});
5145                 if(~si5.value == "o2", {~rslot5 = ~bplaceo2; ~rdo5 = ~si5.value;});
5146                 if(~si5.value == "f2", {~rslot5 = ~bplacef2; ~rdo5 = ~si5.value;});
5147                 if(~si5.value == "s2", {~rslot5 = ~bplaces2; ~rdo5 = ~si5.value;});
5148                 if(~si5.value == "o3", {~rslot5 = ~bplaceo3; ~rdo5 = ~si5.value;});
5149                 if(~si5.value == "f3", {~rslot5 = ~bplacef3; ~rdo5 = ~si5.value;});
5150                 if(~si5.value == "s3", {~rslot5 = ~bplaces3; ~rdo5 = ~si5.value;});
5151                 if(~si5.value == "o4", {~rslot5 = ~bplaceo4; ~rdo5 = ~si5.value;});
5152                 if(~si5.value == "f4", {~rslot5 = ~bplacef4; ~rdo5 = ~si5.value;});
5153                 if(~si5.value == "s4", {~rslot5 = ~bplaces4; ~rdo5 = ~si5.value;});
5154                 if(~si5.value == "o5", {~rslot5 = ~bplaceo5; ~rdo5 = ~si5.value;});
5155                 if(~si5.value == "f5", {~rslot5 = ~bplacef5; ~rdo5 = ~si5.value;});
5156                 if(~si5.value == "s5", {~rslot5 = ~bplaces5; ~rdo5 = ~si5.value;});
5157                 if(~si5.value == "o6", {~rslot5 = ~bplaceo6; ~rdo5 = ~si5.value;});
5158                 if(~si5.value == "f6", {~rslot5 = ~bplacef6; ~rdo5 = ~si5.value;});
5159                 if(~si5.value == "s6", {~rslot5 = ~bplaces6; ~rdo5 = ~si5.value;});
5160                 if(~si5.value == "o7", {~rslot5 = ~bplaceo7; ~rdo5 = ~si5.value;});
5161                 if(~si5.value == "f7", {~rslot5 = ~bplacef7; ~rdo5 = ~si5.value;});
5162                 if(~si5.value == "s7", {~rslot5 = ~bplaces7; ~rdo5 = ~si5.value;});
5163                 if(~si5.value == "o8", {~rslot5 = ~bplaceo8; ~rdo5 = ~si5.value;});
5164                 if(~si5.value == "f8", {~rslot5 = ~bplacef8; ~rdo5 = ~si5.value;});
5165                 if(~si5.value == "s8", {~rslot5 = ~bplaces8; ~rdo5 = ~si5.value;});
5166         };
5167         ~si6set = {
5168                 if(~si6.value == "o1", {~rslot6 = ~bplaceo1; ~rdo6 = ~si6.value;});
5169                 if(~si6.value == "f1", {~rslot6 = ~bplacef1; ~rdo6 = ~si6.value;});
5170                 if(~si6.value == "s1", {~rslot6 = ~bplaces1; ~rdo6 = ~si6.value;});
5171                 if(~si6.value == "o2", {~rslot6 = ~bplaceo2; ~rdo6 = ~si6.value;});
5172                 if(~si6.value == "f2", {~rslot6 = ~bplacef2; ~rdo6 = ~si6.value;});
5173                 if(~si6.value == "s2", {~rslot6 = ~bplaces2; ~rdo6 = ~si6.value;});
5174                 if(~si6.value == "o3", {~rslot6 = ~bplaceo3; ~rdo6 = ~si6.value;});
5175                 if(~si6.value == "f3", {~rslot6 = ~bplacef3; ~rdo6 = ~si6.value;});
5176                 if(~si6.value == "s3", {~rslot6 = ~bplaces3; ~rdo6 = ~si6.value;});
5177                 if(~si6.value == "o4", {~rslot6 = ~bplaceo4; ~rdo6 = ~si6.value;});
5178                 if(~si6.value == "f4", {~rslot6 = ~bplacef4; ~rdo6 = ~si6.value;});
5179                 if(~si6.value == "s4", {~rslot6 = ~bplaces4; ~rdo6 = ~si6.value;});
5180                 if(~si6.value == "o5", {~rslot6 = ~bplaceo5; ~rdo6 = ~si6.value;});
5181                 if(~si6.value == "f5", {~rslot6 = ~bplacef5; ~rdo6 = ~si6.value;});
5182                 if(~si6.value == "s5", {~rslot6 = ~bplaces5; ~rdo6 = ~si6.value;});
5183                 if(~si6.value == "o6", {~rslot6 = ~bplaceo6; ~rdo6 = ~si6.value;});
5184                 if(~si6.value == "f6", {~rslot6 = ~bplacef6; ~rdo6 = ~si6.value;});
5185                 if(~si6.value == "s6", {~rslot6 = ~bplaces6; ~rdo6 = ~si6.value;});
5186                 if(~si6.value == "o7", {~rslot6 = ~bplaceo7; ~rdo6 = ~si6.value;});
5187                 if(~si6.value == "f7", {~rslot6 = ~bplacef7; ~rdo6 = ~si6.value;});
5188                 if(~si6.value == "s7", {~rslot6 = ~bplaces7; ~rdo6 = ~si6.value;});
5189                 if(~si6.value == "o8", {~rslot6 = ~bplaceo8; ~rdo6 = ~si6.value;});
5190                 if(~si6.value == "f8", {~rslot6 = ~bplacef8; ~rdo6 = ~si6.value;});
5191                 if(~si6.value == "s8", {~rslot6 = ~bplaces8; ~rdo6 = ~si6.value;});
5192         };
5193         ~si7set = {
5194                 if(~si7.value == "o1", {~rslot7 = ~bplaceo1; ~rdo7 = ~si7.value;});
5195                 if(~si7.value == "f1", {~rslot7 = ~bplacef1; ~rdo7 = ~si7.value;});
5196                 if(~si7.value == "s1", {~rslot7 = ~bplaces1; ~rdo7 = ~si7.value;});
5197                 if(~si7.value == "o2", {~rslot7 = ~bplaceo2; ~rdo7 = ~si7.value;});
5198                 if(~si7.value == "f2", {~rslot7 = ~bplacef2; ~rdo7 = ~si7.value;});
5199                 if(~si7.value == "s2", {~rslot7 = ~bplaces2; ~rdo7 = ~si7.value;});
5200                 if(~si7.value == "o3", {~rslot7 = ~bplaceo3; ~rdo7 = ~si7.value;});
5201                 if(~si7.value == "f3", {~rslot7 = ~bplacef3; ~rdo7 = ~si7.value;});
5202                 if(~si7.value == "s3", {~rslot7 = ~bplaces3; ~rdo7 = ~si7.value;});
5203                 if(~si7.value == "o4", {~rslot7 = ~bplaceo4; ~rdo7 = ~si7.value;});
5204                 if(~si7.value == "f4", {~rslot7 = ~bplacef4; ~rdo7 = ~si7.value;});
5205                 if(~si7.value == "s4", {~rslot7 = ~bplaces4; ~rdo7 = ~si7.value;});
5206                 if(~si7.value == "o5", {~rslot7 = ~bplaceo5; ~rdo7 = ~si7.value;});
5207                 if(~si7.value == "f5", {~rslot7 = ~bplacef5; ~rdo7 = ~si7.value;});
5208                 if(~si7.value == "s5", {~rslot7 = ~bplaces5; ~rdo7 = ~si7.value;});
5209                 if(~si7.value == "o6", {~rslot7 = ~bplaceo6; ~rdo7 = ~si7.value;});
5210                 if(~si7.value == "f6", {~rslot7 = ~bplacef6; ~rdo7 = ~si7.value;});
5211                 if(~si7.value == "s6", {~rslot7 = ~bplaces6; ~rdo7 = ~si7.value;});
5212                 if(~si7.value == "o7", {~rslot7 = ~bplaceo7; ~rdo7 = ~si7.value;});
5213                 if(~si7.value == "f7", {~rslot7 = ~bplacef7; ~rdo7 = ~si7.value;});
5214                 if(~si7.value == "s7", {~rslot7 = ~bplaces7; ~rdo7 = ~si7.value;});
5215                 if(~si7.value == "o8", {~rslot7 = ~bplaceo8; ~rdo7 = ~si7.value;});
5216                 if(~si7.value == "f8", {~rslot7 = ~bplacef8; ~rdo7 = ~si7.value;});
5217                 if(~si7.value == "s8", {~rslot7 = ~bplaces8; ~rdo7 = ~si7.value;});
5218         };
5219         ~si8set = {
5220                 if(~si8.value == "o1", {~rslot8 = ~bplaceo1; ~rdo8 = ~si8.value;});
5221                 if(~si8.value == "f1", {~rslot8 = ~bplacef1; ~rdo8 = ~si8.value;});
5222                 if(~si8.value == "s1", {~rslot8 = ~bplaces1; ~rdo8 = ~si8.value;});
5223                 if(~si8.value == "o2", {~rslot8 = ~bplaceo2; ~rdo8 = ~si8.value;});
5224                 if(~si8.value == "f2", {~rslot8 = ~bplacef2; ~rdo8 = ~si8.value;});
5225                 if(~si8.value == "s2", {~rslot8 = ~bplaces2; ~rdo8 = ~si8.value;});
5226                 if(~si8.value == "o3", {~rslot8 = ~bplaceo3; ~rdo8 = ~si8.value;});
5227                 if(~si8.value == "f3", {~rslot8 = ~bplacef3; ~rdo8 = ~si8.value;});
5228                 if(~si8.value == "s3", {~rslot8 = ~bplaces3; ~rdo8 = ~si8.value;});
5229                 if(~si8.value == "o4", {~rslot8 = ~bplaceo4; ~rdo8 = ~si8.value;});
5230                 if(~si8.value == "f4", {~rslot8 = ~bplacef4; ~rdo8 = ~si8.value;});
5231                 if(~si8.value == "s4", {~rslot8 = ~bplaces4; ~rdo8 = ~si8.value;});
5232                 if(~si8.value == "o5", {~rslot8 = ~bplaceo5; ~rdo8 = ~si8.value;});
5233                 if(~si8.value == "f5", {~rslot8 = ~bplacef5; ~rdo8 = ~si8.value;});
5234                 if(~si8.value == "s5", {~rslot8 = ~bplaces5; ~rdo8 = ~si8.value;});
5235                 if(~si8.value == "o6", {~rslot8 = ~bplaceo6; ~rdo8 = ~si8.value;});
5236                 if(~si8.value == "f6", {~rslot8 = ~bplacef6; ~rdo8 = ~si8.value;});
5237                 if(~si8.value == "s6", {~rslot8 = ~bplaces6; ~rdo8 = ~si8.value;});
5238                 if(~si8.value == "o7", {~rslot8 = ~bplaceo7; ~rdo8 = ~si8.value;});
5239                 if(~si8.value == "f7", {~rslot8 = ~bplacef7; ~rdo8 = ~si8.value;});
5240                 if(~si8.value == "s7", {~rslot8 = ~bplaces7; ~rdo8 = ~si8.value;});
5241                 if(~si8.value == "o8", {~rslot8 = ~bplaceo8; ~rdo8 = ~si8.value;});
5242                 if(~si8.value == "f8", {~rslot8 = ~bplacef8; ~rdo8 = ~si8.value;});
5243                 if(~si8.value == "s8", {~rslot8 = ~bplaces8; ~rdo8 = ~si8.value;});
5244         };
5245
5246
5247         //routine function button
5248
5249         ~rviewbutton = Button.new(w,Rect(Window.screenBounds.width-20-20,~bpt+69+5-(20/~gm),20,20/1.6180339887499)).states_([["r",Color.white,Color.black],["r",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
5250
5251                 if(button.value == 1, {
5252                         ({
5253                                 arg leftdo = 0 , leftdobox = 52, lefttime = leftdobox+widthbox+6, lefttimebox = lefttime+57, top = 0,width=52, height = 16,  widthbox=52, heightbox = 16, inc=0, lw = 0,  uw = 0, numw = 40;
5254                                 var tall, stall, iall, siall, st1, st2, st3, st4, st5, st6, st7, st8,  t1,t2,t3,t4,t5,t6,t7,t8,i1,i2,i3,i4,i5,i6,i7,i8;
5255                                 ~rview = View(w, Rect(Window.screenBounds.width-(340+46),Window.screenBounds.height-(340+46/1.6180339887499)-110,340+46,340+46/1.6180339887499)).front;
5256                                 /*w.view.decorator=FlowLayout(w.view.bounds);
5257                                 w.view.decorator.gap=2@2;*/
5258
5259                                 top = 0;
5260
5261                                 i1 = StaticText(~rview, Rect(leftdo , top=top, width, height)).background_(Color.black).string_("rslot1").stringColor_(Color.white);
5262                                 i2 = StaticText(~rview, Rect(leftdo , top=top+height, width, height)).background_(Color.black).string_("rslot2").stringColor_(Color.white);
5263                                 i3 = StaticText(~rview, Rect(leftdo , top=top+height, width, height)).background_(Color.black).string_("rslot3").stringColor_(Color.white);
5264                                 i4 = StaticText(~rview, Rect(leftdo , top=top+height, width, height)).background_(Color.black).string_("rslot4").stringColor_(Color.white);
5265                                 i5 = StaticText(~rview, Rect(leftdo , top=top+height, width, height)).background_(Color.black).string_("rslot5").stringColor_(Color.white);
5266                                 i6 = StaticText(~rview, Rect(leftdo , top=top+height, width, height)).background_(Color.black).string_("rslot6").stringColor_(Color.white);
5267                                 i7 = StaticText(~rview, Rect(leftdo , top=top+height, width, height)).background_(Color.black).string_("rslot7").stringColor_(Color.white);
5268                                 i8 = StaticText(~rview, Rect(leftdo , top=top+height, width, height)).background_(Color.black).string_("rslot8").stringColor_(Color.white);
5269
5270                                 top = 0;
5271
5272                                 ~si1a=TextField(~rview, Rect(leftdobox , top=top, widthbox/2, heightbox)).background_(Color.black).stringColor_(Color.white).value_(~rdo1a);
5273                                 ~si1b=TextField(~rview, Rect(leftdobox+(widthbox/2) , top=top, widthbox/2, heightbox)).background_(Color.black).stringColor_(Color.white).value_(~rdo1b);
5274                                 ~si2=TextField(~rview, Rect(leftdobox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).stringColor_(Color.white).value_(~rdo2);
5275                                 ~si3=TextField(~rview, Rect(leftdobox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).stringColor_(Color.white).value_(~rdo3);
5276                                 ~si4=TextField(~rview, Rect(leftdobox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).stringColor_(Color.white).value_(~rdo4);
5277                                 ~si5=TextField(~rview, Rect(leftdobox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).stringColor_(Color.white).value_(~rdo5);
5278                                 ~si6=TextField(~rview, Rect(leftdobox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).stringColor_(Color.white).value_(~rdo6);
5279                                 ~si7=TextField(~rview, Rect(leftdobox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).stringColor_(Color.white).value_(~rdo7);
5280                                 ~si8=TextField(~rview, Rect(leftdobox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).stringColor_(Color.white).value_(~rdo8);
5281
5282                                 top = 0;
5283
5284                                 t1 = StaticText(~rview, Rect(lefttime , top=top, width, height)).background_(Color.black).string_("rtime1").stringColor_(Color.white);
5285                                 t2 = StaticText(~rview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("rtime2").stringColor_(Color.white);
5286                                 t3 = StaticText(~rview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("rtime3").stringColor_(Color.white);
5287                                 t4 = StaticText(~rview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("rtime4").stringColor_(Color.white);
5288                                 t5 = StaticText(~rview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("rtime5").stringColor_(Color.white);
5289                                 t6 = StaticText(~rview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("rtime6").stringColor_(Color.white);
5290                                 t7 = StaticText(~rview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("rtime7").stringColor_(Color.white);
5291                                 t8 = StaticText(~rview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("rtime8").stringColor_(Color.white);
5292                                 tall = StaticText(~rview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("all time").stringColor_(Color.white);
5293
5294
5295                                 top = 0;
5296
5297                                 st1=NumberBox(~rview, Rect(lefttimebox , top=top, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~rtime1);
5298                                 st2=NumberBox(~rview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~rtime2);
5299                                 st3=NumberBox(~rview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~rtime3);
5300                                 st4=NumberBox(~rview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~rtime4);
5301                                 st5=NumberBox(~rview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~rtime5);
5302                                 st6=NumberBox(~rview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~rtime6);
5303                                 st7=NumberBox(~rview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~rtime7);
5304                                 st8=NumberBox(~rview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~rtime8);
5305                                 stall=NumberBox(~rview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~rtimeall);
5306
5307
5308                                 ~si1a.action_({~si1aset.value});
5309                                 ~si1b.action_({~si1bset.value});
5310                                 ~si2.action_({~si2set.value});
5311                                 ~si3.action_({~si3set.value});
5312                                 ~si4.action_({~si4set.value});
5313                                 ~si5.action_({~si5set.value});
5314                                 ~si6.action_({~si6set.value});
5315                                 ~si7.action_({~si7set.value});
5316                                 ~si8.action_({~si8set.value});
5317
5318                                 stall.action_({arg val;
5319                                         ~rtimeall = val.value;
5320                                         ~rtime1 = val.value;
5321                                         ~rtime2 = val.value;
5322                                         ~rtime3 = val.value;
5323                                         ~rtime4 = val.value;
5324                                         ~rtime5 = val.value;
5325                                         ~rtime6 = val.value;
5326                                         ~rtime7 = val.value;
5327                                         ~rtime8 = val.value;
5328                                         ~rview.close; ~rviewbutton.valueAction_(1);
5329                                 });
5330                                 st1.action_({arg val; ~rtime1 = val.value;});
5331                                 st2.action_({arg val; ~rtime2 = val.value;});
5332                                 st3.action_({arg val; ~rtime3 = val.value;});
5333                                 st4.action_({arg val; ~rtime4 = val.value;});
5334                                 st5.action_({arg val; ~rtime5 = val.value;});
5335                                 st6.action_({arg val; ~rtime6 = val.value;});
5336                                 st7.action_({arg val; ~rtime7 = val.value;});
5337                                 st8.action_({arg val; ~rtime8 = val.value;});
5338
5339                                 ~rview.background_(Color.black);
5340
5341                                 ~metronomeincr = 1;
5342
5343                                 ~routinebutton = Button.new(~rview,Rect(0, top+40, 40, 40/~gm)).states_([["loop",Color.white,Color.black],["stop",Color.white,Color.black]]).action_({arg button;
5344
5345                                         if(button.value == 1, {
5346
5347                                                 ~metronome = Task({
5348                                                         inf.do({
5349                                                                 AppClock.sched(0, {~metronomebutton.value = 1;});
5350                                                                 ~metronomeincr.wait;
5351                                                                 AppClock.sched(0, {~metronomebutton.value = 0;});
5352                                                                 ~metronomeincr.wait;
5353                                                         });
5354                                                 });
5355
5356                                                 ~loop = Task({
5357                                                         1.do({
5358                                                                 {~rslot1a.valueAction_(0)}.defer;
5359                                                                 ~rtime1.wait;
5360                                                                 {~rslot2.valueAction_(0)}.defer;
5361                                                                 ~rtime2.wait;
5362                                                                 {~rslot3.valueAction_(0)}.defer;
5363                                                                 ~rtime3.wait;
5364                                                                 {~rslot4.valueAction_(0)}.defer;
5365                                                                 ~rtime4.wait;
5366                                                                 {~rslot5.valueAction_(0)}.defer;
5367                                                                 ~rtime5.wait;
5368                                                                 {~rslot6.valueAction_(0)}.defer;
5369                                                                 ~rtime6.wait;
5370                                                                 {~rslot7.valueAction_(0)}.defer;
5371                                                                 ~rtime7.wait;
5372                                                                 {~rslot8.valueAction_(0)}.defer;
5373                                                                 ~rtime8.wait;
5374                                                         });
5375                                                         inf.do({
5376                                                                 {~rslot1b.valueAction_(0)}.defer;
5377                                                                 ~rtime1.wait;
5378                                                                 {~rslot2.valueAction_(0)}.defer;
5379                                                                 ~rtime2.wait;
5380                                                                 {~rslot3.valueAction_(0)}.defer;
5381                                                                 ~rtime3.wait;
5382                                                                 {~rslot4.valueAction_(0)}.defer;
5383                                                                 ~rtime4.wait;
5384                                                                 {~rslot5.valueAction_(0)}.defer;
5385                                                                 ~rtime5.wait;
5386                                                                 {~rslot6.valueAction_(0)}.defer;
5387                                                                 ~rtime6.wait;
5388                                                                 {~rslot7.valueAction_(0)}.defer;
5389                                                                 ~rtime7.wait;
5390                                                                 {~rslot8.valueAction_(0)}.defer;
5391                                                                 ~rtime8.wait;
5392                                                         });
5393                                         }); SystemClock(~metronome.start); SystemClock(~loop.start); ~numsynths.stop;}, {
5394
5395                                                 SystemClock(~metronome.stop); SystemClock(~loop.stop); SystemClock(~loop.reset); ~synthfree.value; ~pauseroutinebutton.value = 0; ~numsynths.stop; ~numsynthsfunc.value;});
5396                                 });
5397
5398                                 ~pauseroutinebutton = Button.new(~rview,Rect(50, top+40, 40, 40/~gm)).states_([["pause",Color.white,Color.black],["loop",Color.white,Color.black]]).action_({arg button;
5399
5400                                         if(button.value == 1, {SystemClock(~loop.pause); ~synthpause.value;}, {SystemClock(~loop.resume); ~synthflow.value;});
5401                                 });
5402
5403                                 ~closeroutinebutton = Button.new(~rview,Rect(220, top+40, 40, 40/~gm)).states_([["close",Color.white,Color.black]]).action_({arg button;
5404
5405                                         ~rview.close; ~rviewbutton.value = 0;
5406                                 });
5407
5408                                 ~metronomebutton = Button.new(~rview,Rect(120, top+40, 40, 40/~gm)).states_([["",Color.white,Color.red],["",Color.white,Color.blue]]).action_({arg button;});
5409
5410                         }.value);
5411
5412                         if(~loop.isPlaying == true, {~routinebutton.value = 1;});
5413                         ~rview.front;
5414                 }, {~rview.close});
5415         });
5416
5417
5418         //synth identifier function
5419
5420         ~synthmonitor = StaticText(w, Rect(Window.screenBounds.width-14,~bpt+49,18,18/1.6180339887499)).background_(Color.black).stringColor_(Color.white);
5421         ~synthmonitor.string = if(~currentsynth == nil, {"nil".asString});
5422
5423         ~synthmonitorfunc = {
5424                 ~synthmonitor.close;
5425                 ~synthmonitor = StaticText(w, Rect(Window.screenBounds.width-14,~bpt+49,18,18/1.6180339887499)).background_(Color.black).stringColor_(Color.white);
5426                 ~synthmonitor.string = ~currentsynth.asString;
5427                 ~synthmonitor.font = Font(size: 10);
5428         };
5429
5430         ~synthmonitorfunc.value;
5431
5432
5433         //cpu, # of ugens, # of synths, and current frequencies display
5434
5435         ~cpumonitor = StaticText(w, Rect(Window.screenBounds.width-500,~bpt-200,500,90/1.6180339887499)).background_(Color.black).stringColor_(Color.white);
5436         ~cpumonitor.close;
5437
5438         ~cpumonitorfunc =  {
5439                 ~cpumonitor.close;
5440                 ~cpumonitor = StaticText(w, Rect(20,~bpt-100,800,124/1.6180339887499)).background_(Color.black).stringColor_(Color.white);
5441                 if(~settingsbutton.value == 1, {~cpumonitorroutine.stop; ~cpumonitor.close; ~cpumonitorbutton.value = 0;});
5442                 ~cpumonitor.string =
5443                 "cpu: "+s.avgCPU.asString+"%"++"\n" ++
5444                 "ugens: "+s.numUGens.asString++"\n" ++
5445                 "synths: "+s.numSynths.asString++"\n" ++
5446                 /*"f1 = "++~f1.round(0.01)++", f2 = "++~f2.round(0.01)++", f3 = "++~f3.round(0.01)++", f4 = "++~f4.round(0.01)++", f5 = "++~f5.round(0.01)++", f6 = "++~f6.round(0.01)++","++
5447                 "f7 = "++~f7.round(0.01)++", f8 = "++~f8.round(0.01)++", f9 = "++~f9.round(0.01)++", f10 = "++~f10.round(0.01)++", f11 = "++~f11.round(0.01)++", f12 = "++~f12.round(0.01);
5448                 */              ~f1.round(0.01)++", "++~f2.round(0.01)++", "++~f3.round(0.01)++", "++~f4.round(0.01)++", "++~f5.round(0.01)++", "++~f6.round(0.01)++", "++~f7.round(0.01)++", "++~f8.round(0.01)++", "++~f9.round(0.01)++", "++~f10.round(0.01)++", "++~f11.round(0.01)++", "++~f12.round(0.01);
5449                 /*[ ~f1.round(0.01), ~f2.round(0.01), ~f3.round(0.01),~f4.round(0.01),~f5.round(0.01),~f6.round(0.01),~f7.round(0.01),~f8.round(0.01),~f9.round(0.01),~f10.round(0.01),~f11.round(0.01),~f12.round(0.01) ].asString;
5450                 */      ~cpumonitor.font = Font(size: 14);
5451         };
5452
5453         ~cpumonitorroutine = Routine({
5454                 inf.do({
5455                         AppClock.sched(0, {
5456                                 ~cpumonitorfunc.value;
5457                         });
5458                         1.wait;
5459                 });
5460         });
5461
5462         ~cpumonitorbutton = Button.new(w,Rect(Window.screenBounds.width-20-20-20-20,~bpt+69+5,20,20/1.6180339887499)).states_([["cm",Color.white,Color.black],["cm",Color.white,Color.black]]).action_({arg button;
5463
5464                 if(button.value == 1, {
5465                         ~cpumonitorroutine.reset;
5466                         ~cpumonitorroutine.play;
5467                 }, {~cpumonitorroutine.stop; ~cpumonitor.close;});
5468
5469         });
5470
5471
5472         //information button
5473
5474         info = Button.new(w,Rect(Window.screenBounds.width-20-20,~bpt+69+5,20,20/1.6180339887499)).states_([["i",Color.white,Color.black],["i",Color.white,Color.black]]).action_({arg button;
5475
5476                 if(button.value == 1, {
5477                         ~hb = TextView(w, Rect(0,0, Window.screenBounds.width, Window.screenBounds.height-200)).background_(Color.black);
5478                         (~hb.string =
5479                                 "(scroll down to see more)"++"\n"++"\n"++"\n"++
5480                                 "ctrl/cmd-period: stop synth/free server"++"\n"++"\n"++"\n"++
5481                                 "GUI Buttons"++"\n"++"\n"++"\n"++
5482                                 "synth0/synth1: start/stop synth set"++"\n"++"\n"++
5483                                 "pause0/pause1: pause/unpause synth set"++"\n"++"\n"++
5484                                 "tsynth0/tsynth1: tsynth0 to allow timed synth set, then click on any o, f, or s button to time a progression. click on the stop timer button in the bottom right to stop the timer."++"\n"++"tsynth1 to dis-allow timed synth set"++"\n"++"\n"++
5485                                 "copy: copy frequency/note info"++"\n"++"\n"++
5486                                 "settings button:"++"\n"++"\n"++
5487                                 "     KWS number: change number of kw(King Wen) sequences in a timewave half-cycle (or amplitude x2). press set to load."++"\n"++"\n"++
5488                                 "     base(lowest) freq(hz): set the base(lowest) frequency of timewave cycle. press set to load."++"\n"++"\n"++
5489                                 "     synthdef type: psine1-psine3 (based on phi, with low-pass filter), hsine1-hsine3 (based on 19.47:360, with low-pass filter), psineuf1-psineuf3 (based on phi, without low-pass filter),"++"\n"++"     hsineuf1-hsineuf3 (based on 19.47:360, without low-pass filter) - set synthdef type. press set to load."++"\n"++"\n"++
5490                                 "     lp filter limit(hz): change the low-pass filter frequency limit. default is 2100. press set to load."++"\n"++"\n"++
5491                                 "     automate: setting for automated mid-timewave sequence events. press set to load."++"\n"++"\n"++
5492                                 "s1-s8: set/save note positions"++"\n"++"\n"++
5493                                 "g1-g8: groups of saved note positions"++"\n"++"\n"++
5494                                 "uc-u8: undo changes to set note positions. press set to load."++"\n"++"\n"++
5495                                 "rc, /rc: start recording/stop recording"++"\n"++"\n"++
5496                                 "prc: pause recording"++"\n"++"\n"++
5497                                 "o1-o8: play set/saved note positions by opening a new synth set"++"\n"++"\n"++
5498                                 "f1-f8: flow transition to set/saved note positions"++"\n"++"\n"++
5499                                 "s1-s8: slide transition to set/saved note positions"++"\n"++"\n"++
5500                                 "m/u: mute/unmute all"++"\n"++"\n"++
5501                                 "1-12: mute or unmute individual synth"++"\n"++"\n"++
5502                                 "cm: cpu percentage/number of ugens/number of synths display"++"\n"++"\n"++
5503                                 "rw: random western scale"++"\n"++"\n"++
5504                                 "re: random eastern scale"++"\n"++"\n"++
5505                                 "r: routine/loop function - rslot for synth set, rtime for time between transitions"++"\n"++"\n"++
5506                                 "eo: extra options - set frequencies, set slide time/increment"++"\n"++"\n"++
5507                                 "i: help"++"\n"++"\n"++
5508                                 "m: minimize window"++"\n"++"\n"++
5509                                 "c: close window"++"\n"++"\n"++"\n"++
5510                                 "Keyboard Functions (functionality will vary with device)"++"\n"++"\n"++"\n"++
5511                                 "s: start/stop synth set"++"\n"++"\n"++
5512                                 "space bar: pause/unpause synth set"++"\n"++"\n"++
5513                                 "ctrl-period/cmd-period: stop synth/free server"++"\n"++"\n"++
5514                                 "left/right arrow(or J and L): move down/up note"++"\n"++"\n"++
5515                                 "up/down arrow(or I and K): change synth for left/right arrow note function"++"\n"++"\n"++
5516                                 "#1-= on keyboard: choose synth for left/right arrow note function"++"\n"++"\n"++
5517                                 "r: routine/loop function - rslot for synth set, rtime for time between transitions"++"\n"++"\n"++
5518                                 "m: mute/unmute all"++"\n"++"\n"++
5519                                 "c: copy function"++"\n"++"\n"++
5520                                 "t: timed synth function"++"\n"++"\n"++
5521                                 "esc: minimize window"
5522                                 ;
5523                         );
5524                         ~hb.stringColor = Color.white;
5525                 },
5526                 {~hb.close;});
5527         });
5528
5529
5530         //random notes button 1
5531
5532         ~randombutton1 = Button.new(w,Rect(Window.screenBounds.width-20-20-20-20,~bpt+69+5-(20/~gm),20,20/1.6180339887499)).states_([["rw",Color.white,Color.black]]).action_({arg button;
5533
5534                 if((~l1a.isRunning == true) or: (~l1a1.isRunning == true), {
5535                         12.do(x = 0; {("f"++(x=x+1)).asSymbol.envirPut(~freqmap.at(rrand(36, 91));)});
5536                         ~synthflow.value;
5537                 });
5538         });
5539
5540
5541         //random notes button 2
5542
5543         ~randombutton2 = Button.new(w,Rect(Window.screenBounds.width-20-20-20,~bpt+69+5-(20/~gm),20,20/1.6180339887499)).states_([["re",Color.white,Color.black]]).action_({arg button;
5544
5545                 if((~l1a.isRunning == true) or: (~l1a1.isRunning == true), {
5546                         12.do(x = 0; {("f"++(x=x+1)).asSymbol.envirPut((~freqmap.at(127)/8).rand;)});
5547                         ~synthflow.value;
5548                 });
5549         });
5550
5551
5552         //setgroup buttons, sg1-sg8
5553
5554         ~setgroup1 = Button.new(w,Rect(Window.screenBounds.width-(Window.screenBounds.width/2)-(20*4),~bpt+69+5,20,20/1.6180339887499)).states_([["g1",Color.white,Color.black],["s1",Color.green,Color.black]]).action_({arg button;
5555
5556                 if(button.value == 1, {
5557                         12.do(x = 0; {("fp"++(x=x+1)).asSymbol.envirPut([~sg1a1,~sg1a2,~sg1a3,~sg1a4,~sg1a5,~sg1a6,~sg1a7,~sg1a8,~sg1a9,~sg1a10,~sg1a11,~sg1a12].at(x-1))});
5558                         12.do(x = 0; {("fp"++(x=x+1)++"b").asSymbol.envirPut([~sg1b1,~sg1b2,~sg1b3,~sg1b4,~sg1b5,~sg1b6,~sg1b7,~sg1b8,~sg1b9,~sg1b10,~sg1b11,~sg1b12].at(x-1))});
5559                         12.do(x = 0; {("fp"++(x=x+1)++"c").asSymbol.envirPut([~sg1c1,~sg1c2,~sg1c3,~sg1c4,~sg1c5,~sg1c6,~sg1c7,~sg1c8,~sg1c9,~sg1c10,~sg1c11,~sg1c12].at(x-1))});
5560                         12.do(x = 0; {("fp"++(x=x+1)++"d").asSymbol.envirPut([~sg1d1,~sg1d2,~sg1d3,~sg1d4,~sg1d5,~sg1d6,~sg1d7,~sg1d8,~sg1d9,~sg1d10,~sg1d11,~sg1d12].at(x-1))});
5561                         12.do(x = 0; {("fp"++(x=x+1)++"e").asSymbol.envirPut([~sg1e1,~sg1e2,~sg1e3,~sg1e4,~sg1e5,~sg1e6,~sg1e7,~sg1e8,~sg1e9,~sg1e10,~sg1e11,~sg1e12].at(x-1))});
5562                         12.do(x = 0; {("fp"++(x=x+1)++"f").asSymbol.envirPut([~sg1f1,~sg1f2,~sg1f3,~sg1f4,~sg1f5,~sg1f6,~sg1f7,~sg1f8,~sg1f9,~sg1f10,~sg1f11,~sg1f12].at(x-1))});
5563                         12.do(x = 0; {("fp"++(x=x+1)++"g").asSymbol.envirPut([~sg1g1,~sg1g2,~sg1g3,~sg1g4,~sg1g5,~sg1g6,~sg1g7,~sg1g8,~sg1g9,~sg1g10,~sg1g11,~sg1g12].at(x-1))});
5564                         12.do(x = 0; {("fp"++(x=x+1)++"h").asSymbol.envirPut([~sg1h1,~sg1h2,~sg1h3,~sg1h4,~sg1h5,~sg1h6,~sg1h7,~sg1h8,~sg1h9,~sg1h10,~sg1h11,~sg1h12].at(x-1))});
5565
5566                         ~setgroup2.value = 0;
5567                         ~setgroup3.value = 0;
5568                         ~setgroup4.value = 0;
5569                         ~setgroup5.value = 0;
5570                         ~setgroup6.value = 0;
5571                         ~setgroup7.value = 0;
5572                         ~setgroup8.value = 0;
5573
5574                         ~setgroupval = 1;
5575                 });
5576         });
5577         ~setgroup2 = Button.new(w,Rect(Window.screenBounds.width-(Window.screenBounds.width/2)-(20*3),~bpt+69+5,20,20/1.6180339887499)).states_([["g2",Color.white,Color.black],["s2",Color.green,Color.black]]).action_({arg button;
5578
5579                 if(button.value == 1, {
5580                         12.do(x = 0; {("fp"++(x=x+1)).asSymbol.envirPut([~sg2a1,~sg2a2,~sg2a3,~sg2a4,~sg2a5,~sg2a6,~sg2a7,~sg2a8,~sg2a9,~sg2a10,~sg2a11,~sg2a12].at(x-1))});
5581                         12.do(x = 0; {("fp"++(x=x+1)++"b").asSymbol.envirPut([~sg2b1,~sg2b2,~sg2b3,~sg2b4,~sg2b5,~sg2b6,~sg2b7,~sg2b8,~sg2b9,~sg2b10,~sg2b11,~sg2b12].at(x-1))});
5582                         12.do(x = 0; {("fp"++(x=x+1)++"c").asSymbol.envirPut([~sg2c1,~sg2c2,~sg2c3,~sg2c4,~sg2c5,~sg2c6,~sg2c7,~sg2c8,~sg2c9,~sg2c10,~sg2c11,~sg2c12].at(x-1))});
5583                         12.do(x = 0; {("fp"++(x=x+1)++"d").asSymbol.envirPut([~sg2d1,~sg2d2,~sg2d3,~sg2d4,~sg2d5,~sg2d6,~sg2d7,~sg2d8,~sg2d9,~sg2d10,~sg2d11,~sg2d12].at(x-1))});
5584                         12.do(x = 0; {("fp"++(x=x+1)++"e").asSymbol.envirPut([~sg2e1,~sg2e2,~sg2e3,~sg2e4,~sg2e5,~sg2e6,~sg2e7,~sg2e8,~sg2e9,~sg2e10,~sg2e11,~sg2e12].at(x-1))});
5585                         12.do(x = 0; {("fp"++(x=x+1)++"f").asSymbol.envirPut([~sg2f1,~sg2f2,~sg2f3,~sg2f4,~sg2f5,~sg2f6,~sg2f7,~sg2f8,~sg2f9,~sg2f10,~sg2f11,~sg2f12].at(x-1))});
5586                         12.do(x = 0; {("fp"++(x=x+1)++"g").asSymbol.envirPut([~sg2g1,~sg2g2,~sg2g3,~sg2g4,~sg2g5,~sg2g6,~sg2g7,~sg2g8,~sg2g9,~sg2g10,~sg2g11,~sg2g12].at(x-1))});
5587                         12.do(x = 0; {("fp"++(x=x+1)++"h").asSymbol.envirPut([~sg2h1,~sg2h2,~sg2h3,~sg2h4,~sg2h5,~sg2h6,~sg2h7,~sg2h8,~sg2h9,~sg2h10,~sg2h11,~sg2h12].at(x-1))});
5588
5589                         ~setgroup1.value = 0;
5590                         ~setgroup3.value = 0;
5591                         ~setgroup4.value = 0;
5592                         ~setgroup5.value = 0;
5593                         ~setgroup6.value = 0;
5594                         ~setgroup7.value = 0;
5595                         ~setgroup8.value = 0;
5596
5597                         ~setgroupval = 2;
5598                 });
5599         });
5600         ~setgroup3 = Button.new(w,Rect(Window.screenBounds.width-(Window.screenBounds.width/2)-(20*2),~bpt+69+5,20,20/1.6180339887499)).states_([["g3",Color.white,Color.black],["s3",Color.green,Color.black]]).action_({arg button;
5601
5602                 if(button.value == 1, {
5603                         12.do(x = 0; {("fp"++(x=x+1)).asSymbol.envirPut([~sg3a1,~sg3a2,~sg3a3,~sg3a4,~sg3a5,~sg3a6,~sg3a7,~sg3a8,~sg3a9,~sg3a10,~sg3a11,~sg3a12].at(x-1))});
5604                         12.do(x = 0; {("fp"++(x=x+1)++"b").asSymbol.envirPut([~sg3b1,~sg3b2,~sg3b3,~sg3b4,~sg3b5,~sg3b6,~sg3b7,~sg3b8,~sg3b9,~sg3b10,~sg3b11,~sg3b12].at(x-1))});
5605                         12.do(x = 0; {("fp"++(x=x+1)++"c").asSymbol.envirPut([~sg3c1,~sg3c2,~sg3c3,~sg3c4,~sg3c5,~sg3c6,~sg3c7,~sg3c8,~sg3c9,~sg3c10,~sg3c11,~sg3c12].at(x-1))});
5606                         12.do(x = 0; {("fp"++(x=x+1)++"d").asSymbol.envirPut([~sg3d1,~sg3d2,~sg3d3,~sg3d4,~sg3d5,~sg3d6,~sg3d7,~sg3d8,~sg3d9,~sg3d10,~sg3d11,~sg3d12].at(x-1))});
5607                         12.do(x = 0; {("fp"++(x=x+1)++"e").asSymbol.envirPut([~sg3e1,~sg3e2,~sg3e3,~sg3e4,~sg3e5,~sg3e6,~sg3e7,~sg3e8,~sg3e9,~sg3e10,~sg3e11,~sg3e12].at(x-1))});
5608                         12.do(x = 0; {("fp"++(x=x+1)++"f").asSymbol.envirPut([~sg3f1,~sg3f2,~sg3f3,~sg3f4,~sg3f5,~sg3f6,~sg3f7,~sg3f8,~sg3f9,~sg3f10,~sg3f11,~sg3f12].at(x-1))});
5609                         12.do(x = 0; {("fp"++(x=x+1)++"g").asSymbol.envirPut([~sg3g1,~sg3g2,~sg3g3,~sg3g4,~sg3g5,~sg3g6,~sg3g7,~sg3g8,~sg3g9,~sg3g10,~sg3g11,~sg3g12].at(x-1))});
5610                         12.do(x = 0; {("fp"++(x=x+1)++"h").asSymbol.envirPut([~sg3h1,~sg3h2,~sg3h3,~sg3h4,~sg3h5,~sg3h6,~sg3h7,~sg3h8,~sg3h9,~sg3h10,~sg3h11,~sg3h12].at(x-1))});
5611
5612                         ~setgroup1.value = 0;
5613                         ~setgroup2.value = 0;
5614                         ~setgroup4.value = 0;
5615                         ~setgroup5.value = 0;
5616                         ~setgroup6.value = 0;
5617                         ~setgroup7.value = 0;
5618                         ~setgroup8.value = 0;
5619
5620                         ~setgroupval = 3;
5621                 });
5622         });
5623         ~setgroup4 = Button.new(w,Rect(Window.screenBounds.width-(Window.screenBounds.width/2)-(20*1),~bpt+69+5,20,20/1.6180339887499)).states_([["g4",Color.white,Color.black],["s4",Color.green,Color.black]]).action_({arg button;
5624
5625                 if(button.value == 1, {
5626                         12.do(x = 0; {("fp"++(x=x+1)).asSymbol.envirPut([~sg4a1,~sg4a2,~sg4a3,~sg4a4,~sg4a5,~sg4a6,~sg4a7,~sg4a8,~sg4a9,~sg4a10,~sg4a11,~sg4a12].at(x-1))});
5627                         12.do(x = 0; {("fp"++(x=x+1)++"b").asSymbol.envirPut([~sg4b1,~sg4b2,~sg4b3,~sg4b4,~sg4b5,~sg4b6,~sg4b7,~sg4b8,~sg4b9,~sg4b10,~sg4b11,~sg4b12].at(x-1))});
5628                         12.do(x = 0; {("fp"++(x=x+1)++"c").asSymbol.envirPut([~sg4c1,~sg4c2,~sg4c3,~sg4c4,~sg4c5,~sg4c6,~sg4c7,~sg4c8,~sg4c9,~sg4c10,~sg4c11,~sg4c12].at(x-1))});
5629                         12.do(x = 0; {("fp"++(x=x+1)++"d").asSymbol.envirPut([~sg4d1,~sg4d2,~sg4d3,~sg4d4,~sg4d5,~sg4d6,~sg4d7,~sg4d8,~sg4d9,~sg4d10,~sg4d11,~sg4d12].at(x-1))});
5630                         12.do(x = 0; {("fp"++(x=x+1)++"e").asSymbol.envirPut([~sg4e1,~sg4e2,~sg4e3,~sg4e4,~sg4e5,~sg4e6,~sg4e7,~sg4e8,~sg4e9,~sg4e10,~sg4e11,~sg4e12].at(x-1))});
5631                         12.do(x = 0; {("fp"++(x=x+1)++"f").asSymbol.envirPut([~sg4f1,~sg4f2,~sg4f3,~sg4f4,~sg4f5,~sg4f6,~sg4f7,~sg4f8,~sg4f9,~sg4f10,~sg4f11,~sg4f12].at(x-1))});
5632                         12.do(x = 0; {("fp"++(x=x+1)++"g").asSymbol.envirPut([~sg4g1,~sg4g2,~sg4g3,~sg4g4,~sg4g5,~sg4g6,~sg4g7,~sg4g8,~sg4g9,~sg4g10,~sg4g11,~sg4g12].at(x-1))});
5633                         12.do(x = 0; {("fp"++(x=x+1)++"h").asSymbol.envirPut([~sg4h1,~sg4h2,~sg4h3,~sg4h4,~sg4h5,~sg4h6,~sg4h7,~sg4h8,~sg4h9,~sg4h10,~sg4h11,~sg4h12].at(x-1))});
5634
5635                         ~setgroup1.value = 0;
5636                         ~setgroup2.value = 0;
5637                         ~setgroup3.value = 0;
5638                         ~setgroup5.value = 0;
5639                         ~setgroup6.value = 0;
5640                         ~setgroup7.value = 0;
5641                         ~setgroup8.value = 0;
5642
5643                         ~setgroupval = 4;
5644                 });
5645         });
5646         ~setgroup5 = Button.new(w,Rect(Window.screenBounds.width-(Window.screenBounds.width/2)+(0*1),~bpt+69+5,20,20/1.6180339887499)).states_([["g5",Color.white,Color.black],["s5",Color.green,Color.black]]).action_({arg button;
5647
5648                 if(button.value == 1, {
5649                         12.do(x = 0; {("fp"++(x=x+1)).asSymbol.envirPut([~sg5a1,~sg5a2,~sg5a3,~sg5a4,~sg5a5,~sg5a6,~sg5a7,~sg5a8,~sg5a9,~sg5a10,~sg5a11,~sg5a12].at(x-1))});
5650                         12.do(x = 0; {("fp"++(x=x+1)++"b").asSymbol.envirPut([~sg5b1,~sg5b2,~sg5b3,~sg5b4,~sg5b5,~sg5b6,~sg5b7,~sg5b8,~sg5b9,~sg5b10,~sg5b11,~sg5b12].at(x-1))});
5651                         12.do(x = 0; {("fp"++(x=x+1)++"c").asSymbol.envirPut([~sg5c1,~sg5c2,~sg5c3,~sg5c4,~sg5c5,~sg5c6,~sg5c7,~sg5c8,~sg5c9,~sg5c10,~sg5c11,~sg5c12].at(x-1))});
5652                         12.do(x = 0; {("fp"++(x=x+1)++"d").asSymbol.envirPut([~sg5d1,~sg5d2,~sg5d3,~sg5d4,~sg5d5,~sg5d6,~sg5d7,~sg5d8,~sg5d9,~sg5d10,~sg5d11,~sg5d12].at(x-1))});
5653                         12.do(x = 0; {("fp"++(x=x+1)++"e").asSymbol.envirPut([~sg5e1,~sg5e2,~sg5e3,~sg5e4,~sg5e5,~sg5e6,~sg5e7,~sg5e8,~sg5e9,~sg5e10,~sg5e11,~sg5e12].at(x-1))});
5654                         12.do(x = 0; {("fp"++(x=x+1)++"f").asSymbol.envirPut([~sg5f1,~sg5f2,~sg5f3,~sg5f4,~sg5f5,~sg5f6,~sg5f7,~sg5f8,~sg5f9,~sg5f10,~sg5f11,~sg5f12].at(x-1))});
5655                         12.do(x = 0; {("fp"++(x=x+1)++"g").asSymbol.envirPut([~sg5g1,~sg5g2,~sg5g3,~sg5g4,~sg5g5,~sg5g6,~sg5g7,~sg5g8,~sg5g9,~sg5g10,~sg5g11,~sg5g12].at(x-1))});
5656                         12.do(x = 0; {("fp"++(x=x+1)++"h").asSymbol.envirPut([~sg5h1,~sg5h2,~sg5h3,~sg5h4,~sg5h5,~sg5h6,~sg5h7,~sg5h8,~sg5h9,~sg5h10,~sg5h11,~sg5h12].at(x-1))});
5657
5658                         ~setgroup1.value = 0;
5659                         ~setgroup2.value = 0;
5660                         ~setgroup3.value = 0;
5661                         ~setgroup4.value = 0;
5662                         ~setgroup6.value = 0;
5663                         ~setgroup7.value = 0;
5664                         ~setgroup8.value = 0;
5665
5666                         ~setgroupval = 5;
5667                 });
5668         });
5669         ~setgroup6 = Button.new(w,Rect(Window.screenBounds.width-(Window.screenBounds.width/2)+(20*1),~bpt+69+5,20,20/1.6180339887499)).states_([["g6",Color.white,Color.black],["s6",Color.green,Color.black]]).action_({arg button;
5670
5671                 if(button.value == 1, {
5672                         12.do(x = 0; {("fp"++(x=x+1)).asSymbol.envirPut([~sg6a1,~sg6a2,~sg6a3,~sg6a4,~sg6a5,~sg6a6,~sg6a7,~sg6a8,~sg6a9,~sg6a10,~sg6a11,~sg6a12].at(x-1))});
5673                         12.do(x = 0; {("fp"++(x=x+1)++"b").asSymbol.envirPut([~sg6b1,~sg6b2,~sg6b3,~sg6b4,~sg6b5,~sg6b6,~sg6b7,~sg6b8,~sg6b9,~sg6b10,~sg6b11,~sg6b12].at(x-1))});
5674                         12.do(x = 0; {("fp"++(x=x+1)++"c").asSymbol.envirPut([~sg6c1,~sg6c2,~sg6c3,~sg6c4,~sg6c5,~sg6c6,~sg6c7,~sg6c8,~sg6c9,~sg6c10,~sg6c11,~sg6c12].at(x-1))});
5675                         12.do(x = 0; {("fp"++(x=x+1)++"d").asSymbol.envirPut([~sg6d1,~sg6d2,~sg6d3,~sg6d4,~sg6d5,~sg6d6,~sg6d7,~sg6d8,~sg6d9,~sg6d10,~sg6d11,~sg6d12].at(x-1))});
5676                         12.do(x = 0; {("fp"++(x=x+1)++"e").asSymbol.envirPut([~sg6e1,~sg6e2,~sg6e3,~sg6e4,~sg6e5,~sg6e6,~sg6e7,~sg6e8,~sg6e9,~sg6e10,~sg6e11,~sg6e12].at(x-1))});
5677                         12.do(x = 0; {("fp"++(x=x+1)++"f").asSymbol.envirPut([~sg6f1,~sg6f2,~sg6f3,~sg6f4,~sg6f5,~sg6f6,~sg6f7,~sg6f8,~sg6f9,~sg6f10,~sg6f11,~sg6f12].at(x-1))});
5678                         12.do(x = 0; {("fp"++(x=x+1)++"g").asSymbol.envirPut([~sg6g1,~sg6g2,~sg6g3,~sg6g4,~sg6g5,~sg6g6,~sg6g7,~sg6g8,~sg6g9,~sg6g10,~sg6g11,~sg6g12].at(x-1))});
5679                         12.do(x = 0; {("fp"++(x=x+1)++"h").asSymbol.envirPut([~sg6h1,~sg6h2,~sg6h3,~sg6h4,~sg6h5,~sg6h6,~sg6h7,~sg6h8,~sg6h9,~sg6h10,~sg6h11,~sg6h12].at(x-1))});
5680
5681                         ~setgroup1.value = 0;
5682                         ~setgroup2.value = 0;
5683                         ~setgroup3.value = 0;
5684                         ~setgroup4.value = 0;
5685                         ~setgroup5.value = 0;
5686                         ~setgroup7.value = 0;
5687                         ~setgroup8.value = 0;
5688
5689                         ~setgroupval = 6;
5690                 });
5691         });
5692         ~setgroup7 = Button.new(w,Rect(Window.screenBounds.width-(Window.screenBounds.width/2)+(20*2),~bpt+69+5,20,20/1.6180339887499)).states_([["g7",Color.white,Color.black],["s7",Color.green,Color.black]]).action_({arg button;
5693
5694                 if(button.value == 1, {
5695                         12.do(x = 0; {("fp"++(x=x+1)).asSymbol.envirPut([~sg7a1,~sg7a2,~sg7a3,~sg7a4,~sg7a5,~sg7a6,~sg7a7,~sg7a8,~sg7a9,~sg7a10,~sg7a11,~sg7a12].at(x-1))});
5696                         12.do(x = 0; {("fp"++(x=x+1)++"b").asSymbol.envirPut([~sg7b1,~sg7b2,~sg7b3,~sg7b4,~sg7b5,~sg7b6,~sg7b7,~sg7b8,~sg7b9,~sg7b10,~sg7b11,~sg7b12].at(x-1))});
5697                         12.do(x = 0; {("fp"++(x=x+1)++"c").asSymbol.envirPut([~sg7c1,~sg7c2,~sg7c3,~sg7c4,~sg7c5,~sg7c6,~sg7c7,~sg7c8,~sg7c9,~sg7c10,~sg7c11,~sg7c12].at(x-1))});
5698                         12.do(x = 0; {("fp"++(x=x+1)++"d").asSymbol.envirPut([~sg7d1,~sg7d2,~sg7d3,~sg7d4,~sg7d5,~sg7d6,~sg7d7,~sg7d8,~sg7d9,~sg7d10,~sg7d11,~sg7d12].at(x-1))});
5699                         12.do(x = 0; {("fp"++(x=x+1)++"e").asSymbol.envirPut([~sg7e1,~sg7e2,~sg7e3,~sg7e4,~sg7e5,~sg7e6,~sg7e7,~sg7e8,~sg7e9,~sg7e10,~sg7e11,~sg7e12].at(x-1))});
5700                         12.do(x = 0; {("fp"++(x=x+1)++"f").asSymbol.envirPut([~sg7f1,~sg7f2,~sg7f3,~sg7f4,~sg7f5,~sg7f6,~sg7f7,~sg7f8,~sg7f9,~sg7f10,~sg7f11,~sg7f12].at(x-1))});
5701                         12.do(x = 0; {("fp"++(x=x+1)++"g").asSymbol.envirPut([~sg7g1,~sg7g2,~sg7g3,~sg7g4,~sg7g5,~sg7g6,~sg7g7,~sg7g8,~sg7g9,~sg7g10,~sg7g11,~sg7g12].at(x-1))});
5702                         12.do(x = 0; {("fp"++(x=x+1)++"h").asSymbol.envirPut([~sg7h1,~sg7h2,~sg7h3,~sg7h4,~sg7h5,~sg7h6,~sg7h7,~sg7h8,~sg7h9,~sg7h10,~sg7h11,~sg7h12].at(x-1))});
5703
5704                         ~setgroup1.value = 0;
5705                         ~setgroup2.value = 0;
5706                         ~setgroup3.value = 0;
5707                         ~setgroup4.value = 0;
5708                         ~setgroup5.value = 0;
5709                         ~setgroup6.value = 0;
5710                         ~setgroup8.value = 0;
5711
5712                         ~setgroupval = 7;
5713                 });
5714         });
5715         ~setgroup8 = Button.new(w,Rect(Window.screenBounds.width-(Window.screenBounds.width/2)+(20*3),~bpt+69+5,20,20/1.6180339887499)).states_([["g8",Color.white,Color.black],["s8",Color.green,Color.black]]).action_({arg button;
5716
5717                 if(button.value == 1, {
5718                         12.do(x = 0; {("fp"++(x=x+1)).asSymbol.envirPut([~sg8a1,~sg8a2,~sg8a3,~sg8a4,~sg8a5,~sg8a6,~sg8a7,~sg8a8,~sg8a9,~sg8a10,~sg8a11,~sg8a12].at(x-1))});
5719                         12.do(x = 0; {("fp"++(x=x+1)++"b").asSymbol.envirPut([~sg8b1,~sg8b2,~sg8b3,~sg8b4,~sg8b5,~sg8b6,~sg8b7,~sg8b8,~sg8b9,~sg8b10,~sg8b11,~sg8b12].at(x-1))});
5720                         12.do(x = 0; {("fp"++(x=x+1)++"c").asSymbol.envirPut([~sg8c1,~sg8c2,~sg8c3,~sg8c4,~sg8c5,~sg8c6,~sg8c7,~sg8c8,~sg8c9,~sg8c10,~sg8c11,~sg8c12].at(x-1))});
5721                         12.do(x = 0; {("fp"++(x=x+1)++"d").asSymbol.envirPut([~sg8d1,~sg8d2,~sg8d3,~sg8d4,~sg8d5,~sg8d6,~sg8d7,~sg8d8,~sg8d9,~sg8d10,~sg8d11,~sg8d12].at(x-1))});
5722                         12.do(x = 0; {("fp"++(x=x+1)++"e").asSymbol.envirPut([~sg8e1,~sg8e2,~sg8e3,~sg8e4,~sg8e5,~sg8e6,~sg8e7,~sg8e8,~sg8e9,~sg8e10,~sg8e11,~sg8e12].at(x-1))});
5723                         12.do(x = 0; {("fp"++(x=x+1)++"f").asSymbol.envirPut([~sg8f1,~sg8f2,~sg8f3,~sg8f4,~sg8f5,~sg8f6,~sg8f7,~sg8f8,~sg8f9,~sg8f10,~sg8f11,~sg8f12].at(x-1))});
5724                         12.do(x = 0; {("fp"++(x=x+1)++"g").asSymbol.envirPut([~sg8g1,~sg8g2,~sg8g3,~sg8g4,~sg8g5,~sg8g6,~sg8g7,~sg8g8,~sg8g9,~sg8g10,~sg8g11,~sg8g12].at(x-1))});
5725                         12.do(x = 0; {("fp"++(x=x+1)++"h").asSymbol.envirPut([~sg8h1,~sg8h2,~sg8h3,~sg8h4,~sg8h5,~sg8h6,~sg8h7,~sg8h8,~sg8h9,~sg8h10,~sg8h11,~sg8h12].at(x-1))});
5726
5727                         ~setgroup1.value = 0;
5728                         ~setgroup2.value = 0;
5729                         ~setgroup3.value = 0;
5730                         ~setgroup4.value = 0;
5731                         ~setgroup5.value = 0;
5732                         ~setgroup6.value = 0;
5733                         ~setgroup7.value = 0;
5734
5735                         ~setgroupval = 8;
5736                 });
5737         });
5738
5739
5740         //if setgroup values are nil
5741
5742         if(~setgroupval == nil, {~setgroup1.value = 1;});
5743         if(~setgroupval == 1, {~setgroup1.value = 1;});
5744         if(~setgroupval == 2, {~setgroup2.value = 1;});
5745         if(~setgroupval == 3, {~setgroup3.value = 1;});
5746         if(~setgroupval == 4, {~setgroup4.value = 1;});
5747         if(~setgroupval == 5, {~setgroup5.value = 1;});
5748         if(~setgroupval == 6, {~setgroup6.value = 1;});
5749         if(~setgroupval == 7, {~setgroup7.value = 1;});
5750         if(~setgroupval == 8, {~setgroup8.value = 1;});
5751
5752
5753         //save chord notes buttons, s1-s8
5754
5755         n1 = Button.new(w,Rect(Window.screenBounds.width-(Window.screenBounds.width/2)-(60*2),Window.screenBounds.height-88,60,60/1.6180339887499)).states_([["s1",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button; if(((button.value == 0) or: (button.value == 1)), {~r1=~fp1;~r2=~fp2;~r3=~fp3;~r4=~fp4;~r5=~fp5;~r6=~fp6;~r7=~fp7;~r8=~fp8;~r9=~fp9;~r10=~fp10;~r11=~fp11;~r12=~fp12; 12.do(x = 0; {("fp"++(x=x+1)).asSymbol.envirPut([ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ].at(x-1))}); "s"++"\n"++[ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ].asString.postString; ~u1=~f1;~u2=~f2;~u3=~f3;~u4=~f4;~u5=~f5;~u6=~f6;~u7=~f7;~u8=~f8;~u9=~f9;~u10=~f10;~u11=~f11;~u12=~f12; ~si1aset.value;~si1bset.value;
5756
5757                 if(~setgroup1.value == 1, {12.do(x = 0; {("sg1a"++(x=x+1)).asSymbol.envirPut([~fp1,~fp2,~fp3,~fp4,~fp5,~fp6,~fp7,~fp8,~fp9,~fp10,~fp11,~fp12].at(x-1))});});
5758                 if(~setgroup2.value == 1, {12.do(x = 0; {("sg2a"++(x=x+1)).asSymbol.envirPut([~fp1,~fp2,~fp3,~fp4,~fp5,~fp6,~fp7,~fp8,~fp9,~fp10,~fp11,~fp12].at(x-1))});});
5759                 if(~setgroup3.value == 1, {12.do(x = 0; {("sg3a"++(x=x+1)).asSymbol.envirPut([~fp1,~fp2,~fp3,~fp4,~fp5,~fp6,~fp7,~fp8,~fp9,~fp10,~fp11,~fp12].at(x-1))});});
5760                 if(~setgroup4.value == 1, {12.do(x = 0; {("sg4a"++(x=x+1)).asSymbol.envirPut([~fp1,~fp2,~fp3,~fp4,~fp5,~fp6,~fp7,~fp8,~fp9,~fp10,~fp11,~fp12].at(x-1))});});
5761                 if(~setgroup5.value == 1, {12.do(x = 0; {("sg5a"++(x=x+1)).asSymbol.envirPut([~fp1,~fp2,~fp3,~fp4,~fp5,~fp6,~fp7,~fp8,~fp9,~fp10,~fp11,~fp12].at(x-1))});});
5762                 if(~setgroup6.value == 1, {12.do(x = 0; {("sg6a"++(x=x+1)).asSymbol.envirPut([~fp1,~fp2,~fp3,~fp4,~fp5,~fp6,~fp7,~fp8,~fp9,~fp10,~fp11,~fp12].at(x-1))});});
5763                 if(~setgroup7.value == 1, {12.do(x = 0; {("sg7a"++(x=x+1)).asSymbol.envirPut([~fp1,~fp2,~fp3,~fp4,~fp5,~fp6,~fp7,~fp8,~fp9,~fp10,~fp11,~fp12].at(x-1))});});
5764                 if(~setgroup8.value == 1, {12.do(x = 0; {("sg8a"++(x=x+1)).asSymbol.envirPut([~fp1,~fp2,~fp3,~fp4,~fp5,~fp6,~fp7,~fp8,~fp9,~fp10,~fp11,~fp12].at(x-1))});});
5765
5766                 n1.states_([["s1",Color.green,Color.black]]);
5767                 n2.states_([["s2",Color.white,Color.black]]);
5768                 n3.states_([["s3",Color.white,Color.black]]);
5769                 n4.states_([["s4",Color.white,Color.black]]);
5770                 n5.states_([["s5",Color.white,Color.black]]);
5771                 n6.states_([["s6",Color.white,Color.black]]);
5772                 n7.states_([["s7",Color.white,Color.black]]);
5773                 n8.states_([["s8",Color.white,Color.black]]);
5774         });});
5775
5776         n2 = Button.new(w,Rect(Window.screenBounds.width-(Window.screenBounds.width/2)-(60*1),Window.screenBounds.height-88,60,60/1.6180339887499)).states_([["s2",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button; if(((button.value == 0) or: (button.value == 1)), {~r1b=~fp1b;~r2b=~fp2b;~r3b=~fp3b;~r4b=~fp4b;~r5b=~fp5b;~r6b=~fp6b;~r7b=~fp7b;~r8b=~fp8b;~r9b=~fp9b;~r10b=~fp10b;~r11b=~fp11b;~r12b=~fp12b; 12.do(x = 0; {("fp"++(x=x+1)++"b").asSymbol.envirPut([ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ].at(x-1))}); "s"++"\n"++[ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ].asString.postString; ~u1b=~f1;~u2b=~f2;~u3b=~f3;~u4b=~f4;~u5b=~f5;~u6b=~f6;~u7b=~f7;~u8b=~f8;~u9b=~f9;~u10b=~f10;~u11b=~f11;~u12b=~f12; ~si2set.value;
5777
5778                 if(~setgroup1.value == 1, {12.do(x = 0; {("sg1b"++(x=x+1)).asSymbol.envirPut([~fp1b,~fp2b,~fp3b,~fp4b,~fp5b,~fp6b,~fp7b,~fp8b,~fp9b,~fp10b,~fp11b,~fp12b].at(x-1))});});
5779                 if(~setgroup2.value == 1, {12.do(x = 0; {("sg2b"++(x=x+1)).asSymbol.envirPut([~fp1b,~fp2b,~fp3b,~fp4b,~fp5b,~fp6b,~fp7b,~fp8b,~fp9b,~fp10b,~fp11b,~fp12b].at(x-1))});});
5780                 if(~setgroup3.value == 1, {12.do(x = 0; {("sg3b"++(x=x+1)).asSymbol.envirPut([~fp1b,~fp2b,~fp3b,~fp4b,~fp5b,~fp6b,~fp7b,~fp8b,~fp9b,~fp10b,~fp11b,~fp12b].at(x-1))});});
5781                 if(~setgroup4.value == 1, {12.do(x = 0; {("sg4b"++(x=x+1)).asSymbol.envirPut([~fp1b,~fp2b,~fp3b,~fp4b,~fp5b,~fp6b,~fp7b,~fp8b,~fp9b,~fp10b,~fp11b,~fp12b].at(x-1))});});
5782                 if(~setgroup5.value == 1, {12.do(x = 0; {("sg5b"++(x=x+1)).asSymbol.envirPut([~fp1b,~fp2b,~fp3b,~fp4b,~fp5b,~fp6b,~fp7b,~fp8b,~fp9b,~fp10b,~fp11b,~fp12b].at(x-1))});});
5783                 if(~setgroup6.value == 1, {12.do(x = 0; {("sg6b"++(x=x+1)).asSymbol.envirPut([~fp1b,~fp2b,~fp3b,~fp4b,~fp5b,~fp6b,~fp7b,~fp8b,~fp9b,~fp10b,~fp11b,~fp12b].at(x-1))});});
5784                 if(~setgroup7.value == 1, {12.do(x = 0; {("sg7b"++(x=x+1)).asSymbol.envirPut([~fp1b,~fp2b,~fp3b,~fp4b,~fp5b,~fp6b,~fp7b,~fp8b,~fp9b,~fp10b,~fp11b,~fp12b].at(x-1))});});
5785                 if(~setgroup8.value == 1, {12.do(x = 0; {("sg8b"++(x=x+1)).asSymbol.envirPut([~fp1b,~fp2b,~fp3b,~fp4b,~fp5b,~fp6b,~fp7b,~fp8b,~fp9b,~fp10b,~fp11b,~fp12b].at(x-1))});});
5786
5787                 n1.states_([["s1",Color.white,Color.black]]);
5788                 n2.states_([["s2",Color.green,Color.black]]);
5789                 n3.states_([["s3",Color.white,Color.black]]);
5790                 n4.states_([["s4",Color.white,Color.black]]);
5791                 n5.states_([["s5",Color.white,Color.black]]);
5792                 n6.states_([["s6",Color.white,Color.black]]);
5793                 n7.states_([["s7",Color.white,Color.black]]);
5794                 n8.states_([["s8",Color.white,Color.black]]);
5795         });});
5796         n3 = Button.new(w,Rect(Window.screenBounds.width-(Window.screenBounds.width/2)+(0),   Window.screenBounds.height-88,60,60/1.6180339887499)).states_([["s3",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button; if(((button.value == 0) or: (button.value == 1)), {~r1c=~fp1c;~r2c=~fp2c;~r3c=~fp3c;~r4c=~fp4c;~r5c=~fp5c;~r6c=~fp6c;~r7c=~fp7c;~r8c=~fp8c;~r9c=~fp9c;~r10c=~fp10c;~r11c=~fp11c;~r12c=~fp12c; 12.do(x = 0; {("fp"++(x=x+1)++"c").asSymbol.envirPut([ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ].at(x-1))}); "s"++"\n"++[ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ].asString.postString; ~u1c=~f1;~u2c=~f2;~u3c=~f3;~u4c=~f4;~u5c=~f5;~u6c=~f6;~u7c=~f7;~u8c=~f8;~u9c=~f9;~u10c=~f10;~u11c=~f11;~u12c=~f12; ~si3set.value;
5797
5798                 if(~setgroup1.value == 1, {12.do(x = 0; {("sg1c"++(x=x+1)).asSymbol.envirPut([~fp1c,~fp2c,~fp3c,~fp4c,~fp5c,~fp6c,~fp7c,~fp8c,~fp9c,~fp10c,~fp11c,~fp12c].at(x-1))});});
5799                 if(~setgroup2.value == 1, {12.do(x = 0; {("sg2c"++(x=x+1)).asSymbol.envirPut([~fp1c,~fp2c,~fp3c,~fp4c,~fp5c,~fp6c,~fp7c,~fp8c,~fp9c,~fp10c,~fp11c,~fp12c].at(x-1))});});
5800                 if(~setgroup3.value == 1, {12.do(x = 0; {("sg3c"++(x=x+1)).asSymbol.envirPut([~fp1c,~fp2c,~fp3c,~fp4c,~fp5c,~fp6c,~fp7c,~fp8c,~fp9c,~fp10c,~fp11c,~fp12c].at(x-1))});});
5801                 if(~setgroup4.value == 1, {12.do(x = 0; {("sg4c"++(x=x+1)).asSymbol.envirPut([~fp1c,~fp2c,~fp3c,~fp4c,~fp5c,~fp6c,~fp7c,~fp8c,~fp9c,~fp10c,~fp11c,~fp12c].at(x-1))});});
5802                 if(~setgroup5.value == 1, {12.do(x = 0; {("sg5c"++(x=x+1)).asSymbol.envirPut([~fp1c,~fp2c,~fp3c,~fp4c,~fp5c,~fp6c,~fp7c,~fp8c,~fp9c,~fp10c,~fp11c,~fp12c].at(x-1))});});
5803                 if(~setgroup6.value == 1, {12.do(x = 0; {("sg6c"++(x=x+1)).asSymbol.envirPut([~fp1c,~fp2c,~fp3c,~fp4c,~fp5c,~fp6c,~fp7c,~fp8c,~fp9c,~fp10c,~fp11c,~fp12c].at(x-1))});});
5804                 if(~setgroup7.value == 1, {12.do(x = 0; {("sg7c"++(x=x+1)).asSymbol.envirPut([~fp1c,~fp2c,~fp3c,~fp4c,~fp5c,~fp6c,~fp7c,~fp8c,~fp9c,~fp10c,~fp11c,~fp12c].at(x-1))});});
5805                 if(~setgroup8.value == 1, {12.do(x = 0; {("sg8c"++(x=x+1)).asSymbol.envirPut([~fp1c,~fp2c,~fp3c,~fp4c,~fp5c,~fp6c,~fp7c,~fp8c,~fp9c,~fp10c,~fp11c,~fp12c].at(x-1))});});
5806
5807                 n1.states_([["s1",Color.white,Color.black]]);
5808                 n2.states_([["s2",Color.white,Color.black]]);
5809                 n3.states_([["s3",Color.green,Color.black]]);
5810                 n4.states_([["s4",Color.white,Color.black]]);
5811                 n5.states_([["s5",Color.white,Color.black]]);
5812                 n6.states_([["s6",Color.white,Color.black]]);
5813                 n7.states_([["s7",Color.white,Color.black]]);
5814                 n8.states_([["s8",Color.white,Color.black]]);
5815         });});
5816         n4 = Button.new(w,Rect(Window.screenBounds.width-(Window.screenBounds.width/2)+(60*1),Window.screenBounds.height-88,60,60/1.6180339887499)).states_([["s4",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button; if(((button.value == 0) or: (button.value == 1)), {~r1d=~fp1d;~r2d=~fp2d;~r3d=~fp3d;~r4d=~fp4d;~r5d=~fp5d;~r6d=~fp6d;~r7d=~fp7d;~r8d=~fp8d;~r9d=~fp9d;~r10d=~fp10d;~r11d=~fp11d;~r12d=~fp12d; 12.do(x = 0; {("fp"++(x=x+1)++"d").asSymbol.envirPut([ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ].at(x-1))}); "s"++"\n"++[ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ].asString.postString; ~u1d=~f1;~u2d=~f2;~u3d=~f3;~u4d=~f4;~u5d=~f5;~u6d=~f6;~u7d=~f7;~u8d=~f8;~u9d=~f9;~u10d=~f10;~u11d=~f11;~u12d=~f12; ~si4set.value;
5817
5818                 if(~setgroup1.value == 1, {12.do(x = 0; {("sg1d"++(x=x+1)).asSymbol.envirPut([~fp1d,~fp2d,~fp3d,~fp4d,~fp5d,~fp6d,~fp7d,~fp8d,~fp9d,~fp10d,~fp11d,~fp12d].at(x-1))});});
5819                 if(~setgroup2.value == 1, {12.do(x = 0; {("sg2d"++(x=x+1)).asSymbol.envirPut([~fp1d,~fp2d,~fp3d,~fp4d,~fp5d,~fp6d,~fp7d,~fp8d,~fp9d,~fp10d,~fp11d,~fp12d].at(x-1))});});
5820                 if(~setgroup3.value == 1, {12.do(x = 0; {("sg3d"++(x=x+1)).asSymbol.envirPut([~fp1d,~fp2d,~fp3d,~fp4d,~fp5d,~fp6d,~fp7d,~fp8d,~fp9d,~fp10d,~fp11d,~fp12d].at(x-1))});});
5821                 if(~setgroup4.value == 1, {12.do(x = 0; {("sg4d"++(x=x+1)).asSymbol.envirPut([~fp1d,~fp2d,~fp3d,~fp4d,~fp5d,~fp6d,~fp7d,~fp8d,~fp9d,~fp10d,~fp11d,~fp12d].at(x-1))});});
5822                 if(~setgroup5.value == 1, {12.do(x = 0; {("sg5d"++(x=x+1)).asSymbol.envirPut([~fp1d,~fp2d,~fp3d,~fp4d,~fp5d,~fp6d,~fp7d,~fp8d,~fp9d,~fp10d,~fp11d,~fp12d].at(x-1))});});
5823                 if(~setgroup6.value == 1, {12.do(x = 0; {("sg6d"++(x=x+1)).asSymbol.envirPut([~fp1d,~fp2d,~fp3d,~fp4d,~fp5d,~fp6d,~fp7d,~fp8d,~fp9d,~fp10d,~fp11d,~fp12d].at(x-1))});});
5824                 if(~setgroup7.value == 1, {12.do(x = 0; {("sg7d"++(x=x+1)).asSymbol.envirPut([~fp1d,~fp2d,~fp3d,~fp4d,~fp5d,~fp6d,~fp7d,~fp8d,~fp9d,~fp10d,~fp11d,~fp12d].at(x-1))});});
5825                 if(~setgroup8.value == 1, {12.do(x = 0; {("sg8d"++(x=x+1)).asSymbol.envirPut([~fp1d,~fp2d,~fp3d,~fp4d,~fp5d,~fp6d,~fp7d,~fp8d,~fp9d,~fp10d,~fp11d,~fp12d].at(x-1))});});
5826
5827                 n1.states_([["s1",Color.white,Color.black]]);
5828                 n2.states_([["s2",Color.white,Color.black]]);
5829                 n3.states_([["s3",Color.white,Color.black]]);
5830                 n4.states_([["s4",Color.green,Color.black]]);
5831                 n5.states_([["s5",Color.white,Color.black]]);
5832                 n6.states_([["s6",Color.white,Color.black]]);
5833                 n7.states_([["s7",Color.white,Color.black]]);
5834                 n8.states_([["s8",Color.white,Color.black]]);
5835         });});
5836         n5 = Button.new(w,Rect(Window.screenBounds.width-(Window.screenBounds.width/2)-(60*2),Window.screenBounds.height-52,60,60/1.6180339887499)).states_([["s5",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button; if(((button.value == 0) or: (button.value == 1)), {~r1e=~fp1e;~r2e=~fp2e;~r3e=~fp3e;~r4e=~fp4e;~r5e=~fp5e;~r6e=~fp6e;~r7e=~fp7e;~r8e=~fp8e;~r9e=~fp9e;~r10e=~fp10e;~r11e=~fp11e;~r12e=~fp12e; 12.do(x = 0; {("fp"++(x=x+1)++"e").asSymbol.envirPut([ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ].at(x-1))}); "s"++"\n"++[ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ].asString.postString; ~u1e=~f1;~u2e=~f2;~u3e=~f3;~u4e=~f4;~u5e=~f5;~u6e=~f6;~u7e=~f7;~u8e=~f8;~u9e=~f9;~u10e=~f10;~u11e=~f11;~u12e=~f12; ~si5set.value;
5837
5838                 if(~setgroup1.value == 1, {12.do(x = 0; {("sg1e"++(x=x+1)).asSymbol.envirPut([~fp1e,~fp2e,~fp3e,~fp4e,~fp5e,~fp6e,~fp7e,~fp8e,~fp9e,~fp10e,~fp11e,~fp12e].at(x-1))});});
5839                 if(~setgroup2.value == 1, {12.do(x = 0; {("sg2e"++(x=x+1)).asSymbol.envirPut([~fp1e,~fp2e,~fp3e,~fp4e,~fp5e,~fp6e,~fp7e,~fp8e,~fp9e,~fp10e,~fp11e,~fp12e].at(x-1))});});
5840                 if(~setgroup3.value == 1, {12.do(x = 0; {("sg3e"++(x=x+1)).asSymbol.envirPut([~fp1e,~fp2e,~fp3e,~fp4e,~fp5e,~fp6e,~fp7e,~fp8e,~fp9e,~fp10e,~fp11e,~fp12e].at(x-1))});});
5841                 if(~setgroup4.value == 1, {12.do(x = 0; {("sg4e"++(x=x+1)).asSymbol.envirPut([~fp1e,~fp2e,~fp3e,~fp4e,~fp5e,~fp6e,~fp7e,~fp8e,~fp9e,~fp10e,~fp11e,~fp12e].at(x-1))});});
5842                 if(~setgroup5.value == 1, {12.do(x = 0; {("sg5e"++(x=x+1)).asSymbol.envirPut([~fp1e,~fp2e,~fp3e,~fp4e,~fp5e,~fp6e,~fp7e,~fp8e,~fp9e,~fp10e,~fp11e,~fp12e].at(x-1))});});
5843                 if(~setgroup6.value == 1, {12.do(x = 0; {("sg6e"++(x=x+1)).asSymbol.envirPut([~fp1e,~fp2e,~fp3e,~fp4e,~fp5e,~fp6e,~fp7e,~fp8e,~fp9e,~fp10e,~fp11e,~fp12e].at(x-1))});});
5844                 if(~setgroup7.value == 1, {12.do(x = 0; {("sg7e"++(x=x+1)).asSymbol.envirPut([~fp1e,~fp2e,~fp3e,~fp4e,~fp5e,~fp6e,~fp7e,~fp8e,~fp9e,~fp10e,~fp11e,~fp12e].at(x-1))});});
5845                 if(~setgroup8.value == 1, {12.do(x = 0; {("sg8e"++(x=x+1)).asSymbol.envirPut([~fp1e,~fp2e,~fp3e,~fp4e,~fp5e,~fp6e,~fp7e,~fp8e,~fp9e,~fp10e,~fp11e,~fp12e].at(x-1))});});
5846
5847                 n1.states_([["s1",Color.white,Color.black]]);
5848                 n2.states_([["s2",Color.white,Color.black]]);
5849                 n3.states_([["s3",Color.white,Color.black]]);
5850                 n4.states_([["s4",Color.white,Color.black]]);
5851                 n5.states_([["s5",Color.green,Color.black]]);
5852                 n6.states_([["s6",Color.white,Color.black]]);
5853                 n7.states_([["s7",Color.white,Color.black]]);
5854                 n8.states_([["s8",Color.white,Color.black]]);
5855         });});
5856         n6 = Button.new(w,Rect(Window.screenBounds.width-(Window.screenBounds.width/2)-(60*1),Window.screenBounds.height-52,60,60/1.6180339887499)).states_([["s6",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button; if(((button.value == 0) or: (button.value == 1)), {~r1f=~fp1f;~r2f=~fp2f;~r3f=~fp3f;~r4f=~fp4f;~r5f=~fp5f;~r6f=~fp6f;~r7f=~fp7f;~r8f=~fp8f;~r9f=~fp9f;~r10f=~fp10f;~r11f=~fp11f;~r12f=~fp12f; 12.do(x = 0; {("fp"++(x=x+1)++"f").asSymbol.envirPut([ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ].at(x-1))}); "s"++"\n"++[ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ].asString.postString; ~u1f=~f1;~u2f=~f2;~u3f=~f3;~u4f=~f4;~u5f=~f5;~u6f=~f6;~u7f=~f7;~u8f=~f8;~u9f=~f9;~u10f=~f10;~u11e=~f11;~u12f=~f12; ~si6set.value;
5857
5858                 if(~setgroup1.value == 1, {12.do(x = 0; {("sg1f"++(x=x+1)).asSymbol.envirPut([~fp1f,~fp2f,~fp3f,~fp4f,~fp5f,~fp6f,~fp7f,~fp8f,~fp9f,~fp10f,~fp11f,~fp12f].at(x-1))});});
5859                 if(~setgroup2.value == 1, {12.do(x = 0; {("sg2f"++(x=x+1)).asSymbol.envirPut([~fp1f,~fp2f,~fp3f,~fp4f,~fp5f,~fp6f,~fp7f,~fp8f,~fp9f,~fp10f,~fp11f,~fp12f].at(x-1))});});
5860                 if(~setgroup3.value == 1, {12.do(x = 0; {("sg3f"++(x=x+1)).asSymbol.envirPut([~fp1f,~fp2f,~fp3f,~fp4f,~fp5f,~fp6f,~fp7f,~fp8f,~fp9f,~fp10f,~fp11f,~fp12f].at(x-1))});});
5861                 if(~setgroup4.value == 1, {12.do(x = 0; {("sg4f"++(x=x+1)).asSymbol.envirPut([~fp1f,~fp2f,~fp3f,~fp4f,~fp5f,~fp6f,~fp7f,~fp8f,~fp9f,~fp10f,~fp11f,~fp12f].at(x-1))});});
5862                 if(~setgroup5.value == 1, {12.do(x = 0; {("sg5f"++(x=x+1)).asSymbol.envirPut([~fp1f,~fp2f,~fp3f,~fp4f,~fp5f,~fp6f,~fp7f,~fp8f,~fp9f,~fp10f,~fp11f,~fp12f].at(x-1))});});
5863                 if(~setgroup6.value == 1, {12.do(x = 0; {("sg6f"++(x=x+1)).asSymbol.envirPut([~fp1f,~fp2f,~fp3f,~fp4f,~fp5f,~fp6f,~fp7f,~fp8f,~fp9f,~fp10f,~fp11f,~fp12f].at(x-1))});});
5864                 if(~setgroup7.value == 1, {12.do(x = 0; {("sg7f"++(x=x+1)).asSymbol.envirPut([~fp1f,~fp2f,~fp3f,~fp4f,~fp5f,~fp6f,~fp7f,~fp8f,~fp9f,~fp10f,~fp11f,~fp12f].at(x-1))});});
5865                 if(~setgroup8.value == 1, {12.do(x = 0; {("sg8f"++(x=x+1)).asSymbol.envirPut([~fp1f,~fp2f,~fp3f,~fp4f,~fp5f,~fp6f,~fp7f,~fp8f,~fp9f,~fp10f,~fp11f,~fp12f].at(x-1))});});
5866
5867                 n1.states_([["s1",Color.white,Color.black]]);
5868                 n2.states_([["s2",Color.white,Color.black]]);
5869                 n3.states_([["s3",Color.white,Color.black]]);
5870                 n4.states_([["s4",Color.white,Color.black]]);
5871                 n5.states_([["s5",Color.white,Color.black]]);
5872                 n6.states_([["s6",Color.green,Color.black]]);
5873                 n7.states_([["s7",Color.white,Color.black]]);
5874                 n8.states_([["s8",Color.white,Color.black]]);
5875         });});
5876         n7 = Button.new(w,Rect(Window.screenBounds.width-(Window.screenBounds.width/2)+(0),   Window.screenBounds.height-52,60,60/1.6180339887499)).states_([["s7",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button; if(((button.value == 0) or: (button.value == 1)), {~r1g=~fp1g;~r2g=~fp2g;~r3g=~fp3g;~r4g=~fp4g;~r5g=~fp5g;~r6g=~fp6g;~r7g=~fp7g;~r8g=~fp8g;~r9g=~fp9g;~r10g=~fp10g;~r11g=~fp11g;~r12g=~fp12g; 12.do(x = 0; {("fp"++(x=x+1)++"g").asSymbol.envirPut([ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ].at(x-1))}); "s"++"\n"++[ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ].asString.postString; ~u1g=~f1;~u2g=~f2;~u3g=~f3;~u4g=~f4;~u5g=~f5;~u6g=~f6;~u7g=~f7;~u8g=~f8;~u9g=~f9;~u10g=~f10;~u11f=~f11;~u12g=~f12; ~si7set.value;
5877
5878                 if(~setgroup1.value == 1, {12.do(x = 0; {("sg1g"++(x=x+1)).asSymbol.envirPut([~fp1g,~fp2g,~fp3g,~fp4g,~fp5g,~fp6g,~fp7g,~fp8g,~fp9g,~fp10g,~fp11g,~fp12g].at(x-1))});});
5879                 if(~setgroup2.value == 1, {12.do(x = 0; {("sg2g"++(x=x+1)).asSymbol.envirPut([~fp1g,~fp2g,~fp3g,~fp4g,~fp5g,~fp6g,~fp7g,~fp8g,~fp9g,~fp10g,~fp11g,~fp12g].at(x-1))});});
5880                 if(~setgroup3.value == 1, {12.do(x = 0; {("sg3g"++(x=x+1)).asSymbol.envirPut([~fp1g,~fp2g,~fp3g,~fp4g,~fp5g,~fp6g,~fp7g,~fp8g,~fp9g,~fp10g,~fp11g,~fp12g].at(x-1))});});
5881                 if(~setgroup4.value == 1, {12.do(x = 0; {("sg4g"++(x=x+1)).asSymbol.envirPut([~fp1g,~fp2g,~fp3g,~fp4g,~fp5g,~fp6g,~fp7g,~fp8g,~fp9g,~fp10g,~fp11g,~fp12g].at(x-1))});});
5882                 if(~setgroup5.value == 1, {12.do(x = 0; {("sg5g"++(x=x+1)).asSymbol.envirPut([~fp1g,~fp2g,~fp3g,~fp4g,~fp5g,~fp6g,~fp7g,~fp8g,~fp9g,~fp10g,~fp11g,~fp12g].at(x-1))});});
5883                 if(~setgroup6.value == 1, {12.do(x = 0; {("sg6g"++(x=x+1)).asSymbol.envirPut([~fp1g,~fp2g,~fp3g,~fp4g,~fp5g,~fp6g,~fp7g,~fp8g,~fp9g,~fp10g,~fp11g,~fp12g].at(x-1))});});
5884                 if(~setgroup7.value == 1, {12.do(x = 0; {("sg7g"++(x=x+1)).asSymbol.envirPut([~fp1g,~fp2g,~fp3g,~fp4g,~fp5g,~fp6g,~fp7g,~fp8g,~fp9g,~fp10g,~fp11g,~fp12g].at(x-1))});});
5885                 if(~setgroup8.value == 1, {12.do(x = 0; {("sg8g"++(x=x+1)).asSymbol.envirPut([~fp1g,~fp2g,~fp3g,~fp4g,~fp5g,~fp6g,~fp7g,~fp8g,~fp9g,~fp10g,~fp11g,~fp12g].at(x-1))});});
5886
5887                 n1.states_([["s1",Color.white,Color.black]]);
5888                 n2.states_([["s2",Color.white,Color.black]]);
5889                 n3.states_([["s3",Color.white,Color.black]]);
5890                 n4.states_([["s4",Color.white,Color.black]]);
5891                 n5.states_([["s5",Color.white,Color.black]]);
5892                 n6.states_([["s6",Color.white,Color.black]]);
5893                 n7.states_([["s7",Color.green,Color.black]]);
5894                 n8.states_([["s8",Color.white,Color.black]]);
5895         });});
5896         n8 = Button.new(w,Rect(Window.screenBounds.width-(Window.screenBounds.width/2)+(60*1),Window.screenBounds.height-52,60,60/1.6180339887499)).states_([["s8",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button; if(((button.value == 0) or: (button.value == 1)), {~r1h=~fp1h;~r2h=~fp2h;~r3h=~fp3h;~r4h=~fp4h;~r5h=~fp5h;~r6h=~fp6h;~r7h=~fp7h;~r8h=~fp8h;~r9h=~fp9h;~r10h=~fp10h;~r11h=~fp11h;~r12h=~fp12h; 12.do(x = 0; {("fp"++(x=x+1)++"h").asSymbol.envirPut([ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ].at(x-1))}); "s"++"\n"++[ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ].asString.postString; ~u1h=~f1;~u2h=~f2;~u3h=~f3;~u4h=~f4;~u5h=~f5;~u6h=~f6;~u7h=~f7;~u8h=~f8;~u9h=~f9;~u10h=~f10;~u11g=~f11;~u12h=~f12; ~si8set.value;
5897
5898                 if(~setgroup1.value == 1, {12.do(x = 0; {("sg1h"++(x=x+1)).asSymbol.envirPut([~fp1h,~fp2h,~fp3h,~fp4h,~fp5h,~fp6h,~fp7h,~fp8h,~fp9h,~fp10h,~fp11h,~fp12h].at(x-1))});});
5899                 if(~setgroup2.value == 1, {12.do(x = 0; {("sg2h"++(x=x+1)).asSymbol.envirPut([~fp1h,~fp2h,~fp3h,~fp4h,~fp5h,~fp6h,~fp7h,~fp8h,~fp9h,~fp10h,~fp11h,~fp12h].at(x-1))});});
5900                 if(~setgroup3.value == 1, {12.do(x = 0; {("sg3h"++(x=x+1)).asSymbol.envirPut([~fp1h,~fp2h,~fp3h,~fp4h,~fp5h,~fp6h,~fp7h,~fp8h,~fp9h,~fp10h,~fp11h,~fp12h].at(x-1))});});
5901                 if(~setgroup4.value == 1, {12.do(x = 0; {("sg4h"++(x=x+1)).asSymbol.envirPut([~fp1h,~fp2h,~fp3h,~fp4h,~fp5h,~fp6h,~fp7h,~fp8h,~fp9h,~fp10h,~fp11h,~fp12h].at(x-1))});});
5902                 if(~setgroup5.value == 1, {12.do(x = 0; {("sg5h"++(x=x+1)).asSymbol.envirPut([~fp1h,~fp2h,~fp3h,~fp4h,~fp5h,~fp6h,~fp7h,~fp8h,~fp9h,~fp10h,~fp11h,~fp12h].at(x-1))});});
5903                 if(~setgroup6.value == 1, {12.do(x = 0; {("sg6h"++(x=x+1)).asSymbol.envirPut([~fp1h,~fp2h,~fp3h,~fp4h,~fp5h,~fp6h,~fp7h,~fp8h,~fp9h,~fp10h,~fp11h,~fp12h].at(x-1))});});
5904                 if(~setgroup7.value == 1, {12.do(x = 0; {("sg7h"++(x=x+1)).asSymbol.envirPut([~fp1h,~fp2h,~fp3h,~fp4h,~fp5h,~fp6h,~fp7h,~fp8h,~fp9h,~fp10h,~fp11h,~fp12h].at(x-1))});});
5905                 if(~setgroup8.value == 1, {12.do(x = 0; {("sg8h"++(x=x+1)).asSymbol.envirPut([~fp1h,~fp2h,~fp3h,~fp4h,~fp5h,~fp6h,~fp7h,~fp8h,~fp9h,~fp10h,~fp11h,~fp12h].at(x-1))});});
5906
5907                 n1.states_([["s1",Color.white,Color.black]]);
5908                 n2.states_([["s2",Color.white,Color.black]]);
5909                 n3.states_([["s3",Color.white,Color.black]]);
5910                 n4.states_([["s4",Color.white,Color.black]]);
5911                 n5.states_([["s5",Color.white,Color.black]]);
5912                 n6.states_([["s6",Color.white,Color.black]]);
5913                 n7.states_([["s7",Color.white,Color.black]]);
5914                 n8.states_([["s8",Color.green,Color.black]]);
5915         });});
5916
5917
5918         //undo saved chord pop-up menu
5919
5920         ~undo = PopUpMenu(w, Rect(Window.screenBounds.width-(Window.screenBounds.width/3)+39,Window.screenBounds.height-52+19.777087639995-(40/1.6180339887499)-8,40,40/1.6180339887499)).items_(["uc","u1","u2","u3","u4","u5","u6","u7","u8"]).background_(Color.black).stringColor_(Color.white).action_({arg button;});
5921
5922
5923         //set button for undo pop-up menu
5924
5925         set2 = Button.new(w,Rect(Window.screenBounds.width-(Window.screenBounds.width/3)+40+39,Window.screenBounds.height-52+19.777087639995-(40/1.6180339887499)-8,40,40/1.6180339887499)).states_([["set",Color.white,Color.black]]).action_({arg button;
5926                 case
5927                 {~undo.value == 0}{if(([ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ] != [~undof1,~undof2,~undof3,~undof4,~undof5,~undof6,~undof7,~undof8,~undof9,~undof10,~undof11,~undof12]).postln, {12.do(x = 0; {("f"++(x=x+1)).asSymbol.envirPut([~undof1,~undof2,~undof3,~undof4,~undof5,~undof6,~undof7,~undof8,~undof9,~undof10,~undof11,~undof12].at(x-1))});}/*,{12.do(x = 0; {("f"++(x=x+1)).asSymbol.envirPut([~redof1,~redof2,~redof3,~redof4,~redof5,~redof6,~redof7,~redof8,~redof9,~redof10,~redof11,~redof12].at(x-1))});}*/);~undo.value = 0;}
5928                 {~undo.value == 1}{if(([~fp1,~fp2,~fp3,~fp4,~fp5,~fp6,~fp7,~fp8,~fp9,~fp10,~fp11,~fp12] == [~r1,~r2,~r3,~r4,~r5,~r6,~r7,~r8,~r9,~r10,~r11,~r12]).postln, {12.do(x = 0; {("fp"++(x=x+1)).asSymbol.envirPut([~u1,~u2,~u3,~u4,~u5,~u6,~u7,~u8,~u9,~u10,~u11,~u12].at(x-1))});},{12.do(x = 0; {("fp"++(x=x+1)).asSymbol.envirPut([~r1,~r2,~r3,~r4,~r5,~r6,~r7,~r8,~r9,~r10,~r11,~r12].at(x-1))});});~undo.value = 0;}
5929                 {~undo.value == 2}{if([~fp1b,~fp2b,~fp3b,~fp4b,~fp5b,~fp6b,~fp7b,~fp8b,~fp9b,~fp10b,~fp11b,~fp12b] == [~r1b,~r2b,~r3b,~r4b,~r5b,~r6b,~r7b,~r8b,~r9b,~r10b,~r11b,~r12b], {12.do(x = 0; {("fp"++(x=x+1)++"b").asSymbol.envirPut([~u1b,~u2b,~u3b,~u4b,~u5b,~u6b,~u7b,~u8b,~u9b,~u10b,~u11b,~u12b].at(x-1))});},{12.do(x = 0; {("fp"++(x=x+1)++"b").asSymbol.envirPut([~r1b,~r2b,~r3b,~r4b,~r5b,~r6b,~r7b,~r8b,~r9b,~r10b,~r11b,~r12b].at(x-1))});});~undo.value = 0;}
5930                 {~undo.value == 3}{if([~fp1c,~fp2c,~fp3c,~fp4c,~fp5c,~fp6c,~fp7c,~fp8c,~fp9c,~fp10c,~fp11c,~fp12c] == [~r1c,~r2c,~r3c,~r4c,~r5c,~r6c,~r7c,~r8c,~r9c,~r10c,~r11c,~r12c], {12.do(x = 0; {("fp"++(x=x+1)++"c").asSymbol.envirPut([~u1c,~u2c,~u3c,~u4c,~u5c,~u6c,~u7c,~u8c,~u9c,~u10c,~u11c,~u12c].at(x-1))});},{12.do(x = 0; {("fp"++(x=x+1)++"c").asSymbol.envirPut([~r1c,~r2c,~r3c,~r4c,~r5c,~r6c,~r7c,~r8c,~r9c,~r10c,~r11c,~r12c].at(x-1))});});~undo.value = 0;}
5931                 {~undo.value == 4}{if([~fp1d,~fp2d,~fp3d,~fp4d,~fp5d,~fp6d,~fp7d,~fp8d,~fp9d,~fp10d,~fp11d,~fp12d] == [~r1d,~r2d,~r3d,~r4d,~r5d,~r6d,~r7d,~r8d,~r9d,~r10d,~r11d,~r12d], {12.do(x = 0; {("fp"++(x=x+1)++"d").asSymbol.envirPut([~u1d,~u2d,~u3d,~u4d,~u5d,~u6d,~u7d,~u8d,~u9d,~u10d,~u11d,~u12d].at(x-1))});},{12.do(x = 0; {("fp"++(x=x+1)++"d").asSymbol.envirPut([~r1d,~r2d,~r3d,~r4d,~r5d,~r6d,~r7d,~r8d,~r9d,~r10d,~r11d,~r12d].at(x-1))});});~undo.value = 0;}
5932                 {~undo.value == 5}{if([~fp1e,~fp2e,~fp3e,~fp4e,~fp5e,~fp6e,~fp7e,~fp8e,~fp9e,~fp10e,~fp11e,~fp12e] == [~r1e,~r2e,~r3e,~r4e,~r5e,~r6e,~r7e,~r8e,~r9e,~r10e,~r11e,~r12e], {12.do(x = 0; {("fp"++(x=x+1)++"e").asSymbol.envirPut([~u1e,~u2e,~u3e,~u4e,~u5e,~u6e,~u7e,~u8e,~u9e,~u10e,~u11e,~u12e].at(x-1))});},{12.do(x = 0; {("fp"++(x=x+1)++"e").asSymbol.envirPut([~r1e,~r2e,~r3e,~r4e,~r5e,~r6e,~r7e,~r8e,~r9e,~r10e,~r11e,~r12e].at(x-1))});});~undo.value = 0;}
5933                 {~undo.value == 6}{if([~fp1f,~fp2f,~fp3f,~fp4f,~fp5f,~fp6f,~fp7f,~fp8f,~fp9f,~fp10f,~fp11f,~fp12f] == [~r1f,~r2f,~r3f,~r4f,~r5f,~r6f,~r7f,~r8f,~r9f,~r10f,~r11f,~r12f], {12.do(x = 0; {("fp"++(x=x+1)++"f").asSymbol.envirPut([~u1f,~u2f,~u3f,~u4f,~u5f,~u6f,~u7f,~u8f,~u9f,~u10f,~u11f,~u12f].at(x-1))});},{12.do(x = 0; {("fp"++(x=x+1)++"f").asSymbol.envirPut([~r1f,~r2f,~r3f,~r4f,~r5f,~r6f,~r7f,~r8f,~r9f,~r10f,~r11f,~r12f].at(x-1))});});~undo.value = 0;}
5934                 {~undo.value == 7}{if([~fp1g,~fp2g,~fp3g,~fp4g,~fp5g,~fp6g,~fp7g,~fp8g,~fp9g,~fp10g,~fp11g,~fp12g] == [~r1g,~r2g,~r3g,~r4g,~r5g,~r6g,~r7g,~r8g,~r9g,~r10g,~r11g,~r12g], {12.do(x = 0; {("fp"++(x=x+1)++"g").asSymbol.envirPut([~u1g,~u2g,~u3g,~u4g,~u5g,~u6g,~u7g,~u8g,~u9g,~u10g,~u11g,~u12g].at(x-1))});},{12.do(x = 0; {("fp"++(x=x+1)++"g").asSymbol.envirPut([~r1g,~r2g,~r3g,~r4g,~r5g,~r6g,~r7g,~r8g,~r9g,~r10g,~r11g,~r12g].at(x-1))});});~undo.value = 0;}
5935                 {~undo.value == 8}{if([~fp1h,~fp2h,~fp3h,~fp4h,~fp5h,~fp6h,~fp7h,~fp8h,~fp9h,~fp10h,~fp11h,~fp12h] == [~r1h,~r2h,~r3h,~r4h,~r5h,~r6h,~r7h,~r8h,~r9h,~r10h,~r11h,~r12h], {12.do(x = 0; {("fp"++(x=x+1)++"h").asSymbol.envirPut([~u1h,~u2h,~u3h,~u4h,~u5h,~u6h,~u7h,~u8h,~u9h,~u10h,~u11h,~u12h].at(x-1))});},{12.do(x = 0; {("fp"++(x=x+1)++"g").asSymbol.envirPut([~r1h,~r2h,~r3h,~r4h,~r5h,~r6h,~r7h,~r8h,~r9h,~r10h,~r11h,~r12h].at(x-1))});});~undo.value = 0;};
5936         });
5937
5938
5939         //record/stop record button
5940
5941         ~startrecord = Button.new(w,Rect(Window.screenBounds.width-(Window.screenBounds.width/3)+39,Window.screenBounds.height-52+19.777087639995,28,28/1.6180339887499)).states_([["rc",Color.white,Color.black],["/rc",Color.black,Color.red]]).action_({arg button;
5942
5943                 if(button.value == 1, {~numsynths.stop; s.record; if(button.value == 0, {button.value = 1});},
5944                         {s.stopRecording; ~startrecord.value = 0; ~pauserecord.value = 0; ~numsynths.stop; ~numsynths.play;});
5945         });
5946
5947
5948         //pause record button
5949
5950         ~pauserecord = Button.new(w,Rect(Window.screenBounds.width-(Window.screenBounds.width/3)+28+39,Window.screenBounds.height-52+19.777087639995,28,28/1.6180339887499)).states_([["prc",Color.white,Color.black],["/prc",Color.black,Color.blue]]).action_({arg button; if(button == 1, {s.pauseRecording;}, {s.record});});
5951
5952
5953         //minimize GUI window button
5954
5955         ~min = Button.new(w,Rect(Window.screenBounds.width-20,~bpt+69+5-(20/1.6180339887499),20,20/1.6180339887499)).states_([["m",Color.white,Color.black]]).action_({arg button; w.minimize;
5956
5957                 ~fullscreen_correct = {w.fullScreen};
5958                 ~fscview = UserView(w, Rect(0,0, Window.screenBounds.width-100, Window.screenBounds.height;));
5959                 ~fullscreen_button = Button.new(w,Rect(Window.screenBounds.width/2-35,Window.screenBounds.height/2+120,150,20)).states_([["re-adjust to fullscreen",Color.white,Color.black]]).action_({arg button; w.fullScreen; ~fullscreen_button.close; ~fullscreen_button = nil;});
5960                 ~fscview.mouseEnterAction_{|v, x, y| ~fullscreen_correct.value; ~fullscreen_correct = nil; ~fscview.close; ~fscview = nil; ~fullscreen_button.close; ~fullscreen_button = nil;};
5961         });
5962
5963
5964         //close GUI window button
5965
5966         ~close = Button.new(w,Rect(Window.screenBounds.width-20,~bpt+69+5,20,20/1.6180339887499)).states_([["c",Color.white,Color.black]]).action_({arg button;
5967
5968                 if(~closemessage != nil, {~closemessage.close}, {nil});
5969                 ~closemessage = View(w, Rect(Window.screenBounds.width-(340+46),Window.screenBounds.height-(340+46/1.6180339887499)-110,340+46,340+46/1.6180339887499)).background_(Color.black).front;
5970                 ~closemessagestring = StaticText(~closemessage, Rect(0,0,340+46,340+46/1.6180339887499)).background_(Color.black);
5971                 ~closemessagestring.align = \center;
5972                 ~closemessagestring.string ="Close Timewave Synth?";
5973                 ~closemessagestring.stringColor = Color.white;
5974                 ~closemessagebutton1 = Button.new(~closemessage,Rect(120-46+40,340/1.6180339887499-30,46,46/1.6180339887499)).states_([["Yes",Color.white,Color.black]]).action_({AppClock.sched(0, {~cpumonitorroutine.stop; ~metronome.stop; ~loop.stop; ~loop.reset; ~numsynths.stop; w.close; Task({1.do({if(~l1a.isRunning == true or: ~l1a1.isRunning == true, {~synthfree.value;}, {nil}); 1.wait; Server.freeAll;});}).play;});});
5975                 ~closemessagebutton2 = Button.new(~closemessage,Rect(320+46-130,340/1.6180339887499-30,46,46/1.6180339887499)).states_([["No",Color.white,Color.black]]).action_({AppClock.sched(0, {~closemessage.close;});});
5976                 ~closemessage.front;
5977
5978         });
5979
5980
5981         w.front; w.fullScreen;
5982
5983         /* e-mail: ken_brant@ymail.com */
5984
5985 }.value);
5986 );
5987 );
5988
5989
5990 //Interpreted King Wen Sequences
5991
5992 /*
5993
5994 (#a,b,c,d,e,f = /*[ 128.43436842029,128.43436842029,128.43436842029,128.43436842029,128.43436842029,128.43436842029  ]*/
5995 [ ~basefreq,~basefreq,~basefreq,~basefreq,~basefreq,~basefreq  ];
5996 ~a = a; ~b = b; ~c =c; ~d = d; ~e = e;~f=f;);
5997
5998 ~fth = 1.4142135623729;
5999 ~bi  = ~fth; (~bi  = "binary interval" - intverval of key change to a hexagram line's opposite in King Wen sequence)
6000
6001
6002 (First Setting)
6003
6004 /*1*/   #a,b,c,d,e,f=[ ~a,~b,~c,~d,~e,~f  ],
6005 /*2*/   [ a = a/~bi, b = b/~bi, c = c/~bi, d = d/~bi, e = e/~bi, f = f/~bi ],
6006 /*3*/   [ a = a,     b = b*~bi, c = c,     d = d,     e = e,     f = f*~bi ],
6007 /*4*/   [ a = a*~bi, b = b/~bi, c = c,     d = d,     e = e*~bi, f = f/~bi ],
6008 /*5*/   [ a = a/~bi, b = b*~bi, c = c,     d = d*~bi, e = e,     f = f*~bi ],
6009 /*6*/   [ a = a*~bi, b = b,     c = c*~bi, d = d/~bi, e = e,     f = f/~bi ],
6010 /*7*/   [ a = a/~bi, b = b/~bi, c = c/~bi, d = d,     e = e,     f = f     ],
6011 /*8*/   [ a = a,     b = b*~bi, c = c,     d = d,     e = e/~bi, f = f     ],
6012 /*9*/   [ a = a*~bi, b = b,     c = c,     d = d*~bi, e = e*~bi, f = f*~bi ],
6013 /*10*/  [ a = a,     b = b,     c = c*~bi, d = d/~bi, e = e,     f = f     ],
6014 /*11*/  [ a = a/~bi, b = b/~bi, c = c/~bi, d = d*~bi, e = e,     f = f     ],
6015 /*12*/  [ a = a*~bi, b = b*~bi, c = c*~bi, d = d/~bi, e = e/~bi, f = f/~bi ],
6016 /*13*/  [ a = a,     b = b,     c = c,     d = d*~bi, e = e,     f = f*~bi ],
6017 /*14*/  [ a = a,     b = b/~bi, c = c,     d = d,     e = e*~bi, f = f     ],
6018 /*15*/  [ a = a/~bi, b = b,     c = c/~bi, d = d,     e = e/~bi, f = f/~bi ],
6019 /*16*/  [ a = a,     b = b,     c = c*~bi, d = d/~bi, e = e,     f = f     ],
6020 /*17*/  [ a = a,     b = b*~bi, c = c,     d = d,     e = e,     f = f*~bi ],
6021 /*18*/  [ a = a*~bi, b = b/~bi, c = c/~bi, d = d*~bi, e = e*~bi, f = f/~bi ],
6022 /*19*/  [ a = a/~bi, b = b,     c = c,     d = d/~bi, e = e,     f = f*~bi ],
6023 /*20*/  [ a = a*~bi, b = b*~bi, c = c,     d = d,     e = e/~bi, f = f/~bi ],
6024 /*21*/  [ a = a,     b = b/~bi, c = c*~bi, d = d,     e = e,     f = f*~bi ],
6025 /*22*/  [ a = a,     b = b,     c = c/~bi, d = d*~bi, e = e,     f = f     ],
6026 /*23*/  [ a = a,     b = b,     c = c,     d = d/~bi, e = e,     f = f/~bi ],
6027 /*24*/  [ a = a/~bi, b = b,     c = c,     d = d,     e = e,     f = f*~bi ],
6028 /*25*/  [ a = a*~bi, b = b*~bi, c = c*~bi, d = d,     e = e,     f = f     ],
6029 /*26*/  [ a = a,     b = b/~bi, c = c/~bi, d = d*~bi, e = e*~bi, f = f     ],
6030 /*27*/  [ a = a,     b = b,     c = c,     d = d/~bi, e = e/~bi, f = f     ],
6031 /*28*/  [ a = a/~bi, b = b*~bi, c = c*~bi, d = d*~bi, e = e*~bi, f = f/~bi ],
6032 /*29*/  [ a = a,     b = b,     c = c/~bi, d = d/~bi, e = e,     f = f     ],
6033 /*30*/  [ a = a*~bi, b = b/~bi, c = c*~bi, d = d*~bi, e = e/~bi, f = f*~bi ],
6034 /*31*/  [ a = a/~bi, b = b*~bi, c = c,     d = d,     e = e,     f = f/~bi ],
6035 /*32*/  [ a = a,     b = b/~bi, c = c,     d = d,     e = e*~bi, f = f     ],
6036 /*33*/  [ a = a*~bi, b = b*~bi, c = c,     d = d,     e = e/~bi, f = f     ],
6037 /*34*/  [ a = a/~bi, b = b/~bi, c = c,     d = d,     e = e*~bi, f = f*~bi ],
6038 /*35*/  [ a = a*~bi, b = b,     c = c,     d = d/~bi, e = e/~bi, f = f/~bi ],
6039 /*36*/  [ a = a/~bi, b = b,     c = c/~bi, d = d*~bi, e = e,     f = f*~bi ],
6040 /*37*/  [ a = a*~bi, b = b*~bi, c = c,     d = d,     e = e,     f = f     ],
6041 /*38*/  [ a = a,     b = b/~bi, c = c*~bi, d = d/~bi, e = e*~bi, f = f     ],
6042 /*39*/  [ a = a/~bi, b = b*~bi, c = c/~bi, d = d*~bi, e = e/~bi, f = f/~bi ],
6043 /*40*/  [ a = a,     b = b/~bi, c = c*~bi, d = d/~bi, e = e*~bi, f = f     ],
6044 /*41*/  [ a = a*~bi, b = b,     c = c/~bi, d = d,     e = e,     f = f*~bi ],
6045 /*42*/  [ a = a,     b = b*~bi, c = c,     d = d,     e = e/~bi, f = f     ],
6046 /*43*/  [ a = a/~bi, b = b,     c = c*~bi, d = d*~bi, e = e*~bi, f = f     ],
6047 /*44*/  [ a = a*~bi, b = b,     c = c,     d = d,     e = e,     f = f/~bi ],
6048 /*45*/  [ a = a/~bi, b = b,     c = c,     d = d/~bi, e = e/~bi, f = f     ],
6049 /*46*/  [ a = a,     b = b/~bi, c = c/~bi, d = d*~bi, e = e*~bi, f = f     ],
6050 /*47*/  [ a = a,     b = b*~bi, c = c*~bi, d = d/~bi, e = e,     f = f     ],
6051 /*48*/  [ a = a,     b = b,     c = c/~bi, d = d*~bi, e = e,     f = f     ],
6052 /*49*/  [ a = a,     b = b,     c = c*~bi, d = d,     e = e/~bi, f = f*~bi ],
6053 /*50*/  [ a = a*~bi, b = b/~bi, c = c,     d = d,     e = e*~bi, f = f/~bi ],
6054 /*51*/  [ a = a/~bi, b = b,     c = c,     d = d/~bi, e = e/~bi, f = f*~bi ],
6055 /*52*/  [ a = a*~bi, b = b,     c = c/~bi, d = d*~bi, e = e,     f = f/~bi ],
6056 /*53*/  [ a = a,     b = b*~bi, c = c,     d = d,     e = e,     f = f     ],
6057 /*54*/  [ a = a/~bi, b = b/~bi, c = c*~bi, d = d/~bi, e = e*~bi, f = f*~bi ],
6058 /*55*/  [ a = a,     b = b,     c = c,     d = d*~bi, e = e/~bi, f = f     ],
6059 /*56*/  [ a = a*~bi, b = b,     c = c,     d = d,     e = e,     f = f/~bi ],
6060 /*57*/  [ a = a,     b = b*~bi, c = c/~bi, d = d,     e = e*~bi, f = f     ],
6061 /*58*/  [ a = a/~bi, b = b,     c = c*~bi, d = d/~bi, e = e,     f = f*~bi ],
6062 /*59*/  [ a = a*~bi, b = b,     c = c/~bi, d = d,     e = e,     f = f/~bi ],
6063 /*60*/  [ a = a/~bi, b = b,     c = c,     d = d,     e = e,     f = f*~bi ],
6064 /*61*/  [ a = a*~bi, b = b,     c = c,     d = d,     e = e,     f = f     ],
6065 /*62*/  [ a = a/~bi, b = b/~bi, c = c*~bi, d = d*~bi, e = e/~bi, f = f/~bi ],
6066 /*63*/  [ a = a,     b = b*~bi, c = c/~bi, d = d,     e = e,     f = f*~bi ],
6067 /*64*/  [ a = a*~bi, b = b/~bi, c = c*~bi, d = d/~bi, e = e*~bi, f = f/~bi ]
6068
6069 /*1*/   [ a = a*~n1, b = b*~n1*~bi, c = c*~n1, d = d*~n1*~bi, e = e*~n1, f = f*~n1*~bi ],...
6070
6071
6072 (Second Setting)
6073
6074 /*1*/   #a,b,c,d,e,f=[ ~a,~b,~c,~d,~e,~f  ],
6075 /*2*/   [ a = a*~n1/~bi, b = b*~n1/~bi, c = c*~n1/~bi, d = d*~n1/~bi, e = e*~n1/~bi, f = f*~n1/~bi ],
6076 /*3*/   [ a = a,         b = b*~bi,     c = c,         d = d,         e = e,         f = f*~bi     ],
6077 /*4*/   [ a = a*~bi,     b = b/~bi,     c = c,         d = d,         e = e*~bi,     f = f/~bi     ],
6078 /*5*/   [ a = a/~bi,     b = b*~bi,     c = c,         d = d*~bi,     e = e,         f = f*~bi     ],
6079 /*6*/   [ a = a*~bi,     b = b,         c = c*~bi,     d = d/~bi,     e = e,         f = f/~bi     ],
6080 /*7*/   [ a = a/~bi,     b = b/~bi,     c = c/~bi,     d = d,         e = e,         f = f         ],
6081 /*8*/   [ a = a,         b = b*~bi,     c = c,         d = d,         e = e/~bi,     f = f         ],
6082 /*9*/   [ a = a*~bi,     b = b,         c = c,         d = d*~bi,     e = e*~bi,     f = f*~bi     ],
6083 /*10*/  [ a = a,         b = b,         c = c*~bi,     d = d/~bi,     e = e,         f = f         ],
6084 /*11*/  [ a = a/~bi,     b = b/~bi,     c = c/~bi,     d = d*~bi,     e = e,         f = f         ],
6085 /*12*/  [ a = a*~n2*~bi, b = b*~n2*~bi, c = c*~n2*~bi, d = d*~n2/~bi, e = e*~n2/~bi, f = f*~n2/~bi ],
6086 /*13*/  [ a = a,         b = b,         c = c,         d = d*~bi,     e = e,         f = f*~bi     ],
6087 /*14*/  [ a = a,         b = b/~bi,     c = c,         d = d,         e = e*~bi,     f = f         ],
6088 /*15*/  [ a = a/~bi,     b = b,         c = c/~bi,     d = d,         e = e/~bi,     f = f/~bi     ],
6089 /*16*/  [ a = a,         b = b,         c = c*~bi,     d = d/~bi,     e = e,         f = f         ],
6090 /*17*/  [ a = a,         b = b*~bi,     c = c,         d = d,         e = e,         f = f*~bi     ],
6091 /*18*/  [ a = a*~n3*~bi, b = b*~n3/~bi, c = c*~n3/~bi, d = d*~n3*~bi, e = e*~n3*~bi, f = f*~n3/~bi ],
6092 /*19*/  [ a = a/~bi,     b = b,         c = c,         d = d/~bi,     e = e,         f = f*~bi     ],
6093 /*20*/  [ a = a*~bi,     b = b*~bi,     c = c,         d = d,         e = e/~bi,     f = f/~bi     ],
6094 /*21*/  [ a = a,         b = b/~bi,     c = c*~bi,     d = d,         e = e,         f = f*~bi     ],
6095 /*22*/  [ a = a,         b = b,         c = c/~bi,     d = d*~bi,     e = e,         f = f         ],
6096 /*23*/  [ a = a,         b = b,         c = c,         d = d/~bi,     e = e,         f = f/~bi     ],
6097 /*24*/  [ a = a/~bi,     b = b,         c = c,         d = d,         e = e,         f = f*~bi     ],
6098 /*25*/  [ a = a*~bi,     b = b*~bi,     c = c*~bi,     d = d,         e = e,         f = f         ],
6099 /*26*/  [ a = a,         b = b/~bi,     c = c/~bi,     d = d*~bi,     e = e*~bi,     f = f         ],
6100 /*27*/  [ a = a,         b = b,         c = c,         d = d/~bi,     e = e/~bi,     f = f         ],
6101 /*28*/  [ a = a*~n4/~bi, b = b*~n4*~bi, c = c*~n4*~bi, d = d*~n4*~bi, e = e*~n4*~bi, f = f*~n4/~bi ],
6102 /*29*/  [ a = a,         b = b,         c = c/~bi,     d = d/~bi,     e = e,         f = f         ],
6103 /*30*/  [ a = a*~n5*~bi, b = b*~n5/~bi, c = c*~n5*~bi, d = d*~n5*~bi, e = e*~n5/~bi, f = f*~n5*~bi ],
6104 /*31*/  [ a = a/~bi,     b = b*~bi,     c = c,         d = d,         e = e,         f = f/~bi     ],
6105 /*32*/  [ a = a,         b = b/~bi,     c = c,         d = d,         e = e*~bi,     f = f         ],
6106 /*33*/  [ a = a*~bi,     b = b*~bi,     c = c,         d = d,         e = e/~bi,     f = f         ],
6107 /*34*/  [ a = a/~bi,     b = b/~bi,     c = c,         d = d,         e = e*~bi,     f = f*~bi     ],
6108 /*35*/  [ a = a*~bi,     b = b,         c = c,         d = d/~bi,     e = e/~bi,     f = f/~bi     ],
6109 /*36*/  [ a = a/~bi,     b = b,         c = c/~bi,     d = d*~bi,     e = e,         f = f*~bi     ],
6110 /*37*/  [ a = a*~bi,     b = b*~bi,     c = c,         d = d,         e = e,         f = f         ],
6111 /*38*/  [ a = a,         b = b/~bi,     c = c*~bi,     d = d/~bi,     e = e*~bi,     f = f         ],
6112 /*39*/  [ a = a*~n6/~bi, b = b*~n6*~bi, c = c*~n6/~bi, d = d*~n6*~bi, e = e*~n6/~bi, f = f*~n6/~bi ],
6113 /*40*/  [ a = a,         b = b/~bi,     c = c*~bi,     d = d/~bi,     e = e*~bi,     f = f         ],
6114 /*41*/  [ a = a*~bi,     b = b,         c = c/~bi,     d = d,         e = e,         f = f*~bi     ],
6115 /*42*/  [ a = a,         b = b*~bi,     c = c,         d = d,         e = e/~bi,     f = f         ],
6116 /*43*/  [ a = a/~bi,     b = b,         c = c*~bi,     d = d*~bi,     e = e*~bi,     f = f         ],
6117 /*44*/  [ a = a*~bi,     b = b,         c = c,         d = d,         e = e,         f = f/~bi     ],
6118 /*45*/  [ a = a/~bi,     b = b,         c = c,         d = d/~bi,     e = e/~bi,     f = f         ],
6119 /*46*/  [ a = a,         b = b/~bi,     c = c/~bi,     d = d*~bi,     e = e*~bi,     f = f         ],
6120 /*47*/  [ a = a,         b = b*~bi,     c = c*~bi,     d = d/~bi,     e = e,         f = f         ],
6121 /*48*/  [ a = a,         b = b,         c = c/~bi,     d = d*~bi,     e = e,         f = f         ],
6122 /*49*/  [ a = a,         b = b,         c = c*~bi,     d = d,         e = e/~bi,     f = f*~bi     ],
6123 /*50*/  [ a = a*~bi,     b = b/~bi,     c = c,         d = d,         e = e*~bi,     f = f/~bi     ],
6124 /*51*/  [ a = a/~bi,     b = b,         c = c,         d = d/~bi,     e = e/~bi,     f = f*~bi     ],
6125 /*52*/  [ a = a*~bi,     b = b,         c = c/~bi,     d = d*~bi,     e = e,         f = f/~bi     ],
6126 /*53*/  [ a = a,         b = b*~bi,     c = c,         d = d,         e = e,         f = f         ],
6127 /*54*/  [ a = a*~n7/~bi, b = b*~n7/~bi, c = c*~n7*~bi, d = d*~n7/~bi, e = e*~n7*~bi, f = f*~n7*~bi ],
6128 /*55*/  [ a = a,         b = b,         c = c,         d = d*~bi,     e = e/~bi,     f = f         ],
6129 /*56*/  [ a = a*~bi,     b = b,         c = c,         d = d,         e = e,         f = f/~bi     ],
6130 /*57*/  [ a = a,         b = b*~bi,     c = c/~bi,     d = d,         e = e*~bi,     f = f         ],
6131 /*58*/  [ a = a/~bi,     b = b,         c = c*~bi,     d = d/~bi,     e = e,         f = f*~bi     ],
6132 /*59*/  [ a = a*~bi,     b = b,         c = c/~bi,     d = d,         e = e,         f = f/~bi     ],
6133 /*60*/  [ a = a/~bi,     b = b,         c = c,         d = d,         e = e,         f = f*~bi     ],
6134 /*61*/  [ a = a*~bi,     b = b,         c = c,         d = d,         e = e,         f = f         ],
6135 /*62*/  [ a = a*~n8/~bi, b = b*~n8/~bi, c = c*~n8*~bi, d = d*~n8*~bi, e = e*~n8/~bi, f = f*~n8/~bi ],
6136 /*63*/  [ a = a,         b = b*~bi,     c = c/~bi,     d = d,         e = e,         f = f*~bi     ],
6137 /*64*/  [ a = a*~n9*~bi, b = b*~n9/~bi, c = c*~n9*~bi, d = d*~n9/~bi, e = e*~n9*~bi, f = f*~n9/~bi ]
6138
6139 /*1*/   [ a = a,         b = b*~bi,     c = c,         d = d*~bi,     e = e,         f = f*~bi     ],...
6140
6141
6142 (Third Setting)
6143
6144 /*1*/   #a,b,c,d,e,f=[ ~a,~b,~c,~d,~e,~f  ],
6145 /*2*/   [ a = a*~n1/~bi, b = b*~n1/~bi, c = c*~n1/~bi, d = d*~n1/~bi, e = e*~n1/~bi, f = f*~n1/~bi ],
6146 /*3*/   [ a = a*~n1,     b = b*~n1*~bi, c = c*~n1,     d = d*~n1,     e = e*~n1,     f = f*~n1*~bi ],
6147 /*4*/   [ a = a*~n1*~bi, b = b*~n1/~bi, c = c*~n1,     d = d*~n1,     e = e*~n1*~bi, f = f*~n1/~bi ],
6148 /*5*/   [ a = a*~n1/~bi, b = b*~n1*~bi, c = c*~n1,     d = d*~n1*~bi, e = e*~n1,     f = f*~n1*~bi ],
6149 /*6*/   [ a = a*~n1*~bi, b = b*~n1,     c = c*~n1*~bi, d = d*~n1/~bi, e = e*~n1,     f = f*~n1/~bi ],
6150 /*7*/   [ a = a*~n1/~bi, b = b*~n1/~bi, c = c*~n1/~bi, d = d*~n1,     e = e*~n1,     f = f*~n1     ],
6151 /*8*/   [ a = a*~n1,     b = b*~n1*~bi, c = c*~n1,     d = d*~n1,     e = e*~n1/~bi, f = f*~n1     ],
6152 /*9*/   [ a = a*~n1*~bi, b = b*~n1,     c = c*~n1,     d = d*~n1*~bi, e = e*~n1*~bi, f = f*~n1*~bi ],
6153 /*10*/  [ a = a*~n1,     b = b*~n1,     c = c*~n1*~bi, d = d*~n1/~bi, e = e*~n1,     f = f*~n1     ],
6154 /*11*/  [ a = a*~n1/~bi, b = b*~n1/~bi, c = c*~n1/~bi, d = d*~n1*~bi, e = e*~n1,     f = f*~n1     ],
6155 /*12*/  [ a = a*~n1*~bi, b = b*~n1*~bi, c = c*~n1*~bi, d = d*~n1/~bi, e = e*~n1/~bi, f = f*~n1/~bi ],
6156 /*13*/  [ a = a*~n1,     b = b*~n1,     c = c*~n1,     d = d*~n1*~bi, e = e*~n1,     f = f*~n1*~bi ],
6157 /*14*/  [ a = a*~n1,     b = b*~n1/~bi, c = c*~n1,     d = d*~n1,     e = e*~n1*~bi, f = f*~n1     ],
6158 /*15*/  [ a = a*~n1/~bi, b = b*~n1,     c = c*~n1/~bi, d = d*~n1,     e = e*~n1/~bi, f = f*~n1/~bi ],
6159 /*16*/  [ a = a*~n1,     b = b*~n1,     c = c*~n1*~bi, d = d*~n1/~bi, e = e*~n1,     f = f*~n1     ],
6160 /*17*/  [ a = a*~n1,     b = b*~n1*~bi, c = c*~n1,     d = d*~n1,     e = e*~n1,     f = f*~n1*~bi ],
6161 /*18*/  [ a = a*~n1*~bi, b = b*~n1/~bi, c = c*~n1/~bi, d = d*~n1*~bi, e = e*~n1*~bi, f = f*~n1/~bi ],
6162 /*19*/  [ a = a*~n1/~bi, b = b*~n1,     c = c*~n1,     d = d*~n1/~bi, e = e*~n1,     f = f*~n1*~bi ],
6163 /*20*/  [ a = a*~n1*~bi, b = b*~n1*~bi, c = c*~n1,     d = d*~n1,     e = e*~n1/~bi, f = f*~n1/~bi ],
6164 /*21*/  [ a = a*~n1,     b = b*~n1/~bi, c = c*~n1*~bi, d = d*~n1,     e = e*~n1,     f = f*~n1*~bi ],
6165 /*22*/  [ a = a*~n1,     b = b*~n1,     c = c*~n1/~bi, d = d*~n1*~bi, e = e*~n1,     f = f*~n1     ],
6166 /*23*/  [ a = a*~n1,     b = b*~n1,     c = c*~n1,     d = d*~n1/~bi, e = e*~n1,     f = f*~n1/~bi ],
6167 /*24*/  [ a = a*~n1/~bi, b = b*~n1,     c = c*~n1,     d = d*~n1,     e = e*~n1,     f = f*~n1*~bi ],
6168 /*25*/  [ a = a*~n1*~bi, b = b*~n1*~bi, c = c*~n1*~bi, d = d*~n1,     e = e*~n1,     f = f*~n1     ],
6169 /*26*/  [ a = a*~n1,     b = b*~n1/~bi, c = c*~n1/~bi, d = d*~n1*~bi, e = e*~n1*~bi, f = f*~n1     ],
6170 /*27*/  [ a = a*~n1,     b = b*~n1,     c = c*~n1,     d = d*~n1/~bi, e = e*~n1/~bi, f = f*~n1     ],
6171 /*28*/  [ a = a*~n1/~bi, b = b*~n1*~bi, c = c*~n1*~bi, d = d*~n1*~bi, e = e*~n1*~bi, f = f*~n1/~bi ],
6172 /*29*/  [ a = a*~n1,     b = b*~n1,     c = c*~n1/~bi, d = d*~n1/~bi, e = e*~n1,     f = f*~n1     ],
6173 /*30*/  [ a = a*~n1*~bi, b = b*~n1/~bi, c = c*~n1*~bi, d = d*~n1*~bi, e = e*~n1/~bi, f = f*~n1*~bi ],
6174 /*31*/  [ a = a*~n1/~bi, b = b*~n1*~bi, c = c*~n1,     d = d*~n1,     e = e*~n1,     f = f*~n1/~bi ],
6175 /*32*/  [ a = a*~n1,     b = b*~n1/~bi, c = c*~n1,     d = d*~n1,     e = e*~n1*~bi, f = f*~n1     ],
6176 /*33*/  [ a = a*~n1*~bi, b = b*~n1*~bi, c = c*~n1,     d = d*~n1,     e = e*~n1/~bi, f = f*~n1     ],
6177 /*34*/  [ a = a*~n1/~bi, b = b*~n1/~bi, c = c*~n1,     d = d*~n1,     e = e*~n1*~bi, f = f*~n1*~bi ],
6178 /*35*/  [ a = a*~n1*~bi, b = b*~n1,     c = c*~n1,     d = d*~n1/~bi, e = e*~n1/~bi, f = f*~n1/~bi ],
6179 /*36*/  [ a = a*~n1/~bi, b = b*~n1,     c = c*~n1/~bi, d = d*~n1*~bi, e = e*~n1,     f = f*~n1*~bi ],
6180 /*37*/  [ a = a*~n1*~bi, b = b*~n1*~bi, c = c*~n1,     d = d*~n1,     e = e*~n1,     f = f*~n1     ],
6181 /*38*/  [ a = a*~n1,     b = b*~n1/~bi, c = c*~n1*~bi, d = d*~n1/~bi, e = e*~n1*~bi, f = f*~n1     ],
6182 /*39*/  [ a = a*~n1/~bi, b = b*~n1*~bi, c = c*~n1/~bi, d = d*~n1*~bi, e = e*~n1/~bi, f = f*~n1/~bi ],
6183 /*40*/  [ a = a*~n1,     b = b*~n1/~bi, c = c*~n1*~bi, d = d*~n1/~bi, e = e*~n1*~bi, f = f*~n1     ],
6184 /*41*/  [ a = a*~n1*~bi, b = b*~n1,     c = c*~n1/~bi, d = d*~n1,     e = e*~n1,     f = f*~n1*~bi ],
6185 /*42*/  [ a = a*~n1,     b = b*~n1*~bi, c = c*~n1,     d = d*~n1,     e = e*~n1/~bi, f = f*~n1     ],
6186 /*43*/  [ a = a*~n1/~bi, b = b*~n1,     c = c*~n1*~bi, d = d*~n1*~bi, e = e*~n1*~bi, f = f*~n1     ],
6187 /*44*/  [ a = a*~n1*~bi, b = b*~n1,     c = c*~n1,     d = d*~n1,     e = e*~n1,     f = f*~n1/~bi ],
6188 /*45*/  [ a = a*~n1/~bi, b = b*~n1,     c = c*~n1,     d = d*~n1/~bi, e = e*~n1/~bi, f = f*~n1     ],
6189 /*46*/  [ a = a*~n1,     b = b*~n1/~bi, c = c*~n1/~bi, d = d*~n1*~bi, e = e*~n1*~bi, f = f*~n1     ],
6190 /*47*/  [ a = a*~n1,     b = b*~n1*~bi, c = c*~n1*~bi, d = d*~n1/~bi, e = e*~n1,     f = f*~n1     ],
6191 /*48*/  [ a = a*~n1,     b = b*~n1,     c = c*~n1/~bi, d = d*~n1*~bi, e = e*~n1,     f = f*~n1     ],
6192 /*49*/  [ a = a*~n1,     b = b*~n1,     c = c*~n1*~bi, d = d*~n1,     e = e*~n1/~bi, f = f*~n1*~bi ],
6193 /*50*/  [ a = a*~n1*~bi, b = b*~n1/~bi, c = c*~n1,     d = d*~n1,     e = e*~n1*~bi, f = f*~n1/~bi ],
6194 /*51*/  [ a = a*~n1/~bi, b = b*~n1,     c = c*~n1,     d = d*~n1/~bi, e = e*~n1/~bi, f = f*~n1*~bi ],
6195 /*52*/  [ a = a*~n1*~bi, b = b*~n1,     c = c*~n1/~bi, d = d*~n1*~bi, e = e*~n1,     f = f*~n1/~bi ],
6196 /*53*/  [ a = a*~n1,     b = b*~n1*~bi, c = c*~n1,     d = d*~n1,     e = e*~n1,     f = f*~n1     ],
6197 /*54*/  [ a = a*~n1/~bi, b = b*~n1/~bi, c = c*~n1*~bi, d = d*~n1/~bi, e = e*~n1*~bi, f = f*~n1*~bi ],
6198 /*55*/  [ a = a*~n1,     b = b*~n1,     c = c*~n1,     d = d*~n1*~bi, e = e*~n1/~bi, f = f*~n1     ],
6199 /*56*/  [ a = a*~n1*~bi, b = b*~n1,     c = c*~n1,     d = d*~n1,     e = e*~n1,     f = f*~n1/~bi ],
6200 /*57*/  [ a = a*~n1,     b = b*~n1*~bi, c = c*~n1/~bi, d = d*~n1,     e = e*~n1*~bi, f = f*~n1     ],
6201 /*58*/  [ a = a*~n1/~bi, b = b*~n1,     c = c*~n1*~bi, d = d*~n1/~bi, e = e*~n1,     f = f*~n1*~bi ],
6202 /*59*/  [ a = a*~n1*~bi, b = b*~n1,     c = c*~n1/~bi, d = d*~n1,     e = e*~n1,     f = f*~n1/~bi ],
6203 /*60*/  [ a = a*~n1/~bi, b = b*~n1,     c = c*~n1,     d = d*~n1,     e = e*~n1,     f = f*~n1*~bi ],
6204 /*61*/  [ a = a*~n1*~bi, b = b*~n1,     c = c*~n1,     d = d*~n1,     e = e*~n1,     f = f*~n1     ],
6205 /*62*/  [ a = a*~n1/~bi, b = b*~n1/~bi, c = c*~n1*~bi, d = d*~n1*~bi, e = e*~n1/~bi, f = f*~n1/~bi ],
6206 /*63*/  [ a = a*~n1,     b = b*~n1*~bi, c = c*~n1/~bi, d = d*~n1,     e = e*~n1,     f = f*~n1*~bi ],
6207 /*64*/  [ a = a*~n1*~bi, b = b*~n1/~bi, c = c*~n1*~bi, d = d*~n1/~bi, e = e*~n1*~bi, f = f*~n1/~bi ]
6208
6209 /*1*/   [ a = a*~n1,     b = b*~n1*~bi, c = c*~n1,     d = d*~n1*~bi, e = e*~n1,     f = f*~n1*~bi ],...
6210
6211 */