OSDN Git Service

Fixed bugs, and others
[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/2;
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         x = 432; y = 432; ~basefreqmap = Array.fill(32, {x=x/1.0835058821738}).reverse++[432]++Array.fill(25, {y=y*1.0835058821738}); //create basefreqmap array
47
48         ~base_frequency = ~basefreqmap.at(8); //default 8 (63.027950580203). replace "~basefreqmap.at(#)" for custom value.
49
50
51         //starting synthdef setting
52
53         if((~kws_setting == nil) or: (~ratio_setting == nil), {
54
55                 ~kws_setting = 1; //default type of King Wen sequence interpretation
56
57                 ~ratio_setting = "psine1"; //default ratio setting for synthdef
58         });
59
60
61         //low-pass filter settings
62
63         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.
64         ~default_low_pass_filter_freq_limit = 1468;
65         if(~low_pass_filter_set_value == nil, {~low_pass_filter_freq_limit = ~default_low_pass_filter_freq_limit; //frequency limit for low-pass filter in synthdefs. default is 1468.
66         });
67         ~lpfilter_rq_ratio = 295.57086653808;
68
69
70         //default sendreply toggle
71
72         if(~sendreplysynthdef_on == nil, {~sendreplysynthdef_on = 0; //switch for mid-timewave sequence events. 0 is off, 1 is on. default is 0
73         });
74         if(~sendreplyfunc_choose == nil, {~sendreplyfunc_choose = 0; //switch for specific mid-timewave sequence events function. default is 0
75         });
76         if(~sendreplyfuncswitch == nil, {~sendreplyfuncswitch = 1; //1 is random western scale note change per timewave half-cycle, 2 is eastern scale. default is 1
77         });
78         if(~sendreply_period == nil, {~sendreply_period = 1; //default is 1. this determines when sendreply triggers for the "automate" function. 1 is in 1 full timewave cycle, 0.5 is in 1/2 timewave cycle, 1.5 is 1 1/2 cycles, 2 is in 2 cycles, etc.
79         });
80
81
82         //volume
83
84         ~vol_default = 0.012; //default 0.012
85         if(~vol == nil, {~vol = ~vol_default});
86         12.do(x = 0; {("vol"++(x=x+1)).asSymbol.envirPut(~vol)});
87
88
89         //Key codes for keyboard functions - either unicode or keycode. To find key codes, see below:
90
91         ~rightarrow_keycode = 65363; //next note change increase
92         ~leftarrow_keycode = 65361; //next note change decrease
93         ~uparrow_keycode = 65362; //change synth up
94         ~downarrow_keycode = 65364; //change synth down
95
96         ~rightarrow_keycode1 = 114; //next note change increase (old version - may not work)
97         ~leftarrow_keycode1 = 113; //next note change decrease (old version - may not work)
98         ~uparrow_keycode1 = 111; //change synth up (old version - may not work)
99         ~downarrow_keycode1 = 116; //change synth down (old version - may not work)
100
101         ~enter_unicode = 13; //
102         ~s_unicode = 115; //start synth
103         ~m_unicode = 109; //mute/unmute all synths
104         ~r_unicode = 114; //routine/loop function
105         ~u_unicode = 117; //
106         ~t_unicode = 116; //timer function
107         ~c_unicode = 99; //copy function
108         ~i_unicode = 105; //change synth up
109         ~k_unicode = 107; //change synth down
110         ~j_unicode = 106; //next note change decrease
111         ~l_unicode = 108; //next note change increase
112         ~spacebar_unicode = 32; //pause all synths
113         ~one_unicode = 49; //choose synth 1
114         ~two_unicode = 50; //choose synth 2
115         ~three_unicode = 51; //choose synth 3
116         ~four_unicode = 52; //choose synth 4
117         ~five_unicode = 53; //choose synth 5
118         ~six_unicode = 54; //choose synth 6
119         ~seven_unicode = 55; //choose synth 7
120         ~eight_unicode = 56; //choose synth 8
121         ~nine_unicode = 57; //choose synth 9
122         ~ten_unicode = 48; //choose synth 10
123         ~eleven_unicode = 45; //choose synth 11
124         ~twelve_unicode = 61; //choose synth 12
125         ~escape_unicode = 27; //escape function
126
127
128         //To find key codes in post window... Hightlight the function and its parenthesis in red below,
129         //and press "ctrl - enter" or "cmd - return" - then a small window called "test" will pop up...
130         //Press the "type" button inside of the window, then press anywhere on the keyboard to find
131         //the key codes in the right-hand side post window. Layout: [unicode, keycode, modifiers]. It is either a unicode
132         //or a keycode. Do not delete the /* and */ characters, or else the
133         //program will not run.
134
135         /*
136
137         (
138         var win = Window(\test, Rect(10, 100, 100, 50)),
139         btn = Button(win, Rect(5, 5, 90, 40)).states_([["type"]]);
140         btn.keyDownAction =
141         { arg view, char, modifiers, unicode, keycode;
142         ["unicode:"+unicode, "keycode:"+keycode, "modifiers:"+modifiers].postln;
143         };
144         win.front;
145         )
146
147         */
148
149
150         //gui set frequency ranges - currently set at the lowest and highest notes on a 128 key range using 432 hz A tuning
151         //you can change the tuning near top
152         //to insert custom ranges, replace "~freqmap.at()" with a hz frequency
153
154         ~outmin1 = ~freqmap.at(0);       // 8.0271480262684 hz                       //base frequency of upper set
155         ~outmax1 = ~freqmap.at(127);     // 12315.783879572 hz                       //high frequency of upper set
156         ~outmin2 = ~freqmap.at(0)*8;     // (8.0271480262684)*8 hz                   //base frequency of lower set
157         ~outmax2 = ~freqmap.at(127)/8;   // (12315.783879572)/8 hz;                  //high frequency of lower set
158
159         ~outmina = ~outmin2;
160         ~outmaxa = ~outmax2;
161         ~outminb = ~outmin1;
162         ~outmaxb = ~outmax1;
163
164
165         //increase or decrease magnitude of second and third harmonics for synthdefs and synth functions (not recommend changing if uncertain of effects)
166
167         //synthdefs
168
169         ~first_harmonic = 1;  //1
170         ~second_harmonic = 2; //2
171         ~third_harmonic = 6;  //6
172
173         //synth functions
174
175         ~icd3 = 3; //3
176         ~icd6 = 6; //6
177
178
179         //ratio values
180
181         ~fth = 1.4142135623729; //default kws binary interval
182         ~bi = ~fth; //~bi = "binary interval" - intverval of key change to a hexagram line's opposite in King Wen sequence
183         ~stepratio = 1.0594630943593;
184         ~nval = 1.0355417528;
185         ~n9s = 1.86;
186         ~n9 = 1.080059789899;
187         ~n18 = 1.0392592260319;
188         ~n27 = 1.0260044847071;
189         ~n36 = 1.0194406437022;
190         ~n45 = 1.0155225125043;
191         ~n54 = 1.012918794725;
192         ~n63 = 1.0110630844869;
193         ~n72 = 1.0096735332285;
194         ~gm = 1.6180339887499; //phi (golden mean), scaled on 1 key change per King Wen sequence
195         ~gm2 = 1.2720196495141;
196         ~gm6 = 1.0835058821738;
197         ~ngm1 = 1.0549232131786; //phi (golden mean), scaled on 9 key changes per King Wen sequence
198         ~ngm2 = 1.0270945492887;
199         ~ngm6 = 1.0089511542031;
200         ~nngm1 = 1.0075472729363; //phi (golden mean), scaled on 64 key changes per King Wen sequence
201         ~nngm2 = 1.0037665430449;
202         ~nngm6 = 1.0012539413222;
203         ~h1 = 11.10101010101; //based on 19.47:360, scaled on 1 key change per King Wen sequence
204         ~h2 = 4.2999982083345;
205         ~h6 = 1.6261331058274;
206         ~nh1 = 1.3828361607663; //based on 19.47:360, scaled on 9 key changes per King Wen sequence
207         ~nh2 = 1.1759405430404;
208         ~nh6 = 1.0555086286213;
209         ~nnh1 = 1.0466365180627; //based on 19.47:360, scaled on 64 key changes per King Wen sequence
210         ~nnh2 = 1.0230525490231;
211         ~nnh6 = 1.0076258811195;
212
213
214         //edit SAVED s1-s8 frequencies/chords. Replace any "[ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ]" with desired frequencies.
215         //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]
216         //You can find frequencies in the "copy" section of GUI under "saved open/flow 1-8 frequencies:" or "saved slide 1-8 frequencies:".
217         //Remove both the "/*" and "*/" around the code to make evaluable. Put them back to make it unevaluable.
218
219         /*
220
221         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))});
222         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))});
223         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))});
224         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))});
225         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))});
226         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))});
227         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))});
228         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))});
229
230         */
231
232
233         //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.
234         //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]
235         //You can find frequencies in the "copy" section of GUI under "current chord/frequencies".
236         //Remove both the "/*" and "*/" around the code to make evaluable. Put them back to make it unevaluable again.
237
238         /*
239
240         12.do(x = 0; {("f"++(x=x+1)).asSymbol.envirPut(
241
242         [ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ]
243
244         .at(x-1))});
245
246         */
247
248         //^Imoprtant note: "edit STARTING frequencies/chord" must be placed after "edit SAVED frequencies/chords" in code in order for it to work correctly
249
250
251         ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
252
253
254         //default starting notes
255
256         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]), {
257                 #f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12 = [
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                         (~freqmap.at(127)/8).rand,
263                         (~freqmap.at(127)/8).rand,
264                         (~freqmap.at(127)/8).rand,
265                         (~freqmap.at(127)/8).rand,
266                         (~freqmap.at(127)/8).rand,
267                         (~freqmap.at(127)/8).rand,
268                         (~freqmap.at(127)/8).rand,
269                         (~freqmap.at(127)/8).rand,
270                 ];
271         });
272
273         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))});});
274
275         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))});});
276         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))});});
277         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))});});
278         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))});});
279         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))});});
280         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))});});
281         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))});});
282         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))});});
283
284         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))});
285         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))});
286         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))});
287         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))});
288         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))});
289         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))});
290         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))});
291         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))});
292
293         /*if(96.do(x = 1; y = (-1); z = 0; {("sg"++(x)++"a"++(z=z+1)).asSymbol.envirGet; if(z>=12, {x= x+1; y = 0; z = 0;});}).collect.every({arg item; item == nil;}), {96.do(x = 1; y = (-1); z = 0; {("sg"++(x)++"a"++(z=z+1)).asSymbol.envirPut([~fp1,~fp2,~fp3,~fp4,~fp5,~fp6,~fp7,~fp8,~fp9,~fp10,~fp11,~fp12].at(y=y+1)); if(z>=12, {x= x+1; y = 0; z = 0;});});});
294         if(96.do(x = 1; y = (-1); z = 0; {("sg"++(x)++"b"++(z=z+1)).asSymbol.envirGet; if(z>=12, {x= x+1; y = 0; z = 0;});}).collect.every({arg item; item == nil;}), {96.do(x = 1; y = (-1); z = 0; {("sg"++(x)++"a"++(z=z+1)).asSymbol.envirPut([~fp1,~fp2,~fp3,~fp4,~fp5,~fp6,~fp7,~fp8,~fp9,~fp10,~fp11,~fp12].at(y=y+1)); if(z>=12, {x= x+1; y = 0; z = 0;});});});
295         if(96.do(x = 1; y = (-1); z = 0; {("sg"++(x)++"c"++(z=z+1)).asSymbol.envirGet; if(z>=12, {x= x+1; y = 0; z = 0;});}).collect.every({arg item; item == nil;}), {96.do(x = 1; y = (-1); z = 0; {("sg"++(x)++"a"++(z=z+1)).asSymbol.envirPut([~fp1,~fp2,~fp3,~fp4,~fp5,~fp6,~fp7,~fp8,~fp9,~fp10,~fp11,~fp12].at(y=y+1)); if(z>=12, {x= x+1; y = 0; z = 0;});});});
296         if(96.do(x = 1; y = (-1); z = 0; {("sg"++(x)++"d"++(z=z+1)).asSymbol.envirGet; if(z>=12, {x= x+1; y = 0; z = 0;});}).collect.every({arg item; item == nil;}), {96.do(x = 1; y = (-1); z = 0; {("sg"++(x)++"a"++(z=z+1)).asSymbol.envirPut([~fp1,~fp2,~fp3,~fp4,~fp5,~fp6,~fp7,~fp8,~fp9,~fp10,~fp11,~fp12].at(y=y+1)); if(z>=12, {x= x+1; y = 0; z = 0;});});});
297         if(96.do(x = 1; y = (-1); z = 0; {("sg"++(x)++"e"++(z=z+1)).asSymbol.envirGet; if(z>=12, {x= x+1; y = 0; z = 0;});}).collect.every({arg item; item == nil;}), {96.do(x = 1; y = (-1); z = 0; {("sg"++(x)++"a"++(z=z+1)).asSymbol.envirPut([~fp1,~fp2,~fp3,~fp4,~fp5,~fp6,~fp7,~fp8,~fp9,~fp10,~fp11,~fp12].at(y=y+1)); if(z>=12, {x= x+1; y = 0; z = 0;});});});
298         if(96.do(x = 1; y = (-1); z = 0; {("sg"++(x)++"f"++(z=z+1)).asSymbol.envirGet; if(z>=12, {x= x+1; y = 0; z = 0;});}).collect.every({arg item; item == nil;}), {96.do(x = 1; y = (-1); z = 0; {("sg"++(x)++"a"++(z=z+1)).asSymbol.envirPut([~fp1,~fp2,~fp3,~fp4,~fp5,~fp6,~fp7,~fp8,~fp9,~fp10,~fp11,~fp12].at(y=y+1)); if(z>=12, {x= x+1; y = 0; z = 0;});});});
299         if(96.do(x = 1; y = (-1); z = 0; {("sg"++(x)++"g"++(z=z+1)).asSymbol.envirGet; if(z>=12, {x= x+1; y = 0; z = 0;});}).collect.every({arg item; item == nil;}), {96.do(x = 1; y = (-1); z = 0; {("sg"++(x)++"a"++(z=z+1)).asSymbol.envirPut([~fp1,~fp2,~fp3,~fp4,~fp5,~fp6,~fp7,~fp8,~fp9,~fp10,~fp11,~fp12].at(y=y+1)); if(z>=12, {x= x+1; y = 0; z = 0;});});});
300         if(96.do(x = 1; y = (-1); z = 0; {("sg"++(x)++"h"++(z=z+1)).asSymbol.envirGet; if(z>=12, {x= x+1; y = 0; z = 0;});}).collect.every({arg item; item == nil;}), {96.do(x = 1; y = (-1); z = 0; {("sg"++(x)++"a"++(z=z+1)).asSymbol.envirPut([~fp1,~fp2,~fp3,~fp4,~fp5,~fp6,~fp7,~fp8,~fp9,~fp10,~fp11,~fp12].at(y=y+1)); if(z>=12, {x= x+1; y = 0; z = 0;});});});
301         */
302
303         //set n1-n9 ratio values
304
305         case
306         {~ratio_setting == "psine1";}{~n_value1 = ~gm;    ~n_value2 = ~gm2;   ~n_value6 = ~gm6;}
307         {~ratio_setting == "psine2";}{~n_value1 = ~ngm1;  ~n_value2 = ~ngm2;  ~n_value6 = ~ngm6;}
308         {~ratio_setting == "psine3";}{~n_value1 = ~nngm1; ~n_value2 = ~nngm2; ~n_value6 = ~nngm6;}
309         {~ratio_setting == "hsine1";}{~n_value1 = ~h1;    ~n_value2 = ~h2;    ~n_value6 = ~h6;}
310         {~ratio_setting == "hsine2";}{~n_value1 = ~nh1;   ~n_value2 = ~nh2;   ~n_value6 = ~nh6;}
311         {~ratio_setting == "hsine3";}{~n_value1 = ~nnh1;  ~n_value2 = ~nnh2;  ~n_value6 = ~nnh6;};
312
313
314         //King Wen sequence interpretation settings 1-3 for synthdefs
315
316         ~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 ]]};
317         ~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 ]]};
318
319         ~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 ]]};
320         ~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 ]]};
321
322         ~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    ]]};
323         ~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    ]]};
324
325
326         //synthdefs
327
328         ~gsine = {
329
330                 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,
331                         a, b, c, d, e, f, pan=0, fc = 1;
332                         var s1, out, env1, s2, dseq;
333                         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
334                         dseq = Dseq(
335                                 case
336                                 {~kws_setting == 1}{~kws_setting_1_a.value;}
337                                 {~kws_setting == 2}{~kws_setting_2_a.value;}
338                                 {~kws_setting == 3}{~kws_setting_3_a.value;} ++ Array.fill((~gsinenum*~first_harmonic -1), {
339                                         case
340                                         {~kws_setting == 1}{~kws_setting_1_b.value;}
341                                         {~kws_setting == 2}{~kws_setting_2_b.value;}
342                                         {~kws_setting == 3}{~kws_setting_3_b.value;}}).flatten, inf);
343                         s1 = GrainSin.ar(1, Impulse.ar(dur), 1/(dur),Demand.ar(Impulse.ar(dur), 0, dseq));
344                         if(~low_pass_filter_on == 1, {s1 = BLowPass.ar(s1, ~low_pass_filter_freq_limit, ~low_pass_filter_freq_limit/~lpfilter_rq_ratio);}, {s1 = s1});
345                         OffsetOut.ar(0, s1.dup*vol);
346                 }, [\ir]).add;
347
348                 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,
349                         a, b, c, d, e, f, pan=0, fc = 1, id = -1;
350                         var s1, out, env1, s2, dseq;
351                         9.do(x = 0; {("n"++(x=x+1)).asSymbol.envirPut(~n_value1)});
352                         dseq = Dseq([
353                                 case
354                                 {~kws_setting == 1}{~kws_setting_1_a.value;}
355                                 {~kws_setting == 2}{~kws_setting_2_a.value;}
356                                 {~kws_setting == 3}{~kws_setting_3_a.value;} ++ Array.fill((~gsinenum*~first_harmonic -1), {
357                                         case
358                                         {~kws_setting == 1}{~kws_setting_1_b.value;}
359                                         {~kws_setting == 2}{~kws_setting_2_b.value;}
360                                         {~kws_setting == 3}{~kws_setting_3_b.value;}}).flatten].flatten.reverse, inf);
361                         s1 = GrainSin.ar(1, Impulse.ar(dur), 1/(dur), Demand.ar(Impulse.ar(dur), 0, dseq));
362                         if(~low_pass_filter_on == 1, {s1 = BLowPass.ar(s1, ~low_pass_filter_freq_limit, ~low_pass_filter_freq_limit/~lpfilter_rq_ratio);}, {s1 = s1});
363                         OffsetOut.ar(0, s1.dup*vol);
364                 }, [\ir]).add;
365
366                 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,
367                         a, b, c, d, e, f, pan=0, fc = 1;
368                         var s1, out, env1, s2, dseq;
369                         9.do(x = 0; {("n"++(x=x+1)).asSymbol.envirPut(~n_value2)});
370                         dseq = Dseq(
371                                 case
372                                 {~kws_setting == 1}{~kws_setting_1_a.value;}
373                                 {~kws_setting == 2}{~kws_setting_2_a.value;}
374                                 {~kws_setting == 3}{~kws_setting_3_a.value;} ++ Array.fill((~gsinenum*~second_harmonic -1), {
375                                         case
376                                         {~kws_setting == 1}{~kws_setting_1_b.value;}
377                                         {~kws_setting == 2}{~kws_setting_2_b.value;}
378                                         {~kws_setting == 3}{~kws_setting_3_b.value;}}).flatten, inf);
379                         s1 = GrainSin.ar(1, Impulse.ar(dur), 1/(dur),Demand.ar(Impulse.ar(dur), 0, dseq));
380                         if(~low_pass_filter_on == 1, {s1 = BLowPass.ar(s1, ~low_pass_filter_freq_limit, ~low_pass_filter_freq_limit/~lpfilter_rq_ratio);}, {s1 = s1});
381                         OffsetOut.ar(0, s1.dup*vol);
382                 }, [\ir]).add;
383
384                 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,
385                         a, b, c, d, e, f, pan=0, fc = 1, id = -1;
386                         var s1, out, env1, s2, dseq;
387                         9.do(x = 0; {("n"++(x=x+1)).asSymbol.envirPut(~n_value2)});
388                         dseq = Dseq([
389                                 case
390                                 {~kws_setting == 1}{~kws_setting_1_a.value;}
391                                 {~kws_setting == 2}{~kws_setting_2_a.value;}
392                                 {~kws_setting == 3}{~kws_setting_3_a.value;} ++ Array.fill((~gsinenum*~second_harmonic -1), {
393                                         case
394                                         {~kws_setting == 1}{~kws_setting_1_b.value;}
395                                         {~kws_setting == 2}{~kws_setting_2_b.value;}
396                                         {~kws_setting == 3}{~kws_setting_3_b.value;}}).flatten].flatten.reverse, inf);
397                         s1 = GrainSin.ar(1, Impulse.ar(dur), 1/(dur), Demand.ar(Impulse.ar(dur), 0, dseq));
398                         if(~low_pass_filter_on == 1, {s1 = BLowPass.ar(s1, ~low_pass_filter_freq_limit, ~low_pass_filter_freq_limit/~lpfilter_rq_ratio);}, {s1 = s1});
399                         OffsetOut.ar(0, s1.dup*vol);
400                 }, [\ir]).add;
401
402                 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,
403                         a, b, c, d, e, f, pan=0, fc = 1;
404                         var s1, out, env1, s2, dseq;
405                         9.do(x = 0; {("n"++(x=x+1)).asSymbol.envirPut(~n_value6)});
406                         dseq = Dseq(
407                                 case
408                                 {~kws_setting == 1}{~kws_setting_1_a.value;}
409                                 {~kws_setting == 2}{~kws_setting_2_a.value;}
410                                 {~kws_setting == 3}{~kws_setting_3_a.value;} ++ Array.fill((~gsinenum*~third_harmonic -1), {
411                                         case
412                                         {~kws_setting == 1}{~kws_setting_1_b.value;}
413                                         {~kws_setting == 2}{~kws_setting_2_b.value;}
414                                         {~kws_setting == 3}{~kws_setting_3_b.value;}}).flatten, inf);
415                         s1 = GrainSin.ar(1, Impulse.ar(dur), 1/(dur),Demand.ar(Impulse.ar(dur), 0, dseq));
416                         if(~low_pass_filter_on == 1, {s1 = BLowPass.ar(s1, ~low_pass_filter_freq_limit, ~low_pass_filter_freq_limit/~lpfilter_rq_ratio);}, {s1 = s1});
417                         OffsetOut.ar(0, s1.dup*vol);
418                 }, [\ir]).add;
419
420                 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,
421                         a, b, c, d, e, f, pan=0, fc = 1;
422                         var s1, out, env1, s2, dseq;
423                         9.do(x = 0; {("n"++(x=x+1)).asSymbol.envirPut(~n_value6)});
424                         dseq = Dseq([
425                                 case
426                                 {~kws_setting == 1}{~kws_setting_1_a.value;}
427                                 {~kws_setting == 2}{~kws_setting_2_a.value;}
428                                 {~kws_setting == 3}{~kws_setting_3_a.value;} ++ Array.fill((~gsinenum*~third_harmonic -1), {
429                                         case
430                                         {~kws_setting == 1}{~kws_setting_1_b.value;}
431                                         {~kws_setting == 2}{~kws_setting_2_b.value;}
432                                         {~kws_setting == 3}{~kws_setting_3_b.value;}}).flatten].flatten.reverse, inf);
433                         s1 = GrainSin.ar(1, Impulse.ar(dur), 1/(dur), Demand.ar(Impulse.ar(dur), 0, dseq));
434                         if(~low_pass_filter_on == 1, {s1 = BLowPass.ar(s1, ~low_pass_filter_freq_limit, ~low_pass_filter_freq_limit/~lpfilter_rq_ratio);}, {s1 = s1});
435                         OffsetOut.ar(0, s1.dup*vol);
436                 }, [\ir]).add;
437
438                 if(~sendreplysynthdef_on == 1, {
439
440                         12.do(~sendreply_x = 0; {
441
442                                 ~sendreply_x=~sendreply_x+1;
443
444                                 SynthDef(\gsineicfld1_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,
445                                         a, b, c, d, e, f, pan=0, fc = 1;
446                                         var s1, out, env1, s2, dseq;
447                                         9.do(x = 0; {("n"++(x=x+1)).asSymbol.envirPut(~n_value1)});
448                                         dseq = Dseq(
449                                                 case
450                                                 {~kws_setting == 1}{~kws_setting_1_a.value;}
451                                                 {~kws_setting == 2}{~kws_setting_2_a.value;}
452                                                 {~kws_setting == 3}{~kws_setting_3_a.value;} ++ Array.fill((~gsinenum*~first_harmonic -1), {
453                                                         case
454                                                         {~kws_setting == 1}{~kws_setting_1_b.value;}
455                                                         {~kws_setting == 2}{~kws_setting_2_b.value;}
456                                                         {~kws_setting == 3}{~kws_setting_3_b.value;}}).flatten, inf);
457                                         s1 = GrainSin.ar(1, Impulse.ar(dur), 1/(dur),Demand.ar(Impulse.ar(dur), 0, dseq));
458                                         if(~low_pass_filter_on == 1, {s1 = BLowPass.ar(s1, ~low_pass_filter_freq_limit, ~low_pass_filter_freq_limit/~lpfilter_rq_ratio);}, {s1 = s1});
459                                         OffsetOut.ar(0, s1.dup*vol);
460                                         SendReply.ar(PulseDivider.ar(Impulse.ar(dur), (~kws_setting_1_a.value.size*(~gsinenum*~first_harmonic))*2*~sendreply_period),
461                                                 case
462                                                 {~sendreplyfunc_choose == 0}{("synthflow_gmf_sendreply_answer_f"++(~sendreply_x)).asSymbol.envirGet;}
463                                                 {~sendreplyfunc_choose == 1}{("synthflow_random_sendreply_answer_f"++(~sendreply_x)).asSymbol.envirGet;};
464                                         );
465                                 }, [\ir]).add;
466
467                         });
468                 });
469         };
470
471
472         //sendreply functions
473
474         ~sendreplyfunc_choose = 0;
475
476         ~send_reply_random_func_western = {~freqmap.at(rrand(60, 91));};
477         ~send_reply_random_func_eastern = {(rrand(~freqmap.at(60), ~freqmap.at(91);))};
478
479         if(~sendreply_gm_fth_y_1 == nil, {12.do(x = 0; {("sendreply_gm_fth_y_"++(x=x+1)).asSymbol.envirPut((-1);)});});
480         ~sendreply_gm_fth_func_1 = {if((x <= 1539.4729849465) and: (x >= 256.86873684059), {
481                 x = x*[[a = 1.6842135623729, a = 0.5937489296732].choose, [a = 1.4142135623729, a = 0.70710678118665].choose].at(y=y+1); if(y>=1, {y=(-1)});
482
483         }, {
484                 if(x > 1539.4729849465, {
485                         case
486                         {(a == 1.6842135623729) or: (a == 0.5937489296732)}{x = x/2; x = x*[a = 1.4142135623729, a = 0.70710678118665].choose; y=y+1; if(y>=1, {y=(-1)});}
487                         {(a == 1.4142135623729) or: (a == 0.70710678118665)}{x = x/2; x = x*[a = 1.6842135623729, a = 0.5937489296732].choose; y=y+1; if(y>=1, {y=(-1)});};
488                 }, {
489                         case
490                         {(a == 1.6842135623729) or: (a == 0.5937489296732)}{x = x*2; x = x*[a = 1.4142135623729, a = 0.70710678118665].choose; y=y+1; if(y>=1, {y=(-1)});}
491                         {(a == 1.4142135623729) or: (a == 0.70710678118665)}{x = x*2; x = x*[a = 1.6842135623729, a = 0.5937489296732].choose; y=y+1; if(y>=1, {y=(-1)});};
492                 });
493         });
494         };
495         ~sendreply_gm_fth_func_2 = {if((x <= 1539.4729849465) and: (x >= 256.86873684059), {
496                 x = x*[a = 1.6842135623729, a = 0.5937489296732].choose;}, {
497                 if(x > 1539.4729849465, {x = x/2; x = x*[1.6842135623729, 0.5937489296732].choose;}, {x = x*2; x = x*[1.6842135623729, 0.5937489296732].choose;});
498         });
499         };
500         if(~sendreply_gm_fth_func == nil, {~sendreply_gm_fth_func = ~sendreply_gm_fth_func_1});
501
502         case
503         {~sendreplyfuncswitch == 1;}{~send_reply_random_func = ~send_reply_random_func_western;}
504         {~sendreplyfuncswitch == 2;}{~send_reply_random_func = ~send_reply_random_func_eastern;};
505
506         ~synthflow_random_sendreply_answer_f1 = '/synthflow_random_sendreply_answer_f1';
507         ~synthflow_random_sendreply_answer_f2 = '/synthflow_random_sendreply_answer_f2';
508         ~synthflow_random_sendreply_answer_f3 = '/synthflow_random_sendreply_answer_f3';
509         ~synthflow_random_sendreply_answer_f4 = '/synthflow_random_sendreply_answer_f4';
510         ~synthflow_random_sendreply_answer_f5 = '/synthflow_random_sendreply_answer_f5';
511         ~synthflow_random_sendreply_answer_f6 = '/synthflow_random_sendreply_answer_f6';
512         ~synthflow_random_sendreply_answer_f7 = '/synthflow_random_sendreply_answer_f7';
513         ~synthflow_random_sendreply_answer_f8 = '/synthflow_random_sendreply_answer_f8';
514         ~synthflow_random_sendreply_answer_f9 = '/synthflow_random_sendreply_answer_f9';
515         ~synthflow_random_sendreply_answer_f10 = '/synthflow_random_sendreply_answer_f10';
516         ~synthflow_random_sendreply_answer_f11 = '/synthflow_random_sendreply_answer_f11';
517         ~synthflow_random_sendreply_answer_f12 = '/synthflow_random_sendreply_answer_f12';
518
519         ~synthflow_gmf_sendreply_answer_f1 = '/synthflow_gmf_sendreply_answer_f1';
520         ~synthflow_gmf_sendreply_answer_f2 = '/synthflow_gmf_sendreply_answer_f2';
521         ~synthflow_gmf_sendreply_answer_f3 = '/synthflow_gmf_sendreply_answer_f3';
522         ~synthflow_gmf_sendreply_answer_f4 = '/synthflow_gmf_sendreply_answer_f4';
523         ~synthflow_gmf_sendreply_answer_f5 = '/synthflow_gmf_sendreply_answer_f5';
524         ~synthflow_gmf_sendreply_answer_f6 = '/synthflow_gmf_sendreply_answer_f6';
525         ~synthflow_gmf_sendreply_answer_f7 = '/synthflow_gmf_sendreply_answer_f7';
526         ~synthflow_gmf_sendreply_answer_f8 = '/synthflow_gmf_sendreply_answer_f8';
527         ~synthflow_gmf_sendreply_answer_f9 = '/synthflow_gmf_sendreply_answer_f9';
528         ~synthflow_gmf_sendreply_answer_f10 = '/synthflow_gmf_sendreply_answer_f10';
529         ~synthflow_gmf_sendreply_answer_f11 = '/synthflow_gmf_sendreply_answer_f11';
530         ~synthflow_gmf_sendreply_answer_f12 = '/synthflow_gmf_sendreply_answer_f12';
531
532         ~sendreply_oscfunc_array = {
533
534                 OSCFunc({~f1 = ~send_reply_random_func.value; AppClock.sched(0,{~synthflow.value;});}, '/synthflow_random_sendreply_answer_f1');
535                 OSCFunc({~f2 = ~send_reply_random_func.value; AppClock.sched(0,{~synthflow.value;});}, '/synthflow_random_sendreply_answer_f2');
536                 OSCFunc({~f3 = ~send_reply_random_func.value; AppClock.sched(0,{~synthflow.value;});}, '/synthflow_random_sendreply_answer_f3');
537                 OSCFunc({~f4 = ~send_reply_random_func.value; AppClock.sched(0,{~synthflow.value;});}, '/synthflow_random_sendreply_answer_f4');
538                 OSCFunc({~f5 = ~send_reply_random_func.value; AppClock.sched(0,{~synthflow.value;});}, '/synthflow_random_sendreply_answer_f5');
539                 OSCFunc({~f6 = ~send_reply_random_func.value; AppClock.sched(0,{~synthflow.value;});}, '/synthflow_random_sendreply_answer_f6');
540                 OSCFunc({~f7 = ~send_reply_random_func.value; AppClock.sched(0,{~synthflow.value;});}, '/synthflow_random_sendreply_answer_f7');
541                 OSCFunc({~f8 = ~send_reply_random_func.value; AppClock.sched(0,{~synthflow.value;});}, '/synthflow_random_sendreply_answer_f8');
542                 OSCFunc({~f9 = ~send_reply_random_func.value; AppClock.sched(0,{~synthflow.value;});}, '/synthflow_random_sendreply_answer_f9');
543                 OSCFunc({~f10 = ~send_reply_random_func.value; AppClock.sched(0,{~synthflow.value;});}, '/synthflow_random_sendreply_answer_f10');
544                 OSCFunc({~f11 = ~send_reply_random_func.value; AppClock.sched(0,{~synthflow.value;});}, '/synthflow_random_sendreply_answer_f11');
545                 OSCFunc({~f12 = ~send_reply_random_func.value; AppClock.sched(0,{~synthflow.value;});}, '/synthflow_random_sendreply_answer_f12');
546
547                 OSCFunc({x = ~f1; y = ~sendreply_gm_fth_y_1; ~sendreply_gm_fth_func.value; ~f1 = x; AppClock.sched(0,{~synthflow.value;}); ~sendreply_gm_fth_y_1 = y;}, '/synthflow_gmf_sendreply_answer_f1');
548                 OSCFunc({x = ~f2; y = ~sendreply_gm_fth_y_2; ~sendreply_gm_fth_func.value; ~f2 = x; AppClock.sched(0,{~synthflow.value;}); ~sendreply_gm_fth_y_2 = y;}, '/synthflow_gmf_sendreply_answer_f2');
549                 OSCFunc({x = ~f3; y = ~sendreply_gm_fth_y_3; ~sendreply_gm_fth_func.value; ~f3 = x; AppClock.sched(0,{~synthflow.value;}); ~sendreply_gm_fth_y_3 = y;}, '/synthflow_gmf_sendreply_answer_f3');
550                 OSCFunc({x = ~f4; y = ~sendreply_gm_fth_y_4; ~sendreply_gm_fth_func.value; ~f4 = x; AppClock.sched(0,{~synthflow.value;}); ~sendreply_gm_fth_y_4 = y;}, '/synthflow_gmf_sendreply_answer_f4');
551                 OSCFunc({x = ~f5; y = ~sendreply_gm_fth_y_5; ~sendreply_gm_fth_func.value; ~f5 = x; AppClock.sched(0,{~synthflow.value;}); ~sendreply_gm_fth_y_5 = y;}, '/synthflow_gmf_sendreply_answer_f5');
552                 OSCFunc({x = ~f6; y = ~sendreply_gm_fth_y_6; ~sendreply_gm_fth_func.value; ~f6 = x; AppClock.sched(0,{~synthflow.value;}); ~sendreply_gm_fth_y_6 = y;}, '/synthflow_gmf_sendreply_answer_f6');
553                 OSCFunc({x = ~f7; y = ~sendreply_gm_fth_y_7; ~sendreply_gm_fth_func.value; ~f7 = x; AppClock.sched(0,{~synthflow.value;}); ~sendreply_gm_fth_y_7 = y;}, '/synthflow_gmf_sendreply_answer_f7');
554                 OSCFunc({x = ~f8; y = ~sendreply_gm_fth_y_8; ~sendreply_gm_fth_func.value; ~f8 = x; AppClock.sched(0,{~synthflow.value;}); ~sendreply_gm_fth_y_8 = y;}, '/synthflow_gmf_sendreply_answer_f8');
555                 OSCFunc({x = ~f9; y = ~sendreply_gm_fth_y_9; ~sendreply_gm_fth_func.value; ~f9 = x; AppClock.sched(0,{~synthflow.value;}); ~sendreply_gm_fth_y_9 = y;}, '/synthflow_gmf_sendreply_answer_f9');
556                 OSCFunc({x = ~f10; y = ~sendreply_gm_fth_y_10; ~sendreply_gm_fth_func.value; ~f10 = x; AppClock.sched(0,{~synthflow.value;}); ~sendreply_gm_fth_y_10 = y;}, '/synthflow_gmf_sendreply_answer_f10');
557                 OSCFunc({x = ~f11; y = ~sendreply_gm_fth_y_11; ~sendreply_gm_fth_func.value; ~f11 = x; AppClock.sched(0,{~synthflow.value;}); ~sendreply_gm_fth_y_11 = y;}, '/synthflow_gmf_sendreply_answer_f11');
558                 OSCFunc({x = ~f12; y = ~sendreply_gm_fth_y_12; ~sendreply_gm_fth_func.value; ~f12 = x; AppClock.sched(0,{~synthflow.value;}); ~sendreply_gm_fth_y_12 = y;}, '/synthflow_gmf_sendreply_answer_f12');
559         };
560
561         //set base (lowest) frequencies, set starting values for synthdef, and load synthdef on server boot
562
563         if((~gsinenum == nil) or: (~synthdef != "gsineicld"), {
564                 (
565                         if(~basefreq == nil, {~basefreq = ~base_frequency});
566                         ~fmult = 16;
567                         (#a,b,c,d,e,f = [ ~basefreq,~basefreq,~basefreq,~basefreq,~basefreq,~basefreq  ];
568                                 ~a = a; ~b = b; ~c =c; ~d = d; ~e = e;~f=f;);
569
570                         ~synthdef = "gsineicld"; ~gsinenum = ~synthdefnum;
571
572                         ~gsine.value;
573                 );
574         });
575
576
577         //generate GUI window
578
579         w = Window("Timewave Synth", Rect(0,0,Window.screenBounds.width,Window.screenBounds.height), border:true);
580
581         view = UserView(w, Window.screenBounds);
582         view.clearOnRefresh = false;
583         view.background = Color.black;
584
585         //vertical grid (inactive)
586
587         /*~b1 = Window.screenBounds.width/(12*4) /*25.462962962963*/; ~btu = 31; ~btd = 375; ~bw = 0.5; ~bh = 120; ~bcolor = Color.grey;
588         View(w, Rect(~b1, ~btu, ~bw, ~bh)).background = ~bcolor;
589         View(w, Rect(~b1, ~btd, ~bw, ~bh)).background = ~bcolor;
590         54.do({View(w, Rect(~b1 = ~b1+(Window.screenBounds.width/(12*4)), ~btu, ~bw, ~bh)).background = ~bcolor;});
591         ~b1 = Window.screenBounds.width/(12*4);
592         54.do({View(w, Rect(~b1 = ~b1+(Window.screenBounds.width/(12*4)), ~btd, ~bw, ~bh)).background = ~bcolor;});*/
593
594
595         //horizontal grid
596
597         ~nh = 2;
598         ~nw = ~nh*1.6180339887499;
599
600         ~tgrid = 30;
601         ~bgrid = Window.screenBounds.height-(Window.screenBounds.height/1.6180339887499)+30;
602
603         ~dc1 = ~tgrid-5; ~dc2 = ~bgrid-5; ~dca = 10;
604
605         13.do(x=~tgrid-10; {View(w, Rect(1, x=x+10, Window.screenBounds.width, 0.5)).background = Color.new255(51, 51, 51)});
606         13.do(x=~bgrid-10; {View(w, Rect(1, x=x+10, Window.screenBounds.width, 0.5)).background = Color.new255(51, 51, 51)});
607
608         ~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;);
609         ~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;);
610         ~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;);
611         ~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;);
612         ~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;);
613         ~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;);
614         ~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;);
615         ~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;);
616         ~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;);
617         ~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;);
618         ~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;);
619         ~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;);
620         ~zmid = (View(w, Rect(x, 280, ~nw, 2)).background = Color.clear;);
621         ~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;);
622         ~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;);
623         ~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;);
624         ~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;);
625         ~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;);
626         ~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;);
627         ~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;);
628         ~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;);
629         ~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;);
630         ~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;);
631         ~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;);
632         ~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;);
633
634
635         ~dc1 = ~tgrid-5; ~dc2 = ~bgrid-5; ~dca = 10;
636
637
638         //synth functions (open, flow, slide, pause, free)
639
640         ~synthopen = {
641                 case
642                 {((~l1a.isRunning == false) and: (~l1a1.isRunning == false)) or: ~l1a1.isRunning == true}{
643                         if(~l1a1.isRunning == true, {
644                                 (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;
645                                         #vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8,vol9,vol10,vol11,vol12 = [~vol1,~vol2,~vol3,~vol4,~vol5,~vol6,~vol7,~vol8,~vol9,~vol10,~vol11,~vol12];
646                                         #f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12 = [ 0,0,0,0,0,0,0,0,0,0,0,0 ];
647                                         s.makeBundle(0, {
648                                                 ~l1a1.set(\dur, f1,     \vol, vol1);  ~l1b1.set(\dur, f1,  \vol, vol1);
649                                                 ~l1c1.set(\dur, f1/~icd3,       \vol, vol1);  ~l1d1.set(\dur, f1/~icd3,  \vol, vol1);
650                                                 ~l1e1.set(\dur, f1/~icd6,       \vol, vol1);  ~l1f1.set(\dur, f1/~icd6,  \vol, vol1);
651                                                 ~l2a1.set(\dur, f2,     \vol, vol2);          ~l2b1.set(\dur, f2,  \vol, vol2);
652                                                 ~l2c1.set(\dur, f2/~icd3,       \vol, vol2);  ~l2d1.set(\dur, f2/~icd3,  \vol, vol2);
653                                                 ~l2e1.set(\dur, f2/~icd6,       \vol, vol2);  ~l2f1.set(\dur, f2/~icd6,  \vol, vol2);
654                                                 ~l3a1.set(\dur, f3,     \vol, vol3);          ~l3b1.set(\dur, f3,  \vol, vol3);
655                                                 ~l3c1.set(\dur, f3/~icd3,       \vol, vol3);  ~l3d1.set(\dur, f3/~icd3,  \vol, vol3);
656                                                 ~l3e1.set(\dur, f3/~icd6,       \vol, vol3);  ~l3f1.set(\dur, f3/~icd6,  \vol, vol3);
657                                                 ~l4a1.set(\dur, f4,    \vol, vol4);           ~l4b1.set(\dur, f4,  \vol, vol4);
658                                                 ~l4c1.set(\dur, f4/~icd3,       \vol, vol4);  ~l4d1.set(\dur, f4/~icd3,  \vol, vol4);
659                                                 ~l4e1.set(\dur, f4/~icd6,       \vol, vol4);  ~l4f1.set(\dur, f4/~icd6,  \vol, vol4);
660                                                 ~l5a1.set(\dur, f5,    \vol, vol5);           ~l5b1.set(\dur, f5,  \vol, vol5);
661                                                 ~l5c1.set(\dur, f5/~icd3,       \vol, vol5);  ~l5d1.set(\dur, f5/~icd3,  \vol, vol5);
662                                                 ~l5e1.set(\dur, f5/~icd6,       \vol, vol5);  ~l5f1.set(\dur, f5/~icd6,  \vol, vol5);
663                                                 ~l6a1.set(\dur, f6,    \vol, vol6);           ~l6b1.set(\dur, f6,  \vol, vol6);
664                                                 ~l6c1.set(\dur, f6/~icd3,       \vol, vol6);  ~l6d1.set(\dur, f6/~icd3,  \vol, vol6);
665                                                 ~l6e1.set(\dur, f6/~icd6,       \vol, vol6);  ~l6f1.set(\dur, f6/~icd6,  \vol, vol6);
666                                                 ~l7a1.set(\dur, f7,    \vol, vol7);           ~l7b1.set(\dur, f7,  \vol, vol7);
667                                                 ~l7c1.set(\dur, f7/~icd3,       \vol, vol7);  ~l7d1.set(\dur, f7/~icd3,  \vol, vol7);
668                                                 ~l7e1.set(\dur, f7/~icd6,       \vol, vol7);  ~l7f1.set(\dur, f7/~icd6,  \vol, vol7);
669                                                 ~l8a1.set(\dur, f8,    \vol, vol8);           ~l8b1.set(\dur, f8,  \vol, vol8);
670                                                 ~l8c1.set(\dur, f8/~icd3,       \vol, vol8);  ~l8d1.set(\dur, f8/~icd3,  \vol, vol8);
671                                                 ~l8e1.set(\dur, f8/~icd6,       \vol, vol8);  ~l8f1.set(\dur, f8/~icd6,  \vol, vol8);
672                                                 ~l9a1.set(\dur, f9,    \vol, vol9);          ~l9b1.set(\dur, f9,  \vol, vol9);
673                                                 ~l9c1.set(\dur, f9/~icd3,       \vol, vol9); ~l9d1.set(\dur, f9/~icd3,  \vol, vol9);
674                                                 ~l9e1.set(\dur, f9/~icd6,       \vol, vol9); ~l9f1.set(\dur, f9/~icd6,  \vol, vol9);
675                                                 ~l10a1.set(\dur, f10,  \vol, vol10);         ~l10b1.set(\dur, f10,  \vol, vol10);
676                                                 ~l10c1.set(\dur, f10/~icd3,     \vol, vol10);~l10d1.set(\dur, f10/~icd3,  \vol, vol10);
677                                                 ~l10e1.set(\dur, f10/~icd6,     \vol, vol10);~l10f1.set(\dur, f10/~icd6,  \vol, vol10);
678                                                 ~l11a1.set(\dur, f11,  \vol, vol11);         ~l11b1.set(\dur, f11,  \vol, vol11);
679                                                 ~l11c1.set(\dur, f11/~icd3,     \vol, vol11);~l11d1.set(\dur, f11/~icd3,  \vol, vol11);
680                                                 ~l11e1.set(\dur, f11/~icd6,     \vol, vol11);~l11f1.set(\dur, f11/~icd6,  \vol, vol11);
681                                                 ~l12a1.set(\dur, f12,  \vol, vol12);         ~l12b1.set(\dur, f12,  \vol, vol12);
682                                                 ~l12c1.set(\dur, f12/~icd3,     \vol, vol12);~l12d1.set(\dur, f12/~icd3,  \vol, vol12);
683                                                 ~l12e1.set(\dur, f12/~icd6,     \vol, vol12);~l12f1.set(\dur, f12/~icd6,  \vol, vol12);
684                                         });
685                                 }););
686                         });
687
688                         (
689                                 1.do({var vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8,vol9,vol10,vol11,vol12,s1,s2,s3,s4,s5,s6,s5_1,s5_2,s5_3,s5_4,s5_5,s5_6,s5_7,s5_8,s5_9,s5_10,s5_11,s5_12;
690                                         #vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8,vol9,vol10,vol11,vol12 = [~vol1,~vol2,~vol3,~vol4,~vol5,~vol6,~vol7,~vol8,~vol9,~vol10,~vol11,~vol12];
691                                         #s1,s2,s3,s4,s5,s6 = [\gsineicfld6, \gsineicrld6, \gsineicfld2, \gsineicrld2, \gsineicfld1, \gsineicrld1];
692                                         case
693                                         {~sendreplysynthdef_on == 0}{#s5_1,s5_2,s5_3,s5_4,s5_5,s5_6,s5_7,s5_8,s5_9,s5_10,s5_11,s5_12 = \gsineicfld1!12;}
694                                         {~sendreplysynthdef_on == 1}{#s5_1,s5_2,s5_3,s5_4,s5_5,s5_6,s5_7,s5_8,s5_9,s5_10,s5_11,s5_12 =
695                                                 [\gsineicfld1_f1, \gsineicfld1_f2, \gsineicfld1_f3, \gsineicfld1_f4, \gsineicfld1_f5, \gsineicfld1_f6, \gsineicfld1_f7, \gsineicfld1_f8, \gsineicfld1_f9, \gsineicfld1_f10, \gsineicfld1_f11, \gsineicfld1_f12]; ~sendreply_oscfunc_array.value;};
696                                         s.makeBundle(0, {
697                                                 ~l1a = Synth(s1, [\dur, ~f1,    \vol, vol1]).register;    ~l1b = Synth(s2, [\dur, ~f1,    \vol, vol1]);
698                                                 ~l1c = Synth(s3, [\dur, ~f1/~icd3,  \vol, vol1]);   ~l1d = Synth(s4, [\dur, ~f1/~icd3,  \vol, vol1]);
699                                                 ~l1e = Synth(s5_1, [\dur, ~f1/~icd6,  \vol, vol1]);   ~l1f = Synth(s6, [\dur, ~f1/~icd6,  \vol, vol1]);
700                                                 ~l2a = Synth(s1, [\dur, ~f2,    \vol, vol2]);        ~l2b = Synth(s2, [\dur, ~f2,    \vol, vol2]);
701                                                 ~l2c = Synth(s3, [\dur, ~f2/~icd3,  \vol, vol2]);   ~l2d = Synth(s4, [\dur, ~f2/~icd3,  \vol, vol2]);
702                                                 ~l2e = Synth(s5_2, [\dur, ~f2/~icd6,  \vol, vol2]);   ~l2f = Synth(s6, [\dur, ~f2/~icd6,  \vol, vol2]);
703                                                 ~l3a = Synth(s1, [\dur, ~f3,    \vol, vol3]);        ~l3b = Synth(s2, [\dur, ~f3,   \vol, vol3]);
704                                                 ~l3c = Synth(s3, [\dur, ~f3/~icd3,  \vol, vol3]);   ~l3d = Synth(s4, [\dur, ~f3/~icd3, \vol, vol3]);
705                                                 ~l3e = Synth(s5_3, [\dur, ~f3/~icd6,  \vol, vol3]);   ~l3f = Synth(s6, [\dur, ~f3/~icd6, \vol, vol3]);
706                                                 ~l4a = Synth(s1, [\dur, ~f4,    \vol, vol4]);       ~l4b = Synth(s2, [\dur, ~f4,   \vol, vol4]);
707                                                 ~l4c = Synth(s3, [\dur, ~f4/~icd3,  \vol, vol4]);  ~l4d = Synth(s4, [\dur, ~f4/~icd3, \vol, vol4]);
708                                                 ~l4e = Synth(s5_4, [\dur, ~f4/~icd6,  \vol, vol4]);   ~l4f = Synth(s6, [\dur, ~f4/~icd6, \vol, vol4]);
709                                                 ~l5a = Synth(s1, [\dur, ~f5,    \vol, vol5]);       ~l5b = Synth(s2, [\dur, ~f5,   \vol, vol5]);
710                                                 ~l5c = Synth(s3, [\dur, ~f5/~icd3,  \vol, vol5]);   ~l5d = Synth(s4, [\dur, ~f5/~icd3, \vol, vol5]);
711                                                 ~l5e = Synth(s5_5, [\dur, ~f5/~icd6,  \vol, vol5]);   ~l5f = Synth(s6, [\dur, ~f5/~icd6, \vol, vol5]);
712                                                 ~l6a = Synth(s1, [\dur, ~f6,    \vol, vol6]);       ~l6b = Synth(s2, [\dur, ~f6,   \vol, vol6]);
713                                                 ~l6c = Synth(s3, [\dur, ~f6/~icd3,  \vol, vol6]);   ~l6d = Synth(s4, [\dur, ~f6/~icd3, \vol, vol6]);
714                                                 ~l6e = Synth(s5_6, [\dur, ~f6/~icd6,  \vol, vol6]);   ~l6f = Synth(s6, [\dur, ~f6/~icd6, \vol, vol6]);
715                                                 ~l7a = Synth(s1, [\dur, ~f7,    \vol, vol7]);       ~l7b = Synth(s2, [\dur, ~f7,   \vol, vol7]);
716                                                 ~l7c = Synth(s3, [\dur, ~f7/~icd3,  \vol, vol7]);   ~l7d = Synth(s4, [\dur, ~f7/~icd3, \vol, vol7]);
717                                                 ~l7e = Synth(s5_7, [\dur, ~f7/~icd6,  \vol, vol7]);   ~l7f = Synth(s6, [\dur, ~f7/~icd6, \vol, vol7]);
718                                                 ~l8a = Synth(s1, [\dur, ~f8,    \vol, vol8]);       ~l8b = Synth(s2, [\dur, ~f8,   \vol, vol8]);
719                                                 ~l8c = Synth(s3, [\dur, ~f8/~icd3,  \vol, vol8]);   ~l8d = Synth(s4, [\dur, ~f8/~icd3, \vol, vol8]);
720                                                 ~l8e = Synth(s5_8, [\dur, ~f8/~icd6,  \vol, vol8]);   ~l8f = Synth(s6, [\dur, ~f8/~icd6, \vol, vol8]);
721                                                 ~l9a = Synth(s1, [\dur, ~f9,    \vol, vol9]);       ~l9b = Synth(s2, [\dur, ~f9,   \vol, vol9]);
722                                                 ~l9c = Synth(s3, [\dur, ~f9/~icd3,  \vol, vol9]);   ~l9d = Synth(s4, [\dur, ~f9/~icd3, \vol, vol9]);
723                                                 ~l9e = Synth(s5_9, [\dur, ~f9/~icd6,  \vol, vol9]);   ~l9f = Synth(s6, [\dur, ~f9/~icd6, \vol, vol9]);
724                                                 ~l10a = Synth(s1, [\dur,~f10,  \vol, vol10]);       ~l10b = Synth(s2, [\dur, ~f10, \vol, vol10]);
725                                                 ~l10c = Synth(s3, [\dur, ~f10/~icd3,  \vol, vol10]);~l10d = Synth(s4, [\dur, ~f10/~icd3,  \vol, vol10]);
726                                                 ~l10e = Synth(s5_10, [\dur, ~f10/~icd6,  \vol, vol10]);~l10f = Synth(s6, [\dur, ~f10/~icd6,  \vol, vol10]);
727                                                 ~l11a = Synth(s1, [\dur,~f11,   \vol, vol11]);      ~l11b = Synth(s2, [\dur, ~f11,    \vol, vol11]);
728                                                 ~l11c = Synth(s3, [\dur, ~f11/~icd3,  \vol, vol11]);~l11d = Synth(s4, [\dur, ~f11/~icd3,  \vol, vol11]);
729                                                 ~l11e = Synth(s5_11, [\dur, ~f11/~icd6,  \vol, vol11]);~l11f = Synth(s6, [\dur, ~f11/~icd6,  \vol, vol11]);
730                                                 ~l12a = Synth(s1, [\dur,~f12,   \vol, vol12]);      ~l12b = Synth(s2, [\dur, ~f12,    \vol, vol12]);
731                                                 ~l12c = Synth(s3, [\dur, ~f12/~icd3,  \vol, vol12]);~l12d = Synth(s4, [\dur, ~f12/~icd3,  \vol, vol12]);
732                                                 ~l12e = Synth(s5_12, [\dur, ~f12/~icd6,  \vol, vol12]);~l12f = Synth(s6, [\dur, ~f12/~icd6,  \vol, vol12]);
733                                         });
734                                 });
735                         );
736                         if(~l1a1.isRunning == true, {
737                                 AppClock.sched(0.161803398875,{
738                                         ([~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;
739                                 });
740                         });
741                 }
742                 {~l1a.isRunning == true}{
743                         (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;
744                                 #vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8,vol9,vol10,vol11,vol12 = [~vol1,~vol2,~vol3,~vol4,~vol5,~vol6,~vol7,~vol8,~vol9,~vol10,~vol11,~vol12];
745                                 #f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12 = [ 0,0,0,0,0,0,0,0,0,0,0,0 ];
746                                 s.makeBundle(0, {
747                                         ~l1a.set(\dur, f1,     \vol, vol1);  ~l1b.set(\dur, f1,  \vol, vol1);
748                                         ~l1c.set(\dur, f1/~icd3,       \vol, vol1);  ~l1d.set(\dur, f1/~icd3,  \vol, vol1);
749                                         ~l1e.set(\dur, f1/~icd6,       \vol, vol1);  ~l1f.set(\dur, f1/~icd6,  \vol, vol1);
750                                         ~l2a.set(\dur, f2,     \vol, vol2);          ~l2b.set(\dur, f2,  \vol, vol2);
751                                         ~l2c.set(\dur, f2/~icd3,       \vol, vol2);  ~l2d.set(\dur, f2/~icd3,  \vol, vol2);
752                                         ~l2e.set(\dur, f2/~icd6,       \vol, vol2);  ~l2f.set(\dur, f2/~icd6,  \vol, vol2);
753                                         ~l3a.set(\dur, f3,     \vol, vol3);          ~l3b.set(\dur, f3,  \vol, vol3);
754                                         ~l3c.set(\dur, f3/~icd3,       \vol, vol3);  ~l3d.set(\dur, f3/~icd3,  \vol, vol3);
755                                         ~l3e.set(\dur, f3/~icd6,       \vol, vol3);  ~l3f.set(\dur, f3/~icd6,  \vol, vol3);
756                                         ~l4a.set(\dur, f4,    \vol, vol4);           ~l4b.set(\dur, f4,  \vol, vol4);
757                                         ~l4c.set(\dur, f4/~icd3,       \vol, vol4);  ~l4d.set(\dur, f4/~icd3,  \vol, vol4);
758                                         ~l4e.set(\dur, f4/~icd6,       \vol, vol4);  ~l4f.set(\dur, f4/~icd6,  \vol, vol4);
759                                         ~l5a.set(\dur, f5,    \vol, vol5);           ~l5b.set(\dur, f5,  \vol, vol5);
760                                         ~l5c.set(\dur, f5/~icd3,       \vol, vol5);  ~l5d.set(\dur, f5/~icd3,  \vol, vol5);
761                                         ~l5e.set(\dur, f5/~icd6,       \vol, vol5);  ~l5f.set(\dur, f5/~icd6,  \vol, vol5);
762                                         ~l6a.set(\dur, f6,    \vol, vol6);           ~l6b.set(\dur, f6,  \vol, vol6);
763                                         ~l6c.set(\dur, f6/~icd3,       \vol, vol6);  ~l6d.set(\dur, f6/~icd3,  \vol, vol6);
764                                         ~l6e.set(\dur, f6/~icd6,       \vol, vol6);  ~l6f.set(\dur, f6/~icd6,  \vol, vol6);
765                                         ~l7a.set(\dur, f7,    \vol, vol7);           ~l7b.set(\dur, f7,  \vol, vol7);
766                                         ~l7c.set(\dur, f7/~icd3,       \vol, vol7);  ~l7d.set(\dur, f7/~icd3,  \vol, vol7);
767                                         ~l7e.set(\dur, f7/~icd6,       \vol, vol7);  ~l7f.set(\dur, f7/~icd6,  \vol, vol7);
768                                         ~l8a.set(\dur, f8,    \vol, vol8);           ~l8b.set(\dur, f8,  \vol, vol8);
769                                         ~l8c.set(\dur, f8/~icd3,       \vol, vol8);  ~l8d.set(\dur, f8/~icd3,  \vol, vol8);
770                                         ~l8e.set(\dur, f8/~icd6,       \vol, vol8);  ~l8f.set(\dur, f8/~icd6,  \vol, vol8);
771                                         ~l9a.set(\dur, f9,    \vol, vol9);          ~l9b.set(\dur, f9,  \vol, vol9);
772                                         ~l9c.set(\dur, f9/~icd3,       \vol, vol9); ~l9d.set(\dur, f9/~icd3,  \vol, vol9);
773                                         ~l9e.set(\dur, f9/~icd6,       \vol, vol9); ~l9f.set(\dur, f9/~icd6,  \vol, vol9);
774                                         ~l10a.set(\dur, f10,  \vol, vol10);         ~l10b.set(\dur, f10,  \vol, vol10);
775                                         ~l10c.set(\dur, f10/~icd3,     \vol, vol10);~l10d.set(\dur, f10/~icd3,  \vol, vol10);
776                                         ~l10e.set(\dur, f10/~icd6,     \vol, vol10);~l10f.set(\dur, f10/~icd6,  \vol, vol10);
777                                         ~l11a.set(\dur, f11,  \vol, vol11);         ~l11b.set(\dur, f11,  \vol, vol11);
778                                         ~l11c.set(\dur, f11/~icd3,     \vol, vol11,);~l11d.set(\dur, f11/~icd3,  \vol, vol11);
779                                         ~l11e.set(\dur, f11/~icd6,     \vol, vol11);~l11f.set(\dur, f11/~icd6,  \vol, vol11);
780                                         ~l12a.set(\dur, f12,  \vol, vol12);         ~l12b.set(\dur, f12,  \vol, vol12);
781                                         ~l12c.set(\dur, f12/~icd3,     \vol, vol12,);~l12d.set(\dur, f12/~icd3,  \vol, vol12);
782                                         ~l12e.set(\dur, f12/~icd6,     \vol, vol12);~l12f.set(\dur, f12/~icd6,  \vol, vol12);
783                                 });
784                         }););
785
786                         (
787                                 1.do({var vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8,vol9,vol10,vol11,vol12,s1,s2,s3,s4,s5,s6,s5_1,s5_2,s5_3,s5_4,s5_5,s5_6,s5_7,s5_8,s5_9,s5_10,s5_11,s5_12;
788                                         #vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8,vol9,vol10,vol11,vol12 = [~vol1,~vol2,~vol3,~vol4,~vol5,~vol6,~vol7,~vol8,~vol9,~vol10,~vol11,~vol12];
789                                         #s1,s2,s3,s4,s5,s6 = [\gsineicfld6, \gsineicrld6, \gsineicfld2, \gsineicrld2, \gsineicfld1, \gsineicrld1];
790                                         case
791                                         {~sendreplysynthdef_on == 0}{#s5_1,s5_2,s5_3,s5_4,s5_5,s5_6,s5_7,s5_8,s5_9,s5_10,s5_11,s5_12 = \gsineicfld1!12;}
792                                         {~sendreplysynthdef_on == 1}{#s5_1,s5_2,s5_3,s5_4,s5_5,s5_6,s5_7,s5_8,s5_9,s5_10,s5_11,s5_12 =
793                                                 [\gsineicfld1_f1, \gsineicfld1_f2, \gsineicfld1_f3, \gsineicfld1_f4, \gsineicfld1_f5, \gsineicfld1_f6, \gsineicfld1_f7, \gsineicfld1_f8, \gsineicfld1_f9, \gsineicfld1_f10, \gsineicfld1_f11, \gsineicfld1_f12]; ~sendreply_oscfunc_array.value;};
794                                         s.makeBundle(0, {
795                                                 ~l1a1 = Synth(s1, [\dur, ~f1,    \vol, vol1]).register;    ~l1b1 = Synth(s2, [\dur, ~f1,    \vol, vol1]);
796                                                 ~l1c1 = Synth(s3, [\dur, ~f1/~icd3,  \vol, vol1]);   ~l1d1 = Synth(s4, [\dur, ~f1/~icd3,  \vol, vol1]);
797                                                 ~l1e1 = Synth(s5_1, [\dur, ~f1/~icd6,  \vol, vol1]);   ~l1f1 = Synth(s6, [\dur, ~f1/~icd6,  \vol, vol1]);
798                                                 ~l2a1 = Synth(s1, [\dur, ~f2,    \vol, vol2]);        ~l2b1 = Synth(s2, [\dur, ~f2,    \vol, vol2]);
799                                                 ~l2c1 = Synth(s3, [\dur, ~f2/~icd3,  \vol, vol2]);   ~l2d1 = Synth(s4, [\dur, ~f2/~icd3,  \vol, vol2]);
800                                                 ~l2e1 = Synth(s5_2, [\dur, ~f2/~icd6,  \vol, vol2]);   ~l2f1 = Synth(s6, [\dur, ~f2/~icd6,  \vol, vol2]);
801                                                 ~l3a1 = Synth(s1, [\dur, ~f3,    \vol, vol3]);        ~l3b1 = Synth(s2, [\dur, ~f3,   \vol, vol3]);
802                                                 ~l3c1 = Synth(s3, [\dur, ~f3/~icd3,  \vol, vol3]);   ~l3d1 = Synth(s4, [\dur, ~f3/~icd3, \vol, vol3]);
803                                                 ~l3e1 = Synth(s5_3, [\dur, ~f3/~icd6,  \vol, vol3]);   ~l3f1 = Synth(s6, [\dur, ~f3/~icd6, \vol, vol3]);
804                                                 ~l4a1 = Synth(s1, [\dur, ~f4,    \vol, vol4]);       ~l4b1 = Synth(s2, [\dur, ~f4,   \vol, vol4]);
805                                                 ~l4c1 = Synth(s3, [\dur, ~f4/~icd3,  \vol, vol4]);  ~l4d1 = Synth(s4, [\dur, ~f4/~icd3, \vol, vol4]);
806                                                 ~l4e1 = Synth(s5_4, [\dur, ~f4/~icd6,  \vol, vol4]);   ~l4f1 = Synth(s6, [\dur, ~f4/~icd6, \vol, vol4]);
807                                                 ~l5a1 = Synth(s1, [\dur, ~f5,    \vol, vol5]);       ~l5b1 = Synth(s2, [\dur, ~f5,   \vol, vol5]);
808                                                 ~l5c1 = Synth(s3, [\dur, ~f5/~icd3,  \vol, vol5]);   ~l5d1 = Synth(s4, [\dur, ~f5/~icd3, \vol, vol5]);
809                                                 ~l5e1 = Synth(s5_5, [\dur, ~f5/~icd6,  \vol, vol5]);   ~l5f1 = Synth(s6, [\dur, ~f5/~icd6, \vol, vol5]);
810                                                 ~l6a1 = Synth(s1, [\dur, ~f6,    \vol, vol6]);       ~l6b1 = Synth(s2, [\dur, ~f6,   \vol, vol6]);
811                                                 ~l6c1 = Synth(s3, [\dur, ~f6/~icd3,  \vol, vol6]);   ~l6d1 = Synth(s4, [\dur, ~f6/~icd3, \vol, vol6]);
812                                                 ~l6e1 = Synth(s5_6, [\dur, ~f6/~icd6,  \vol, vol6]);   ~l6f1 = Synth(s6, [\dur, ~f6/~icd6, \vol, vol6]);
813                                                 ~l7a1 = Synth(s1, [\dur, ~f7,    \vol, vol7]);       ~l7b1 = Synth(s2, [\dur, ~f7,   \vol, vol7]);
814                                                 ~l7c1 = Synth(s3, [\dur, ~f7/~icd3,  \vol, vol7]);   ~l7d1 = Synth(s4, [\dur, ~f7/~icd3, \vol, vol7]);
815                                                 ~l7e1 = Synth(s5_7, [\dur, ~f7/~icd6,  \vol, vol7]);   ~l7f1 = Synth(s6, [\dur, ~f7/~icd6, \vol, vol7]);
816                                                 ~l8a1 = Synth(s1, [\dur, ~f8,    \vol, vol8]);       ~l8b1 = Synth(s2, [\dur, ~f8,   \vol, vol8]);
817                                                 ~l8c1 = Synth(s3, [\dur, ~f8/~icd3,  \vol, vol8]);   ~l8d1 = Synth(s4, [\dur, ~f8/~icd3, \vol, vol8]);
818                                                 ~l8e1 = Synth(s5_8, [\dur, ~f8/~icd6,  \vol, vol8]);   ~l8f1 = Synth(s6, [\dur, ~f8/~icd6, \vol, vol8]);
819                                                 ~l9a1 = Synth(s1, [\dur, ~f9,    \vol, vol9]);       ~l9b1 = Synth(s2, [\dur, ~f9,   \vol, vol9]);
820                                                 ~l9c1 = Synth(s3, [\dur, ~f9/~icd3,  \vol, vol9]);   ~l9d1 = Synth(s4, [\dur, ~f9/~icd3, \vol, vol9]);
821                                                 ~l9e1 = Synth(s5_9, [\dur, ~f9/~icd6,  \vol, vol9]);   ~l9f1 = Synth(s6, [\dur, ~f9/~icd6, \vol, vol9]);
822                                                 ~l10a1 = Synth(s1, [\dur,~f10,  \vol, vol10]);       ~l10b1 = Synth(s2, [\dur, ~f10, \vol, vol10]);
823                                                 ~l10c1 = Synth(s3, [\dur, ~f10/~icd3,  \vol, vol10]);~l10d1 = Synth(s4, [\dur, ~f10/~icd3,  \vol, vol10]);
824                                                 ~l10e1 = Synth(s5_10, [\dur, ~f10/~icd6,  \vol, vol10]);~l10f1 = Synth(s6, [\dur, ~f10/~icd6,  \vol, vol10]);
825                                                 ~l11a1 = Synth(s1, [\dur,~f11,   \vol, vol11]);      ~l11b1 = Synth(s2, [\dur, ~f11,    \vol, vol11]);
826                                                 ~l11c1 = Synth(s3, [\dur, ~f11/~icd3,  \vol, vol11]);~l11d1 = Synth(s4, [\dur, ~f11/~icd3,  \vol, vol11]);
827                                                 ~l11e1 = Synth(s5_11, [\dur, ~f11/~icd6,  \vol, vol11]);~l11f1 = Synth(s6, [\dur, ~f11/~icd6,  \vol, vol11]);
828                                                 ~l12a1 = Synth(s1, [\dur,~f12,   \vol, vol12]);      ~l12b1 = Synth(s2, [\dur, ~f12,    \vol, vol12]);
829                                                 ~l12c1 = Synth(s3, [\dur, ~f12/~icd3,  \vol, vol12]);~l12d1 = Synth(s4, [\dur, ~f12/~icd3,  \vol, vol12]);
830                                                 ~l12e1 = Synth(s5_12, [\dur, ~f12/~icd6,  \vol, vol12]);~l12f1 = Synth(s6, [\dur, ~f12/~icd6,  \vol, vol12]);
831                                         });
832                                 });
833                         );
834                         AppClock.sched(0.161803398875,{
835                                 ([~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;
836                         });
837                 };
838
839                 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;);});
840                 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;);});
841                 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;);});
842                 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;);});
843                 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;);});
844                 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;);});
845                 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;);});
846                 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;);});
847                 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;);});
848                 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;);});
849                 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;);});
850                 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;);});
851
852                 b3.value = 1;
853         };
854
855         ~synthflow = {
856                 case
857                 {~l1a1.isRunning == true}{
858                         (1.do({var vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8,vol9,vol10,vol11,vol12,s1,s2,s3,s4,s5,s6;
859                                 #vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8,vol9,vol10,vol11,vol12 = [~vol1,~vol2,~vol3,~vol4,~vol5,~vol6,~vol7,~vol8,~vol9,~vol10,~vol11,~vol12];
860                                 s.makeBundle(0, {
861                                         ~l1a1.set(\dur, ~f1,     \vol, vol1);  ~l1b1.set(\dur, ~f1,  \vol, vol1);
862                                         ~l1c1.set(\dur, ~f1/~icd3,       \vol, vol1);  ~l1d1.set(\dur, ~f1/~icd3,  \vol, vol1);
863                                         ~l1e1.set(\dur, ~f1/~icd6,       \vol, vol1);  ~l1f1.set(\dur, ~f1/~icd6,  \vol, vol1);
864                                         ~l2a1.set(\dur, ~f2,     \vol, vol2);          ~l2b1.set(\dur, ~f2,  \vol, vol2);
865                                         ~l2c1.set(\dur, ~f2/~icd3,       \vol, vol2);  ~l2d1.set(\dur, ~f2/~icd3,  \vol, vol2);
866                                         ~l2e1.set(\dur, ~f2/~icd6,       \vol, vol2);  ~l2f1.set(\dur, ~f2/~icd6,  \vol, vol2);
867                                         ~l3a1.set(\dur, ~f3,     \vol, vol3);          ~l3b1.set(\dur, ~f3,  \vol, vol3);
868                                         ~l3c1.set(\dur, ~f3/~icd3,       \vol, vol3);  ~l3d1.set(\dur, ~f3/~icd3,  \vol, vol3);
869                                         ~l3e1.set(\dur, ~f3/~icd6,       \vol, vol3);  ~l3f1.set(\dur, ~f3/~icd6,  \vol, vol3);
870                                         ~l4a1.set(\dur, ~f4,    \vol, vol4);           ~l4b1.set(\dur, ~f4,  \vol, vol4);
871                                         ~l4c1.set(\dur, ~f4/~icd3,       \vol, vol4);  ~l4d1.set(\dur, ~f4/~icd3,  \vol, vol4);
872                                         ~l4e1.set(\dur, ~f4/~icd6,       \vol, vol4);  ~l4f1.set(\dur, ~f4/~icd6,  \vol, vol4);
873                                         ~l5a1.set(\dur, ~f5,    \vol, vol5);           ~l5b1.set(\dur, ~f5,  \vol, vol5);
874                                         ~l5c1.set(\dur, ~f5/~icd3,       \vol, vol5);  ~l5d1.set(\dur, ~f5/~icd3,  \vol, vol5);
875                                         ~l5e1.set(\dur, ~f5/~icd6,       \vol, vol5);  ~l5f1.set(\dur, ~f5/~icd6,  \vol, vol5);
876                                         ~l6a1.set(\dur, ~f6,    \vol, vol6);           ~l6b1.set(\dur, ~f6,  \vol, vol6);
877                                         ~l6c1.set(\dur, ~f6/~icd3,       \vol, vol6);  ~l6d1.set(\dur, ~f6/~icd3,  \vol, vol6);
878                                         ~l6e1.set(\dur, ~f6/~icd6,       \vol, vol6);  ~l6f1.set(\dur, ~f6/~icd6,  \vol, vol6);
879                                         ~l7a1.set(\dur, ~f7,    \vol, vol7);           ~l7b1.set(\dur, ~f7,  \vol, vol7);
880                                         ~l7c1.set(\dur, ~f7/~icd3,       \vol, vol7);  ~l7d1.set(\dur, ~f7/~icd3,  \vol, vol7);
881                                         ~l7e1.set(\dur, ~f7/~icd6,       \vol, vol7);  ~l7f1.set(\dur, ~f7/~icd6,  \vol, vol7);
882                                         ~l8a1.set(\dur, ~f8,    \vol, vol8);           ~l8b1.set(\dur, ~f8,  \vol, vol8);
883                                         ~l8c1.set(\dur, ~f8/~icd3,       \vol, vol8);  ~l8d1.set(\dur, ~f8/~icd3,  \vol, vol8);
884                                         ~l8e1.set(\dur, ~f8/~icd6,       \vol, vol8);  ~l8f1.set(\dur, ~f8/~icd6,  \vol, vol8);
885                                         ~l9a1.set(\dur, ~f9,    \vol, vol9);          ~l9b1.set(\dur, ~f9,  \vol, vol9);
886                                         ~l9c1.set(\dur, ~f9/~icd3,       \vol, vol9); ~l9d1.set(\dur, ~f9/~icd3,  \vol, vol9);
887                                         ~l9e1.set(\dur, ~f9/~icd6,       \vol, vol9); ~l9f1.set(\dur, ~f9/~icd6,  \vol, vol9);
888                                         ~l10a1.set(\dur, ~f10,  \vol, vol10);         ~l10b1.set(\dur, ~f10,  \vol, vol10);
889                                         ~l10c1.set(\dur, ~f10/~icd3,     \vol, vol10);~l10d1.set(\dur, ~f10/~icd3,  \vol, vol10);
890                                         ~l10e1.set(\dur, ~f10/~icd6,     \vol, vol10);~l10f1.set(\dur, ~f10/~icd6,  \vol, vol10);
891                                         ~l11a1.set(\dur, ~f11,  \vol, vol11);         ~l11b1.set(\dur, ~f11,  \vol, vol11);
892                                         ~l11c1.set(\dur, ~f11/~icd3,     \vol, vol11);~l11d1.set(\dur, ~f11/~icd3,  \vol, vol11);
893                                         ~l11e1.set(\dur, ~f11/~icd6,     \vol, vol11);~l11f1.set(\dur, ~f11/~icd6,  \vol, vol11);
894                                         ~l12a1.set(\dur, ~f12,  \vol, vol12);         ~l12b1.set(\dur, ~f12,  \vol, vol12);
895                                         ~l12c1.set(\dur, ~f12/~icd3,     \vol, vol12);~l12d1.set(\dur, ~f12/~icd3,  \vol, vol12);
896                                         ~l12e1.set(\dur, ~f12/~icd6,     \vol, vol12);~l12f1.set(\dur, ~f12/~icd6,  \vol, vol12);
897                                 });
898                         }););
899                 }
900                 {~l1a.isRunning == true} {
901                         (1.do({var vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8,vol9,vol10,vol11,vol12,s1,s2,s3,s4,s5,s6;
902                                 #vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8,vol9,vol10,vol11,vol12 = [~vol1,~vol2,~vol3,~vol4,~vol5,~vol6,~vol7,~vol8,~vol9,~vol10,~vol11,~vol12];
903                                 s.makeBundle(0, {
904                                         ~l1a.set(\dur, ~f1,     \vol, vol1);  ~l1b.set(\dur, ~f1,  \vol, vol1);
905                                         ~l1c.set(\dur, ~f1/~icd3,       \vol, vol1);  ~l1d.set(\dur, ~f1/~icd3,  \vol, vol1);
906                                         ~l1e.set(\dur, ~f1/~icd6,       \vol, vol1);  ~l1f.set(\dur, ~f1/~icd6,  \vol, vol1);
907                                         ~l2a.set(\dur, ~f2,     \vol, vol2);          ~l2b.set(\dur, ~f2,  \vol, vol2);
908                                         ~l2c.set(\dur, ~f2/~icd3,       \vol, vol2);  ~l2d.set(\dur, ~f2/~icd3,  \vol, vol2);
909                                         ~l2e.set(\dur, ~f2/~icd6,       \vol, vol2);  ~l2f.set(\dur, ~f2/~icd6,  \vol, vol2);
910                                         ~l3a.set(\dur, ~f3,     \vol, vol3);          ~l3b.set(\dur, ~f3,  \vol, vol3);
911                                         ~l3c.set(\dur, ~f3/~icd3,       \vol, vol3);  ~l3d.set(\dur, ~f3/~icd3,  \vol, vol3);
912                                         ~l3e.set(\dur, ~f3/~icd6,       \vol, vol3);  ~l3f.set(\dur, ~f3/~icd6,  \vol, vol3);
913                                         ~l4a.set(\dur, ~f4,    \vol, vol4);           ~l4b.set(\dur, ~f4,  \vol, vol4);
914                                         ~l4c.set(\dur, ~f4/~icd3,       \vol, vol4);  ~l4d.set(\dur, ~f4/~icd3,  \vol, vol4);
915                                         ~l4e.set(\dur, ~f4/~icd6,       \vol, vol4);  ~l4f.set(\dur, ~f4/~icd6,  \vol, vol4);
916                                         ~l5a.set(\dur, ~f5,    \vol, vol5);           ~l5b.set(\dur, ~f5,  \vol, vol5);
917                                         ~l5c.set(\dur, ~f5/~icd3,       \vol, vol5);  ~l5d.set(\dur, ~f5/~icd3,  \vol, vol5);
918                                         ~l5e.set(\dur, ~f5/~icd6,       \vol, vol5);  ~l5f.set(\dur, ~f5/~icd6,  \vol, vol5);
919                                         ~l6a.set(\dur, ~f6,    \vol, vol6);           ~l6b.set(\dur, ~f6,  \vol, vol6);
920                                         ~l6c.set(\dur, ~f6/~icd3,       \vol, vol6);  ~l6d.set(\dur, ~f6/~icd3,  \vol, vol6);
921                                         ~l6e.set(\dur, ~f6/~icd6,       \vol, vol6);  ~l6f.set(\dur, ~f6/~icd6,  \vol, vol6);
922                                         ~l7a.set(\dur, ~f7,    \vol, vol7);           ~l7b.set(\dur, ~f7,  \vol, vol7);
923                                         ~l7c.set(\dur, ~f7/~icd3,       \vol, vol7);  ~l7d.set(\dur, ~f7/~icd3,  \vol, vol7);
924                                         ~l7e.set(\dur, ~f7/~icd6,       \vol, vol7);  ~l7f.set(\dur, ~f7/~icd6,  \vol, vol7);
925                                         ~l8a.set(\dur, ~f8,    \vol, vol8);           ~l8b.set(\dur, ~f8,  \vol, vol8);
926                                         ~l8c.set(\dur, ~f8/~icd3,       \vol, vol8);  ~l8d.set(\dur, ~f8/~icd3,  \vol, vol8);
927                                         ~l8e.set(\dur, ~f8/~icd6,       \vol, vol8);  ~l8f.set(\dur, ~f8/~icd6,  \vol, vol8);
928                                         ~l9a.set(\dur, ~f9,    \vol, vol9);          ~l9b.set(\dur, ~f9,  \vol, vol9);
929                                         ~l9c.set(\dur, ~f9/~icd3,       \vol, vol9); ~l9d.set(\dur, ~f9/~icd3,  \vol, vol9);
930                                         ~l9e.set(\dur, ~f9/~icd6,       \vol, vol9); ~l9f.set(\dur, ~f9/~icd6,  \vol, vol9);
931                                         ~l10a.set(\dur, ~f10,  \vol, vol10);         ~l10b.set(\dur, ~f10,  \vol, vol10);
932                                         ~l10c.set(\dur, ~f10/~icd3,     \vol, vol10);~l10d.set(\dur, ~f10/~icd3,  \vol, vol10);
933                                         ~l10e.set(\dur, ~f10/~icd6,     \vol, vol10);~l10f.set(\dur, ~f10/~icd6,  \vol, vol10);
934                                         ~l11a.set(\dur, ~f11,  \vol, vol11);         ~l11b.set(\dur, ~f11,  \vol, vol11);
935                                         ~l11c.set(\dur, ~f11/~icd3,     \vol, vol11);~l11d.set(\dur, ~f11/~icd3,  \vol, vol11);
936                                         ~l11e.set(\dur, ~f11/~icd6,     \vol, vol11);~l11f.set(\dur, ~f11/~icd6,  \vol, vol11);
937                                         ~l12a.set(\dur, ~f12,  \vol, vol12);         ~l12b.set(\dur, ~f12,  \vol, vol12);
938                                         ~l12c.set(\dur, ~f12/~icd3,     \vol, vol12);~l12d.set(\dur, ~f12/~icd3,  \vol, vol12);
939                                         ~l12e.set(\dur, ~f12/~icd6,     \vol, vol12);~l12f.set(\dur, ~f12/~icd6,  \vol, vol12);
940                                 });
941                         }););
942                 };
943
944                 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;);});
945                 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;);});
946                 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;);});
947                 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;);});
948                 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;);});
949                 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;);});
950                 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;);});
951                 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;);});
952                 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;);});
953                 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;);});
954                 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;);});
955                 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;);});
956
957         };
958
959         ~synthslide = {
960                 case
961                 {~l1a1.isRunning == true}{(//fprog
962                         ~slideroutine = Routine({1.do({var vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8,vol9,vol10,vol11,vol12,s1,s2,s3,s4,s5,s6;
963                                 #vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8,vol9,vol10,vol11,vol12 = [~vol1,~vol2,~vol3,~vol4,~vol5,~vol6,~vol7,~vol8,~vol9,~vol10,~vol11,~vol12];
964                                 ~slidedo.do({~slidecount=~slidecount-1;
965                                         (
966                                                 [ ~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 ];
967                                                 s.makeBundle(0, {
968                                                         ~l1a1.set(\dur, ~f1,     \vol, vol1);  ~l1b1.set(\dur, ~f1,  \vol, vol1);
969                                                         ~l1c1.set(\dur, ~f1/~icd3,       \vol, vol1);  ~l1d1.set(\dur, ~f1/~icd3,  \vol, vol1);
970                                                         ~l1e1.set(\dur, ~f1/~icd6,       \vol, vol1);  ~l1f1.set(\dur, ~f1/~icd6,  \vol, vol1);
971                                                         ~l2a1.set(\dur, ~f2,     \vol, vol2);          ~l2b1.set(\dur, ~f2,  \vol, vol2);
972                                                         ~l2c1.set(\dur, ~f2/~icd3,       \vol, vol2);  ~l2d1.set(\dur, ~f2/~icd3,  \vol, vol2);
973                                                         ~l2e1.set(\dur, ~f2/~icd6,       \vol, vol2);  ~l2f1.set(\dur, ~f2/~icd6,  \vol, vol2);
974                                                         ~l3a1.set(\dur, ~f3,     \vol, vol3);          ~l3b1.set(\dur, ~f3,  \vol, vol3);
975                                                         ~l3c1.set(\dur, ~f3/~icd3,       \vol, vol3);  ~l3d1.set(\dur, ~f3/~icd3,  \vol, vol3);
976                                                         ~l3e1.set(\dur, ~f3/~icd6,       \vol, vol3);  ~l3f1.set(\dur, ~f3/~icd6,  \vol, vol3);
977                                                         ~l4a1.set(\dur, ~f4,    \vol, vol4);           ~l4b1.set(\dur, ~f4,  \vol, vol4);
978                                                         ~l4c1.set(\dur, ~f4/~icd3,       \vol, vol4);  ~l4d1.set(\dur, ~f4/~icd3,  \vol, vol4);
979                                                         ~l4e1.set(\dur, ~f4/~icd6,       \vol, vol4);  ~l4f1.set(\dur, ~f4/~icd6,  \vol, vol4);
980                                                         ~l5a1.set(\dur, ~f5,    \vol, vol5);           ~l5b1.set(\dur, ~f5,  \vol, vol5);
981                                                         ~l5c1.set(\dur, ~f5/~icd3,       \vol, vol5);  ~l5d1.set(\dur, ~f5/~icd3,  \vol, vol5);
982                                                         ~l5e1.set(\dur, ~f5/~icd6,       \vol, vol5);  ~l5f1.set(\dur, ~f5/~icd6,  \vol, vol5);
983                                                         ~l6a1.set(\dur, ~f6,    \vol, vol6);           ~l6b1.set(\dur, ~f6,  \vol, vol6);
984                                                         ~l6c1.set(\dur, ~f6/~icd3,       \vol, vol6);  ~l6d1.set(\dur, ~f6/~icd3,  \vol, vol6);
985                                                         ~l6e1.set(\dur, ~f6/~icd6,       \vol, vol6);  ~l6f1.set(\dur, ~f6/~icd6,  \vol, vol6);
986                                                         ~l7a1.set(\dur, ~f7,    \vol, vol7);           ~l7b1.set(\dur, ~f7,  \vol, vol7);
987                                                         ~l7c1.set(\dur, ~f7/~icd3,       \vol, vol7);  ~l7d1.set(\dur, ~f7/~icd3,  \vol, vol7);
988                                                         ~l7e1.set(\dur, ~f7/~icd6,       \vol, vol7);  ~l7f1.set(\dur, ~f7/~icd6,  \vol, vol7);
989                                                         ~l8a1.set(\dur, ~f8,    \vol, vol8);           ~l8b1.set(\dur, ~f8,  \vol, vol8);
990                                                         ~l8c1.set(\dur, ~f8/~icd3,       \vol, vol8);  ~l8d1.set(\dur, ~f8/~icd3,  \vol, vol8);
991                                                         ~l8e1.set(\dur, ~f8/~icd6,       \vol, vol8);  ~l8f1.set(\dur, ~f8/~icd6,  \vol, vol8);
992                                                         ~l9a1.set(\dur, ~f9,    \vol, vol9);          ~l9b1.set(\dur, ~f9,  \vol, vol9);
993                                                         ~l9c1.set(\dur, ~f9/~icd3,       \vol, vol9); ~l9d1.set(\dur, ~f9/~icd3,  \vol, vol9);
994                                                         ~l9e1.set(\dur, ~f9/~icd6,       \vol, vol9); ~l9f1.set(\dur, ~f9/~icd6,  \vol, vol9);
995                                                         ~l10a1.set(\dur, ~f10,  \vol, vol10);         ~l10b1.set(\dur, ~f10,  \vol, vol10);
996                                                         ~l10c1.set(\dur, ~f10/~icd3,     \vol, vol10);~l10d1.set(\dur, ~f10/~icd3,  \vol, vol10);
997                                                         ~l10e1.set(\dur, ~f10/~icd6,     \vol, vol10);~l10f1.set(\dur, ~f10/~icd6,  \vol, vol10);
998                                                         ~l11a1.set(\dur, ~f11,  \vol, vol11);         ~l11b1.set(\dur, ~f11,  \vol, vol11);
999                                                         ~l11c1.set(\dur, ~f11/~icd3,     \vol, vol11);~l11d1.set(\dur, ~f11/~icd3,  \vol, vol11);
1000                                                         ~l11e1.set(\dur, ~f11/~icd6,     \vol, vol11);~l11f1.set(\dur, ~f11/~icd6,  \vol, vol11);
1001                                                         ~l12a1.set(\dur, ~f12,  \vol, vol12);         ~l12b1.set(\dur, ~f12,  \vol, vol12);
1002                                                         ~l12c1.set(\dur, ~f12/~icd3,     \vol, vol12);~l12d1.set(\dur, ~f12/~icd3,  \vol, vol12);
1003                                                         ~l12e1.set(\dur, ~f12/~icd6,     \vol, vol12);~l12f1.set(\dur, ~f12/~icd6,  \vol, vol12);
1004                                                 });
1005                                         );
1006
1007                                         {if(~slidecount==0,{
1008                                                 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;);});
1009                                                 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;);});
1010                                                 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;);});
1011                                                 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;);});
1012                                                 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;);});
1013                                                 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;);});
1014                                                 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;);});
1015                                                 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;);});
1016                                                 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;);});
1017                                                 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;);});
1018                                                 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;);});
1019                                                 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;);});
1020                                         });}.defer;
1021
1022                                         (~slidetime/~slidedo).wait;});});}).play;);}
1023                 {~l1a.isRunning == true} {(//fprog
1024                         ~slideroutine = Routine({1.do({var vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8,vol9,vol10,vol11,vol12,s1,s2,s3,s4,s5,s6;
1025                                 #vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8,vol9,vol10,vol11,vol12 = [~vol1,~vol2,~vol3,~vol4,~vol5,~vol6,~vol7,~vol8,~vol9,~vol10,~vol11,~vol12];
1026                                 ~slidedo.do({~slidecount=~slidecount-1;
1027                                         (
1028                                                 [ ~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 ];
1029                                                 s.makeBundle(0, {
1030                                                         ~l1a.set(\dur, ~f1,     \vol, vol1);  ~l1b.set(\dur, ~f1,  \vol, vol1);
1031                                                         ~l1c.set(\dur, ~f1/~icd3,       \vol, vol1);  ~l1d.set(\dur, ~f1/~icd3,  \vol, vol1);
1032                                                         ~l1e.set(\dur, ~f1/~icd6,       \vol, vol1);  ~l1f.set(\dur, ~f1/~icd6,  \vol, vol1);
1033                                                         ~l2a.set(\dur, ~f2,     \vol, vol2);          ~l2b.set(\dur, ~f2,  \vol, vol2);
1034                                                         ~l2c.set(\dur, ~f2/~icd3,       \vol, vol2);  ~l2d.set(\dur, ~f2/~icd3,  \vol, vol2);
1035                                                         ~l2e.set(\dur, ~f2/~icd6,       \vol, vol2);  ~l2f.set(\dur, ~f2/~icd6,  \vol, vol2);
1036                                                         ~l3a.set(\dur, ~f3,     \vol, vol3);          ~l3b.set(\dur, ~f3,  \vol, vol3);
1037                                                         ~l3c.set(\dur, ~f3/~icd3,       \vol, vol3);  ~l3d.set(\dur, ~f3/~icd3,  \vol, vol3);
1038                                                         ~l3e.set(\dur, ~f3/~icd6,       \vol, vol3);  ~l3f.set(\dur, ~f3/~icd6,  \vol, vol3);
1039                                                         ~l4a.set(\dur, ~f4,    \vol, vol4);           ~l4b.set(\dur, ~f4,  \vol, vol4);
1040                                                         ~l4c.set(\dur, ~f4/~icd3,       \vol, vol4);  ~l4d.set(\dur, ~f4/~icd3,  \vol, vol4);
1041                                                         ~l4e.set(\dur, ~f4/~icd6,       \vol, vol4);  ~l4f.set(\dur, ~f4/~icd6,  \vol, vol4);
1042                                                         ~l5a.set(\dur, ~f5,    \vol, vol5);           ~l5b.set(\dur, ~f5,  \vol, vol5);
1043                                                         ~l5c.set(\dur, ~f5/~icd3,       \vol, vol5);  ~l5d.set(\dur, ~f5/~icd3,  \vol, vol5);
1044                                                         ~l5e.set(\dur, ~f5/~icd6,       \vol, vol5);  ~l5f.set(\dur, ~f5/~icd6,  \vol, vol5);
1045                                                         ~l6a.set(\dur, ~f6,    \vol, vol6);           ~l6b.set(\dur, ~f6,  \vol, vol6);
1046                                                         ~l6c.set(\dur, ~f6/~icd3,       \vol, vol6);  ~l6d.set(\dur, ~f6/~icd3,  \vol, vol6);
1047                                                         ~l6e.set(\dur, ~f6/~icd6,       \vol, vol6);  ~l6f.set(\dur, ~f6/~icd6,  \vol, vol6);
1048                                                         ~l7a.set(\dur, ~f7,    \vol, vol7);           ~l7b.set(\dur, ~f7,  \vol, vol7);
1049                                                         ~l7c.set(\dur, ~f7/~icd3,       \vol, vol7);  ~l7d.set(\dur, ~f7/~icd3,  \vol, vol7);
1050                                                         ~l7e.set(\dur, ~f7/~icd6,       \vol, vol7);  ~l7f.set(\dur, ~f7/~icd6,  \vol, vol7);
1051                                                         ~l8a.set(\dur, ~f8,    \vol, vol8);           ~l8b.set(\dur, ~f8,  \vol, vol8);
1052                                                         ~l8c.set(\dur, ~f8/~icd3,       \vol, vol8);  ~l8d.set(\dur, ~f8/~icd3,  \vol, vol8);
1053                                                         ~l8e.set(\dur, ~f8/~icd6,       \vol, vol8);  ~l8f.set(\dur, ~f8/~icd6,  \vol, vol8);
1054                                                         ~l9a.set(\dur, ~f9,    \vol, vol9);          ~l9b.set(\dur, ~f9,  \vol, vol9);
1055                                                         ~l9c.set(\dur, ~f9/~icd3,       \vol, vol9); ~l9d.set(\dur, ~f9/~icd3,  \vol, vol9);
1056                                                         ~l9e.set(\dur, ~f9/~icd6,       \vol, vol9); ~l9f.set(\dur, ~f9/~icd6,  \vol, vol9);
1057                                                         ~l10a.set(\dur, ~f10,  \vol, vol10);         ~l10b.set(\dur, ~f10,  \vol, vol10);
1058                                                         ~l10c.set(\dur, ~f10/~icd3,     \vol, vol10);~l10d.set(\dur, ~f10/~icd3,  \vol, vol10);
1059                                                         ~l10e.set(\dur, ~f10/~icd6,     \vol, vol10);~l10f.set(\dur, ~f10/~icd6,  \vol, vol10);
1060                                                         ~l11a.set(\dur, ~f11,  \vol, vol11);         ~l11b.set(\dur, ~f11,  \vol, vol11);
1061                                                         ~l11c.set(\dur, ~f11/~icd3,     \vol, vol11);~l11d.set(\dur, ~f11/~icd3,  \vol, vol11);
1062                                                         ~l11e.set(\dur, ~f11/~icd6,     \vol, vol11);~l11f.set(\dur, ~f11/~icd6,  \vol, vol11);
1063                                                         ~l12a.set(\dur, ~f12,  \vol, vol12);         ~l12b.set(\dur, ~f12,  \vol, vol12);
1064                                                         ~l12c.set(\dur, ~f12/~icd3,     \vol, vol12);~l12d.set(\dur, ~f12/~icd3,  \vol, vol12);
1065                                                         ~l12e.set(\dur, ~f12/~icd6,     \vol, vol12);~l12f.set(\dur, ~f12/~icd6,  \vol, vol12);
1066                                                 });
1067
1068                                         );
1069
1070                                         {if(~slidecount==0,{
1071                                                 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;);});
1072                                                 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;);});
1073                                                 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;);});
1074                                                 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;);});
1075                                                 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;);});
1076                                                 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;);});
1077                                                 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;);});
1078                                                 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;);});
1079                                                 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;);});
1080                                                 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;);});
1081                                                 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;);});
1082                                                 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;);});
1083                                         });}.defer;
1084
1085                                         (~slidetime/~slidedo).wait;});});}).play;);};
1086         };
1087
1088         ~synthpause = {(
1089                 case
1090                 {~l1a1.isRunning == true}{
1091                         (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;
1092                                 #vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8,vol9,vol10,vol11,vol12 = [~vol1,~vol2,~vol3,~vol4,~vol5,~vol6,~vol7,~vol8,~vol9,~vol10,~vol11,~vol12];
1093                                 #f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12 = [ 0,0,0,0,0,0,0,0,0,0,0,0 ];
1094                                 s.makeBundle(0, {
1095                                         ~l1a1.set(\dur, f1,     \vol, vol1);          ~l1b1.set(\dur, f1,  \vol, vol1);
1096                                         ~l1c1.set(\dur, f1/~icd3,       \vol, vol1);  ~l1d1.set(\dur, f1/~icd3,  \vol, vol1);
1097                                         ~l1e1.set(\dur, f1/~icd6,       \vol, vol1);  ~l1f1.set(\dur, f1/~icd6,  \vol, vol1);
1098                                         ~l2a1.set(\dur, f2,     \vol, vol2);          ~l2b1.set(\dur, f2,  \vol, vol2);
1099                                         ~l2c1.set(\dur, f2/~icd3,       \vol, vol2);  ~l2d1.set(\dur, f2/~icd3,  \vol, vol2);
1100                                         ~l2e1.set(\dur, f2/~icd6,       \vol, vol2);  ~l2f1.set(\dur, f2/~icd6,  \vol, vol2);
1101                                         ~l3a1.set(\dur, f3,     \vol, vol3);          ~l3b1.set(\dur, f3,  \vol, vol3);
1102                                         ~l3c1.set(\dur, f3/~icd3,       \vol, vol3);  ~l3d1.set(\dur, f3/~icd3,  \vol, vol3);
1103                                         ~l3e1.set(\dur, f3/~icd6,       \vol, vol3);  ~l3f1.set(\dur, f3/~icd6,  \vol, vol3);
1104                                         ~l4a1.set(\dur, f4,    \vol, vol4);           ~l4b1.set(\dur, f4,  \vol, vol4);
1105                                         ~l4c1.set(\dur, f4/~icd3,       \vol, vol4);  ~l4d1.set(\dur, f4/~icd3,  \vol, vol4);
1106                                         ~l4e1.set(\dur, f4/~icd6,       \vol, vol4);  ~l4f1.set(\dur, f4/~icd6,  \vol, vol4);
1107                                         ~l5a1.set(\dur, f5,    \vol, vol5);           ~l5b1.set(\dur, f5,  \vol, vol5);
1108                                         ~l5c1.set(\dur, f5/~icd3,       \vol, vol5);  ~l5d1.set(\dur, f5/~icd3,  \vol, vol5);
1109                                         ~l5e1.set(\dur, f5/~icd6,       \vol, vol5);  ~l5f1.set(\dur, f5/~icd6,  \vol, vol5);
1110                                         ~l6a1.set(\dur, f6,    \vol, vol6);           ~l6b1.set(\dur, f6,  \vol, vol6);
1111                                         ~l6c1.set(\dur, f6/~icd3,       \vol, vol6);  ~l6d1.set(\dur, f6/~icd3,  \vol, vol6);
1112                                         ~l6e1.set(\dur, f6/~icd6,       \vol, vol6);  ~l6f1.set(\dur, f6/~icd6,  \vol, vol6);
1113                                         ~l7a1.set(\dur, f7,    \vol, vol7);           ~l7b1.set(\dur, f7,  \vol, vol7);
1114                                         ~l7c1.set(\dur, f7/~icd3,       \vol, vol7);  ~l7d1.set(\dur, f7/~icd3,  \vol, vol7);
1115                                         ~l7e1.set(\dur, f7/~icd6,       \vol, vol7);  ~l7f1.set(\dur, f7/~icd6,  \vol, vol7);
1116                                         ~l8a1.set(\dur, f8,    \vol, vol8);           ~l8b1.set(\dur, f8,  \vol, vol8);
1117                                         ~l8c1.set(\dur, f8/~icd3,       \vol, vol8);  ~l8d1.set(\dur, f8/~icd3,  \vol, vol8);
1118                                         ~l8e1.set(\dur, f8/~icd6,       \vol, vol8);  ~l8f1.set(\dur, f8/~icd6,  \vol, vol8);
1119                                         ~l9a1.set(\dur, f9,    \vol, vol9);          ~l9b1.set(\dur, f9,  \vol, vol9);
1120                                         ~l9c1.set(\dur, f9/~icd3,       \vol, vol9); ~l9d1.set(\dur, f9/~icd3,  \vol, vol9);
1121                                         ~l9e1.set(\dur, f9/~icd6,       \vol, vol9); ~l9f1.set(\dur, f9/~icd6,  \vol, vol9);
1122                                         ~l10a1.set(\dur, f10,  \vol, vol10);         ~l10b1.set(\dur, f10,  \vol, vol10);
1123                                         ~l10c1.set(\dur, f10/~icd3,     \vol, vol10);~l10d1.set(\dur, f10/~icd3,  \vol, vol10);
1124                                         ~l10e1.set(\dur, f10/~icd6,     \vol, vol10);~l10f1.set(\dur, f10/~icd6,  \vol, vol10);
1125                                         ~l11a1.set(\dur, f11,  \vol, vol11);         ~l11b1.set(\dur, f11,  \vol, vol11);
1126                                         ~l11c1.set(\dur, f11/~icd3,     \vol, vol11);~l11d1.set(\dur, f11/~icd3,  \vol, vol11);
1127                                         ~l11e1.set(\dur, f11/~icd6,     \vol, vol11);~l11f1.set(\dur, f11/~icd6,  \vol, vol11);
1128                                         ~l12a1.set(\dur, f12,  \vol, vol12);         ~l12b1.set(\dur, f12,  \vol, vol12);
1129                                         ~l12c1.set(\dur, f12/~icd3,     \vol, vol12);~l12d1.set(\dur, f12/~icd3,  \vol, vol12);
1130                                         ~l12e1.set(\dur, f12/~icd6,     \vol, vol12);~l12f1.set(\dur, f12/~icd6,  \vol, vol12);
1131                                 });
1132                         }););
1133                 }
1134                 {~l1a.isRunning == true} {
1135                         (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;
1136                                 #vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8,vol9,vol10,vol11,vol12 = [~vol1,~vol2,~vol3,~vol4,~vol5,~vol6,~vol7,~vol8,~vol9,~vol10,~vol11,~vol12];
1137                                 #f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12 = [ 0,0,0,0,0,0,0,0,0,0,0,0 ];
1138                                 s.makeBundle(0, {
1139                                         ~l1a.set(\dur, f1,     \vol, vol1);  ~l1b.set(\dur, f1,  \vol, vol1);
1140                                         ~l1c.set(\dur, f1/~icd3,       \vol, vol1);  ~l1d.set(\dur, f1/~icd3,  \vol, vol1);
1141                                         ~l1e.set(\dur, f1/~icd6,       \vol, vol1);  ~l1f.set(\dur, f1/~icd6,  \vol, vol1);
1142                                         ~l2a.set(\dur, f2,     \vol, vol2);          ~l2b.set(\dur, f2,  \vol, vol2);
1143                                         ~l2c.set(\dur, f2/~icd3,       \vol, vol2);  ~l2d.set(\dur, f2/~icd3,  \vol, vol2);
1144                                         ~l2e.set(\dur, f2/~icd6,       \vol, vol2);  ~l2f.set(\dur, f2/~icd6,  \vol, vol2);
1145                                         ~l3a.set(\dur, f3,     \vol, vol3);          ~l3b.set(\dur, f3,  \vol, vol3);
1146                                         ~l3c.set(\dur, f3/~icd3,       \vol, vol3);  ~l3d.set(\dur, f3/~icd3,  \vol, vol3);
1147                                         ~l3e.set(\dur, f3/~icd6,       \vol, vol3);  ~l3f.set(\dur, f3/~icd6,  \vol, vol3);
1148                                         ~l4a.set(\dur, f4,    \vol, vol4);           ~l4b.set(\dur, f4,  \vol, vol4);
1149                                         ~l4c.set(\dur, f4/~icd3,       \vol, vol4);  ~l4d.set(\dur, f4/~icd3,  \vol, vol4);
1150                                         ~l4e.set(\dur, f4/~icd6,       \vol, vol4);  ~l4f.set(\dur, f4/~icd6,  \vol, vol4);
1151                                         ~l5a.set(\dur, f5,    \vol, vol5);           ~l5b.set(\dur, f5,  \vol, vol5);
1152                                         ~l5c.set(\dur, f5/~icd3,       \vol, vol5);  ~l5d.set(\dur, f5/~icd3,  \vol, vol5);
1153                                         ~l5e.set(\dur, f5/~icd6,       \vol, vol5);  ~l5f.set(\dur, f5/~icd6,  \vol, vol5);
1154                                         ~l6a.set(\dur, f6,    \vol, vol6);           ~l6b.set(\dur, f6,  \vol, vol6);
1155                                         ~l6c.set(\dur, f6/~icd3,       \vol, vol6);  ~l6d.set(\dur, f6/~icd3,  \vol, vol6);
1156                                         ~l6e.set(\dur, f6/~icd6,       \vol, vol6);  ~l6f.set(\dur, f6/~icd6,  \vol, vol6);
1157                                         ~l7a.set(\dur, f7,    \vol, vol7);           ~l7b.set(\dur, f7,  \vol, vol7);
1158                                         ~l7c.set(\dur, f7/~icd3,       \vol, vol7);  ~l7d.set(\dur, f7/~icd3,  \vol, vol7);
1159                                         ~l7e.set(\dur, f7/~icd6,       \vol, vol7);  ~l7f.set(\dur, f7/~icd6,  \vol, vol7);
1160                                         ~l8a.set(\dur, f8,    \vol, vol8);           ~l8b.set(\dur, f8,  \vol, vol8);
1161                                         ~l8c.set(\dur, f8/~icd3,       \vol, vol8);  ~l8d.set(\dur, f8/~icd3,  \vol, vol8);
1162                                         ~l8e.set(\dur, f8/~icd6,       \vol, vol8);  ~l8f.set(\dur, f8/~icd6,  \vol, vol8);
1163                                         ~l9a.set(\dur, f9,    \vol, vol9);          ~l9b.set(\dur, f9,  \vol, vol9);
1164                                         ~l9c.set(\dur, f9/~icd3,       \vol, vol9); ~l9d.set(\dur, f9/~icd3,  \vol, vol9);
1165                                         ~l9e.set(\dur, f9/~icd6,       \vol, vol9); ~l9f.set(\dur, f9/~icd6,  \vol, vol9);
1166                                         ~l10a.set(\dur, f10,  \vol, vol10);         ~l10b.set(\dur, f10,  \vol, vol10);
1167                                         ~l10c.set(\dur, f10/~icd3,     \vol, vol10);~l10d.set(\dur, f10/~icd3,  \vol, vol10);
1168                                         ~l10e.set(\dur, f10/~icd6,     \vol, vol10);~l10f.set(\dur, f10/~icd6,  \vol, vol10);
1169                                         ~l11a.set(\dur, f11,  \vol, vol11);         ~l11b.set(\dur, f11,  \vol, vol11);
1170                                         ~l11c.set(\dur, f11/~icd3,     \vol, vol11);~l11d.set(\dur, f11/~icd3,  \vol, vol11);
1171                                         ~l11e.set(\dur, f11/~icd6,     \vol, vol11);~l11f.set(\dur, f11/~icd6,  \vol, vol11);
1172                                         ~l12a.set(\dur, f12,  \vol, vol12);         ~l12b.set(\dur, f12,  \vol, vol12);
1173                                         ~l12c.set(\dur, f12/~icd3,     \vol, vol12);~l12d.set(\dur, f12/~icd3,  \vol, vol12);
1174                                         ~l12e.set(\dur, f12/~icd6,     \vol, vol12);~l12f.set(\dur, f12/~icd6,  \vol, vol12);
1175                                 });
1176                         }););
1177                 };
1178         );
1179         };
1180
1181         ~synthfree = {
1182                 (
1183                         case
1184                         {~l1a1.isRunning == true}{
1185                                 (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;
1186                                         #vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8,vol9,vol10,vol11,vol12 = [~vol1,~vol2,~vol3,~vol4,~vol5,~vol6,~vol7,~vol8,~vol9,~vol10,~vol11,~vol12];
1187                                         #f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12 = [ 0,0,0,0,0,0,0,0,0,0,0,0 ];
1188                                         s.makeBundle(0, {
1189                                                 ~l1a1.set(\dur, f1,     \vol, vol1);  ~l1b1.set(\dur, f1,  \vol, vol1);
1190                                                 ~l1c1.set(\dur, f1/~icd3,       \vol, vol1);  ~l1d1.set(\dur, f1/~icd3,  \vol, vol1);
1191                                                 ~l1e1.set(\dur, f1/~icd6,       \vol, vol1);  ~l1f1.set(\dur, f1/~icd6,  \vol, vol1);
1192                                                 ~l2a1.set(\dur, f2,     \vol, vol2);          ~l2b1.set(\dur, f2,  \vol, vol2);
1193                                                 ~l2c1.set(\dur, f2/~icd3,       \vol, vol2);  ~l2d1.set(\dur, f2/~icd3,  \vol, vol2);
1194                                                 ~l2e1.set(\dur, f2/~icd6,       \vol, vol2);  ~l2f1.set(\dur, f2/~icd6,  \vol, vol2);
1195                                                 ~l3a1.set(\dur, f3,     \vol, vol3);          ~l3b1.set(\dur, f3,  \vol, vol3);
1196                                                 ~l3c1.set(\dur, f3/~icd3,       \vol, vol3);  ~l3d1.set(\dur, f3/~icd3,  \vol, vol3);
1197                                                 ~l3e1.set(\dur, f3/~icd6,       \vol, vol3);  ~l3f1.set(\dur, f3/~icd6,  \vol, vol3);
1198                                                 ~l4a1.set(\dur, f4,    \vol, vol4);           ~l4b1.set(\dur, f4,  \vol, vol4);
1199                                                 ~l4c1.set(\dur, f4/~icd3,       \vol, vol4);  ~l4d1.set(\dur, f4/~icd3,  \vol, vol4);
1200                                                 ~l4e1.set(\dur, f4/~icd6,       \vol, vol4);  ~l4f1.set(\dur, f4/~icd6,  \vol, vol4);
1201                                                 ~l5a1.set(\dur, f5,    \vol, vol5);           ~l5b1.set(\dur, f5,  \vol, vol5);
1202                                                 ~l5c1.set(\dur, f5/~icd3,       \vol, vol5);  ~l5d1.set(\dur, f5/~icd3,  \vol, vol5);
1203                                                 ~l5e1.set(\dur, f5/~icd6,       \vol, vol5);  ~l5f1.set(\dur, f5/~icd6,  \vol, vol5);
1204                                                 ~l6a1.set(\dur, f6,    \vol, vol6);           ~l6b1.set(\dur, f6,  \vol, vol6);
1205                                                 ~l6c1.set(\dur, f6/~icd3,       \vol, vol6);  ~l6d1.set(\dur, f6/~icd3,  \vol, vol6);
1206                                                 ~l6e1.set(\dur, f6/~icd6,       \vol, vol6);  ~l6f1.set(\dur, f6/~icd6,  \vol, vol6);
1207                                                 ~l7a1.set(\dur, f7,    \vol, vol7);           ~l7b1.set(\dur, f7,  \vol, vol7);
1208                                                 ~l7c1.set(\dur, f7/~icd3,       \vol, vol7);  ~l7d1.set(\dur, f7/~icd3,  \vol, vol7);
1209                                                 ~l7e1.set(\dur, f7/~icd6,       \vol, vol7);  ~l7f1.set(\dur, f7/~icd6,  \vol, vol7);
1210                                                 ~l8a1.set(\dur, f8,    \vol, vol8);           ~l8b1.set(\dur, f8,  \vol, vol8);
1211                                                 ~l8c1.set(\dur, f8/~icd3,       \vol, vol8);  ~l8d1.set(\dur, f8/~icd3,  \vol, vol8);
1212                                                 ~l8e1.set(\dur, f8/~icd6,       \vol, vol8);  ~l8f1.set(\dur, f8/~icd6,  \vol, vol8);
1213                                                 ~l9a1.set(\dur, f9,    \vol, vol9);          ~l9b1.set(\dur, f9,  \vol, vol9);
1214                                                 ~l9c1.set(\dur, f9/~icd3,       \vol, vol9); ~l9d1.set(\dur, f9/~icd3,  \vol, vol9);
1215                                                 ~l9e1.set(\dur, f9/~icd6,       \vol, vol9); ~l9f1.set(\dur, f9/~icd6,  \vol, vol9);
1216                                                 ~l10a1.set(\dur, f10,  \vol, vol10);         ~l10b1.set(\dur, f10,  \vol, vol10);
1217                                                 ~l10c1.set(\dur, f10/~icd3,     \vol, vol10);~l10d1.set(\dur, f10/~icd3,  \vol, vol10);
1218                                                 ~l10e1.set(\dur, f10/~icd6,     \vol, vol10);~l10f1.set(\dur, f10/~icd6,  \vol, vol10);
1219                                                 ~l11a1.set(\dur, f11,  \vol, vol11);         ~l11b1.set(\dur, f11,  \vol, vol11);
1220                                                 ~l11c1.set(\dur, f11/~icd3,     \vol, vol11);~l11d1.set(\dur, f11/~icd3,  \vol, vol11);
1221                                                 ~l11e1.set(\dur, f11/~icd6,     \vol, vol11);~l11f1.set(\dur, f11/~icd6,  \vol, vol11);
1222                                                 ~l12a1.set(\dur, f12,  \vol, vol12);         ~l12b1.set(\dur, f12,  \vol, vol12);
1223                                                 ~l12c1.set(\dur, f12/~icd3,     \vol, vol12);~l12d1.set(\dur, f12/~icd3,  \vol, vol12);
1224                                                 ~l12e1.set(\dur, f12/~icd6,     \vol, vol12);~l12f1.set(\dur, f12/~icd6,  \vol, vol12);
1225                                         });
1226                                 }););
1227                                 AppClock.sched(0.161803398875,{
1228                                         ([~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;
1229                                 });
1230                         }
1231                         {~l1a.isRunning == true}{
1232                                 (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;
1233                                         #vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8,vol9,vol10,vol11,vol12 = [~vol1,~vol2,~vol3,~vol4,~vol5,~vol6,~vol7,~vol8,~vol9,~vol10,~vol11,~vol12];
1234                                         #f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12 = [ 0,0,0,0,0,0,0,0,0,0,0,0 ];
1235                                         s.makeBundle(0, {
1236                                                 ~l1a.set(\dur, f1,     \vol, vol1);  ~l1b.set(\dur, f1,  \vol, vol1);
1237                                                 ~l1c.set(\dur, f1/~icd3,       \vol, vol1);  ~l1d.set(\dur, f1/~icd3,  \vol, vol1);
1238                                                 ~l1e.set(\dur, f1/~icd6,       \vol, vol1);  ~l1f.set(\dur, f1/~icd6,  \vol, vol1);
1239                                                 ~l2a.set(\dur, f2,     \vol, vol2);          ~l2b.set(\dur, f2,  \vol, vol2);
1240                                                 ~l2c.set(\dur, f2/~icd3,       \vol, vol2);  ~l2d.set(\dur, f2/~icd3,  \vol, vol2);
1241                                                 ~l2e.set(\dur, f2/~icd6,       \vol, vol2);  ~l2f.set(\dur, f2/~icd6,  \vol, vol2);
1242                                                 ~l3a.set(\dur, f3,     \vol, vol3);          ~l3b.set(\dur, f3,  \vol, vol3);
1243                                                 ~l3c.set(\dur, f3/~icd3,       \vol, vol3);  ~l3d.set(\dur, f3/~icd3,  \vol, vol3);
1244                                                 ~l3e.set(\dur, f3/~icd6,       \vol, vol3);  ~l3f.set(\dur, f3/~icd6,  \vol, vol3);
1245                                                 ~l4a.set(\dur, f4,    \vol, vol4);           ~l4b.set(\dur, f4,  \vol, vol4);
1246                                                 ~l4c.set(\dur, f4/~icd3,       \vol, vol4);  ~l4d.set(\dur, f4/~icd3,  \vol, vol4);
1247                                                 ~l4e.set(\dur, f4/~icd6,       \vol, vol4);  ~l4f.set(\dur, f4/~icd6,  \vol, vol4);
1248                                                 ~l5a.set(\dur, f5,    \vol, vol5);           ~l5b.set(\dur, f5,  \vol, vol5);
1249                                                 ~l5c.set(\dur, f5/~icd3,       \vol, vol5);  ~l5d.set(\dur, f5/~icd3,  \vol, vol5);
1250                                                 ~l5e.set(\dur, f5/~icd6,       \vol, vol5);  ~l5f.set(\dur, f5/~icd6,  \vol, vol5);
1251                                                 ~l6a.set(\dur, f6,    \vol, vol6);           ~l6b.set(\dur, f6,  \vol, vol6);
1252                                                 ~l6c.set(\dur, f6/~icd3,       \vol, vol6);  ~l6d.set(\dur, f6/~icd3,  \vol, vol6);
1253                                                 ~l6e.set(\dur, f6/~icd6,       \vol, vol6);  ~l6f.set(\dur, f6/~icd6,  \vol, vol6);
1254                                                 ~l7a.set(\dur, f7,    \vol, vol7);           ~l7b.set(\dur, f7,  \vol, vol7);
1255                                                 ~l7c.set(\dur, f7/~icd3,       \vol, vol7);  ~l7d.set(\dur, f7/~icd3,  \vol, vol7);
1256                                                 ~l7e.set(\dur, f7/~icd6,       \vol, vol7);  ~l7f.set(\dur, f7/~icd6,  \vol, vol7);
1257                                                 ~l8a.set(\dur, f8,    \vol, vol8);           ~l8b.set(\dur, f8,  \vol, vol8);
1258                                                 ~l8c.set(\dur, f8/~icd3,       \vol, vol8);  ~l8d.set(\dur, f8/~icd3,  \vol, vol8);
1259                                                 ~l8e.set(\dur, f8/~icd6,       \vol, vol8);  ~l8f.set(\dur, f8/~icd6,  \vol, vol8);
1260                                                 ~l9a.set(\dur, f9,    \vol, vol9);          ~l9b.set(\dur, f9,  \vol, vol9);
1261                                                 ~l9c.set(\dur, f9/~icd3,       \vol, vol9); ~l9d.set(\dur, f9/~icd3,  \vol, vol9);
1262                                                 ~l9e.set(\dur, f9/~icd6,       \vol, vol9); ~l9f.set(\dur, f9/~icd6,  \vol, vol9);
1263                                                 ~l10a.set(\dur, f10,  \vol, vol10);         ~l10b.set(\dur, f10,  \vol, vol10);
1264                                                 ~l10c.set(\dur, f10/~icd3,     \vol, vol10);~l10d.set(\dur, f10/~icd3,  \vol, vol10);
1265                                                 ~l10e.set(\dur, f10/~icd6,     \vol, vol10);~l10f.set(\dur, f10/~icd6,  \vol, vol10);
1266                                                 ~l11a.set(\dur, f11,  \vol, vol11);         ~l11b.set(\dur, f11,  \vol, vol11);
1267                                                 ~l11c.set(\dur, f11/~icd3,     \vol, vol11);~l11d.set(\dur, f11/~icd3,  \vol, vol11);
1268                                                 ~l11e.set(\dur, f11/~icd6,     \vol, vol11);~l11f.set(\dur, f11/~icd6,  \vol, vol11);
1269                                                 ~l12a.set(\dur, f12,  \vol, vol12);         ~l12b.set(\dur, f12,  \vol, vol12);
1270                                                 ~l12c.set(\dur, f12/~icd3,     \vol, vol12);~l12d.set(\dur, f12/~icd3,  \vol, vol12);
1271                                                 ~l12e.set(\dur, f12/~icd6,     \vol, vol12);~l12f.set(\dur, f12/~icd6,  \vol, vol12);
1272                                         });
1273                                 }););
1274                                 AppClock.sched(0.161803398875,{
1275                                         ([~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;
1276                                 });
1277                         };
1278                 );
1279         };
1280
1281
1282         //timer values
1283
1284         case
1285         {~slot1 == nil}{""}
1286         {~slot2 == nil}{""}
1287         {~slot3 == nil}{""}
1288         {~slot4 == nil}{""}
1289         {~slot5 == nil}{""}
1290         {~slot6 == nil}{""}
1291         {~slot7 == nil}{""}
1292         {~slot8 == nil}{""};
1293
1294         ~timevals = {(~tst = TextView(w, Rect(~tspl,~tspt, ~tspw, ~tsph)).background_(Color.black);
1295                 (~tst.string =
1296                         "o1:_"++~time1o.value.asString++"_f1:_"++~time1f.value.asString++"_s1:_"++~time1s.value.asString++"\n" ++
1297                         "o2:_"++~time2o.value.asString++"_f2:_"++~time2f.value.asString++"_s2:_"++~time2s.value.asString++"\n" ++
1298                         "o3:_"++~time3o.value.asString++"_f3:_"++~time3f.value.asString++"_s3:_"++~time3s.value.asString++"\n" ++
1299                         "o4:_"++~time4o.value.asString++"_f4:_"++~time4f.value.asString++"_s4:_"++~time4s.value.asString++"\n" ++
1300                         "o5:_"++~time5o.value.asString++"_f5:_"++~time5f.value.asString++"_s5:_"++~time5s.value.asString++"\n" ++
1301                         "o6:_"++~time6o.value.asString++"_f6:_"++~time6f.value.asString++"_s6:_"++~time6s.value.asString++"\n" ++
1302                         "o7:_"++~time7o.value.asString++"_f7:_"++~time7f.value.asString++"_s7:_"++~time7s.value.asString++"\n" ++
1303                         "o8:_"++~time8o.value.asString++"_f8:_"++~time8f.value.asString++"_s8:_"++~time8s.value.asString++"\n" ++"\n" ++
1304                         if(~slot8 != ~slot, {
1305                                 (~slot1 = ~slot2).asString++"\n" ++
1306                                 (~slot2 = ~slot3).asString++"\n" ++
1307                                 (~slot3 = ~slot4).asString++"\n" ++
1308                                 (~slot4 = ~slot5).asString++"\n" ++
1309                                 (~slot5 = ~slot6).asString++"\n" ++
1310                                 (~slot6 = ~slot7).asString++"\n" ++
1311                                 (~slot7 = ~slot8).asString++"\n" ++
1312                                 (~slot8 = ~slot).asString;
1313                         },{
1314                                 (~slot1).asString++"\n" ++
1315                                 (~slot2).asString++"\n" ++
1316                                 (~slot3).asString++"\n" ++
1317                                 (~slot4).asString++"\n" ++
1318                                 (~slot5).asString++"\n" ++
1319                                 (~slot6).asString++"\n" ++
1320                                 (~slot7).asString++"\n" ++
1321                                 (~slot8).asString;
1322                         });
1323
1324                 );
1325                 ~tst.stringColor = Color.white;
1326         )};
1327
1328
1329         //monitoring number of synths function
1330
1331         ~numsynthsfunc = {
1332                 if((~numsynths != nil) or: (~numsynths.isPlaying == true), {~numsynths.stop;});
1333                 ~numsynths = Routine({inf.do({if((s.numSynths > 73) and: (3.wait; s.numSynths > 73) and: (6.wait; s.numSynths > 73), {
1334
1335                         AppClock.sched(0, {
1336                                 if(~numsynthmessage != nil, {~numsynthmessage.close;});
1337                                 ~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;
1338                                 ~numsynthmessagestring = StaticText(~numsynthmessage, Rect(0,0,340+46,340+46/1.6180339887499)).background_(Color.black);
1339                                 ~numsynthmessagestring.align = \topLeft;
1340                                 ~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.";
1341                                 ~numsynthmessagestring.stringColor = Color.white;
1342                                 ~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;});});
1343                                 ~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;});});
1344                                 ~numsynthmessage.front;
1345                         });
1346                 }); 1.wait;});}).play;
1347         };
1348
1349         ~numsynthsfunc.value;
1350
1351
1352         //mouse down action
1353
1354         view.mouseDownAction = {
1355                 |v, x, y, mod, butNum|
1356                 point = [x,y];
1357                 if(butNum == 0, { v.refresh;
1358
1359                         //generate dots on mouse down action
1360
1361                         ~tgrid = 30;
1362                         ~bgrid = Window.screenBounds.height-(Window.screenBounds.height/1.6180339887499)+30;
1363
1364                         case
1365                         {y<~tgrid} {nil}
1366                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z1.close;~z1 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1367                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z2.close;~z2 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1368                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z3.close;~z3 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1369                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z4.close;~z4 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1370                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z5.close;~z5 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1371                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z6.close;~z6 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1372                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z7.close;~z7 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1373                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z8.close;~z8 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1374                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z9.close;~z9 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1375                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z10.close;~z10 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1376                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z11.close;~z11 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1377                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z12.close;~z12 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1378                         {y>~tgrid and: y<~bgrid} {nil}
1379                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z1.close;~z1 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1380                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z2.close;~z2 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1381                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z3.close;~z3 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1382                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z4.close;~z4 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1383                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z5.close;~z5 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1384                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z6.close;~z6 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1385                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z7.close;~z7 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1386                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z8.close;~z8 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1387                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z9.close;~z9 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1388                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z10.close;~z10 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1389                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z11.close;~z11 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1390                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z12.close;~z12 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1391                 }, {});
1392
1393                 ~tgrid = 30;
1394                 ~bgrid = Window.screenBounds.height-(Window.screenBounds.height/1.6180339887499)+30;
1395
1396                 //set synth values on mouse down action
1397
1398                 case
1399                 {~l1a.isRunning == true}{
1400                         case
1401                         {y<~tgrid} {nil}
1402                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1403                                 ~l1a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1404                                 ~l1b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f1=q.value; ~undof1=~f1;
1405                                 ~l1c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1406                                 ~l1d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1407                                 ~l1e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1408                                 ~l1f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1409                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1410                                 ~l2a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1411                                 ~l2b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f2=q.value; ~undof2=~f2;
1412                                 ~l2c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1413                                 ~l2d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1414                                 ~l2e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1415                                 ~l2f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1416                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1417                                 ~l3a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1418                                 ~l3b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f3=q.value; ~undof3=~f3;
1419                                 ~l3c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1420                                 ~l3d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1421                                 ~l3e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1422                                 ~l3f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1423                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1424                                 ~l4a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1425                                 ~l4b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f4=q.value; ~undof4=~f4;
1426                                 ~l4c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1427                                 ~l4d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1428                                 ~l4e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1429                                 ~l4f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1430                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1431                                 ~l5a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1432                                 ~l5b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f5=q.value; ~undof5=~f5;
1433                                 ~l5c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1434                                 ~l5d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1435                                 ~l5e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1436                                 ~l5f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1437                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1438                                 ~l6a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1439                                 ~l6b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f6=q.value; ~undof6=~f6;
1440                                 ~l6c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1441                                 ~l6d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1442                                 ~l6e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1443                                 ~l6f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1444                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1445                                 ~l7a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1446                                 ~l7b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f7=q.value; ~undof7=~f7;
1447                                 ~l7c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1448                                 ~l7d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1449                                 ~l7e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1450                                 ~l7f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1451                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1452                                 ~l8a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1453                                 ~l8b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f8=q.value; ~undof8=~f8;
1454                                 ~l8c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1455                                 ~l8d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1456                                 ~l8e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1457                                 ~l8f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1458                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1459                                 ~l9a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1460                                 ~l9b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f9=q.value; ~undof9=~f9;
1461                                 ~l9c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1462                                 ~l9d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1463                                 ~l9e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1464                                 ~l9f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1465                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1466                                 ~l10a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1467                                 ~l10b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f10=q.value; ~undof10=~f10;
1468                                 ~l10c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1469                                 ~l10d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1470                                 ~l10e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1471                                 ~l10f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1472                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1473                                 ~l11a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1474                                 ~l11b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f11=q.value; ~undof11=~f11;
1475                                 ~l11c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1476                                 ~l11d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1477                                 ~l11e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1478                                 ~l11f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1479                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1480                                 ~l12a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1481                                 ~l12b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f12=q.value; ~undof12=~f12;
1482                                 ~l12c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1483                                 ~l12d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1484                                 ~l12e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1485                                 ~l12f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1486                         {y>~tgrid and: y<~bgrid} {nil}
1487                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1488                                 ~l1a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1489                                 ~l1b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f1=q.value; ~undof1=~f1;
1490                                 ~l1c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1491                                 ~l1d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1492                                 ~l1e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1493                                 ~l1f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1494                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1495                                 ~l2a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1496                                 ~l2b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f2=q.value; ~undof2=~f2;
1497                                 ~l2c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1498                                 ~l2d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1499                                 ~l2e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1500                                 ~l2f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1501                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1502                                 ~l3a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1503                                 ~l3b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f3=q.value; ~undof3=~f3;
1504                                 ~l3c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1505                                 ~l3d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1506                                 ~l3e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1507                                 ~l3f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1508                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1509                                 ~l4a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1510                                 ~l4b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f4=q.value; ~undof4=~f4;
1511                                 ~l4c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1512                                 ~l4d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1513                                 ~l4e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1514                                 ~l4f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1515                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1516                                 ~l5a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1517                                 ~l5b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f5=q.value; ~undof5=~f5;
1518                                 ~l5c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1519                                 ~l5d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1520                                 ~l5e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1521                                 ~l5f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1522                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1523                                 ~l6a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1524                                 ~l6b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f6=q.value; ~undof6=~f6;
1525                                 ~l6c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1526                                 ~l6d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1527                                 ~l6e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1528                                 ~l6f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1529                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1530                                 ~l7a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1531                                 ~l7b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f7=q.value; ~undof7=~f7;
1532                                 ~l7c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1533                                 ~l7d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1534                                 ~l7e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1535                                 ~l7f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1536                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1537                                 ~l8a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1538                                 ~l8b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f8=q.value; ~undof8=~f8;
1539                                 ~l8c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1540                                 ~l8d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1541                                 ~l8e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1542                                 ~l8f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1543                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1544                                 ~l9a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1545                                 ~l9b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f9=q.value; ~undof9=~f9;
1546                                 ~l9c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1547                                 ~l9d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1548                                 ~l9e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1549                                 ~l9f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1550                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1551                                 ~l10a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1552                                 ~l10b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f10=q.value; ~undof10=~f10;
1553                                 ~l10c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1554                                 ~l10d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1555                                 ~l10e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1556                                 ~l10f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1557                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1558                                 ~l11a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1559                                 ~l11b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f11=q.value; ~undof11=~f11;
1560                                 ~l11c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1561                                 ~l11d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1562                                 ~l11e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1563                                 ~l11f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1564                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1565                                 ~l12a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1566                                 ~l12b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f12=q.value; ~undof12=~f12;
1567                                 ~l12c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1568                                 ~l12d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1569                                 ~l12e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1570                                 ~l12f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);};
1571                 }
1572                 {~l1a1.isRunning == true}{
1573                         case
1574                         {y<~tgrid} {nil}
1575                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1576                                 ~l1a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1577                                 ~l1b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f1=q.value; ~undof1=~f1;
1578                                 ~l1c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1579                                 ~l1d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1580                                 ~l1e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1581                                 ~l1f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1582                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1583                                 ~l2a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1584                                 ~l2b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f2=q.value; ~undof2=~f2;
1585                                 ~l2c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1586                                 ~l2d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1587                                 ~l2e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1588                                 ~l2f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1589                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1590                                 ~l3a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1591                                 ~l3b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f3=q.value; ~undof3=~f3;
1592                                 ~l3c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1593                                 ~l3d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1594                                 ~l3e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1595                                 ~l3f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1596                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1597                                 ~l4a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1598                                 ~l4b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f4=q.value; ~undof4=~f4;
1599                                 ~l4c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1600                                 ~l4d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1601                                 ~l4e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1602                                 ~l4f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1603                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1604                                 ~l5a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1605                                 ~l5b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f5=q.value; ~undof5=~f5;
1606                                 ~l5c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1607                                 ~l5d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1608                                 ~l5e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1609                                 ~l5f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1610                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1611                                 ~l6a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1612                                 ~l6b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f6=q.value; ~undof6=~f6;
1613                                 ~l6c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1614                                 ~l6d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1615                                 ~l6e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1616                                 ~l6f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1617                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1618                                 ~l7a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1619                                 ~l7b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f7=q.value; ~undof7=~f7;
1620                                 ~l7c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1621                                 ~l7d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1622                                 ~l7e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1623                                 ~l7f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1624                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1625                                 ~l8a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1626                                 ~l8b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f8=q.value; ~undof8=~f8;
1627                                 ~l8c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1628                                 ~l8d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1629                                 ~l8e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1630                                 ~l8f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1631                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1632                                 ~l9a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1633                                 ~l9b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f9=q.value; ~undof9=~f9;
1634                                 ~l9c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1635                                 ~l9d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1636                                 ~l9e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1637                                 ~l9f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1638                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1639                                 ~l10a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1640                                 ~l10b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f10=q.value; ~undof10=~f10;
1641                                 ~l10c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1642                                 ~l10d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1643                                 ~l10e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1644                                 ~l10f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1645                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1646                                 ~l11a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1647                                 ~l11b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f11=q.value; ~undof11=~f11;
1648                                 ~l11c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1649                                 ~l11d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1650                                 ~l11e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1651                                 ~l11f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1652                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1653                                 ~l12a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1654                                 ~l12b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f12=q.value; ~undof12=~f12;
1655                                 ~l12c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1656                                 ~l12d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1657                                 ~l12e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1658                                 ~l12f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1659                         {y>~tgrid and: y<~bgrid} {nil}
1660                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1661                                 ~l1a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1662                                 ~l1b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f1=q.value; ~undof1=~f1;
1663                                 ~l1c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1664                                 ~l1d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1665                                 ~l1e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1666                                 ~l1f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1667                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1668                                 ~l2a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1669                                 ~l2b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f2=q.value; ~undof2=~f2;
1670                                 ~l2c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1671                                 ~l2d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1672                                 ~l2e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1673                                 ~l2f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1674                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1675                                 ~l3a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1676                                 ~l3b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f3=q.value; ~undof3=~f3;
1677                                 ~l3c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1678                                 ~l3d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1679                                 ~l3e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1680                                 ~l3f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1681                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1682                                 ~l4a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1683                                 ~l4b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f4=q.value; ~undof4=~f4;
1684                                 ~l4c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1685                                 ~l4d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1686                                 ~l4e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1687                                 ~l4f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1688                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1689                                 ~l5a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1690                                 ~l5b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f5=q.value; ~undof5=~f5;
1691                                 ~l5c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1692                                 ~l5d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1693                                 ~l5e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1694                                 ~l5f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1695                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1696                                 ~l6a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1697                                 ~l6b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f6=q.value; ~undof6=~f6;
1698                                 ~l6c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1699                                 ~l6d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1700                                 ~l6e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1701                                 ~l6f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1702                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1703                                 ~l7a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1704                                 ~l7b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f7=q.value; ~undof7=~f7;
1705                                 ~l7c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1706                                 ~l7d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1707                                 ~l7e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1708                                 ~l7f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1709                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1710                                 ~l8a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1711                                 ~l8b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f8=q.value; ~undof8=~f8;
1712                                 ~l8c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1713                                 ~l8d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1714                                 ~l8e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1715                                 ~l8f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1716                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1717                                 ~l9a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1718                                 ~l9b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f9=q.value; ~undof9=~f9;
1719                                 ~l9c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1720                                 ~l9d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1721                                 ~l9e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1722                                 ~l9f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1723                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1724                                 ~l10a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1725                                 ~l10b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f10=q.value; ~undof10=~f10;
1726                                 ~l10c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1727                                 ~l10d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1728                                 ~l10e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1729                                 ~l10f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1730                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1731                                 ~l11a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1732                                 ~l11b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f11=q.value; ~undof11=~f11;
1733                                 ~l11c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1734                                 ~l11d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1735                                 ~l11e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1736                                 ~l11f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1737                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1738                                 ~l12a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1739                                 ~l12b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f12=q.value; ~undof12=~f12;
1740                                 ~l12c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1741                                 ~l12d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1742                                 ~l12e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1743                                 ~l12f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);};
1744                 };
1745         };
1746
1747
1748         //mouse move action
1749
1750         view.mouseMoveAction = {
1751                 |v, x, y|
1752
1753                 ~nh = 2;
1754                 ~nw = ~nh*1.6180339887499;
1755
1756                 //generate dots on mouse move action
1757
1758                 ~tgrid = 30;
1759                 ~bgrid = Window.screenBounds.height-(Window.screenBounds.height/1.6180339887499)+30;
1760
1761                 case
1762                 {y<~tgrid} {nil}
1763                 {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z1.close;~z25.close;~z1 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1764                 {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z2.close;~z26.close;~z2 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1765                 {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z3.close;~z27.close;~z3 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1766                 {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z4.close;~z28.close;~z4 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1767                 {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z5.close;~z29.close;~z5 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1768                 {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z6.close;~z30.close;~z6 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1769                 {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z7.close;~z31.close;~z7 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1770                 {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z8.close;~z32.close;~z8 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1771                 {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z9.close;~z33.close;~z9 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1772                 {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z10.close;~z34.close;~z10 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1773                 {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z11.close;~z35.close;~z11 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1774                 {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z12.close;~z36.close;~z12 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1775                 {y>~tgrid and: y<~bgrid} {nil}
1776                 {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z1.close;~z25.close;~z1 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1777                 {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z2.close;~z26.close;~z2 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1778                 {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z3.close;~z27.close;~z3 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1779                 {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z4.close;~z28.close;~z4 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1780                 {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z5.close;~z29.close;~z5 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1781                 {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z6.close;~z30.close;~z6 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1782                 {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z7.close;~z31.close;~z7 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1783                 {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z8.close;~z32.close;~z8 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1784                 {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z9.close;~z33.close;~z9 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1785                 {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z10.close;~z34.close;~z10 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1786                 {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z11.close;~z35.close;~z11 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1787                 {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z12.close;~z36.close;~z12 = (View(w, Rect(x, y, ~nw, 2)).background = Color.white;)};
1788                 w.refresh;
1789
1790                 ~tgrid = 30;
1791                 ~bgrid = Window.screenBounds.height-(Window.screenBounds.height/1.6180339887499)+30;
1792
1793                 //set synth values on mouse move action
1794
1795                 case
1796                 {~l1a.isRunning == true}{
1797                         case
1798                         {y<~tgrid} {nil}
1799                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1800                                 ~l1a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1801                                 ~l1b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f1=q.value; ~undof1=~f1;
1802                                 ~l1c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1803                                 ~l1d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1804                                 ~l1e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1805                                 ~l1f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1806                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1807                                 ~l2a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1808                                 ~l2b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f2=q.value; ~undof2=~f2;
1809                                 ~l2c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1810                                 ~l2d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1811                                 ~l2e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1812                                 ~l2f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1813                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1814                                 ~l3a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1815                                 ~l3b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f3=q.value; ~undof3=~f3;
1816                                 ~l3c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1817                                 ~l3d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1818                                 ~l3e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1819                                 ~l3f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1820                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1821                                 ~l4a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1822                                 ~l4b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f4=q.value; ~undof4=~f4;
1823                                 ~l4c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1824                                 ~l4d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1825                                 ~l4e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1826                                 ~l4f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1827                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1828                                 ~l5a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1829                                 ~l5b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f5=q.value; ~undof5=~f5;
1830                                 ~l5c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1831                                 ~l5d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1832                                 ~l5e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1833                                 ~l5f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1834                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1835                                 ~l6a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1836                                 ~l6b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f6=q.value; ~undof6=~f6;
1837                                 ~l6c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1838                                 ~l6d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1839                                 ~l6e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1840                                 ~l6f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1841                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1842                                 ~l7a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1843                                 ~l7b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f7=q.value; ~undof7=~f7;
1844                                 ~l7c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1845                                 ~l7d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1846                                 ~l7e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1847                                 ~l7f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1848                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1849                                 ~l8a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1850                                 ~l8b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f8=q.value; ~undof8=~f8;
1851                                 ~l8c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1852                                 ~l8d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1853                                 ~l8e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1854                                 ~l8f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1855                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1856                                 ~l9a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1857                                 ~l9b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f9=q.value; ~undof9=~f9;
1858                                 ~l9c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1859                                 ~l9d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1860                                 ~l9e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1861                                 ~l9f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1862                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1863                                 ~l10a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1864                                 ~l10b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f10=q.value; ~undof10=~f10;
1865                                 ~l10c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1866                                 ~l10d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1867                                 ~l10e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1868                                 ~l10f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1869                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1870                                 ~l11a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1871                                 ~l11b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f11=q.value; ~undof11=~f11;
1872                                 ~l11c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1873                                 ~l11d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1874                                 ~l11e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1875                                 ~l11f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1876                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1877                                 ~l12a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1878                                 ~l12b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f12=q.value; ~undof12=~f12;
1879                                 ~l12c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1880                                 ~l12d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1881                                 ~l12e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1882                                 ~l12f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1883                         {y>~tgrid and: y<~bgrid} {nil}
1884                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1885                                 ~l1a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1886                                 ~l1b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f1=q.value; ~undof1=~f1;
1887                                 ~l1c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1888                                 ~l1d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1889                                 ~l1e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1890                                 ~l1f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1891                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1892                                 ~l2a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1893                                 ~l2b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f2=q.value; ~undof2=~f2;
1894                                 ~l2c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1895                                 ~l2d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1896                                 ~l2e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1897                                 ~l2f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1898                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1899                                 ~l3a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1900                                 ~l3b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f3=q.value; ~undof3=~f3;
1901                                 ~l3c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1902                                 ~l3d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1903                                 ~l3e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1904                                 ~l3f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1905                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1906                                 ~l4a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1907                                 ~l4b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f4=q.value; ~undof4=~f4;
1908                                 ~l4c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1909                                 ~l4d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1910                                 ~l4e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1911                                 ~l4f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1912                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1913                                 ~l5a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1914                                 ~l5b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f5=q.value; ~undof5=~f5;
1915                                 ~l5c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1916                                 ~l5d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1917                                 ~l5e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1918                                 ~l5f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1919                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1920                                 ~l6a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1921                                 ~l6b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f6=q.value; ~undof6=~f6;
1922                                 ~l6c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1923                                 ~l6d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1924                                 ~l6e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1925                                 ~l6f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1926                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1927                                 ~l7a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1928                                 ~l7b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f7=q.value; ~undof7=~f7;
1929                                 ~l7c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1930                                 ~l7d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1931                                 ~l7e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1932                                 ~l7f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1933                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1934                                 ~l8a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1935                                 ~l8b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f8=q.value; ~undof8=~f8;
1936                                 ~l8c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1937                                 ~l8d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1938                                 ~l8e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1939                                 ~l8f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1940                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1941                                 ~l9a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1942                                 ~l9b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f9=q.value; ~undof9=~f9;
1943                                 ~l9c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1944                                 ~l9d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1945                                 ~l9e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1946                                 ~l9f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1947                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1948                                 ~l10a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1949                                 ~l10b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f10=q.value; ~undof10=~f10;
1950                                 ~l10c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1951                                 ~l10d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1952                                 ~l10e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1953                                 ~l10f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1954                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1955                                 ~l11a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1956                                 ~l11b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f11=q.value; ~undof11=~f11;
1957                                 ~l11c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1958                                 ~l11d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1959                                 ~l11e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1960                                 ~l11f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1961                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1962                                 ~l12a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1963                                 ~l12b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f12=q.value; ~undof12=~f12;
1964                                 ~l12c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1965                                 ~l12d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1966                                 ~l12e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1967                                 ~l12f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);};
1968                 }
1969                 {~l1a1.isRunning == true}{
1970                         case
1971                         {y<~tgrid} {nil}
1972                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1973                                 ~l1a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1974                                 ~l1b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f1=q.value; ~undof1=~f1;
1975                                 ~l1c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1976                                 ~l1d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1977                                 ~l1e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1978                                 ~l1f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1979                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1980                                 ~l2a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1981                                 ~l2b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f2=q.value; ~undof2=~f2;
1982                                 ~l2c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1983                                 ~l2d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1984                                 ~l2e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1985                                 ~l2f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1986                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1987                                 ~l3a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1988                                 ~l3b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f3=q.value; ~undof3=~f3;
1989                                 ~l3c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1990                                 ~l3d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1991                                 ~l3e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1992                                 ~l3f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1993                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1994                                 ~l4a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1995                                 ~l4b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f4=q.value; ~undof4=~f4;
1996                                 ~l4c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1997                                 ~l4d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1998                                 ~l4e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1999                                 ~l4f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
2000                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
2001                                 ~l5a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
2002                                 ~l5b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f5=q.value; ~undof5=~f5;
2003                                 ~l5c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
2004                                 ~l5d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
2005                                 ~l5e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
2006                                 ~l5f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
2007                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
2008                                 ~l6a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
2009                                 ~l6b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f6=q.value; ~undof6=~f6;
2010                                 ~l6c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
2011                                 ~l6d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
2012                                 ~l6e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
2013                                 ~l6f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
2014                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
2015                                 ~l7a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
2016                                 ~l7b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f7=q.value; ~undof7=~f7;
2017                                 ~l7c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
2018                                 ~l7d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
2019                                 ~l7e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
2020                                 ~l7f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
2021                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
2022                                 ~l8a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
2023                                 ~l8b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f8=q.value; ~undof8=~f8;
2024                                 ~l8c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
2025                                 ~l8d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
2026                                 ~l8e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
2027                                 ~l8f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
2028                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
2029                                 ~l9a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
2030                                 ~l9b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f9=q.value; ~undof9=~f9;
2031                                 ~l9c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
2032                                 ~l9d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
2033                                 ~l9e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
2034                                 ~l9f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
2035                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
2036                                 ~l10a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
2037                                 ~l10b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f10=q.value; ~undof10=~f10;
2038                                 ~l10c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
2039                                 ~l10d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
2040                                 ~l10e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
2041                                 ~l10f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
2042                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
2043                                 ~l11a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
2044                                 ~l11b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f11=q.value; ~undof11=~f11;
2045                                 ~l11c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
2046                                 ~l11d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
2047                                 ~l11e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
2048                                 ~l11f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
2049                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
2050                                 ~l12a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
2051                                 ~l12b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f12=q.value; ~undof12=~f12;
2052                                 ~l12c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
2053                                 ~l12d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
2054                                 ~l12e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
2055                                 ~l12f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
2056                         {y>~tgrid and: y<~bgrid} {nil}
2057                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
2058                                 ~l1a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
2059                                 ~l1b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f1=q.value; ~undof1=~f1;
2060                                 ~l1c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
2061                                 ~l1d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
2062                                 ~l1e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
2063                                 ~l1f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
2064                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
2065                                 ~l2a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
2066                                 ~l2b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f2=q.value; ~undof2=~f2;
2067                                 ~l2c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
2068                                 ~l2d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
2069                                 ~l2e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
2070                                 ~l2f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
2071                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
2072                                 ~l3a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
2073                                 ~l3b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f3=q.value; ~undof3=~f3;
2074                                 ~l3c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
2075                                 ~l3d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
2076                                 ~l3e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
2077                                 ~l3f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
2078                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
2079                                 ~l4a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
2080                                 ~l4b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f4=q.value; ~undof4=~f4;
2081                                 ~l4c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
2082                                 ~l4d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
2083                                 ~l4e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
2084                                 ~l4f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
2085                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
2086                                 ~l5a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
2087                                 ~l5b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f5=q.value; ~undof5=~f5;
2088                                 ~l5c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
2089                                 ~l5d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
2090                                 ~l5e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
2091                                 ~l5f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
2092                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
2093                                 ~l6a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
2094                                 ~l6b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f6=q.value; ~undof6=~f6;
2095                                 ~l6c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
2096                                 ~l6d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
2097                                 ~l6e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
2098                                 ~l6f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
2099                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
2100                                 ~l7a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
2101                                 ~l7b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f7=q.value; ~undof7=~f7;
2102                                 ~l7c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
2103                                 ~l7d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
2104                                 ~l7e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
2105                                 ~l7f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
2106                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
2107                                 ~l8a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
2108                                 ~l8b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f8=q.value; ~undof8=~f8;
2109                                 ~l8c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
2110                                 ~l8d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
2111                                 ~l8e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
2112                                 ~l8f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
2113                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
2114                                 ~l9a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
2115                                 ~l9b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f9=q.value; ~undof9=~f9;
2116                                 ~l9c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
2117                                 ~l9d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
2118                                 ~l9e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
2119                                 ~l9f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
2120                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
2121                                 ~l10a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
2122                                 ~l10b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f10=q.value; ~undof10=~f10;
2123                                 ~l10c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
2124                                 ~l10d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
2125                                 ~l10e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
2126                                 ~l10f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
2127                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
2128                                 ~l11a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
2129                                 ~l11b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f11=q.value; ~undof11=~f11;
2130                                 ~l11c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
2131                                 ~l11d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
2132                                 ~l11e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
2133                                 ~l11f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
2134                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
2135                                 ~l12a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
2136                                 ~l12b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f12=q.value; ~undof12=~f12;
2137                                 ~l12c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
2138                                 ~l12d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
2139                                 ~l12e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
2140                                 ~l12f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);};
2141                 };
2142         };
2143
2144         ~tgrid = 30;
2145         ~bgrid = Window.screenBounds.height-(Window.screenBounds.height/1.6180339887499)+30;
2146         ~dc1 = ~tgrid-5; ~dc2 = ~bgrid-5; ~dca = 10;
2147
2148         ~bpl = Window.screenBounds.width-340;
2149         ~bpt = Window.screenBounds.height-88;
2150         ~bph = 40;
2151         ~bpw = 40/1.6180339887499;
2152
2153
2154         //copy button
2155
2156         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;
2157                 if(button.value == 1, {
2158
2159                         ~tsc = TextView(w, Rect(0,5, Window.screenBounds.width, 354)).background_(Color.black);
2160                         (~tsc.string =
2161
2162                                 "current chord/frequencies: "++"\n"++"\n"++
2163
2164                                 "[~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"++
2165
2166                                 "saved open/flow 1-8 frequencies (in script format): "++"\n"++"\n"++
2167
2168                                 "[~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"++
2169                                 "[~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"++
2170                                 "[~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"++
2171                                 "[~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"++
2172                                 "[~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"++
2173                                 "[~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"++
2174                                 "[~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"++
2175                                 "[~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"++
2176
2177                                 "saved slide 1-8 frequencies (in script format): "++"\n"++"\n"++
2178
2179                                 "#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"++
2180                                 "#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"++
2181                                 "#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"++
2182                                 "#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"++
2183                                 "#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"++
2184                                 "#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"++
2185                                 "#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"++
2186                                 "#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;"
2187                         );
2188                         ~tsc.stringColor = Color.white;
2189                         [ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ].postln;},
2190                 {~tsc.close;});
2191         });
2192
2193
2194         /*//stop timer button
2195
2196         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;
2197         if(~timer.isPlaying == true, {
2198         if(~tst.value == nil, {~timer.stop; ~systemclock.stop; ~systemclock.clear;},{~tst.close;
2199         ~timevals.value;
2200         ~timer.stop; ~systemclock.stop; ~systemclock.clear;});
2201         });
2202         });*/
2203
2204
2205         //timer button
2206
2207         ~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, {
2208
2209                 ~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;
2210                         if(~timer.isPlaying == true, {
2211                                 if(~tst.value == nil, {~timer.stop; ~systemclock.stop; ~systemclock.clear;},{~tst.close;
2212                                         ~timevals.value;
2213                                         ~timer.stop; ~systemclock.stop; ~systemclock.clear;});
2214                         });
2215                 });
2216
2217                 if(~tst != nil, {~tst.close});
2218                 ~timevals.value;
2219                 ~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;})});
2220
2221         });
2222
2223
2224         //start/stop synth button
2225
2226         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_({
2227                 arg synthbutton; if(synthbutton.value == 1, {
2228                         ~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);
2229                         ~synthopen.value;
2230                         ~numsynths.stop; ~numsynthsfunc.value;
2231                         if(~midifunc != nil, {~midifunc.value});
2232                 },
2233                 {~synthfree.value; b4.value = 0;})
2234         });
2235
2236
2237         //pause/unpause button
2238
2239         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_({
2240                 arg synthbutton; if(synthbutton.value == 1, {~synthpause.value; if(~ts.value == 1, {~timer.stop;});},
2241                         {~synthflow.value; if(~ts.value != 1, {nil}, {SystemClock.play(~timer);})})
2242         });
2243
2244
2245         //generate values for number of KW(King Wen) sequences in a timewave half-cycle (or amplitude x2) pop-up menu
2246
2247         if(~low_pass_filter_set_value == nil, {~low_pass_filter_set_value = ~low_pass_filter_freq_limit});
2248         if(~low_pass_filter_set_value != ~low_pass_filter_freq_limit, {~low_pass_filter_set_value = ~low_pass_filter_freq_limit});
2249
2250
2251         //settings function
2252
2253         ~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;
2254
2255                 if(button.value == 1, {
2256
2257                         ({
2258                                 arg  top = 0,width=160, 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;
2259                                 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;
2260                                 ~settingsview = View(w, Rect(20+60*2+15+25,Window.screenBounds.height-370,380,420/1.6180339887499)).front;
2261                                 /*w.view.decorator=FlowLayout(w.view.bounds);
2262                                 w.view.decorator.gap=2@2;*/
2263
2264                                 top = 0;
2265
2266                                 t1 = StaticText(~settingsview, Rect(lefttime , top=top, width, height)).background_(Color.black).string_("KWS number").stringColor_(Color.white);
2267                                 t2 = StaticText(~settingsview, Rect(lefttime , top=top+height+5, width, height)).background_(Color.black).string_("base(lowest) freq(hz)").stringColor_(Color.white);
2268                                 t3 = StaticText(~settingsview, Rect(lefttime , top=top+height+5, width, height)).background_(Color.black).string_("synthdef type").stringColor_(Color.white);
2269                                 t4 = StaticText(~settingsview, Rect(lefttime , top=top+height+5, width, height)).background_(Color.black).string_("lp filter limit(hz)").stringColor_(Color.white);
2270                                 t5 = StaticText(~settingsview, Rect(lefttime , top=top+height+5, width, height)).background_(Color.black).string_("automate").stringColor_(Color.white);
2271                                 t6 = StaticText(~settingsview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("automate period").stringColor_(Color.white);
2272                                 t7 = StaticText(~settingsview, Rect(lefttime , top=top+height+5, width, height+10)).background_(Color.black).string_("volume(use small intervals)").stringColor_(Color.white);
2273
2274
2275                                 top = 0;
2276
2277
2278                                 //number of KW(King Wen) sequences in a timewave half-cycle (or amplitude x2) pop-up menu
2279
2280                                 ~menu2 = PopUpMenu(~settingsview,Rect(lefttimebox , top=top, widthbox, heightbox)).items_(x = 0; Array.fill(24, {(x=x+1).asString++" kws"});).background_(Color.black).stringColor_(Color.white).action_({arg button;
2281
2282                                         if(~st != nil, {~st.close});
2283                                         ~st = StaticText(~settingsview, Rect(lefttime, top, 200, 20)).background_(Color.black);
2284                                         ~st.stringColor = Color.white;
2285                                         ~st.string = "# of kws in halfcycle selected";
2286                                         AppClock.sched(~gm,{~st.close;});
2287                                 });
2288
2289                                 ~menu2.value = ~gsinenum-1;
2290
2291
2292                                 //pop-menu for timewave base(lowest) frequency
2293
2294                                 ~bfreq = PopUpMenu(~settingsview, Rect(lefttimebox , top=top+heightbox+5, widthbox, heightbox)).items_(~bfreqv = (-1); Array.fill(~basefreqmap.size, {~basefreqmap.at(~bfreqv=~bfreqv+1).asString})).background_(Color.black).stringColor_(Color.white).action_({arg button;
2295
2296                                         if(~st != nil, {~st.close});
2297                                         ~st = StaticText(~settingsview, Rect(lefttime, top, 200, 20)).background_(Color.black);
2298                                         ~st.stringColor = Color.white;
2299                                         ~st.string = "basefreq selected";
2300                                         AppClock.sched(~gm,{~st.close;});
2301                                 });
2302
2303                                 if(~bfreqval != nil, {~bfreq.value = ~bfreqval}, {~bfreq.value = ~basefreqmap.indexOf(~base_frequency);});
2304
2305
2306                                 //synthdef pop-up menu
2307
2308                                 ~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;
2309
2310                                         if(~gsinemenu.value == 0,  {~kws_setting = 1; ~ratio_setting = "psine1"; ~low_pass_filter_on = 1; ~gs = 0;});
2311                                         if(~gsinemenu.value == 1,  {~kws_setting = 2; ~ratio_setting = "psine2"; ~low_pass_filter_on = 1; ~gs = 1;});
2312                                         if(~gsinemenu.value == 2,  {~kws_setting = 3; ~ratio_setting = "psine3"; ~low_pass_filter_on = 1; ~gs = 2;});
2313                                         if(~gsinemenu.value == 3,  {~kws_setting = 1; ~ratio_setting = "hsine1"; ~low_pass_filter_on = 1; ~gs = 3;});
2314                                         if(~gsinemenu.value == 4,  {~kws_setting = 2; ~ratio_setting = "hsine2"; ~low_pass_filter_on = 1; ~gs = 4;});
2315                                         if(~gsinemenu.value == 5,  {~kws_setting = 3; ~ratio_setting = "hsine3"; ~low_pass_filter_on = 1; ~gs = 5;});
2316                                         if(~gsinemenu.value == 6,  {~kws_setting = 1; ~ratio_setting = "psine1"; ~low_pass_filter_on = 0; ~gs = 6;});
2317                                         if(~gsinemenu.value == 7,  {~kws_setting = 2; ~ratio_setting = "psine2"; ~low_pass_filter_on = 0; ~gs = 7;});
2318                                         if(~gsinemenu.value == 8,  {~kws_setting = 3; ~ratio_setting = "psine3"; ~low_pass_filter_on = 0; ~gs = 8;});
2319                                         if(~gsinemenu.value == 9,  {~kws_setting = 1; ~ratio_setting = "hsine1"; ~low_pass_filter_on = 0; ~gs = 9;});
2320                                         if(~gsinemenu.value == 10, {~kws_setting = 2; ~ratio_setting = "hsine2"; ~low_pass_filter_on = 0; ~gs = 10;});
2321                                         if(~gsinemenu.value == 11, {~kws_setting = 3; ~ratio_setting = "hsine3"; ~low_pass_filter_on = 0; ~gs = 11;});
2322
2323                                         if(~st != nil, {~st.close});
2324                                         ~st = StaticText(~settingsview, Rect(lefttime, top, 200, 20)).background_(Color.black);
2325                                         ~st.stringColor = Color.white;
2326                                         ~st.string = "synthdef setting selected";
2327                                         AppClock.sched(~gm,{~st.close;});
2328                                 });
2329
2330                                 if(~gs == nil, {~gs = 0;});
2331
2332                                 case
2333                                 {~gs == 0}{~gsinemenu.value = 0;}
2334                                 {~gs == 1}{~gsinemenu.value = 1;}
2335                                 {~gs == 2}{~gsinemenu.value = 2;}
2336                                 {~gs == 3}{~gsinemenu.value = 3;}
2337                                 {~gs == 4}{~gsinemenu.value = 4;}
2338                                 {~gs == 5}{~gsinemenu.value = 5;}
2339                                 {~gs == 0}{~gsinemenu.value = 6;}
2340                                 {~gs == 1}{~gsinemenu.value = 7;}
2341                                 {~gs == 2}{~gsinemenu.value = 8;}
2342                                 {~gs == 3}{~gsinemenu.value = 9;}
2343                                 {~gs == 4}{~gsinemenu.value = 10;}
2344                                 {~gs == 5}{~gsinemenu.value = 11;};
2345
2346
2347                                 //set low-pass filter frequency limit
2348
2349                                 ~low_pass_filter_textfield = TextField(~settingsview, Rect(lefttimebox , top=top+heightbox+5, widthbox, heightbox));
2350                                 ~low_pass_filter_textfield.string = ~low_pass_filter_set_value.asString;
2351                                 ~low_pass_filter_textfield.background_(Color.black);
2352                                 ~low_pass_filter_textfield.stringColor_(Color.white);
2353                                 ~low_pass_filter_textfield.action = {arg value; ~freqsetvalue = value.value;
2354
2355                                         ~freqset_textfield_func.value; //this function is found after line 2900
2356
2357                                         ~low_pass_filter_set_value = ~freqsetvalue.value;
2358
2359                                         ~low_pass_filter_textfield.string = ~low_pass_filter_set_value.asString; ~low_pass_filter_set_value = ~low_pass_filter_set_value.asFloat;
2360
2361                                         if(~low_pass_filter_set_value != 0, {
2362                                                 if(~st != nil, {~st.close});
2363                                                 ~st = StaticText(~settingsview, Rect(lefttime, top, 240, 20)).background_(Color.black);
2364                                                 ~st.stringColor = Color.white;
2365                                                 ~st.string = "low-pass filter freq limit selected";
2366                                                 AppClock.sched(~gm,{~st.close;});
2367                                         }, {~low_pass_filter_set_value = ~low_pass_filter_freq_limit; ~low_pass_filter_textfield.string = ~low_pass_filter_set_value.asString;});
2368                                 };
2369
2370
2371                                 //switch to sendreply functions
2372
2373                                 ~sendreplymenu = PopUpMenu(~settingsview,Rect(lefttimebox , top=top+heightbox+5, widthbox, heightbox)).items_(["off","phi/fth trans","phi trans","western scale","eastern scale"]).background_(Color.black).stringColor_(Color.white).action_({arg button;
2374
2375                                         case
2376                                         {button.value == 0;}{~sendreplymenu_value = 0;}
2377                                         {button.value == 1;}{~sendreplymenu_value = 1;}
2378                                         {button.value == 2;}{~sendreplymenu_value = 2;}
2379                                         {button.value == 3;}{~sendreplymenu_value = 3;}
2380                                         {button.value == 4;}{~sendreplymenu_value = 4;};
2381
2382                                         if(~st != nil, {~st.close});
2383                                         ~st = StaticText(~settingsview, Rect(lefttime, top, 200, 20)).background_(Color.black);
2384                                         ~st.stringColor = Color.white;
2385                                         ~st.string = "automate setting selected";
2386                                         AppClock.sched(~gm,{~st.close;});
2387                                 });
2388
2389                                 if(~sendreplymenu_value == nil, {~sendreplymenu_value = 0;});
2390
2391                                 case
2392                                 {~sendreplymenu_value == 0}{~sendreplymenu.value = 0;}
2393                                 {~sendreplymenu_value == 1}{~sendreplymenu.value = 1;}
2394                                 {~sendreplymenu_value == 2}{~sendreplymenu.value = 2;}
2395                                 {~sendreplymenu_value == 3}{~sendreplymenu.value = 3;}
2396                                 {~sendreplymenu_value == 4}{~sendreplymenu.value = 4;};
2397
2398
2399                                 //set automate note-change period for sendreply
2400
2401                                 ~sendreplyperiodtextfield = TextField(~settingsview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox));
2402                                 ~sendreplyperiodtextfield.string = ~sendreply_period.asString;
2403                                 ~sendreplyperiodtextfield.background_(Color.black);
2404                                 ~sendreplyperiodtextfield.stringColor_(Color.white);
2405                                 ~sendreplyperiodtextfield.action = {arg value; ~freqsetvalue = value.value;
2406
2407                                         ~freqset_textfield_func.value; //this function is found after line 2900
2408
2409                                         ~sendreply_period = ~freqsetvalue.value;
2410
2411                                         ~sendreplyperiodtextfield.string = ~sendreply_period.asString; ~sendreply_period = ~sendreply_period.asFloat;
2412
2413                                         if(~st != nil, {~st.close});
2414                                         ~st = StaticText(~settingsview, Rect(lefttime, top, 240, 35)).background_(Color.black);
2415                                         ~st.stringColor = Color.white;
2416                                         ~st.string = "automate note-change period selected";
2417                                         AppClock.sched(~gm,{~st.close;});
2418                                 };
2419
2420
2421                                 //set volume
2422
2423                                 ~volumetextfield = TextField(~settingsview, Rect(lefttimebox , top=top+heightbox+5, widthbox, heightbox));
2424                                 ~volumetextfield.string = ~vol.asString;
2425                                 ~volumetextfield.background_(Color.black);
2426                                 ~volumetextfield.stringColor_(Color.white);
2427                                 ~volumetextfield.action = {arg value; ~freqsetvalue = value.value;
2428
2429                                         ~volumetextfield.value; //this function is found after line 2900
2430
2431                                         ~vol = ~freqsetvalue.value;
2432
2433                                         ~volumetextfield.string = ~vol.asString; ~vol = ~vol.asFloat;
2434
2435                                         12.do(x = 0; {("vol"++(x=x+1)).asSymbol.envirPut(~vol)});
2436
2437                                         if(~st != nil, {~st.close});
2438                                         ~st = StaticText(~settingsview, Rect(lefttime, top, 240, 35)).background_(Color.black);
2439                                         ~st.stringColor = Color.white;
2440                                         ~st.string = "volume selected";
2441                                         AppClock.sched(~gm,{~st.close;});
2442                                 };
2443
2444
2445                                 //set button for all settings
2446
2447                                 ~set1=Button(~settingsview,Rect(lefttimebox+widthbox-60, top=top+height+20, 60, 60/~gm)).states_([["set",Color.white,Color.black]]).mouseDownAction_({
2448
2449                                         ~st1 = StaticText(~settingsview, Rect(lefttime, top, 200, 20)).background_(Color.black);
2450                                         ~st1.stringColor = Color.white;
2451                                         ~st1.string = "loading...";
2452
2453                                         ~basefreq = ~basefreqmap.at(~bfreq.value;); ~bfreqval = ~bfreq.value;
2454
2455                                         (#a,b,c,d,e,f = [ ~basefreq,~basefreq,~basefreq,~basefreq,~basefreq,~basefreq  ]; ~a = a; ~b = b; ~c =c; ~d = d; ~e = e;~f=f;);
2456
2457                                         ~low_pass_filter_freq_limit = ~low_pass_filter_set_value;
2458
2459
2460                                         //set n1-n9 values
2461
2462                                         case
2463                                         {~ratio_setting == "psine1";}{~n_value1 = ~gm;    ~n_value2 = ~gm2;   ~n_value6 = ~gm6;}
2464                                         {~ratio_setting == "psine2";}{~n_value1 = ~ngm1;  ~n_value2 = ~ngm2;  ~n_value6 = ~ngm6;}
2465                                         {~ratio_setting == "psine3";}{~n_value1 = ~nngm1; ~n_value2 = ~nngm2; ~n_value6 = ~nngm6;}
2466                                         {~ratio_setting == "hsine1";}{~n_value1 = ~h1;    ~n_value2 = ~h2;    ~n_value6 = ~h6;}
2467                                         {~ratio_setting == "hsine2";}{~n_value1 = ~nh1;   ~n_value2 = ~nh2;   ~n_value6 = ~nh6;}
2468                                         {~ratio_setting == "hsine3";}{~n_value1 = ~nnh1;  ~n_value2 = ~nnh2;  ~n_value6 = ~nnh6;};
2469
2470
2471                                         //sendyreply values
2472
2473                                         case
2474                                         {~sendreplymenu.value ==  0}{~sendreplysynthdef_on = 0;}
2475                                         {~sendreplymenu.value ==  1}{~sendreplysynthdef_on = 1; ~sendreplyfunc_choose = 0; ~sendreply_gm_fth_func = ~sendreply_gm_fth_func_1}
2476                                         {~sendreplymenu.value ==  2}{~sendreplysynthdef_on = 1; ~sendreplyfunc_choose = 0; ~sendreply_gm_fth_func = ~sendreply_gm_fth_func_2}
2477                                         {~sendreplymenu.value ==  3}{~sendreplysynthdef_on = 1; ~sendreplyfunc_choose = 1; ~send_reply_random_func = ~send_reply_random_func_western; ~sendreplyfuncswitch = 1;}
2478                                         {~sendreplymenu.value ==  4}{~sendreplysynthdef_on = 1; ~sendreplyfunc_choose = 1; ~send_reply_random_func = ~send_reply_random_func_eastern; ~sendreplyfuncswitch = 2;};
2479
2480
2481                                         //evaluate synthdefs(gsine)
2482
2483                                         AppClock.sched(~gm,{
2484                                                 case
2485                                                 {~menu2.value == 0}{~gsinenum = 1; ~gsine.value;}
2486                                                 {~menu2.value == 1}{~gsinenum = 2; ~gsine.value;}
2487                                                 {~menu2.value == 2}{~gsinenum = 3; ~gsine.value;}
2488                                                 {~menu2.value == 3}{~gsinenum = 4; ~gsine.value;}
2489                                                 {~menu2.value == 4}{~gsinenum = 5; ~gsine.value;}
2490                                                 {~menu2.value == 5}{~gsinenum = 6; ~gsine.value;}
2491                                                 {~menu2.value == 6}{~gsinenum = 7; ~gsine.value;}
2492                                                 {~menu2.value == 7}{~gsinenum = 8; ~gsine.value;}
2493                                                 {~menu2.value == 8}{~gsinenum = 9; ~gsine.value;}
2494                                                 {~menu2.value == 9}{~gsinenum = 10; ~gsine.value;}
2495                                                 {~menu2.value == 10}{~gsinenum = 11; ~gsine.value;}
2496                                                 {~menu2.value == 11}{~gsinenum = 12; ~gsine.value;}
2497                                                 {~menu2.value == 12}{~gsinenum = 13; ~gsine.value;}
2498                                                 {~menu2.value == 13}{~gsinenum = 14; ~gsine.value;}
2499                                                 {~menu2.value == 14}{~gsinenum = 15; ~gsine.value;}
2500                                                 {~menu2.value == 15}{~gsinenum = 16; ~gsine.value;}
2501                                                 {~menu2.value == 16}{~gsinenum = 17; ~gsine.value;}
2502                                                 {~menu2.value == 17}{~gsinenum = 18; ~gsine.value;}
2503                                                 {~menu2.value == 18}{~gsinenum = 19; ~gsine.value;}
2504                                                 {~menu2.value == 19}{~gsinenum = 20; ~gsine.value;}
2505                                                 {~menu2.value == 20}{~gsinenum = 21; ~gsine.value;}
2506                                                 {~menu2.value == 21}{~gsinenum = 22; ~gsine.value;}
2507                                                 {~menu2.value == 22}{~gsinenum = 23; ~gsine.value;}
2508                                                 {~menu2.value == 23}{~gsinenum = 24; ~gsine.value;};
2509
2510                                                 ~st1.close;
2511                                                 ~st_load = StaticText(~settingsview, Rect(lefttime, top, 200, 20)).background_(Color.black);
2512                                                 ~st_load.stringColor = Color.white;
2513                                                 ~st_load.string = "loaded.";
2514                                                 AppClock.sched(~gm,{if(~st != nil, {~st.close}); ~st_load.close;});
2515                                         });
2516
2517
2518
2519                                 });
2520
2521                                 ~settingsview.background_(Color.black);
2522
2523                                 /*~closessettingsbutton = Button.new(~settingsview,Rect(lefttimebox+widthbox-40, top, 40, 40/~gm)).states_([["close",Color.white,Color.black]]).action_({arg button;
2524
2525                                 ~settingsview.close; ~settingsbutton.value = 0;
2526                                 });*/
2527
2528
2529                         }.value);
2530
2531                         ~settingsview.front;
2532                 }, {~settingsview.close});
2533         });
2534
2535
2536         //open/flow/slide buttons coordinate values
2537
2538         ~bph = 26;
2539         ~bpw = 26/1.6180339887499;
2540         ~bpl = Window.screenBounds.width-(~bph*8)-20;
2541         ~bpt = Window.screenBounds.height-88;
2542
2543         ~bp01l = ~bpl;
2544         ~bp02l = ~bpl+(~bph*1);
2545         ~bp03l = ~bpl+(~bph*2);
2546         ~bp04l = ~bpl+(~bph*3);
2547         ~bp05l = ~bpl+(~bph*4);
2548         ~bp06l = ~bpl+(~bph*5);
2549         ~bp07l = ~bpl+(~bph*6);
2550         ~bp08l = ~bpl+(~bph*7);
2551         ~bpf1l = ~bpl;
2552         ~bpf2l = ~bpl+(~bph*1);
2553         ~bpf3l = ~bpl+(~bph*2);
2554         ~bpf4l = ~bpl+(~bph*3);
2555         ~bpf5l = ~bpl+(~bph*4);
2556         ~bpf6l = ~bpl+(~bph*5);
2557         ~bpf7l = ~bpl+(~bph*6);
2558         ~bpf8l = ~bpl+(~bph*7);
2559
2560         ~bp01t = ~bpt;
2561         ~bp02t = ~bpt;
2562         ~bp03t = ~bpt;
2563         ~bp04t = ~bpt;
2564         ~bp05t = ~bpt;
2565         ~bp06t = ~bpt;
2566         ~bp07t = ~bpt;
2567         ~bp08t = ~bpt;
2568         ~bpf1t = ~bpt+~bpw;
2569         ~bpf2t = ~bpt+~bpw;
2570         ~bpf3t = ~bpt+~bpw;
2571         ~bpf4t = ~bpt+~bpw;
2572         ~bpf5t = ~bpt+~bpw;
2573         ~bpf6t = ~bpt+~bpw;
2574         ~bpf7t = ~bpt+~bpw;
2575         ~bpf8t = ~bpt+~bpw;
2576
2577         ~bp01h = ~bph;
2578         ~bp02h = ~bph;
2579         ~bp03h = ~bph;
2580         ~bp04h = ~bph;
2581         ~bp05h = ~bph;
2582         ~bp06h = ~bph;
2583         ~bp07h = ~bph;
2584         ~bp08h = ~bph;
2585         ~bpf1h = ~bph;
2586         ~bpf2h = ~bph;
2587         ~bpf3h = ~bph;
2588         ~bpf4h = ~bph;
2589         ~bpf5h = ~bph;
2590         ~bpf6h = ~bph;
2591         ~bpf7h = ~bph;
2592         ~bpf8h = ~bph;
2593
2594         ~bp01w = ~bpw;
2595         ~bp02w = ~bpw;
2596         ~bp03w = ~bpw;
2597         ~bp04w = ~bpw;
2598         ~bp05w = ~bpw;
2599         ~bp06w = ~bpw;
2600         ~bp07w = ~bpw;
2601         ~bp08w = ~bpw;
2602         ~bpf1w = ~bpw;
2603         ~bpf2w = ~bpw;
2604         ~bpf3w = ~bpw;
2605         ~bpf4w = ~bpw;
2606         ~bpf5w = ~bpw;
2607         ~bpf6w = ~bpw;
2608         ~bpf7w = ~bpw;
2609         ~bpf8w = ~bpw;
2610
2611         ~tspw=280+210;
2612         ~tsph=280+210/~gm;
2613         ~tspl=Window.screenBounds.width-~tspw;
2614         ~tspt=~bpt-310;
2615
2616
2617         //synthopen 1-8 buttons
2618
2619         ~bplaceo1 = Button.new(w,Rect(~bp01l,~bp01t,~bp01h,~bp01w)).states_([["o1",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
2620
2621                 [~f1=~fp1,~f2=~fp2,~f3=~fp3,~f4=~fp4,~f5=~fp5,~f6=~fp6,~f7=~fp7,~f8=~fp8,~f9=~fp9,~f10=~fp10,~f11=~fp11,~f12=~fp12];
2622
2623                 ~synthopen.value;
2624                 ~currentsynth = "o1"; ~synthmonitorfunc.value;
2625
2626                 if(~ts.value == 1,
2627                         {if(~tst == nil, {nil}, {~tst.close;});
2628                                 ~timevals.value;
2629                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time1o = 0;
2630                                 ~timer = Routine({inf.do({
2631                                         ~time1o =
2632                                         ~time1o+0.01; ~slot = "o1_"+~time1o.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
2633                         {nil});
2634         });
2635
2636         ~bplaceo2 = Button.new(w,Rect(~bp02l,~bp02t,~bp02h,~bp02w)).states_([["o2",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
2637
2638                 [~f1=~fp1b,~f2=~fp2b,~f3=~fp3b,~f4=~fp4b,~f5=~fp5b,~f6=~fp6b,~f7=~fp7b,~f8=~fp8b,~f9=~fp9b,~f10=~fp10b,~f11=~fp11b,~f12=~fp12b];
2639
2640                 ~synthopen.value;
2641                 ~currentsynth = "o2"; ~synthmonitorfunc.value;
2642
2643                 if(~ts.value == 1,
2644                         {if(~tst == nil, {nil}, {~tst.close;});
2645                                 ~timevals.value;
2646                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time2o = 0;
2647                                 ~timer = Routine({inf.do({
2648                                         ~time2o =
2649                                         ~time2o+0.01; ~slot = "o2_"+~time2o.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
2650                         {nil});
2651         });
2652         ~bplaceo3 = Button.new(w,Rect(~bp03l,~bp03t,~bp03h,~bp03w)).states_([["o3",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
2653
2654                 [~f1=~fp1c,~f2=~fp2c,~f3=~fp3c,~f4=~fp4c,~f5=~fp5c,~f6=~fp6c,~f7=~fp7c,~f8=~fp8c,~f9=~fp9c,~f10=~fp10c,~f11=~fp11c,~f12=~fp12c];
2655
2656                 ~synthopen.value;
2657                 ~currentsynth = "o3"; ~synthmonitorfunc.value;
2658
2659                 if(~ts.value == 1,
2660                         {if(~tst == nil, {nil}, {~tst.close;});
2661                                 ~timevals.value;
2662                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time3o = 0;
2663                                 ~timer = Routine({inf.do({
2664                                         ~time3o =
2665                                         ~time3o+0.01; ~slot = "o3_"+~time3o.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
2666                         {nil});
2667         });
2668         ~bplaceo4 = Button.new(w,Rect(~bp04l,~bp04t,~bp04h,~bp04w)).states_([["o4",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
2669
2670                 [~f1=~fp1d,~f2=~fp2d,~f3=~fp3d,~f4=~fp4d,~f5=~fp5d,~f6=~fp6d,~f7=~fp7d,~f8=~fp8d,~f9=~fp9d,~f10=~fp10d,~f11=~fp11d,~f12=~fp12d];
2671
2672                 ~synthopen.value;
2673                 ~currentsynth = "o4"; ~synthmonitorfunc.value;
2674
2675                 if(~ts.value == 1,
2676                         {if(~tst == nil, {nil}, {~tst.close;});
2677                                 ~timevals.value;
2678                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time4o = 0;
2679                                 ~timer = Routine({inf.do({
2680                                         ~time4o =
2681                                         ~time4o+0.01; ~slot = "o4_"+~time4o.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
2682                         {nil});
2683
2684         });
2685
2686         ~bplaceo5 = Button.new(w,Rect(~bp05l,~bp05t,~bp05h,~bp05w)).states_([["o5",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
2687
2688                 [~f1=~fp1e,~f2=~fp2e,~f3=~fp3e,~f4=~fp4e,~f5=~fp5e,~f6=~fp6e,~f7=~fp7e,~f8=~fp8e,~f9=~fp9e,~f10=~fp10e,~f11=~fp11e,~f12=~fp12e];
2689
2690                 ~synthopen.value;
2691                 ~currentsynth = "o5"; ~synthmonitorfunc.value;
2692
2693                 if(~ts.value == 1,
2694                         {if(~tst == nil, {nil}, {~tst.close;});
2695                                 ~timevals.value;
2696                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time5o = 0;
2697                                 ~timer = Routine({inf.do({
2698                                         ~time5o =
2699                                         ~time5o+0.01; ~slot = "o5_"+~time5o.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
2700                         {nil});
2701
2702         });
2703         ~bplaceo6 = Button.new(w,Rect(~bp06l,~bp06t,~bp06h,~bp06w)).states_([["o6",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
2704
2705                 [~f1=~fp1f,~f2=~fp2f,~f3=~fp3f,~f4=~fp4f,~f5=~fp5f,~f6=~fp6f,~f7=~fp7f,~f8=~fp8f,~f9=~fp9f,~f10=~fp10f,~f11=~fp11f,~f12=~fp12f];
2706
2707                 ~synthopen.value;
2708                 ~currentsynth = "o6"; ~synthmonitorfunc.value;
2709
2710                 if(~ts.value == 1,
2711                         {if(~tst == nil, {nil}, {~tst.close;});
2712                                 ~timevals.value;
2713                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time6o = 0;
2714                                 ~timer = Routine({inf.do({
2715                                         ~time6o =
2716                                         ~time6o+0.01; ~slot = "o6_"+~time6o.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
2717                         {nil});
2718         });
2719         ~bplaceo7 = Button.new(w,Rect(~bp07l,~bp07t,~bp07h,~bp07w)).states_([["o7",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
2720
2721                 [~f1=~fp1g,~f2=~fp2g,~f3=~fp3g,~f4=~fp4g,~f5=~fp5g,~f6=~fp6g,~f7=~fp7g,~f8=~fp8g,~f9=~fp9g,~f10=~fp10g,~f11=~fp11g,~f12=~fp12g];
2722
2723                 ~synthopen.value;
2724                 ~currentsynth = "o7"; ~synthmonitorfunc.value;
2725
2726                 if(~ts.value == 1,
2727                         {if(~tst == nil, {nil}, {~tst.close;});
2728                                 ~timevals.value;
2729                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time7o = 0;
2730                                 ~timer = Routine({inf.do({
2731                                         ~time7o =
2732                                         ~time7o+0.01; ~slot = "o7_"+~time7o.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
2733                         {nil});
2734         });
2735         ~bplaceo8 = Button.new(w,Rect(~bp08l,~bp08t,~bp08h,~bp08w)).states_([["o8",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
2736
2737                 [~f1=~fp1h,~f2=~fp2h,~f3=~fp3h,~f4=~fp4h,~f5=~fp5h,~f6=~fp6h,~f7=~fp7h,~f8=~fp8h,~f9=~fp9h,~f10=~fp10h,~f11=~fp11h,~f12=~fp12h];
2738
2739                 ~synthopen.value;
2740                 ~currentsynth = "o8"; ~synthmonitorfunc.value;
2741
2742                 if(~ts.value == 1,
2743                         {if(~tst == nil, {nil}, {~tst.close;});
2744                                 ~timevals.value;
2745                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time8o = 0;
2746                                 ~timer = Routine({inf.do({
2747                                         ~time8o =
2748                                         ~time8o+0.01; ~slot = "o8_"+~time8o.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
2749                         {nil});
2750         });
2751
2752
2753         //synthflow 1-8 buttons
2754
2755         ~bplacef1 = Button.new(w,Rect(~bpf1l,~bpf1t,~bpf1h,~bpf1w)).states_([["f1",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
2756
2757                 [~f1=~fp1,~f2=~fp2,~f3=~fp3,~f4=~fp4,~f5=~fp5,~f6=~fp6,~f7=~fp7,~f8=~fp8,~f9=~fp9,~f10=~fp10,~f11=~fp11,~f12=~fp12];
2758
2759                 ~synthflow.value;
2760                 ~currentsynth = "f1"; ~synthmonitorfunc.value;
2761
2762                 if(~ts.value == 1,
2763                         {if(~tst == nil, {nil}, {~tst.close;});
2764                                 ~timevals.value;
2765                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time1f = 0;
2766                                 ~timer = Routine({inf.do({
2767                                         ~time1f =
2768                                         ~time1f+0.01; ~slot = "f1_"+~time1f.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
2769                         {nil});
2770         });
2771         ~bplacef2 = Button.new(w,Rect(~bpf2l,~bpf2t,~bpf2h,~bpf2w)).states_([["f2",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
2772
2773                 [~f1=~fp1b,~f2=~fp2b,~f3=~fp3b,~f4=~fp4b,~f5=~fp5b,~f6=~fp6b,~f7=~fp7b,~f8=~fp8b,~f9=~fp9b,~f10=~fp10b,~f11=~fp11b,~f12=~fp12b];
2774
2775                 ~synthflow.value;
2776                 ~currentsynth = "f2"; ~synthmonitorfunc.value;
2777
2778                 if(~ts.value == 1,
2779                         {if(~tst == nil, {nil}, {~tst.close;});
2780                                 ~timevals.value;
2781                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time2f = 0;
2782                                 ~timer = Routine({inf.do({
2783                                         ~time2f =
2784                                         ~time2f+0.01; ~slot = "f2_"+~time2f.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
2785                         {nil});
2786         });
2787
2788         ~bplacef3 = Button.new(w,Rect(~bpf3l,~bpf3t,~bpf3h,~bpf3w)).states_([["f3",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
2789
2790                 [~f1=~fp1c,~f2=~fp2c,~f3=~fp3c,~f4=~fp4c,~f5=~fp5c,~f6=~fp6c,~f7=~fp7c,~f8=~fp8c,~f9=~fp9c,~f10=~fp10c,~f11=~fp11c,~f12=~fp12c];
2791
2792                 ~synthflow.value;
2793                 ~currentsynth = "f3"; ~synthmonitorfunc.value;
2794
2795                 if(~ts.value == 1,
2796                         {if(~tst == nil, {nil}, {~tst.close;});
2797                                 ~timevals.value;
2798                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time3f = 0;
2799                                 ~timer = Routine({inf.do({
2800                                         ~time3f =
2801                                         ~time3f+0.01; ~slot = "f3_"+~time3f.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
2802                         {nil});
2803         });
2804         ~bplacef4 = Button.new(w,Rect(~bpf4l,~bpf4t,~bpf4h,~bpf4w)).states_([["f4",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
2805
2806                 [~f1=~fp1d,~f2=~fp2d,~f3=~fp3d,~f4=~fp4d,~f5=~fp5d,~f6=~fp6d,~f7=~fp7d,~f8=~fp8d,~f9=~fp9d,~f10=~fp10d,~f11=~fp11d,~f12=~fp12d];
2807
2808                 ~synthflow.value;
2809                 ~currentsynth = "f4"; ~synthmonitorfunc.value;
2810
2811                 if(~ts.value == 1,
2812                         {if(~tst == nil, {nil}, {~tst.close;});
2813                                 ~timevals.value;
2814                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time4f = 0;
2815                                 ~timer = Routine({inf.do({
2816                                         ~time4f =
2817                                         ~time4f+0.01; ~slot = "f4_"+~time4f.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
2818                         {nil});
2819         });
2820
2821         ~bplacef5 = Button.new(w,Rect(~bpf5l,~bpf5t,~bpf5h,~bpf5w)).states_([["f5",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
2822
2823                 [~f1=~fp1e,~f2=~fp2e,~f3=~fp3e,~f4=~fp4e,~f5=~fp5e,~f6=~fp6e,~f7=~fp7e,~f8=~fp8e,~f9=~fp9e,~f10=~fp10e,~f11=~fp11e,~f12=~fp12e];
2824
2825                 ~synthflow.value;
2826                 ~currentsynth = "f5"; ~synthmonitorfunc.value;
2827
2828                 if(~ts.value == 1,
2829                         {if(~tst == nil, {nil}, {~tst.close;});
2830                                 ~timevals.value;
2831                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time5f = 0;
2832                                 ~timer = Routine({inf.do({
2833                                         ~time5f =
2834                                         ~time5f+0.01; ~slot = "f5_"+~time5f.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
2835                         {nil});
2836         });
2837
2838         ~bplacef6 = Button.new(w,Rect(~bpf6l,~bpf6t,~bpf6h,~bpf6w)).states_([["f6",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
2839
2840                 [~f1=~fp1f,~f2=~fp2f,~f3=~fp3f,~f4=~fp4f,~f5=~fp5f,~f6=~fp6f,~f7=~fp7f,~f8=~fp8f,~f9=~fp9f,~f10=~fp10f,~f11=~fp11f,~f12=~fp12f];
2841
2842                 ~synthflow.value;
2843                 ~currentsynth = "f6"; ~synthmonitorfunc.value;
2844
2845                 if(~ts.value == 1,
2846                         {if(~tst == nil, {nil}, {~tst.close;});
2847                                 ~timevals.value;
2848                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time6f = 0;
2849                                 ~timer = Routine({inf.do({
2850                                         ~time6f =
2851                                         ~time6f+0.01; ~slot = "f6_"+~time6f.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
2852                         {nil});
2853         });
2854
2855
2856         ~bplacef7 = Button.new(w,Rect(~bpf7l,~bpf7t,~bpf7h,~bpf7w)).states_([["f7",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
2857
2858                 [~f1=~fp1g,~f2=~fp2g,~f3=~fp3g,~f4=~fp4g,~f5=~fp5g,~f6=~fp6g,~f7=~fp7g,~f8=~fp8g,~f9=~fp9g,~f10=~fp10g,~f11=~fp11g,~f12=~fp12g];
2859
2860                 ~synthflow.value;
2861                 ~currentsynth = "f7"; ~synthmonitorfunc.value;
2862
2863                 if(~ts.value == 1,
2864                         {if(~tst == nil, {nil}, {~tst.close;});
2865                                 ~timevals.value;
2866                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time7f = 0;
2867                                 ~timer = Routine({inf.do({
2868                                         ~time7f =
2869                                         ~time7f+0.01; ~slot = "f7_"+~time7f.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
2870                         {nil});
2871         });
2872         ~bplacef8 = Button.new(w,Rect(~bpf8l,~bpf8t,~bpf8h,~bpf8w)).states_([["f8",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
2873
2874                 [~f1=~fp1h,~f2=~fp2h,~f3=~fp3h,~f4=~fp4h,~f5=~fp5h,~f6=~fp6h,~f7=~fp7h,~f8=~fp8h,~f9=~fp9h,~f10=~fp10h,~f11=~fp11h,~f12=~fp12h];
2875
2876                 ~synthflow.value;
2877                 ~currentsynth = "f8"; ~synthmonitorfunc.value;
2878
2879                 if(~ts.value == 1,
2880                         {if(~tst == nil, {nil}, {~tst.close;});
2881                                 ~timevals.value;
2882                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time8f = 0;
2883                                 ~timer = Routine({inf.do({
2884                                         ~time8f =
2885                                         ~time8f+0.01; ~slot = "f8_"+~time8f.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
2886                         {nil});
2887         });
2888
2889
2890         //synthslide 1-8 buttons
2891
2892         ~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;
2893
2894                 if(~slidetime1 == nil, {~slidetime1 = 4}); if(~slidedo1 == nil, {~slidedo1 = 2000;}); ~slidecount = ~slidedo1;
2895                 #g,h,i,j,k,l,m,n,o,p,q,r = (([ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ]-
2896                         [ ~fp1,~fp2,~fp3,~fp4,~fp5,~fp6,~fp7,~fp8,~fp9,~fp10,~fp11,~fp12 ])*(-1)/~slidedo1);
2897
2898                 ~slidetime =~slidetime1; ~slidedo = ~slidedo1;
2899
2900                 ~slideroutine.stop;
2901
2902                 ~synthslide.value;
2903                 ~currentsynth = "s1"; ~synthmonitorfunc.value;
2904
2905                 if(~ts.value == 1,
2906                         {if(~tst == nil, {nil}, {~tst.close;});
2907                                 ~timevals.value;
2908                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time1s = 0;
2909                                 ~timer = Routine({inf.do({
2910                                         ~time1s =
2911                                         ~time1s+0.01; ~slot = "s1_"+~time1s.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
2912                         {nil});
2913
2914         });
2915         ~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;
2916
2917                 if(~slidetime2 == nil, {~slidetime2 = 4}); if(~slidedo2 == nil, {~slidedo2 = 2000;}); ~slidecount = ~slidedo2;
2918                 #g,h,i,j,k,l,m,n,o,p,q,r = (([ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ]-
2919                         [ ~fp1b,~fp2b,~fp3b,~fp4b,~fp5b,~fp6b,~fp7b,~fp8b,~fp9b,~fp10b,~fp11b,~fp12b ])*(-1)/~slidedo2);
2920
2921                 ~slidetime = ~slidetime2; ~slidedo = ~slidedo2;
2922
2923                 ~slideroutine.stop;
2924
2925                 ~synthslide.value;
2926                 ~currentsynth = "s2"; ~synthmonitorfunc.value;
2927
2928                 if(~ts.value == 1,
2929                         {if(~tst == nil, {nil}, {~tst.close;});
2930                                 ~timevals.value;
2931                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time2s = 0;
2932                                 ~timer = Routine({inf.do({
2933                                         ~time2s =
2934                                         ~time2s+0.01; ~slot = "s2_"+~time2s.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
2935                         {nil});
2936
2937         });
2938         ~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;
2939
2940                 if(~slidetime3 == nil, {~slidetime3 = 4}); if(~slidedo3 == nil, {~slidedo3 = 2000;}); ~slidecount = ~slidedo3;
2941                 #g,h,i,j,k,l,m,n,o,p,q,r = (([ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ]-
2942                         [ ~fp1c,~fp2c,~fp3c,~fp4c,~fp5c,~fp6c,~fp7c,~fp8c,~fp9c,~fp10c,~fp11c,~fp12c ])*(-1)/~slidedo3);
2943
2944                 ~slidetime = ~slidetime3; ~slidedo = ~slidedo3;
2945
2946                 ~slideroutine.stop;
2947
2948                 ~synthslide.value;
2949                 ~currentsynth = "s3"; ~synthmonitorfunc.value;
2950
2951                 if(~ts.value == 1,
2952                         {if(~tst == nil, {nil}, {~tst.close;});
2953                                 ~timevals.value;
2954                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time3s = 0;
2955                                 ~timer = Routine({inf.do({
2956                                         ~time3s =
2957                                         ~time3s+0.01; ~slot = "s3_"+~time3s.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
2958                         {nil});
2959
2960         });
2961         ~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;
2962
2963                 if(~slidetime4 == nil, {~slidetime4 = 4}); if(~slidedo4 == nil, {~slidedo4 = 2000;}); ~slidecount = ~slidedo4;
2964                 #g,h,i,j,k,l,m,n,o,p,q,r = (([ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ]-
2965                         [ ~fp1d,~fp2d,~fp3d,~fp4d,~fp5d,~fp6d,~fp7d,~fp8d,~fp9d,~fp10d,~fp11d,~fp12d ])*(-1)/~slidedo4);
2966
2967                 ~slidetime = ~slidetime4; ~slidedo = ~slidedo4;
2968
2969                 ~slideroutine.stop;
2970
2971                 ~synthslide.value;
2972                 ~currentsynth = "s4"; ~synthmonitorfunc.value;
2973
2974                 if(~ts.value == 1,
2975                         {if(~tst == nil, {nil}, {~tst.close;});
2976                                 ~timevals.value;
2977                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time4s = 0;
2978                                 ~timer = Routine({inf.do({
2979                                         ~time4s =
2980                                         ~time4s+0.01; ~slot = "s4_"+~time4s.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
2981                         {nil});
2982         });
2983         ~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;
2984
2985                 if(~slidetime5 == nil, {~slidetime5 = 4}); if(~slidedo5 == nil, {~slidedo5 = 2000;}); ~slidecount = ~slidedo5;
2986                 #g,h,i,j,k,l,m,n,o,p,q,r = (([ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ]-
2987                         [ ~fp1e,~fp2e,~fp3e,~fp4e,~fp5e,~fp6e,~fp7e,~fp8e,~fp9e,~fp10e,~fp11e,~fp12e ])*(-1)/~slidedo5);
2988
2989                 ~slidetime = ~slidetime5; ~slidedo = ~slidedo5;
2990
2991                 ~slideroutine.stop;
2992
2993                 ~synthslide.value;
2994                 ~currentsynth = "s5"; ~synthmonitorfunc.value;
2995
2996                 if(~ts.value == 1,
2997                         {if(~tst == nil, {nil}, {~tst.close;});
2998                                 ~timevals.value;
2999                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time5s = 0;
3000                                 ~timer = Routine({inf.do({
3001                                         ~time5s =
3002                                         ~time5s+0.01; ~slot = "s5_"+~time5s.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
3003                         {nil});
3004
3005         });
3006         ~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;
3007
3008                 if(~slidetime6 == nil, {~slidetime6 = 4}); if(~slidedo6 == nil, {~slidedo6 = 2000;}); ~slidecount = ~slidedo6;
3009                 #g,h,i,j,k,l,m,n,o,p,q,r = (([ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ]-
3010                         [ ~fp1f,~fp2f,~fp3f,~fp4f,~fp5f,~fp6f,~fp7f,~fp8f,~fp9f,~fp10f,~fp11f,~fp12f ])*(-1)/~slidedo6);
3011
3012                 ~slidetime = ~slidetime6; ~slidedo = ~slidedo6;
3013                 ~slideroutine.stop;
3014
3015                 ~synthslide.value;
3016                 ~currentsynth = "s6"; ~synthmonitorfunc.value;
3017
3018                 if(~ts.value == 1,
3019                         {if(~tst == nil, {nil}, {~tst.close;});
3020                                 ~timevals.value;
3021                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time6s = 0;
3022                                 ~timer = Routine({inf.do({
3023                                         ~time6s =
3024                                         ~time6s+0.01; ~slot = "s6_"+~time6s.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
3025                         {nil});
3026
3027         });
3028         ~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;
3029
3030                 if(~slidetime7 == nil, {~slidetime7 = 4}); if(~slidedo7 == nil, {~slidedo7 = 2000;}); ~slidecount = ~slidedo7;
3031                 #g,h,i,j,k,l,m,n,o,p,q,r = (([ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ]-
3032                         [ ~fp1g,~fp2g,~fp3g,~fp4g,~fp5g,~fp6g,~fp7g,~fp8g,~fp9g,~fp10g,~fp11g,~fp12g ])*(-1)/~slidedo7);
3033
3034                 ~slidetime = ~slidetime7; ~slidedo = ~slidedo7;
3035                 ~slideroutine.stop;
3036
3037                 ~synthslide.value;
3038                 ~currentsynth = "s7"; ~synthmonitorfunc.value;
3039
3040                 if(~ts.value == 1,
3041                         {if(~tst == nil, {nil}, {~tst.close;});
3042                                 ~timevals.value;
3043                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time7s = 0;
3044                                 ~timer = Routine({inf.do({
3045                                         ~time7s =
3046                                         ~time7s+0.01; ~slot = "s7_"+~time7s.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
3047                         {nil});
3048
3049         });
3050         ~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;
3051
3052                 if(~slidetime8 == nil, {~slidetime8 = 4}); if(~slidedo8 == nil, {~slidedo8 = 2000;}); ~slidecount = ~slidedo8;
3053                 #g,h,i,j,k,l,m,n,o,p,q,r = (([ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ]-
3054                         [ ~fp1h,~fp2h,~fp3h,~fp4h,~fp5h,~fp6h,~fp7h,~fp8h,~fp9h,~fp10h,~fp11h,~fp12h ])*(-1)/~slidedo8);
3055
3056                 ~slidetime = ~slidetime8; ~slidedo = ~slidedo8;
3057
3058                 ~slideroutine.stop;
3059
3060                 ~synthslide.value;
3061                 ~currentsynth = "s8"; ~synthmonitorfunc.value;
3062
3063                 if(~ts.value == 1,
3064                         {if(~tst == nil, {nil}, {~tst.close;});
3065                                 ~timevals.value;
3066                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time8s = 0;
3067                                 ~timer = Routine({inf.do({
3068                                         ~time8s =
3069                                         ~time8s+0.01; ~slot = "s8_"+~time8s.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
3070                         {nil});
3071         });
3072
3073
3074         //if slidetime/slidedo is nil
3075
3076         if(~slidetimeall == nil, {~slidetimeall = 1});
3077         if(~slidetime1 == nil, {~slidetime1 = 1});
3078         if(~slidetime2 == nil, {~slidetime2 = 1});
3079         if(~slidetime3 == nil, {~slidetime3 = 1});
3080         if(~slidetime4 == nil, {~slidetime4 = 1});
3081         if(~slidetime5 == nil, {~slidetime5 = 1});
3082         if(~slidetime6 == nil, {~slidetime6 = 1});
3083         if(~slidetime7 == nil, {~slidetime7 = 1});
3084         if(~slidetime8 == nil, {~slidetime8 = 1});
3085
3086         if(~slidedoall == nil, {~slidedoall = 432});
3087         if(~slidedo1 == nil, {~slidedo1 = 432});
3088         if(~slidedo2 == nil, {~slidedo2 = 432});
3089         if(~slidedo3 == nil, {~slidedo3 = 432});
3090         if(~slidedo4 == nil, {~slidedo4 = 432});
3091         if(~slidedo5 == nil, {~slidedo5 = 432});
3092         if(~slidedo6 == nil, {~slidedo6 = 432});
3093         if(~slidedo7 == nil, {~slidedo7 = 432});
3094         if(~slidedo8 == nil, {~slidedo8 = 432});
3095
3096
3097         //frequency set function
3098
3099         ~freqset_textfield_func = {
3100                 ~freqsetvalue = ~freqsetvalue.asString;
3101                 ~freqsetvalue = ~freqsetvalue.separate;
3102                 ~freqsetvalue = ~freqsetvalue.reject{arg item;
3103                         (item != "1") and:
3104                         (item != "2") and:
3105                         (item != "3") and:
3106                         (item != "4") and:
3107                         (item != "5") and:
3108                         (item != "6") and:
3109                         (item != "7") and:
3110                         (item != "8") and:
3111                         (item != "9") and:
3112                         (item != "0") and:
3113                         (item != ".") and:
3114                         (item != "+") and:
3115                         (item != "-") and:
3116                         (item != "*") and:
3117                         (item != "/") and:
3118                         (item != "**") and:
3119                         (item != "%")
3120                 };
3121                 ~freqsetvalue = ~freqsetvalue.join.asString.interpret; ~freqsetvalue = ~freqsetvalue.asFloat;
3122         };
3123
3124
3125         //extra options button
3126
3127         ~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;
3128
3129                 if(button.value == 1, {
3130
3131                         ~extraoptionsview = View(w, Rect(Window.screenBounds.width-(540),Window.screenBounds.height-(340+46/1.6180339887499)-150,340+46,380+46/1.6180339887499)).front;
3132                         ~extraoptionsview.background_(Color.black);
3133
3134                         //set slide values button
3135
3136                         ~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;
3137
3138                                 if(button.value == 1, {
3139                                         ({
3140                                                 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;
3141                                                 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;
3142                                                 ~slideview = View(w, Rect(Window.screenBounds.width-(340+46),Window.screenBounds.height-(340+46/1.6180339887499)-150,340+46,380+46/1.6180339887499)).front;
3143                                                 /*w.view.decorator=FlowLayout(w.view.bounds);
3144                                                 w.view.decorator.gap=2@2;*/
3145
3146                                                 tall = StaticText(~slideview, Rect(lefttime , top=top, width, height)).background_(Color.black).string_("all time").stringColor_(Color.white);
3147                                                 t1 = StaticText(~slideview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("s1 time").stringColor_(Color.white);
3148                                                 t2 = StaticText(~slideview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("s2 time").stringColor_(Color.white);
3149                                                 t3 = StaticText(~slideview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("s3 time").stringColor_(Color.white);
3150                                                 t4 = StaticText(~slideview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("s4 time").stringColor_(Color.white);
3151                                                 t5 = StaticText(~slideview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("s5 time").stringColor_(Color.white);
3152                                                 t6 = StaticText(~slideview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("s6 time").stringColor_(Color.white);
3153                                                 t7 = StaticText(~slideview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("s7 time").stringColor_(Color.white);
3154                                                 t8 = StaticText(~slideview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("s8 time").stringColor_(Color.white);
3155
3156                                                 top = 0;
3157
3158                                                 stall=NumberBox(~slideview, Rect(lefttimebox , top=top, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~slidetimeall).maxDecimals_(9);
3159                                                 st1=NumberBox(~slideview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~slidetime1).maxDecimals_(9);
3160                                                 st2=NumberBox(~slideview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~slidetime2).maxDecimals_(9);
3161                                                 st3=NumberBox(~slideview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~slidetime3).maxDecimals_(9);
3162                                                 st4=NumberBox(~slideview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~slidetime4).maxDecimals_(9);
3163                                                 st5=NumberBox(~slideview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~slidetime5).maxDecimals_(9);
3164                                                 st6=NumberBox(~slideview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~slidetime6).maxDecimals_(9);
3165                                                 st7=NumberBox(~slideview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~slidetime7).maxDecimals_(9);
3166                                                 st8=NumberBox(~slideview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~slidetime8).maxDecimals_(9);
3167
3168                                                 top = 0;
3169
3170                                                 iall = StaticText(~slideview, Rect(leftdo , top=top, width, height)).background_(Color.black).string_("all incr").stringColor_(Color.white);
3171                                                 i1 = StaticText(~slideview, Rect(leftdo , top=top+height, width, height)).background_(Color.black).string_("s1 incr").stringColor_(Color.white);
3172                                                 i2 = StaticText(~slideview, Rect(leftdo , top=top+height, width, height)).background_(Color.black).string_("s2 incr").stringColor_(Color.white);
3173                                                 i3 = StaticText(~slideview, Rect(leftdo , top=top+height, width, height)).background_(Color.black).string_("s3 incr").stringColor_(Color.white);
3174                                                 i4 = StaticText(~slideview, Rect(leftdo , top=top+height, width, height)).background_(Color.black).string_("s4 incr").stringColor_(Color.white);
3175                                                 i5 = StaticText(~slideview, Rect(leftdo , top=top+height, width, height)).background_(Color.black).string_("s5 incr").stringColor_(Color.white);
3176                                                 i6 = StaticText(~slideview, Rect(leftdo , top=top+height, width, height)).background_(Color.black).string_("s6 incr").stringColor_(Color.white);
3177                                                 i7 = StaticText(~slideview, Rect(leftdo , top=top+height, width, height)).background_(Color.black).string_("s7 incr").stringColor_(Color.white);
3178                                                 i8 = StaticText(~slideview, Rect(leftdo , top=top+height, width, height)).background_(Color.black).string_("s8 incr").stringColor_(Color.white);
3179
3180                                                 top = 0;
3181
3182                                                 siall=NumberBox(~slideview, Rect(leftdobox , top=top, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~slidedoall);
3183                                                 si1=NumberBox(~slideview, Rect(leftdobox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~slidedo1);
3184                                                 si2=NumberBox(~slideview, Rect(leftdobox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~slidedo2);
3185                                                 si3=NumberBox(~slideview, Rect(leftdobox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~slidedo3);
3186                                                 si4=NumberBox(~slideview, Rect(leftdobox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~slidedo4);
3187                                                 si5=NumberBox(~slideview, Rect(leftdobox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~slidedo5);
3188                                                 si6=NumberBox(~slideview, Rect(leftdobox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~slidedo6);
3189                                                 si7=NumberBox(~slideview, Rect(leftdobox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~slidedo7);
3190                                                 si8=NumberBox(~slideview, Rect(leftdobox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~slidedo8);
3191
3192                                                 stall.action_({arg val;
3193                                                         ~slidetimeall = val.value;
3194                                                         ~slidetime1 = val.value;
3195                                                         ~slidetime2 = val.value;
3196                                                         ~slidetime3 = val.value;
3197                                                         ~slidetime4 = val.value;
3198                                                         ~slidetime5 = val.value;
3199                                                         ~slidetime6 = val.value;
3200                                                         ~slidetime7 = val.value;
3201                                                         ~slidetime8 = val.value;
3202                                                         ~slideview.close; ~slidevals.valueAction_(1);
3203                                                 });
3204                                                 st1.action_({arg val; ~slidetime1 = val.value;});
3205                                                 st2.action_({arg val; ~slidetime2 = val.value;});
3206                                                 st3.action_({arg val; ~slidetime3 = val.value;});
3207                                                 st4.action_({arg val; ~slidetime4 = val.value;});
3208                                                 st5.action_({arg val; ~slidetime5 = val.value;});
3209                                                 st6.action_({arg val; ~slidetime6 = val.value;});
3210                                                 st7.action_({arg val; ~slidetime7 = val.value;});
3211                                                 st8.action_({arg val; ~slidetime8 = val.value;});
3212
3213                                                 siall.action_({arg val;
3214                                                         ~slidedoall = val.value;
3215                                                         ~slidedo1 = val.value;
3216                                                         ~slidedo2 = val.value;
3217                                                         ~slidedo3 = val.value;
3218                                                         ~slidedo4 = val.value;
3219                                                         ~slidedo5 = val.value;
3220                                                         ~slidedo6 = val.value;
3221                                                         ~slidedo7 = val.value;
3222                                                         ~slidedo8 = val.value;
3223                                                         ~slideview.close; ~slidevals.valueAction_(1);
3224                                                 });
3225                                                 si1.action_({arg val; ~slidedo1 = val.value;});
3226                                                 si2.action_({arg val; ~slidedo2 = val.value;});
3227                                                 si3.action_({arg val; ~slidedo3 = val.value;});
3228                                                 si4.action_({arg val; ~slidedo4 = val.value;});
3229                                                 si5.action_({arg val; ~slidedo5 = val.value;});
3230                                                 si6.action_({arg val; ~slidedo6 = val.value;});
3231                                                 si7.action_({arg val; ~slidedo7 = val.value;});
3232                                                 si8.action_({arg val; ~slidedo8 = val.value;});
3233
3234                                                 ~slideview.background_(Color.black);
3235
3236                                                 ~closeslidebutton = Button.new(~slideview,Rect(leftdobox+widthbox-40, top+40, 40, 40/~gm)).states_([["close",Color.white,Color.black]]).action_({arg button;
3237
3238                                                         ~slideview.close; ~slidevals.value = 0;
3239                                                 });
3240
3241                                         }.value);
3242
3243                                         ~slideview.front;
3244                                 }, {~slideview.close;});
3245                         });
3246
3247
3248                         //set individual or all synth frequencies button
3249
3250                         ~beforefreqsetfreqs = [ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ];
3251
3252                         ~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;
3253
3254                                 if(button.value == 1, {
3255                                         ({
3256                                                 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;
3257                                                 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;
3258                                                 ~synthfreqsetview = View(w, Rect(Window.screenBounds.width-(340+46),Window.screenBounds.height-(340+46/1.6180339887499)-150,340+46,380+46/1.6180339887499)).front;
3259                                                 /*w.view.decorator=FlowLayout(w.view.bounds);
3260                                                 w.view.decorator.gap=2@2;*/
3261
3262                                                 t1 = StaticText(~synthfreqsetview, Rect(lefttime , top=top, width, height)).background_(Color.black).string_("freq 1 (f1)").stringColor_(Color.white);
3263                                                 t2 = StaticText(~synthfreqsetview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("freq 2 (f2)").stringColor_(Color.white);
3264                                                 t3 = StaticText(~synthfreqsetview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("freq 3 (f3)").stringColor_(Color.white);
3265                                                 t4 = StaticText(~synthfreqsetview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("freq 4 (f4)").stringColor_(Color.white);
3266                                                 t5 = StaticText(~synthfreqsetview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("freq 5 (f5)").stringColor_(Color.white);
3267                                                 t6 = StaticText(~synthfreqsetview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("freq 6 (f6)").stringColor_(Color.white);
3268                                                 t7 = StaticText(~synthfreqsetview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("freq 7 (f7)").stringColor_(Color.white);
3269                                                 t8 = StaticText(~synthfreqsetview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("freq 8 (f8)").stringColor_(Color.white);
3270                                                 t9 = StaticText(~synthfreqsetview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("freq 9 (f9)").stringColor_(Color.white);
3271                                                 t10 = StaticText(~synthfreqsetview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("freq 10 (f10)").stringColor_(Color.white);
3272                                                 t11 = StaticText(~synthfreqsetview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("freq 11 (f11)").stringColor_(Color.white);
3273                                                 t12 = StaticText(~synthfreqsetview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("freq 12 (f12)").stringColor_(Color.white);
3274                                                 tall = StaticText(~synthfreqsetview, Rect(lefttime , top=top+height+10, width, height)).background_(Color.black).string_("all freqs").stringColor_(Color.white);
3275
3276                                                 top = 0;
3277
3278                                                 st1=TextField(~synthfreqsetview, Rect(lefttimebox , top=top, widthbox, heightbox)).background_(Color.black).stringColor_(Color.white).value_(~f1);
3279                                                 st2=TextField(~synthfreqsetview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).stringColor_(Color.white).value_(~f2);
3280                                                 st3=TextField(~synthfreqsetview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).stringColor_(Color.white).value_(~f3);
3281                                                 st4=TextField(~synthfreqsetview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).stringColor_(Color.white).value_(~f4);
3282                                                 st5=TextField(~synthfreqsetview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).stringColor_(Color.white).value_(~f5);
3283                                                 st6=TextField(~synthfreqsetview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).stringColor_(Color.white).value_(~f6);
3284                                                 st7=TextField(~synthfreqsetview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).stringColor_(Color.white).value_(~f7);
3285                                                 st8=TextField(~synthfreqsetview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).stringColor_(Color.white).value_(~f8);
3286                                                 st9=TextField(~synthfreqsetview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).stringColor_(Color.white).value_(~f9);
3287                                                 st10=TextField(~synthfreqsetview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).stringColor_(Color.white).value_(~f10);
3288                                                 st11=TextField(~synthfreqsetview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).stringColor_(Color.white).value_(~f11);
3289                                                 st12=TextField(~synthfreqsetview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).stringColor_(Color.white).value_(~f12);
3290                                                 stall=TextField(~synthfreqsetview, Rect(lefttimebox , top=top+heightbox+10, widthbox, heightbox)).background_(Color.black).stringColor_(Color.white).value_(~f1);
3291
3292                                                 top = 0;
3293
3294                                                 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;});});
3295                                                 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;});});
3296                                                 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;});});
3297                                                 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;});});
3298                                                 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;});});
3299                                                 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;});});
3300                                                 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;});});
3301                                                 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;});});
3302                                                 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;});});
3303                                                 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;});});
3304                                                 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;});});
3305                                                 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;});});
3306                                                 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;});});
3307
3308
3309                                                 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;});
3310                                                 st1.action_({arg val; ~freqsetvalue = val.value; ~freqset_textfield_func.value; ~f1_revert = ~f1; ~f1 = ~freqsetvalue; ~synthflow.value; st1.string = ~freqsetvalue.asString;});
3311                                                 st2.action_({arg val; ~freqsetvalue = val.value; ~freqset_textfield_func.value; ~f2_revert = ~f2; ~f2 = ~freqsetvalue; ~synthflow.value; st2.string = ~freqsetvalue.asString;});
3312                                                 st3.action_({arg val; ~freqsetvalue = val.value; ~freqset_textfield_func.value; ~f3_revert = ~f3; ~f3 = ~freqsetvalue; ~synthflow.value; st3.string = ~freqsetvalue.asString;});
3313                                                 st4.action_({arg val; ~freqsetvalue = val.value; ~freqset_textfield_func.value; ~f4_revert = ~f4; ~f4 = ~freqsetvalue; ~synthflow.value; st4.string = ~freqsetvalue.asString;});
3314                                                 st5.action_({arg val; ~freqsetvalue = val.value; ~freqset_textfield_func.value; ~f5_revert = ~f5; ~f5 = ~freqsetvalue; ~synthflow.value; st5.string = ~freqsetvalue.asString;});
3315                                                 st6.action_({arg val; ~freqsetvalue = val.value; ~freqset_textfield_func.value; ~f6_revert = ~f6; ~f6 = ~freqsetvalue; ~synthflow.value; st6.string = ~freqsetvalue.asString;});
3316                                                 st7.action_({arg val; ~freqsetvalue = val.value; ~freqset_textfield_func.value; ~f7_revert = ~f7; ~f7 = ~freqsetvalue; ~synthflow.value; st7.string = ~freqsetvalue.asString;});
3317                                                 st8.action_({arg val; ~freqsetvalue = val.value; ~freqset_textfield_func.value; ~f8_revert = ~f8; ~f8 = ~freqsetvalue; ~synthflow.value; st8.string = ~freqsetvalue.asString;});
3318                                                 st9.action_({arg val; ~freqsetvalue = val.value; ~freqset_textfield_func.value; ~f9_revert = ~f9; ~f9 = ~freqsetvalue; ~synthflow.value; st9.string = ~freqsetvalue.asString;});
3319                                                 st10.action_({arg val; ~freqsetvalue = val.value; ~freqset_textfield_func.value; ~f10_revert = ~f10; ~f10 = ~freqsetvalue; ~synthflow.value; st10.string = ~freqsetvalue.asString;});
3320                                                 st11.action_({arg val; ~freqsetvalue = val.value; ~freqset_textfield_func.value; ~f11_revert = ~f11; ~f11 = ~freqsetvalue; ~synthflow.value; st11.string = ~freqsetvalue.asString;});
3321                                                 st12.action_({arg val; ~freqsetvalue = val.value; ~freqset_textfield_func.value; ~f12_revert = ~f12; ~f12 = ~freqsetvalue; ~synthflow.value; st12.string = ~freqsetvalue.asString;});
3322
3323
3324                                                 ~synthfreqsetview.background_(Color.black);
3325
3326                                                 ~closesfreqsetbutton = Button.new(~synthfreqsetview,Rect(leftdo+revertwidth-40, top=top+height+20, 40, 40/~gm)).states_([["close",Color.white,Color.black]]).action_({arg button;
3327
3328                                                         ~synthfreqsetview.close;
3329                                                 });
3330
3331                                                 ~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;
3332
3333                                                         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;
3334                                                 });
3335
3336
3337                                         }.value);
3338
3339                                         ~synthfreqsetview.front;
3340                                 }, {~synthfreqsetview.close});
3341                         });
3342
3343
3344                         Button.new(~extraoptionsview,Rect(0,80,120,20)).states_([["close eo",Color.white,Color.black],["close eo",Color.white,Color.black]]).action_({arg button;
3345
3346                                 ~extraoptionsview.close; if(~slideview != nil, {~slideview.close;}); if(~synthfreqsetview != nil, {~synthfreqsetview.close;}); ~extraoptions.value = 0;
3347
3348                         });
3349
3350                 }, {~extraoptionsview.close; if(~slideview != nil, {~slideview.close;}); if(~synthfreqsetview != nil, {~synthfreqsetview.close;});});
3351         });
3352
3353
3354         //mute/unmute 1-8 buttons
3355
3356         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;
3357                 case
3358                 {~l1a1.isRunning == true}{
3359                         if(button.value == 0, {
3360                                 (~vol1 = ~vol;
3361                                         1.do({
3362                                                 ~l1a1.set(\vol, ~vol1);  ~l1b1.set(\vol, ~vol1);
3363                                                 ~l1c1.set(\vol, ~vol1);  ~l1d1.set(\vol, ~vol1);
3364                                                 ~l1e1.set(\vol, ~vol1);  ~l1f1.set(\vol, ~vol1);
3365
3366                                 }););
3367                         }, {(~vol1 = 0;
3368                                 1.do({
3369                                         ~l1a1.set(\vol, ~vol1);  ~l1b1.set(\vol, ~vol1);
3370                                         ~l1c1.set(\vol, ~vol1);  ~l1d1.set(\vol, ~vol1);
3371                                         ~l1e1.set(\vol, ~vol1);  ~l1f1.set(\vol, ~vol1);
3372
3373                         }););
3374                         });
3375                 }
3376                 {~l1a.isRunning == true}{
3377                         if(button.value == 0, {
3378                                 (~vol1 = ~vol;
3379                                         1.do({
3380                                                 ~l1a.set(\vol, ~vol1);  ~l1b.set(\vol, ~vol1);
3381                                                 ~l1c.set(\vol, ~vol1);  ~l1d.set(\vol, ~vol1);
3382                                                 ~l1e.set(\vol, ~vol1);  ~l1f.set(\vol, ~vol1);
3383
3384                                 }););
3385                         }, {(~vol1 = 0;
3386                                 1.do({
3387                                         ~l1a.set(\vol, ~vol1);  ~l1b.set(\vol, ~vol1);
3388                                         ~l1c.set(\vol, ~vol1);  ~l1d.set(\vol, ~vol1);
3389                                         ~l1e.set(\vol, ~vol1);  ~l1f.set(\vol, ~vol1);
3390
3391                         }););
3392                         });
3393                 };
3394         });
3395
3396         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;
3397                 case
3398                 {~l1a1.isRunning == true}{
3399                         if(button.value == 0, {
3400                                 (~vol2 = ~vol;
3401                                         1.do({
3402                                                 ~l2a1.set(\vol, ~vol2);  ~l2b1.set(\vol, ~vol2);
3403                                                 ~l2c1.set(\vol, ~vol2);  ~l2d1.set(\vol, ~vol2);
3404                                                 ~l2e1.set(\vol, ~vol2);  ~l2f1.set(\vol, ~vol2);
3405
3406                                 }););
3407                         }, {(~vol2 = 0;
3408                                 1.do({
3409                                         ~l2a1.set(\vol, ~vol2);  ~l2b1.set(\vol, ~vol2);
3410                                         ~l2c1.set(\vol, ~vol2);  ~l2d1.set(\vol, ~vol2);
3411                                         ~l2e1.set(\vol, ~vol2);  ~l2f1.set(\vol, ~vol2);
3412
3413                         }););
3414                         });
3415                 }
3416                 {~l1a.isRunning == true}{
3417                         if(button.value == 0, {
3418                                 (~vol2 = ~vol;
3419                                         1.do({
3420                                                 ~l2a.set(\vol, ~vol2);  ~l2b.set(\vol, ~vol2);
3421                                                 ~l2c.set(\vol, ~vol2);  ~l2d.set(\vol, ~vol2);
3422                                                 ~l2e.set(\vol, ~vol2);  ~l2f.set(\vol, ~vol2);
3423
3424                                 }););
3425                         }, {(~vol2 = 0;
3426                                 1.do({
3427                                         ~l2a.set(\vol, ~vol2);  ~l2b.set(\vol, ~vol2);
3428                                         ~l2c.set(\vol, ~vol2);  ~l2d.set(\vol, ~vol2);
3429                                         ~l2e.set(\vol, ~vol2);  ~l2f.set(\vol, ~vol2);
3430
3431                         }););
3432                         });
3433                 };
3434         });
3435         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;
3436                 case
3437                 {~l1a1.isRunning == true}{
3438                         if(button.value == 0, {
3439                                 (~vol3 = ~vol;
3440                                         1.do({
3441                                                 ~l3a1.set(\vol, ~vol3);  ~l3b1.set(\vol, ~vol3);
3442                                                 ~l3c1.set(\vol, ~vol3);  ~l3d1.set(\vol, ~vol3);
3443                                                 ~l3e1.set(\vol, ~vol3);  ~l3f1.set(\vol, ~vol3);
3444
3445                                 }););
3446                         }, {(~vol3 = 0;
3447                                 1.do({
3448                                         ~l3a1.set(\vol, ~vol3);  ~l3b1.set(\vol, ~vol3);
3449                                         ~l3c1.set(\vol, ~vol3);  ~l3d1.set(\vol, ~vol3);
3450                                         ~l3e1.set(\vol, ~vol3);  ~l3f1.set(\vol, ~vol3);
3451
3452                         }););
3453                         });
3454                 }
3455                 {~l1a.isRunning == true}{
3456                         if(button.value == 0, {
3457                                 (~vol3 = ~vol;
3458                                         1.do({
3459                                                 ~l3a.set(\vol, ~vol3);  ~l3b.set(\vol, ~vol3);
3460                                                 ~l3c.set(\vol, ~vol3);  ~l3d.set(\vol, ~vol3);
3461                                                 ~l3e.set(\vol, ~vol3);  ~l3f.set(\vol, ~vol3);
3462
3463                                 }););
3464                         }, {(~vol3 = 0;
3465                                 1.do({
3466                                         ~l3a.set(\vol, ~vol3);  ~l3b.set(\vol, ~vol3);
3467                                         ~l3c.set(\vol, ~vol3);  ~l3d.set(\vol, ~vol3);
3468                                         ~l3e.set(\vol, ~vol3);  ~l3f.set(\vol, ~vol3);
3469
3470                         }););
3471                         });
3472                 };
3473         });
3474         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;
3475                 case
3476                 {~l1a1.isRunning == true}{
3477                         if(button.value == 0, {
3478                                 (~vol4 = ~vol;
3479                                         1.do({
3480                                                 ~l4a1.set(\vol, ~vol4);  ~l4b1.set(\vol, ~vol4);
3481                                                 ~l4c1.set(\vol, ~vol4);  ~l4d1.set(\vol, ~vol4);
3482                                                 ~l4e1.set(\vol, ~vol4);  ~l4f1.set(\vol, ~vol4);
3483
3484                                 }););
3485                         }, {(~vol4 = 0;
3486                                 1.do({
3487                                         ~l4a1.set(\vol, ~vol4);  ~l4b1.set(\vol, ~vol4);
3488                                         ~l4c1.set(\vol, ~vol4);  ~l4d1.set(\vol, ~vol4);
3489                                         ~l4e1.set(\vol, ~vol4);  ~l4f1.set(\vol, ~vol4);
3490
3491                         }););
3492                         });
3493                 }
3494                 {~l1a.isRunning == true}{
3495                         if(button.value == 0, {
3496                                 (~vol4 = ~vol;
3497                                         1.do({
3498                                                 ~l4a.set(\vol, ~vol4);  ~l4b.set(\vol, ~vol4);
3499                                                 ~l4c.set(\vol, ~vol4);  ~l4d.set(\vol, ~vol4);
3500                                                 ~l4e.set(\vol, ~vol4);  ~l4f.set(\vol, ~vol4);
3501
3502                                 }););
3503                         }, {(~vol4 = 0;
3504                                 1.do({
3505                                         ~l4a.set(\vol, ~vol4);  ~l4b.set(\vol, ~vol4);
3506                                         ~l4c.set(\vol, ~vol4);  ~l4d.set(\vol, ~vol4);
3507                                         ~l4e.set(\vol, ~vol4);  ~l4f.set(\vol, ~vol4);
3508
3509                         }););
3510                         });
3511                 };
3512         });
3513         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;
3514                 case
3515                 {~l1a1.isRunning == true}{
3516                         if(button.value == 0, {
3517                                 (~vol5 = ~vol;
3518                                         1.do({
3519                                                 ~l5a1.set(\vol, ~vol5);  ~l5b1.set(\vol, ~vol5);
3520                                                 ~l5c1.set(\vol, ~vol5);  ~l5d1.set(\vol, ~vol5);
3521                                                 ~l5e1.set(\vol, ~vol5);  ~l5f1.set(\vol, ~vol5);
3522
3523                                 }););
3524                         }, {(~vol5 = 0;
3525                                 1.do({
3526                                         ~l5a1.set(\vol, ~vol5);  ~l5b1.set(\vol, ~vol5);
3527                                         ~l5c1.set(\vol, ~vol5);  ~l5d1.set(\vol, ~vol5);
3528                                         ~l5e1.set(\vol, ~vol5);  ~l5f1.set(\vol, ~vol5);
3529
3530                         }););
3531                         });
3532                 }
3533                 {~l1a.isRunning == true}{
3534                         if(button.value == 0, {
3535                                 (~vol5 = ~vol;
3536                                         1.do({
3537                                                 ~l5a.set(\vol, ~vol5);  ~l5b.set(\vol, ~vol5);
3538                                                 ~l5c.set(\vol, ~vol5);  ~l5d.set(\vol, ~vol5);
3539                                                 ~l5e.set(\vol, ~vol5);  ~l5f.set(\vol, ~vol5);
3540
3541                                 }););
3542                         }, {(~vol5 = 0;
3543                                 1.do({
3544                                         ~l5a.set(\vol, ~vol5);  ~l5b.set(\vol, ~vol5);
3545                                         ~l5c.set(\vol, ~vol5);  ~l5d.set(\vol, ~vol5);
3546                                         ~l5e.set(\vol, ~vol5);  ~l5f.set(\vol, ~vol5);
3547
3548                         }););
3549                         });
3550                 };
3551         });
3552         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;
3553                 case
3554                 {~l1a1.isRunning == true}{
3555                         if(button.value == 0, {
3556                                 (~vol6 = ~vol;
3557                                         1.do({
3558                                                 ~l6a1.set(\vol, ~vol6);  ~l6b1.set(\vol, ~vol6);
3559                                                 ~l6c1.set(\vol, ~vol6);  ~l6d1.set(\vol, ~vol6);
3560                                                 ~l6e1.set(\vol, ~vol6);  ~l6f1.set(\vol, ~vol6);
3561
3562                                 }););
3563                         }, {(~vol6 = 0;
3564                                 1.do({
3565                                         ~l6a1.set(\vol, ~vol6);  ~l6b1.set(\vol, ~vol6);
3566                                         ~l6c1.set(\vol, ~vol6);  ~l6d1.set(\vol, ~vol6);
3567                                         ~l6e1.set(\vol, ~vol6);  ~l6f1.set(\vol, ~vol6);
3568
3569                         }););
3570                         });
3571                 }
3572                 {~l1a.isRunning == true}{
3573                         if(button.value == 0, {
3574                                 (~vol6 = ~vol;
3575                                         1.do({
3576                                                 ~l6a.set(\vol, ~vol6);  ~l6b.set(\vol, ~vol6);
3577                                                 ~l6c.set(\vol, ~vol6);  ~l6d.set(\vol, ~vol6);
3578                                                 ~l6e.set(\vol, ~vol6);  ~l6f.set(\vol, ~vol6);
3579
3580                                 }););
3581                         }, {(~vol6 = 0;
3582                                 1.do({
3583                                         ~l6a.set(\vol, ~vol6);  ~l6b.set(\vol, ~vol6);
3584                                         ~l6c.set(\vol, ~vol6);  ~l6d.set(\vol, ~vol6);
3585                                         ~l6e.set(\vol, ~vol6);  ~l6f.set(\vol, ~vol6);
3586
3587                         }););
3588                         });
3589                 };
3590
3591         });
3592         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;
3593                 case
3594                 {~l1a1.isRunning == true}{
3595                         if(button.value == 0, {
3596                                 (~vol7 = ~vol;
3597                                         1.do({
3598                                                 ~l7a1.set(\vol, ~vol7);  ~l7b1.set(\vol, ~vol7);
3599                                                 ~l7c1.set(\vol, ~vol7);  ~l7d1.set(\vol, ~vol7);
3600                                                 ~l7e1.set(\vol, ~vol7);  ~l7f1.set(\vol, ~vol7);
3601
3602                                 }););
3603                         }, {(~vol7 = 0;
3604                                 1.do({
3605                                         ~l7a1.set(\vol, ~vol7);  ~l7b1.set(\vol, ~vol7);
3606                                         ~l7c1.set(\vol, ~vol7);  ~l7d1.set(\vol, ~vol7);
3607                                         ~l7e1.set(\vol, ~vol7);  ~l7f1.set(\vol, ~vol7);
3608
3609                         }););
3610                         });
3611                 }
3612                 {~l1a.isRunning == true}{
3613                         if(button.value == 0, {
3614                                 (~vol7 = ~vol;
3615                                         1.do({
3616                                                 ~l7a.set(\vol, ~vol7);  ~l7b.set(\vol, ~vol7);
3617                                                 ~l7c.set(\vol, ~vol7);  ~l7d.set(\vol, ~vol7);
3618                                                 ~l7e.set(\vol, ~vol7);  ~l7f.set(\vol, ~vol7);
3619
3620                                 }););
3621                         }, {(~vol7 = 0;
3622                                 1.do({
3623                                         ~l7a.set(\vol, ~vol7);  ~l7b.set(\vol, ~vol7);
3624                                         ~l7c.set(\vol, ~vol7);  ~l7d.set(\vol, ~vol7);
3625                                         ~l7e.set(\vol, ~vol7);  ~l7f.set(\vol, ~vol7);
3626
3627                         }););
3628                         });
3629                 };
3630         });
3631         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;
3632                 case
3633                 {~l1a1.isRunning == true}{
3634                         if(button.value == 0, {
3635                                 (~vol8 = ~vol;
3636                                         1.do({
3637                                                 ~l8a1.set(\vol, ~vol8);  ~l8b1.set(\vol, ~vol8);
3638                                                 ~l8c1.set(\vol, ~vol8);  ~l8d1.set(\vol, ~vol8);
3639                                                 ~l8e1.set(\vol, ~vol8);  ~l8f1.set(\vol, ~vol8);
3640
3641                                 }););
3642                         }, {(~vol8 = 0;
3643                                 1.do({
3644                                         ~l8a1.set(\vol, ~vol8);  ~l8b1.set(\vol, ~vol8);
3645                                         ~l8c1.set(\vol, ~vol8);  ~l8d1.set(\vol, ~vol8);
3646                                         ~l8e1.set(\vol, ~vol8);  ~l8f1.set(\vol, ~vol8);
3647
3648                         }););
3649                         });
3650                 }
3651                 {~l1a.isRunning == true}{
3652                         if(button.value == 0, {
3653                                 (~vol8 = ~vol;
3654                                         1.do({
3655                                                 ~l8a.set(\vol, ~vol8);  ~l8b.set(\vol, ~vol8);
3656                                                 ~l8c.set(\vol, ~vol8);  ~l8d.set(\vol, ~vol8);
3657                                                 ~l8e.set(\vol, ~vol8);  ~l8f.set(\vol, ~vol8);
3658
3659                                 }););
3660                         }, {(~vol8 = 0;
3661                                 1.do({
3662                                         ~l8a.set(\vol, ~vol8);  ~l8b.set(\vol, ~vol8);
3663                                         ~l8c.set(\vol, ~vol8);  ~l8d.set(\vol, ~vol8);
3664                                         ~l8e.set(\vol, ~vol8);  ~l8f.set(\vol, ~vol8);
3665
3666                         }););
3667                         });
3668                 };
3669         });
3670         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;
3671                 case
3672                 {~l1a1.isRunning == true}{
3673                         if(button.value == 0, {
3674                                 (~vol9 = ~vol;
3675                                         1.do({
3676                                                 ~l9a1.set(\vol, ~vol9);  ~l9b1.set(\vol, ~vol9);
3677                                                 ~l9c1.set(\vol, ~vol9);  ~l9d1.set(\vol, ~vol9);
3678                                                 ~l9e1.set(\vol, ~vol9);  ~l9f1.set(\vol, ~vol9);
3679
3680                                 }););
3681                         }, {(~vol9 = 0;
3682                                 1.do({
3683                                         ~l9a1.set(\vol, ~vol9);  ~l9b1.set(\vol, ~vol9);
3684                                         ~l9c1.set(\vol, ~vol9);  ~l9d1.set(\vol, ~vol9);
3685                                         ~l9e1.set(\vol, ~vol9);  ~l9f1.set(\vol, ~vol9);
3686
3687                         }););
3688                         });
3689                 }
3690                 {~l1a.isRunning == true}{
3691                         if(button.value == 0, {
3692                                 (~vol9 = ~vol;
3693                                         1.do({
3694                                                 ~l9a.set(\vol, ~vol9);  ~l9b.set(\vol, ~vol9);
3695                                                 ~l9c.set(\vol, ~vol9);  ~l9d.set(\vol, ~vol9);
3696                                                 ~l9e.set(\vol, ~vol9);  ~l9f.set(\vol, ~vol9);
3697
3698                                 }););
3699                         }, {(~vol9 = 0;
3700                                 1.do({
3701                                         ~l9a.set(\vol, ~vol9);  ~l9b.set(\vol, ~vol9);
3702                                         ~l9c.set(\vol, ~vol9);  ~l9d.set(\vol, ~vol9);
3703                                         ~l9e.set(\vol, ~vol9);  ~l9f.set(\vol, ~vol9);
3704
3705                         }););
3706                         });
3707                 };
3708         });
3709         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;
3710                 case
3711                 {~l1a1.isRunning == true}{
3712                         if(button.value == 0, {
3713                                 (~vol10 = ~vol;
3714                                         1.do({
3715                                                 ~l10a1.set(\vol, ~vol10);  ~l10b1.set(\vol, ~vol10);
3716                                                 ~l10c1.set(\vol, ~vol10);  ~l10d1.set(\vol, ~vol10);
3717                                                 ~l10e1.set(\vol, ~vol10);  ~l10f1.set(\vol, ~vol10);
3718
3719                                 }););
3720                         }, {(~vol10 = 0;
3721                                 1.do({
3722                                         ~l10a1.set(\vol, ~vol10);  ~l10b1.set(\vol, ~vol10);
3723                                         ~l10c1.set(\vol, ~vol10);  ~l10d1.set(\vol, ~vol10);
3724                                         ~l10e1.set(\vol, ~vol10);  ~l10f1.set(\vol, ~vol10);
3725
3726                         }););
3727                         });
3728                 }
3729                 {~l1a.isRunning == true}{
3730                         if(button.value == 0, {
3731                                 (~vol10 = ~vol;
3732                                         1.do({
3733                                                 ~l10a.set(\vol, ~vol10);  ~l10b.set(\vol, ~vol10);
3734                                                 ~l10c.set(\vol, ~vol10);  ~l10d.set(\vol, ~vol10);
3735                                                 ~l10e.set(\vol, ~vol10);  ~l10f.set(\vol, ~vol10);
3736
3737                                 }););
3738                         }, {(~vol10 = 0;
3739                                 1.do({
3740                                         ~l10a.set(\vol, ~vol10);  ~l10b.set(\vol, ~vol10);
3741                                         ~l10c.set(\vol, ~vol10);  ~l10d.set(\vol, ~vol10);
3742                                         ~l10e.set(\vol, ~vol10);  ~l10f.set(\vol, ~vol10);
3743
3744                         }););
3745                         });
3746                 };
3747         });
3748         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;
3749                 case
3750                 {~l1a1.isRunning == true}{
3751                         if(button.value == 0, {
3752                                 (~vol11 = ~vol;
3753                                         1.do({
3754                                                 ~l11a1.set(\vol, ~vol11);  ~l11b1.set(\vol, ~vol11);
3755                                                 ~l11c1.set(\vol, ~vol11);  ~l11d1.set(\vol, ~vol11);
3756                                                 ~l11e1.set(\vol, ~vol11);  ~l11f1.set(\vol, ~vol11);
3757
3758                                 }););
3759                         }, {(~vol11 = 0;
3760                                 1.do({
3761                                         ~l11a1.set(\vol, ~vol11);  ~l8b1.set(\vol, ~vol11);
3762                                         ~l11c1.set(\vol, ~vol11);  ~l8d1.set(\vol, ~vol11);
3763                                         ~l11e1.set(\vol, ~vol11);  ~l8f1.set(\vol, ~vol11);
3764
3765                         }););
3766                         });
3767                 }
3768                 {~l1a.isRunning == true}{
3769                         if(button.value == 0, {
3770                                 (~vol11 = ~vol;
3771                                         1.do({
3772                                                 ~l11a.set(\vol, ~vol11);  ~l11b.set(\vol, ~vol11);
3773                                                 ~l11c.set(\vol, ~vol11);  ~l11d.set(\vol, ~vol11);
3774                                                 ~l11e.set(\vol, ~vol11);  ~l11f.set(\vol, ~vol11);
3775
3776                                 }););
3777                         }, {(~vol11 = 0;
3778                                 1.do({
3779                                         ~l11a.set(\vol, ~vol11);  ~l11b.set(\vol, ~vol11);
3780                                         ~l11c.set(\vol, ~vol11);  ~l11d.set(\vol, ~vol11);
3781                                         ~l11e.set(\vol, ~vol11);  ~l11f.set(\vol, ~vol11);
3782
3783                         }););
3784                         });
3785                 };
3786         });
3787         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;
3788                 case
3789                 {~l1a1.isRunning == true}{
3790                         if(button.value == 0, {
3791                                 (~vol12 = ~vol;
3792                                         1.do({
3793                                                 ~l12a1.set(\vol, ~vol12);  ~l12b1.set(\vol, ~vol12);
3794                                                 ~l12c1.set(\vol, ~vol12);  ~l12d1.set(\vol, ~vol12);
3795                                                 ~l12e1.set(\vol, ~vol12);  ~l12f1.set(\vol, ~vol12);
3796
3797                                 }););
3798                         }, {(~vol12 = 0;
3799                                 1.do({
3800                                         ~l12a1.set(\vol, ~vol12);  ~l12b1.set(\vol, ~vol12);
3801                                         ~l12c1.set(\vol, ~vol12);  ~l12d1.set(\vol, ~vol12);
3802                                         ~l12e1.set(\vol, ~vol12);  ~l12f1.set(\vol, ~vol12);
3803
3804                         }););
3805                         });
3806                 }
3807                 {~l1a.isRunning == true}{
3808                         if(button.value == 0, {
3809                                 (~vol12 = ~vol;
3810                                         1.do({
3811                                                 ~l12a.set(\vol, ~vol12);  ~l12b.set(\vol, ~vol12);
3812                                                 ~l12c.set(\vol, ~vol12);  ~l12d.set(\vol, ~vol12);
3813                                                 ~l12e.set(\vol, ~vol12);  ~l12f.set(\vol, ~vol12);
3814
3815                                 }););
3816                         }, {(~vol12 = 0;
3817                                 1.do({
3818                                         ~l12a.set(\vol, ~vol12);  ~l12b.set(\vol, ~vol12);
3819                                         ~l12c.set(\vol, ~vol12);  ~l12d.set(\vol, ~vol12);
3820                                         ~l12e.set(\vol, ~vol12);  ~l12f.set(\vol, ~vol12);
3821
3822                         }););
3823                         });
3824                 };
3825         });
3826
3827
3828         //mute/unmute all button
3829
3830         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;
3831
3832                 if(button.value == 0, {
3833                         mute1.value = 0;
3834                         mute2.value = 0;
3835                         mute3.value = 0;
3836                         mute4.value = 0;
3837                         mute5.value = 0;
3838                         mute6.value = 0;
3839                         mute7.value = 0;
3840                         mute8.value = 0;
3841                         mute9.value = 0;
3842                         mute10.value = 0;
3843                         mute11.value = 0;
3844                         mute12.value = 0;
3845
3846                         ~vol1 = ~vol;
3847                         ~vol2 = ~vol;
3848                         ~vol3 = ~vol;
3849                         ~vol4 = ~vol;
3850                         ~vol5 = ~vol;
3851                         ~vol6 = ~vol;
3852                         ~vol7 = ~vol;
3853                         ~vol8 = ~vol;
3854                         ~vol9 = ~vol;
3855                         ~vol10 = ~vol;
3856                         ~vol11 = ~vol;
3857                         ~vol12 = ~vol;
3858                 },
3859                 {
3860                         mute1.value = 1;
3861                         mute2.value = 1;
3862                         mute3.value = 1;
3863                         mute4.value = 1;
3864                         mute5.value = 1;
3865                         mute6.value = 1;
3866                         mute7.value = 1;
3867                         mute8.value = 1;
3868                         mute9.value = 1;
3869                         mute10.value = 1;
3870                         mute11.value = 1;
3871                         mute12.value = 1;
3872
3873                         ~vol1 = 0;
3874                         ~vol2 = 0;
3875                         ~vol3 = 0;
3876                         ~vol4 = 0;
3877                         ~vol5 = 0;
3878                         ~vol6 = 0;
3879                         ~vol7 = 0;
3880                         ~vol8 = 0;
3881                         ~vol9 = 0;
3882                         ~vol10 = 0;
3883                         ~vol11 = 0;
3884                         ~vol12 = 0;
3885                 });
3886                 ~synthflow.value;
3887         });
3888
3889
3890         //keyboard number buttons to choose synth
3891
3892         keycodeb = Button.new(w,Rect(Window.screenBounds.width-20-16,~bpt+160,16,16/1.6180339887499)).states_([
3893                 ["1",Color.white,Color.black],
3894                 ["2",Color.white,Color.black],
3895                 ["3",Color.white,Color.black],
3896                 ["4",Color.white,Color.black],
3897                 ["5",Color.white,Color.black],
3898                 ["6",Color.white,Color.black],
3899                 ["7",Color.white,Color.black],
3900                 ["8",Color.white,Color.black],
3901                 ["9",Color.white,Color.black],
3902                 ["10",Color.white,Color.black],
3903                 ["11",Color.white,Color.black],
3904                 ["12",Color.white,Color.black]]).action_({arg button;
3905
3906                 case
3907                 {button.value == 0}{
3908                         ~z25.background = Color.green; ~z1.background = Color.green;
3909                         ~z26.background = Color.white; ~z2.background = Color.white;
3910                         ~z27.background = Color.white; ~z3.background = Color.white;
3911                         ~z28.background = Color.white; ~z4.background = Color.white;
3912                         ~z29.background = Color.white; ~z5.background = Color.white;
3913                         ~z30.background = Color.white; ~z6.background = Color.white;
3914                         ~z31.background = Color.white; ~z7.background = Color.white;
3915                         ~z32.background = Color.white; ~z8.background = Color.white;
3916                         ~z33.background = Color.white; ~z9.background = Color.white;
3917                         ~z34.background = Color.white; ~z10.background = Color.white;
3918                         ~z35.background = Color.white; ~z11.background = Color.white;
3919                         ~z36.background = Color.white; ~z12.background = Color.white;
3920                 }
3921                 {button.value == 1}{
3922                         ~z25.background = Color.white; ~z1.background = Color.white;
3923                         ~z26.background = Color.green; ~z2.background = Color.green;
3924                         ~z27.background = Color.white; ~z3.background = Color.white;
3925                         ~z28.background = Color.white; ~z4.background = Color.white;
3926                         ~z29.background = Color.white; ~z5.background = Color.white;
3927                         ~z30.background = Color.white; ~z6.background = Color.white;
3928                         ~z31.background = Color.white; ~z7.background = Color.white;
3929                         ~z32.background = Color.white; ~z8.background = Color.white;
3930                         ~z33.background = Color.white; ~z9.background = Color.white;
3931                         ~z34.background = Color.white; ~z10.background = Color.white;
3932                         ~z35.background = Color.white; ~z11.background = Color.white;
3933                         ~z36.background = Color.white; ~z12.background = Color.white;
3934                 }
3935                 {button.value == 2}{
3936                         ~z25.background = Color.white; ~z1.background = Color.white;
3937                         ~z26.background = Color.white; ~z2.background = Color.white;
3938                         ~z27.background = Color.green; ~z3.background = Color.green;
3939                         ~z28.background = Color.white; ~z4.background = Color.white;
3940                         ~z29.background = Color.white; ~z5.background = Color.white;
3941                         ~z30.background = Color.white; ~z6.background = Color.white;
3942                         ~z31.background = Color.white; ~z7.background = Color.white;
3943                         ~z32.background = Color.white; ~z8.background = Color.white;
3944                         ~z33.background = Color.white; ~z9.background = Color.white;
3945                         ~z34.background = Color.white; ~z10.background = Color.white;
3946                         ~z35.background = Color.white; ~z11.background = Color.white;
3947                         ~z36.background = Color.white; ~z12.background = Color.white;
3948                 }
3949                 {button.value == 3}{
3950                         ~z25.background = Color.white; ~z1.background = Color.white;
3951                         ~z26.background = Color.white; ~z2.background = Color.white;
3952                         ~z27.background = Color.white; ~z3.background = Color.white;
3953                         ~z28.background = Color.green; ~z4.background = Color.green;
3954                         ~z29.background = Color.white; ~z5.background = Color.white;
3955                         ~z30.background = Color.white; ~z6.background = Color.white;
3956                         ~z31.background = Color.white; ~z7.background = Color.white;
3957                         ~z32.background = Color.white; ~z8.background = Color.white;
3958                         ~z33.background = Color.white; ~z9.background = Color.white;
3959                         ~z34.background = Color.white; ~z10.background = Color.white;
3960                         ~z35.background = Color.white; ~z11.background = Color.white;
3961                         ~z36.background = Color.white; ~z12.background = Color.white;
3962                 }
3963                 {button.value == 4}{
3964                         ~z25.background = Color.white; ~z1.background = Color.white;
3965                         ~z26.background = Color.white; ~z2.background = Color.white;
3966                         ~z27.background = Color.white; ~z3.background = Color.white;
3967                         ~z28.background = Color.white; ~z4.background = Color.white;
3968                         ~z29.background = Color.green; ~z5.background = Color.green;
3969                         ~z30.background = Color.white; ~z6.background = Color.white;
3970                         ~z31.background = Color.white; ~z7.background = Color.white;
3971                         ~z32.background = Color.white; ~z8.background = Color.white;
3972                         ~z33.background = Color.white; ~z9.background = Color.white;
3973                         ~z34.background = Color.white; ~z10.background = Color.white;
3974                         ~z35.background = Color.white; ~z11.background = Color.white;
3975                         ~z36.background = Color.white; ~z12.background = Color.white;
3976                 }
3977                 {button.value == 5}{
3978                         ~z25.background = Color.white; ~z1.background = Color.white;
3979                         ~z26.background = Color.white; ~z2.background = Color.white;
3980                         ~z27.background = Color.white; ~z3.background = Color.white;
3981                         ~z28.background = Color.white; ~z4.background = Color.white;
3982                         ~z29.background = Color.white; ~z5.background = Color.white;
3983                         ~z30.background = Color.green; ~z6.background = Color.green;
3984                         ~z31.background = Color.white; ~z7.background = Color.white;
3985                         ~z32.background = Color.white; ~z8.background = Color.white;
3986                         ~z33.background = Color.white; ~z9.background = Color.white;
3987                         ~z34.background = Color.white; ~z10.background = Color.white;
3988                         ~z35.background = Color.white; ~z11.background = Color.white;
3989                         ~z36.background = Color.white; ~z12.background = Color.white;
3990                 }
3991                 {button.value == 6}{
3992                         ~z25.background = Color.white; ~z1.background = Color.white;
3993                         ~z26.background = Color.white; ~z2.background = Color.white;
3994                         ~z27.background = Color.white; ~z3.background = Color.white;
3995                         ~z28.background = Color.white; ~z4.background = Color.white;
3996                         ~z29.background = Color.white; ~z5.background = Color.white;
3997                         ~z30.background = Color.white; ~z6.background = Color.white;
3998                         ~z31.background = Color.green; ~z7.background = Color.green;
3999                         ~z32.background = Color.white; ~z8.background = Color.white;
4000                         ~z33.background = Color.white; ~z9.background = Color.white;
4001                         ~z34.background = Color.white; ~z10.background = Color.white;
4002                         ~z35.background = Color.white; ~z11.background = Color.white;
4003                         ~z36.background = Color.white; ~z12.background = Color.white;
4004                 }
4005                 {button.value == 7}{
4006                         ~z25.background = Color.white; ~z1.background = Color.white;
4007                         ~z26.background = Color.white; ~z2.background = Color.white;
4008                         ~z27.background = Color.white; ~z3.background = Color.white;
4009                         ~z28.background = Color.white; ~z4.background = Color.white;
4010                         ~z29.background = Color.white; ~z5.background = Color.white;
4011                         ~z30.background = Color.white; ~z6.background = Color.white;
4012                         ~z31.background = Color.white; ~z7.background = Color.white;
4013                         ~z32.background = Color.green; ~z8.background = Color.green;
4014                         ~z33.background = Color.white; ~z9.background = Color.white;
4015                         ~z34.background = Color.white; ~z10.background = Color.white;
4016                         ~z35.background = Color.white; ~z11.background = Color.white;
4017                         ~z36.background = Color.white; ~z12.background = Color.white;
4018                 }
4019                 {button.value == 8}{
4020                         ~z25.background = Color.white; ~z1.background = Color.white;
4021                         ~z26.background = Color.white; ~z2.background = Color.white;
4022                         ~z27.background = Color.white; ~z3.background = Color.white;
4023                         ~z28.background = Color.white; ~z4.background = Color.white;
4024                         ~z29.background = Color.white; ~z5.background = Color.white;
4025                         ~z30.background = Color.white; ~z6.background = Color.white;
4026                         ~z31.background = Color.white; ~z7.background = Color.white;
4027                         ~z32.background = Color.white; ~z8.background = Color.white;
4028                         ~z33.background = Color.green; ~z9.background = Color.green;
4029                         ~z34.background = Color.white; ~z10.background = Color.white;
4030                         ~z35.background = Color.white; ~z11.background = Color.white;
4031                         ~z36.background = Color.white; ~z12.background = Color.white;
4032                 }
4033                 {button.value == 9}{
4034                         ~z25.background = Color.white; ~z1.background = Color.white;
4035                         ~z26.background = Color.white; ~z2.background = Color.white;
4036                         ~z27.background = Color.white; ~z3.background = Color.white;
4037                         ~z28.background = Color.white; ~z4.background = Color.white;
4038                         ~z29.background = Color.white; ~z5.background = Color.white;
4039                         ~z30.background = Color.white; ~z6.background = Color.white;
4040                         ~z31.background = Color.white; ~z7.background = Color.white;
4041                         ~z32.background = Color.white; ~z8.background = Color.white;
4042                         ~z33.background = Color.white; ~z9.background = Color.white;
4043                         ~z34.background = Color.green; ~z10.background = Color.green;
4044                         ~z35.background = Color.white; ~z11.background = Color.white;
4045                         ~z36.background = Color.white; ~z12.background = Color.white;
4046                 }
4047                 {button.value == 10}{
4048                         ~z25.background = Color.white; ~z1.background = Color.white;
4049                         ~z26.background = Color.white; ~z2.background = Color.white;
4050                         ~z27.background = Color.white; ~z3.background = Color.white;
4051                         ~z28.background = Color.white; ~z4.background = Color.white;
4052                         ~z29.background = Color.white; ~z5.background = Color.white;
4053                         ~z30.background = Color.white; ~z6.background = Color.white;
4054                         ~z31.background = Color.white; ~z7.background = Color.white;
4055                         ~z32.background = Color.white; ~z8.background = Color.white;
4056                         ~z33.background = Color.white; ~z9.background = Color.white;
4057                         ~z34.background = Color.white; ~z10.background = Color.white;
4058                         ~z35.background = Color.green; ~z11.background = Color.green;
4059                         ~z36.background = Color.white; ~z12.background = Color.white;
4060                 }
4061                 {button.value == 11}{
4062                         ~z25.background = Color.white; ~z1.background = Color.white;
4063                         ~z26.background = Color.white; ~z2.background = Color.white;
4064                         ~z27.background = Color.white; ~z3.background = Color.white;
4065                         ~z28.background = Color.white; ~z4.background = Color.white;
4066                         ~z29.background = Color.white; ~z5.background = Color.white;
4067                         ~z30.background = Color.white; ~z6.background = Color.white;
4068                         ~z31.background = Color.white; ~z7.background = Color.white;
4069                         ~z32.background = Color.white; ~z8.background = Color.white;
4070                         ~z33.background = Color.white; ~z9.background = Color.white;
4071                         ~z34.background = Color.white; ~z10.background = Color.white;
4072                         ~z35.background = Color.white; ~z11.background = Color.white;
4073                         ~z36.background = Color.green; ~z12.background = Color.green;
4074                 }
4075
4076         });
4077
4078
4079         //misc. keyboard buttons
4080
4081         w.view.keyDownAction = { arg view, char, modifiers, unicode, keycode;
4082                 [char, modifiers, unicode, keycode];
4083
4084                 //copy
4085                 if(unicode == ~c_unicode, {
4086                         case
4087                         {b.value == 0}{b.valueAction = 1}
4088                         {b.value == 1}{b.valueAction = 0};
4089                 });
4090
4091                 //start/stop synth
4092                 if(unicode == ~s_unicode, {
4093                         case
4094                         {b3.value == 0}{b3.valueAction = 1}
4095                         {b3.value == 1}{b3.valueAction = 0};
4096                 });
4097
4098                 //pause/unpause synth
4099                 if(unicode == ~spacebar_unicode, {
4100                         case
4101                         {b4.value == 0}{b4.valueAction = 1}
4102                         {b4.value == 1}{b4.valueAction = 0};
4103                 });
4104
4105                 //timer function
4106                 if(unicode == ~t_unicode, {
4107                         case
4108                         {~ts.value == 0}{~ts.valueAction = 1}
4109                         {~ts.value == 1}{~ts.valueAction = 0};
4110                 });
4111
4112                 //routine function
4113                 if(unicode == ~r_unicode, {
4114                         case
4115                         {~rviewbutton.value == 0}{~rviewbutton.valueAction = 1}
4116                         {~rviewbutton.value == 1}{~rviewbutton.valueAction = 0};
4117                 });
4118
4119                 //mute/unmute all synths
4120                 if(unicode == ~m_unicode, {
4121                         case
4122                         {muteall.value == 0}{muteall.valueAction = 1}
4123                         {muteall.value == 1}{muteall.valueAction = 0};
4124                 });
4125
4126                 //minimize GUI window
4127                 if(unicode == ~escape_unicode, {w.minimize;
4128
4129                         ~fullscreen_correct = {w.fullScreen};
4130                         ~fscview = UserView(w, Rect(0,0, Window.screenBounds.width-100, Window.screenBounds.height;));
4131                         ~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;});
4132                         ~fscview.mouseEnterAction_{|v, x, y| ~fullscreen_correct.value; ~fullscreen_correct = nil; ~fscview.close; ~fscview = nil; ~fullscreen_button.close; ~fullscreen_button = nil;};
4133                 });
4134
4135                 /*if((unicode == ~escape_unicode) and: (info.isClosed == false), {info.close;});
4136                 if((unicode == ~escape_unicode) and: (b.isClosed == false), {b.close;});
4137
4138                 //minimize GUI window
4139                 if((unicode == ~escape_unicode) and: (((b.isClosed == true) and: (info.isClosed == true)) or: ((b.isClosed == true)) or: (info.isClosed == true)), {w.minimize;});
4140                 */
4141                 /*if(unicode == ~escape_unicode , {
4142                 if((b.isClosed == true) and: (info.isClosed == true), {~min.value});
4143                 if(info.isClosed == false, {info.valueAction  = 0;});
4144                 if(b.isClosed == false, {b.valueAction = 0;});
4145                 });*/
4146
4147
4148                 //keyboard number actions
4149
4150                 case
4151                 {unicode == ~one_unicode}{keycodeb.valueAction_(0)}
4152                 {unicode == ~two_unicode}{keycodeb.valueAction_(1)}
4153                 {unicode == ~three_unicode}{keycodeb.valueAction_(2)}
4154                 {unicode == ~four_unicode}{keycodeb.valueAction_(3)}
4155                 {unicode == ~five_unicode}{keycodeb.valueAction_(4)}
4156                 {unicode == ~six_unicode}{keycodeb.valueAction_(5)}
4157                 {unicode == ~seven_unicode}{keycodeb.valueAction_(6)}
4158                 {unicode == ~eight_unicode}{keycodeb.valueAction_(7)}
4159                 {unicode == ~nine_unicode}{keycodeb.valueAction_(8)}
4160                 {unicode == ~ten_unicode}{keycodeb.valueAction_(9)}
4161                 {unicode == ~eleven_unicode}{keycodeb.valueAction_(10)}
4162                 {unicode == ~twelve_unicode}{keycodeb.valueAction_(11)}
4163
4164
4165                 //keyboard up/down arrow actions
4166
4167                 {(keycode == ~uparrow_keycode) or: (unicode == ~i_unicode)}{keycodeb.valueAction_(keycodeb.value-1)}
4168                 {(keycode == ~downarrow_keycode) or: (unicode == ~k_unicode)}{keycodeb.valueAction_(keycodeb.value+1)};
4169
4170
4171                 //set synth frequency using left/right arrow keys or j/l keys
4172
4173                 if((~f1 >= ~freqmap.at(127)), {~freqmap.at(127)},
4174                         {if((keycodeb.value == 0) and: (((keycode == ~rightarrow_keycode) or: (keycode == ~rightarrow_keycode1)) or: (unicode == ~l_unicode)), {
4175                                 ~freqmapval1 = ~f1.cpsmidi.round;
4176                                 case
4177                                 {~l1a.isRunning == true}{
4178                                         ~l1a.set(\dur, ~f1 = ~freqmap.at(~freqmapval1 = ~freqmapval1.value+1));
4179                                         ~l1b.set(\dur, ~f1);
4180                                         ~l1c.set(\dur, ~f1/~icd3);
4181                                         ~l1d.set(\dur, ~f1/~icd3);
4182                                         ~l1e.set(\dur, ~f1/~icd6);
4183                                         ~l1f.set(\dur, ~f1/~icd6);
4184                                 }
4185                                 {~l1a1.isRunning == true}{
4186                                         ~l1a1.set(\dur, ~f1 = ~freqmap.at(~freqmapval1 = ~freqmapval1.value+1));
4187                                         ~l1b1.set(\dur, ~f1);
4188                                         ~l1c1.set(\dur, ~f1/~icd3);
4189                                         ~l1d1.set(\dur, ~f1/~icd3);
4190                                         ~l1e1.set(\dur, ~f1/~icd6);
4191                                         ~l1f1.set(\dur, ~f1/~icd6);
4192                                 };
4193                                 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;);});
4194                                 ~z25.background = Color.green; ~z1.background = Color.green;
4195                                 ~z26.background = Color.white; ~z2.background = Color.white;
4196                                 ~z27.background = Color.white; ~z3.background = Color.white;
4197                                 ~z28.background = Color.white; ~z4.background = Color.white;
4198                                 ~z29.background = Color.white; ~z5.background = Color.white;
4199                                 ~z30.background = Color.white; ~z6.background = Color.white;
4200                                 ~z31.background = Color.white; ~z7.background = Color.white;
4201                                 ~z32.background = Color.white; ~z8.background = Color.white;
4202                                 ~z33.background = Color.white; ~z9.background = Color.white;
4203                                 ~z34.background = Color.white; ~z10.background = Color.white;
4204                                 ~z35.background = Color.white; ~z11.background = Color.white;
4205                                 ~z36.background = Color.white; ~z12.background = Color.white;
4206                 });});
4207                 if((~f1 <= ~freqmap.at(0)), {~freqmap.at(0)},
4208                         {if((keycodeb.value == 0) and: (((keycode == ~leftarrow_keycode) or: (keycode == ~leftarrow_keycode1)) or: (unicode == ~j_unicode)), {
4209                                 ~freqmapval1 = ~f1.cpsmidi.round;
4210                                 case
4211                                 {~l1a.isRunning == true}{
4212                                         ~l1a.set(\dur, ~f1 = ~freqmap.at(~freqmapval1 = ~freqmapval1.value-1));
4213                                         ~l1b.set(\dur, ~f1);
4214                                         ~l1c.set(\dur, ~f1/~icd3);
4215                                         ~l1d.set(\dur, ~f1/~icd3);
4216                                         ~l1e.set(\dur, ~f1/~icd6);
4217                                         ~l1f.set(\dur, ~f1/~icd6);
4218                                 }
4219                                 {~l1a1.isRunning == true}{
4220                                         ~l1a1.set(\dur, ~f1 = ~freqmap.at(~freqmapval1 = ~freqmapval1.value-1));
4221                                         ~l1b1.set(\dur, ~f1);
4222                                         ~l1c1.set(\dur, ~f1/~icd3);
4223                                         ~l1d1.set(\dur, ~f1/~icd3);
4224                                         ~l1e1.set(\dur, ~f1/~icd6);
4225                                         ~l1f1.set(\dur, ~f1/~icd6);
4226                                 };
4227                                 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;);});
4228
4229                                 ~z25.background = Color.green; ~z1.background = Color.green;
4230                                 ~z26.background = Color.white; ~z2.background = Color.white;
4231                                 ~z27.background = Color.white; ~z3.background = Color.white;
4232                                 ~z28.background = Color.white; ~z4.background = Color.white;
4233                                 ~z29.background = Color.white; ~z5.background = Color.white;
4234                                 ~z30.background = Color.white; ~z6.background = Color.white;
4235                                 ~z31.background = Color.white; ~z7.background = Color.white;
4236                                 ~z32.background = Color.white; ~z8.background = Color.white;
4237                                 ~z33.background = Color.white; ~z9.background = Color.white;
4238                                 ~z34.background = Color.white; ~z10.background = Color.white;
4239                                 ~z35.background = Color.white; ~z11.background = Color.white;
4240                                 ~z36.background = Color.white; ~z12.background = Color.white;
4241                 });});
4242
4243                 if((~f2 >= ~freqmap.at(127)), {~freqmap.at(127)},
4244                         {if((keycodeb.value == 1) and: (((keycode == ~rightarrow_keycode) or: (keycode == ~rightarrow_keycode1)) or: (unicode == ~l_unicode)), {
4245                                 ~freqmapval2 = ~f2.cpsmidi.round;
4246                                 case
4247                                 {~l1a.isRunning == true}{
4248                                         ~l2a.set(\dur, ~f2 = ~freqmap.at(~freqmapval2 = ~freqmapval2.value+1));
4249                                         ~l2b.set(\dur, ~f2);
4250                                         ~l2c.set(\dur, ~f2/~icd3);
4251                                         ~l2d.set(\dur, ~f2/~icd3);
4252                                         ~l2e.set(\dur, ~f2/~icd6);
4253                                         ~l2f.set(\dur, ~f2/~icd6);
4254                                 }
4255                                 {~l1a1.isRunning == true}{
4256                                         ~l2a1.set(\dur, ~f2 = ~freqmap.at(~freqmapval2 = ~freqmapval2.value+1));
4257                                         ~l2b1.set(\dur, ~f2);
4258                                         ~l2c1.set(\dur, ~f2/~icd3);
4259                                         ~l2d1.set(\dur, ~f2/~icd3);
4260                                         ~l2e1.set(\dur, ~f2/~icd6);
4261                                         ~l2f1.set(\dur, ~f2/~icd6);
4262                                 };
4263                                 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;);});
4264                                 ~z25.background = Color.white; ~z1.background = Color.white;
4265                                 ~z26.background = Color.green; ~z2.background = Color.green;
4266                                 ~z27.background = Color.white; ~z3.background = Color.white;
4267                                 ~z28.background = Color.white; ~z4.background = Color.white;
4268                                 ~z29.background = Color.white; ~z5.background = Color.white;
4269                                 ~z30.background = Color.white; ~z6.background = Color.white;
4270                                 ~z31.background = Color.white; ~z7.background = Color.white;
4271                                 ~z32.background = Color.white; ~z8.background = Color.white;
4272                                 ~z33.background = Color.white; ~z9.background = Color.white;
4273                                 ~z34.background = Color.white; ~z10.background = Color.white;
4274                                 ~z35.background = Color.white; ~z11.background = Color.white;
4275                                 ~z36.background = Color.white; ~z12.background = Color.white;
4276                 });});
4277                 if((~f2 <= ~freqmap.at(0)), {~freqmap.at(0)},
4278                         {if((keycodeb.value == 1) and: (((keycode == ~leftarrow_keycode) or: (keycode == ~leftarrow_keycode1)) or: (unicode == ~j_unicode)), {
4279                                 ~freqmapval2 = ~f2.cpsmidi.round;
4280                                 case
4281                                 {~l1a.isRunning == true}{
4282                                         ~l2a.set(\dur, ~f2 = ~freqmap.at(~freqmapval2 = ~freqmapval2.value-1));
4283                                         ~l2b.set(\dur, ~f2);
4284                                         ~l2c.set(\dur, ~f2/~icd3);
4285                                         ~l2d.set(\dur, ~f2/~icd3);
4286                                         ~l2e.set(\dur, ~f2/~icd6);
4287                                         ~l2f.set(\dur, ~f2/~icd6);
4288                                 }
4289                                 {~l1a1.isRunning == true}{
4290                                         ~l2a1.set(\dur, ~f2 = ~freqmap.at(~freqmapval2 = ~freqmapval2.value-1));
4291                                         ~l2b1.set(\dur, ~f2);
4292                                         ~l2c1.set(\dur, ~f2/~icd3);
4293                                         ~l2d1.set(\dur, ~f2/~icd3);
4294                                         ~l2e1.set(\dur, ~f2/~icd6);
4295                                         ~l2f1.set(\dur, ~f2/~icd6);
4296                                 };
4297                                 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;);});
4298
4299                                 ~z25.background = Color.white; ~z1.background = Color.white;
4300                                 ~z26.background = Color.green; ~z2.background = Color.green;
4301                                 ~z27.background = Color.white; ~z3.background = Color.white;
4302                                 ~z28.background = Color.white; ~z4.background = Color.white;
4303                                 ~z29.background = Color.white; ~z5.background = Color.white;
4304                                 ~z30.background = Color.white; ~z6.background = Color.white;
4305                                 ~z31.background = Color.white; ~z7.background = Color.white;
4306                                 ~z32.background = Color.white; ~z8.background = Color.white;
4307                                 ~z33.background = Color.white; ~z9.background = Color.white;
4308                                 ~z34.background = Color.white; ~z10.background = Color.white;
4309                                 ~z35.background = Color.white; ~z11.background = Color.white;
4310                                 ~z36.background = Color.white; ~z12.background = Color.white;
4311                 });});
4312
4313                 if((~f3 >= ~freqmap.at(127)), {~freqmap.at(127)},
4314                         {if((keycodeb.value == 2) and: (((keycode == ~rightarrow_keycode) or: (keycode == ~rightarrow_keycode1)) or: (unicode == ~l_unicode)), {
4315                                 ~freqmapval3 = ~f3.cpsmidi.round;
4316                                 case
4317                                 {~l1a.isRunning == true}{
4318                                         ~l3a.set(\dur, ~f3 = ~freqmap.at(~freqmapval3 = ~freqmapval3.value+1));
4319                                         ~l3b.set(\dur, ~f3);
4320                                         ~l3c.set(\dur, ~f3/~icd3);
4321                                         ~l3d.set(\dur, ~f3/~icd3);
4322                                         ~l3e.set(\dur, ~f3/~icd6);
4323                                         ~l3f.set(\dur, ~f3/~icd6);
4324                                 }
4325                                 {~l1a1.isRunning == true}{
4326                                         ~l3a1.set(\dur, ~f3 = ~freqmap.at(~freqmapval3 = ~freqmapval3.value+1));
4327                                         ~l3b1.set(\dur, ~f3);
4328                                         ~l3c1.set(\dur, ~f3/~icd3);
4329                                         ~l3d1.set(\dur, ~f3/~icd3);
4330                                         ~l3e1.set(\dur, ~f3/~icd6);
4331                                         ~l3f1.set(\dur, ~f3/~icd6);
4332                                 };
4333                                 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;);});
4334                                 ~z25.background = Color.white; ~z1.background = Color.white;
4335                                 ~z26.background = Color.white; ~z2.background = Color.white;
4336                                 ~z27.background = Color.green; ~z3.background = Color.green;
4337                                 ~z28.background = Color.white; ~z4.background = Color.white;
4338                                 ~z29.background = Color.white; ~z5.background = Color.white;
4339                                 ~z30.background = Color.white; ~z6.background = Color.white;
4340                                 ~z31.background = Color.white; ~z7.background = Color.white;
4341                                 ~z32.background = Color.white; ~z8.background = Color.white;
4342                                 ~z33.background = Color.white; ~z9.background = Color.white;
4343                                 ~z34.background = Color.white; ~z10.background = Color.white;
4344                                 ~z35.background = Color.white; ~z11.background = Color.white;
4345                                 ~z36.background = Color.white; ~z12.background = Color.white;
4346                 });});
4347                 if((~f3 <= ~freqmap.at(0)), {~freqmap.at(0)},
4348                         {if((keycodeb.value == 2) and: (((keycode == ~leftarrow_keycode) or: (keycode == ~leftarrow_keycode1)) or: (unicode == ~j_unicode)), {
4349                                 ~freqmapval3 = ~f3.cpsmidi.round;
4350                                 case
4351                                 {~l1a.isRunning == true}{
4352                                         ~l3a.set(\dur, ~f3 = ~freqmap.at(~freqmapval3 = ~freqmapval3.value-1));
4353                                         ~l3b.set(\dur, ~f3);
4354                                         ~l3c.set(\dur, ~f3/~icd3);
4355                                         ~l3d.set(\dur, ~f3/~icd3);
4356                                         ~l3e.set(\dur, ~f3/~icd6);
4357                                         ~l3f.set(\dur, ~f3/~icd6);
4358                                 }
4359                                 {~l1a1.isRunning == true}{
4360                                         ~l3a1.set(\dur, ~f3 = ~freqmap.at(~freqmapval3 = ~freqmapval3.value-1));
4361                                         ~l3b1.set(\dur, ~f3);
4362                                         ~l3c1.set(\dur, ~f3/~icd3);
4363                                         ~l3d1.set(\dur, ~f3/~icd3);
4364                                         ~l3e1.set(\dur, ~f3/~icd6);
4365                                         ~l3f1.set(\dur, ~f3/~icd6);
4366                                 };
4367                                 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;);});
4368
4369                                 ~z25.background = Color.white; ~z1.background = Color.white;
4370                                 ~z26.background = Color.white; ~z2.background = Color.white;
4371                                 ~z27.background = Color.green; ~z3.background = Color.green;
4372                                 ~z28.background = Color.white; ~z4.background = Color.white;
4373                                 ~z29.background = Color.white; ~z5.background = Color.white;
4374                                 ~z30.background = Color.white; ~z6.background = Color.white;
4375                                 ~z31.background = Color.white; ~z7.background = Color.white;
4376                                 ~z32.background = Color.white; ~z8.background = Color.white;
4377                                 ~z33.background = Color.white; ~z9.background = Color.white;
4378                                 ~z34.background = Color.white; ~z10.background = Color.white;
4379                                 ~z35.background = Color.white; ~z11.background = Color.white;
4380                                 ~z36.background = Color.white; ~z12.background = Color.white;
4381                 });});
4382
4383                 if((~f4 >= ~freqmap.at(127)), {~freqmap.at(127)},
4384                         {if((keycodeb.value == 3) and: (((keycode == ~rightarrow_keycode) or: (keycode == ~rightarrow_keycode1)) or: (unicode == ~l_unicode)), {
4385                                 ~freqmapval4 = ~f4.cpsmidi.round;
4386                                 case
4387                                 {~l1a.isRunning == true}{
4388                                         ~l4a.set(\dur, ~f4 = ~freqmap.at(~freqmapval4 = ~freqmapval4.value+1));
4389                                         ~l4b.set(\dur, ~f4);
4390                                         ~l4c.set(\dur, ~f4/~icd3);
4391                                         ~l4d.set(\dur, ~f4/~icd3);
4392                                         ~l4e.set(\dur, ~f4/~icd6);
4393                                         ~l4f.set(\dur, ~f4/~icd6);
4394                                 }
4395                                 {~l1a1.isRunning == true}{
4396                                         ~l4a1.set(\dur, ~f4 = ~freqmap.at(~freqmapval4 = ~freqmapval4.value+1));
4397                                         ~l4b1.set(\dur, ~f4);
4398                                         ~l4c1.set(\dur, ~f4/~icd3);
4399                                         ~l4d1.set(\dur, ~f4/~icd3);
4400                                         ~l4e1.set(\dur, ~f4/~icd6);
4401                                         ~l4f1.set(\dur, ~f4/~icd6);
4402                                 };
4403                                 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;);});
4404                                 ~z25.background = Color.white; ~z1.background = Color.white;
4405                                 ~z26.background = Color.white; ~z2.background = Color.white;
4406                                 ~z27.background = Color.white; ~z3.background = Color.white;
4407                                 ~z28.background = Color.green; ~z4.background = Color.green;
4408                                 ~z29.background = Color.white; ~z5.background = Color.white;
4409                                 ~z30.background = Color.white; ~z6.background = Color.white;
4410                                 ~z31.background = Color.white; ~z7.background = Color.white;
4411                                 ~z32.background = Color.white; ~z8.background = Color.white;
4412                                 ~z33.background = Color.white; ~z9.background = Color.white;
4413                                 ~z34.background = Color.white; ~z10.background = Color.white;
4414                                 ~z35.background = Color.white; ~z11.background = Color.white;
4415                                 ~z36.background = Color.white; ~z12.background = Color.white;
4416                 });});
4417                 if((~f4 <= ~freqmap.at(0)), {~freqmap.at(0)},
4418                         {if((keycodeb.value == 3) and: (((keycode == ~leftarrow_keycode) or: (keycode == ~leftarrow_keycode1)) or: (unicode == ~j_unicode)), {
4419                                 ~freqmapval4 = ~f4.cpsmidi.round;
4420                                 case
4421                                 {~l1a.isRunning == true}{
4422                                         ~l4a.set(\dur, ~f4 = ~freqmap.at(~freqmapval4 = ~freqmapval4.value-1));
4423                                         ~l4b.set(\dur, ~f4);
4424                                         ~l4c.set(\dur, ~f4/~icd3);
4425                                         ~l4d.set(\dur, ~f4/~icd3);
4426                                         ~l4e.set(\dur, ~f4/~icd6);
4427                                         ~l4f.set(\dur, ~f4/~icd6);
4428                                 }
4429                                 {~l1a1.isRunning == true}{
4430                                         ~l4a1.set(\dur, ~f4 = ~freqmap.at(~freqmapval4 = ~freqmapval4.value-1));
4431                                         ~l4b1.set(\dur, ~f4);
4432                                         ~l4c1.set(\dur, ~f4/~icd3);
4433                                         ~l4d1.set(\dur, ~f4/~icd3);
4434                                         ~l4e1.set(\dur, ~f4/~icd6);
4435                                         ~l4f1.set(\dur, ~f4/~icd6);
4436                                 };
4437                                 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;);});
4438
4439                                 ~z25.background = Color.white; ~z1.background = Color.white;
4440                                 ~z26.background = Color.white; ~z2.background = Color.white;
4441                                 ~z27.background = Color.white; ~z3.background = Color.white;
4442                                 ~z28.background = Color.green; ~z4.background = Color.green;
4443                                 ~z29.background = Color.white; ~z5.background = Color.white;
4444                                 ~z30.background = Color.white; ~z6.background = Color.white;
4445                                 ~z31.background = Color.white; ~z7.background = Color.white;
4446                                 ~z32.background = Color.white; ~z8.background = Color.white;
4447                                 ~z33.background = Color.white; ~z9.background = Color.white;
4448                                 ~z34.background = Color.white; ~z10.background = Color.white;
4449                                 ~z35.background = Color.white; ~z11.background = Color.white;
4450                                 ~z36.background = Color.white; ~z12.background = Color.white;
4451                 });});
4452
4453                 if((~f5 >= ~freqmap.at(127)), {~freqmap.at(127)},
4454                         {if((keycodeb.value == 4) and: (((keycode == ~rightarrow_keycode) or: (keycode == ~rightarrow_keycode1)) or: (unicode == ~l_unicode)), {
4455                                 ~freqmapval5 = ~f5.cpsmidi.round;
4456                                 case
4457                                 {~l1a.isRunning == true}{
4458                                         ~l5a.set(\dur, ~f5 = ~freqmap.at(~freqmapval5 = ~freqmapval5.value+1));
4459                                         ~l5b.set(\dur, ~f5);
4460                                         ~l5c.set(\dur, ~f5/~icd3);
4461                                         ~l5d.set(\dur, ~f5/~icd3);
4462                                         ~l5e.set(\dur, ~f5/~icd6);
4463                                         ~l5f.set(\dur, ~f5/~icd6);
4464                                 }
4465                                 {~l1a1.isRunning == true}{
4466                                         ~l5a1.set(\dur, ~f5 = ~freqmap.at(~freqmapval5 = ~freqmapval5.value+1));
4467                                         ~l5b1.set(\dur, ~f5);
4468                                         ~l5c1.set(\dur, ~f5/~icd3);
4469                                         ~l5d1.set(\dur, ~f5/~icd3);
4470                                         ~l5e1.set(\dur, ~f5/~icd6);
4471                                         ~l5f1.set(\dur, ~f5/~icd6);
4472                                 };
4473                                 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;);});
4474                                 ~z25.background = Color.white; ~z1.background = Color.white;
4475                                 ~z26.background = Color.white; ~z2.background = Color.white;
4476                                 ~z27.background = Color.white; ~z3.background = Color.white;
4477                                 ~z28.background = Color.white; ~z4.background = Color.white;
4478                                 ~z29.background = Color.green; ~z5.background = Color.green;
4479                                 ~z30.background = Color.white; ~z6.background = Color.white;
4480                                 ~z31.background = Color.white; ~z7.background = Color.white;
4481                                 ~z32.background = Color.white; ~z8.background = Color.white;
4482                                 ~z33.background = Color.white; ~z9.background = Color.white;
4483                                 ~z34.background = Color.white; ~z10.background = Color.white;
4484                                 ~z35.background = Color.white; ~z11.background = Color.white;
4485                                 ~z36.background = Color.white; ~z12.background = Color.white;
4486                 });});
4487                 if((~f5 <= ~freqmap.at(0)), {~freqmap.at(0)},
4488                         {if((keycodeb.value == 4) and: (((keycode == ~leftarrow_keycode) or: (keycode == ~leftarrow_keycode1)) or: (unicode == ~j_unicode)), {
4489                                 ~freqmapval5 = ~f5.cpsmidi.round;
4490                                 case
4491                                 {~l1a.isRunning == true}{
4492                                         ~l5a.set(\dur, ~f5 = ~freqmap.at(~freqmapval5 = ~freqmapval5.value-1));
4493                                         ~l5b.set(\dur, ~f5);
4494                                         ~l5c.set(\dur, ~f5/~icd3);
4495                                         ~l5d.set(\dur, ~f5/~icd3);
4496                                         ~l5e.set(\dur, ~f5/~icd6);
4497                                         ~l5f.set(\dur, ~f5/~icd6);
4498                                 }
4499                                 {~l1a1.isRunning == true}{
4500                                         ~l5a1.set(\dur, ~f5 = ~freqmap.at(~freqmapval5 = ~freqmapval5.value-1));
4501                                         ~l5b1.set(\dur, ~f5);
4502                                         ~l5c1.set(\dur, ~f5/~icd3);
4503                                         ~l5d1.set(\dur, ~f5/~icd3);
4504                                         ~l5e1.set(\dur, ~f5/~icd6);
4505                                         ~l5f1.set(\dur, ~f5/~icd6);
4506                                 };
4507                                 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;);});
4508
4509                                 ~z25.background = Color.white; ~z1.background = Color.white;
4510                                 ~z26.background = Color.white; ~z2.background = Color.white;
4511                                 ~z27.background = Color.white; ~z3.background = Color.white;
4512                                 ~z28.background = Color.white; ~z4.background = Color.white;
4513                                 ~z29.background = Color.green; ~z5.background = Color.green;
4514                                 ~z30.background = Color.white; ~z6.background = Color.white;
4515                                 ~z31.background = Color.white; ~z7.background = Color.white;
4516                                 ~z32.background = Color.white; ~z8.background = Color.white;
4517                                 ~z33.background = Color.white; ~z9.background = Color.white;
4518                                 ~z34.background = Color.white; ~z10.background = Color.white;
4519                                 ~z35.background = Color.white; ~z11.background = Color.white;
4520                                 ~z36.background = Color.white; ~z12.background = Color.white;
4521                 });});
4522
4523                 if((~f6 >= ~freqmap.at(127)), {~freqmap.at(127)},
4524                         {if((keycodeb.value == 5) and: (((keycode == ~rightarrow_keycode) or: (keycode == ~rightarrow_keycode1)) or: (unicode == ~l_unicode)), {
4525                                 ~freqmapval6 = ~f6.cpsmidi.round;
4526                                 case
4527                                 {~l1a.isRunning == true}{
4528                                         ~l6a.set(\dur, ~f6 = ~freqmap.at(~freqmapval6 = ~freqmapval6.value+1));
4529                                         ~l6b.set(\dur, ~f6);
4530                                         ~l6c.set(\dur, ~f6/~icd3);
4531                                         ~l6d.set(\dur, ~f6/~icd3);
4532                                         ~l6e.set(\dur, ~f6/~icd6);
4533                                         ~l6f.set(\dur, ~f6/~icd6);
4534                                 }
4535                                 {~l1a1.isRunning == true}{
4536                                         ~l6a1.set(\dur, ~f6 = ~freqmap.at(~freqmapval6 = ~freqmapval6.value+1));
4537                                         ~l6b1.set(\dur, ~f6);
4538                                         ~l6c1.set(\dur, ~f6/~icd3);
4539                                         ~l6d1.set(\dur, ~f6/~icd3);
4540                                         ~l6e1.set(\dur, ~f6/~icd6);
4541                                         ~l6f1.set(\dur, ~f6/~icd6);
4542                                 };
4543                                 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;);});
4544                                 ~z25.background = Color.white; ~z1.background = Color.white;
4545                                 ~z26.background = Color.white; ~z2.background = Color.white;
4546                                 ~z27.background = Color.white; ~z3.background = Color.white;
4547                                 ~z28.background = Color.white; ~z4.background = Color.white;
4548                                 ~z29.background = Color.white; ~z5.background = Color.white;
4549                                 ~z30.background = Color.green; ~z6.background = Color.green;
4550                                 ~z31.background = Color.white; ~z7.background = Color.white;
4551                                 ~z32.background = Color.white; ~z8.background = Color.white;
4552                                 ~z33.background = Color.white; ~z9.background = Color.white;
4553                                 ~z34.background = Color.white; ~z10.background = Color.white;
4554                                 ~z35.background = Color.white; ~z11.background = Color.white;
4555                                 ~z36.background = Color.white; ~z12.background = Color.white;
4556                 });});
4557                 if((~f6 <= ~freqmap.at(0)), {~freqmap.at(0)},
4558                         {if((keycodeb.value == 5) and: (((keycode == ~leftarrow_keycode) or: (keycode == ~leftarrow_keycode1)) or: (unicode == ~j_unicode)), {
4559                                 ~freqmapval6 = ~f6.cpsmidi.round;
4560                                 case
4561                                 {~l1a.isRunning == true}{
4562                                         ~l6a.set(\dur, ~f6 = ~freqmap.at(~freqmapval6 = ~freqmapval6.value-1));
4563                                         ~l6b.set(\dur, ~f6);
4564                                         ~l6c.set(\dur, ~f6/~icd3);
4565                                         ~l6d.set(\dur, ~f6/~icd3);
4566                                         ~l6e.set(\dur, ~f6/~icd6);
4567                                         ~l6f.set(\dur, ~f6/~icd6);
4568                                 }
4569                                 {~l1a1.isRunning == true}{
4570                                         ~l6a1.set(\dur, ~f6 = ~freqmap.at(~freqmapval6 = ~freqmapval6.value-1));
4571                                         ~l6b1.set(\dur, ~f6);
4572                                         ~l6c1.set(\dur, ~f6/~icd3);
4573                                         ~l6d1.set(\dur, ~f6/~icd3);
4574                                         ~l6e1.set(\dur, ~f6/~icd6);
4575                                         ~l6f1.set(\dur, ~f6/~icd6);
4576                                 };
4577                                 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;);});
4578
4579                                 ~z25.background = Color.white; ~z1.background = Color.white;
4580                                 ~z26.background = Color.white; ~z2.background = Color.white;
4581                                 ~z27.background = Color.white; ~z3.background = Color.white;
4582                                 ~z28.background = Color.white; ~z4.background = Color.white;
4583                                 ~z29.background = Color.white; ~z5.background = Color.white;
4584                                 ~z30.background = Color.green; ~z6.background = Color.green;
4585                                 ~z31.background = Color.white; ~z7.background = Color.white;
4586                                 ~z32.background = Color.white; ~z8.background = Color.white;
4587                                 ~z33.background = Color.white; ~z9.background = Color.white;
4588                                 ~z34.background = Color.white; ~z10.background = Color.white;
4589                                 ~z35.background = Color.white; ~z11.background = Color.white;
4590                                 ~z36.background = Color.white; ~z12.background = Color.white;
4591                 });});
4592
4593                 if((~f7 >= ~freqmap.at(127)), {~freqmap.at(127)},
4594                         {if((keycodeb.value == 6) and: (((keycode == ~rightarrow_keycode) or: (keycode == ~rightarrow_keycode1)) or: (unicode == ~l_unicode)), {
4595                                 ~freqmapval7 = ~f7.cpsmidi.round;
4596                                 case
4597                                 {~l1a.isRunning == true}{
4598                                         ~l7a.set(\dur, ~f7 = ~freqmap.at(~freqmapval7 = ~freqmapval7.value+1));
4599                                         ~l7b.set(\dur, ~f7);
4600                                         ~l7c.set(\dur, ~f7/~icd3);
4601                                         ~l7d.set(\dur, ~f7/~icd3);
4602                                         ~l7e.set(\dur, ~f7/~icd6);
4603                                         ~l7f.set(\dur, ~f7/~icd6);
4604                                 }
4605                                 {~l1a1.isRunning == true}{
4606                                         ~l7a1.set(\dur, ~f7 = ~freqmap.at(~freqmapval7 = ~freqmapval7.value+1));
4607                                         ~l7b1.set(\dur, ~f7);
4608                                         ~l7c1.set(\dur, ~f7/~icd3);
4609                                         ~l7d1.set(\dur, ~f7/~icd3);
4610                                         ~l7e1.set(\dur, ~f7/~icd6);
4611                                         ~l7f1.set(\dur, ~f7/~icd6);
4612                                 };
4613                                 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;);});
4614                                 ~z25.background = Color.white; ~z1.background = Color.white;
4615                                 ~z26.background = Color.white; ~z2.background = Color.white;
4616                                 ~z27.background = Color.white; ~z3.background = Color.white;
4617                                 ~z28.background = Color.white; ~z4.background = Color.white;
4618                                 ~z29.background = Color.white; ~z5.background = Color.white;
4619                                 ~z30.background = Color.white; ~z6.background = Color.white;
4620                                 ~z31.background = Color.green; ~z7.background = Color.green;
4621                                 ~z32.background = Color.white; ~z8.background = Color.white;
4622                                 ~z33.background = Color.white; ~z9.background = Color.white;
4623                                 ~z34.background = Color.white; ~z10.background = Color.white;
4624                                 ~z35.background = Color.white; ~z11.background = Color.white;
4625                                 ~z36.background = Color.white; ~z12.background = Color.white;
4626                 });});
4627                 if((~f7 <= ~freqmap.at(0)), {~freqmap.at(0)},
4628                         {if((keycodeb.value == 6) and: (((keycode == ~leftarrow_keycode) or: (keycode == ~leftarrow_keycode1)) or: (unicode == ~j_unicode)), {
4629                                 ~freqmapval7 = ~f7.cpsmidi.round;
4630                                 case
4631                                 {~l1a.isRunning == true}{
4632                                         ~l7a.set(\dur, ~f7 = ~freqmap.at(~freqmapval7 = ~freqmapval7.value-1));
4633                                         ~l7b.set(\dur, ~f7);
4634                                         ~l7c.set(\dur, ~f7/~icd3);
4635                                         ~l7d.set(\dur, ~f7/~icd3);
4636                                         ~l7e.set(\dur, ~f7/~icd6);
4637                                         ~l7f.set(\dur, ~f7/~icd6);
4638                                 }
4639                                 {~l1a1.isRunning == true}{
4640                                         ~l7a1.set(\dur, ~f7 = ~freqmap.at(~freqmapval7 = ~freqmapval7.value-1));
4641                                         ~l7b1.set(\dur, ~f7);
4642                                         ~l7c1.set(\dur, ~f7/~icd3);
4643                                         ~l7d1.set(\dur, ~f7/~icd3);
4644                                         ~l7e1.set(\dur, ~f7/~icd6);
4645                                         ~l7f1.set(\dur, ~f7/~icd6);
4646                                 };
4647                                 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;);});
4648
4649                                 ~z25.background = Color.white; ~z1.background = Color.white;
4650                                 ~z26.background = Color.white; ~z2.background = Color.white;
4651                                 ~z27.background = Color.white; ~z3.background = Color.white;
4652                                 ~z28.background = Color.white; ~z4.background = Color.white;
4653                                 ~z29.background = Color.white; ~z5.background = Color.white;
4654                                 ~z30.background = Color.white; ~z6.background = Color.white;
4655                                 ~z31.background = Color.green; ~z7.background = Color.green;
4656                                 ~z32.background = Color.white; ~z8.background = Color.white;
4657                                 ~z33.background = Color.white; ~z9.background = Color.white;
4658                                 ~z34.background = Color.white; ~z10.background = Color.white;
4659                                 ~z35.background = Color.white; ~z11.background = Color.white;
4660                                 ~z36.background = Color.white; ~z12.background = Color.white;
4661                 });});
4662
4663                 if((~f8 >= ~freqmap.at(127)), {~freqmap.at(127)},
4664                         {if((keycodeb.value == 7) and: (((keycode == ~rightarrow_keycode) or: (keycode == ~rightarrow_keycode1)) or: (unicode == ~l_unicode)), {
4665                                 ~freqmapval8 = ~f8.cpsmidi.round;
4666                                 case
4667                                 {~l1a.isRunning == true}{
4668                                         ~l8a.set(\dur, ~f8 = ~freqmap.at(~freqmapval8 = ~freqmapval8.value+1));
4669                                         ~l8b.set(\dur, ~f8);
4670                                         ~l8c.set(\dur, ~f8/~icd3);
4671                                         ~l8d.set(\dur, ~f8/~icd3);
4672                                         ~l8e.set(\dur, ~f8/~icd6);
4673                                         ~l8f.set(\dur, ~f8/~icd6);
4674                                 }
4675                                 {~l1a1.isRunning == true}{
4676                                         ~l8a1.set(\dur, ~f8 = ~freqmap.at(~freqmapval8 = ~freqmapval8.value+1));
4677                                         ~l8b1.set(\dur, ~f8);
4678                                         ~l8c1.set(\dur, ~f8/~icd3);
4679                                         ~l8d1.set(\dur, ~f8/~icd3);
4680                                         ~l8e1.set(\dur, ~f8/~icd6);
4681                                         ~l8f1.set(\dur, ~f8/~icd6);
4682                                 };
4683                                 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;);});
4684                                 ~z25.background = Color.white; ~z1.background = Color.white;
4685                                 ~z26.background = Color.white; ~z2.background = Color.white;
4686                                 ~z27.background = Color.white; ~z3.background = Color.white;
4687                                 ~z28.background = Color.white; ~z4.background = Color.white;
4688                                 ~z29.background = Color.white; ~z5.background = Color.white;
4689                                 ~z30.background = Color.white; ~z6.background = Color.white;
4690                                 ~z31.background = Color.white; ~z7.background = Color.white;
4691                                 ~z32.background = Color.green; ~z8.background = Color.green;
4692                                 ~z33.background = Color.white; ~z9.background = Color.white;
4693                                 ~z34.background = Color.white; ~z10.background = Color.white;
4694                                 ~z35.background = Color.white; ~z11.background = Color.white;
4695                                 ~z36.background = Color.white; ~z12.background = Color.white;
4696                 });});
4697                 if((~f8 <= ~freqmap.at(0)), {~freqmap.at(0)},
4698                         {if((keycodeb.value == 7) and: (((keycode == ~leftarrow_keycode) or: (keycode == ~leftarrow_keycode1)) or: (unicode == ~j_unicode)), {
4699                                 ~freqmapval8 = ~f8.cpsmidi.round;
4700                                 case
4701                                 {~l1a.isRunning == true}{
4702                                         ~l8a.set(\dur, ~f8 = ~freqmap.at(~freqmapval8 = ~freqmapval8.value-1));
4703                                         ~l8b.set(\dur, ~f8);
4704                                         ~l8c.set(\dur, ~f8/~icd3);
4705                                         ~l8d.set(\dur, ~f8/~icd3);
4706                                         ~l8e.set(\dur, ~f8/~icd6);
4707                                         ~l8f.set(\dur, ~f8/~icd6);
4708                                 }
4709                                 {~l1a1.isRunning == true}{
4710                                         ~l8a1.set(\dur, ~f8 = ~freqmap.at(~freqmapval8 = ~freqmapval8.value-1));
4711                                         ~l8b1.set(\dur, ~f8);
4712                                         ~l8c1.set(\dur, ~f8/~icd3);
4713                                         ~l8d1.set(\dur, ~f8/~icd3);
4714                                         ~l8e1.set(\dur, ~f8/~icd6);
4715                                         ~l8f1.set(\dur, ~f8/~icd6);
4716                                 };
4717                                 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;);});
4718
4719                                 ~z25.background = Color.white; ~z1.background = Color.white;
4720                                 ~z26.background = Color.white; ~z2.background = Color.white;
4721                                 ~z27.background = Color.white; ~z3.background = Color.white;
4722                                 ~z28.background = Color.white; ~z4.background = Color.white;
4723                                 ~z29.background = Color.white; ~z5.background = Color.white;
4724                                 ~z30.background = Color.white; ~z6.background = Color.white;
4725                                 ~z31.background = Color.white; ~z7.background = Color.white;
4726                                 ~z32.background = Color.green; ~z8.background = Color.green;
4727                                 ~z33.background = Color.white; ~z9.background = Color.white;
4728                                 ~z34.background = Color.white; ~z10.background = Color.white;
4729                                 ~z35.background = Color.white; ~z11.background = Color.white;
4730                                 ~z36.background = Color.white; ~z12.background = Color.white;
4731                 });});
4732
4733                 if((~f9 >= ~freqmap.at(127)), {~freqmap.at(127)},
4734                         {if((keycodeb.value == 8) and: (((keycode == ~rightarrow_keycode) or: (keycode == ~rightarrow_keycode1)) or: (unicode == ~l_unicode)), {
4735                                 ~freqmapval9 = ~f9.cpsmidi.round;
4736                                 case
4737                                 {~l1a.isRunning == true}{
4738                                         ~l9a.set(\dur, ~f9 = ~freqmap.at(~freqmapval9 = ~freqmapval9.value+1));
4739                                         ~l9b.set(\dur, ~f9);
4740                                         ~l9c.set(\dur, ~f9/~icd3);
4741                                         ~l9d.set(\dur, ~f9/~icd3);
4742                                         ~l9e.set(\dur, ~f9/~icd6);
4743                                         ~l9f.set(\dur, ~f9/~icd6);
4744                                 }
4745                                 {~l1a1.isRunning == true}{
4746                                         ~l9a1.set(\dur, ~f9 = ~freqmap.at(~freqmapval9 = ~freqmapval9.value+1));
4747                                         ~l9b1.set(\dur, ~f9);
4748                                         ~l9c1.set(\dur, ~f9/~icd3);
4749                                         ~l9d1.set(\dur, ~f9/~icd3);
4750                                         ~l9e1.set(\dur, ~f9/~icd6);
4751                                         ~l9f1.set(\dur, ~f9/~icd6);
4752                                 };
4753                                 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;);});
4754                                 ~z25.background = Color.white; ~z1.background = Color.white;
4755                                 ~z26.background = Color.white; ~z2.background = Color.white;
4756                                 ~z27.background = Color.white; ~z3.background = Color.white;
4757                                 ~z28.background = Color.white; ~z4.background = Color.white;
4758                                 ~z29.background = Color.white; ~z5.background = Color.white;
4759                                 ~z30.background = Color.white; ~z6.background = Color.white;
4760                                 ~z31.background = Color.white; ~z7.background = Color.white;
4761                                 ~z32.background = Color.white; ~z8.background = Color.white;
4762                                 ~z33.background = Color.green; ~z9.background = Color.green;
4763                                 ~z34.background = Color.white; ~z10.background = Color.white;
4764                                 ~z35.background = Color.white; ~z11.background = Color.white;
4765                                 ~z36.background = Color.white; ~z12.background = Color.white;
4766                 });});
4767                 if((~f9 <= ~freqmap.at(0)), {~freqmap.at(0)},
4768                         {if((keycodeb.value == 8) and: (((keycode == ~leftarrow_keycode) or: (keycode == ~leftarrow_keycode1)) or: (unicode == ~j_unicode)), {
4769                                 ~freqmapval9 = ~f9.cpsmidi.round;
4770                                 case
4771                                 {~l1a.isRunning == true}{
4772                                         ~l9a.set(\dur, ~f9 = ~freqmap.at(~freqmapval9 = ~freqmapval9.value-1));
4773                                         ~l9b.set(\dur, ~f9);
4774                                         ~l9c.set(\dur, ~f9/~icd3);
4775                                         ~l9d.set(\dur, ~f9/~icd3);
4776                                         ~l9e.set(\dur, ~f9/~icd6);
4777                                         ~l9f.set(\dur, ~f9/~icd6);
4778                                 }
4779                                 {~l1a1.isRunning == true}{
4780                                         ~l9a1.set(\dur, ~f9 = ~freqmap.at(~freqmapval9 = ~freqmapval9.value-1));
4781                                         ~l9b1.set(\dur, ~f9);
4782                                         ~l9c1.set(\dur, ~f9/~icd3);
4783                                         ~l9d1.set(\dur, ~f9/~icd3);
4784                                         ~l9e1.set(\dur, ~f9/~icd6);
4785                                         ~l9f1.set(\dur, ~f9/~icd6);
4786                                 };
4787                                 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;);});
4788
4789                                 ~z25.background = Color.white; ~z1.background = Color.white;
4790                                 ~z26.background = Color.white; ~z2.background = Color.white;
4791                                 ~z27.background = Color.white; ~z3.background = Color.white;
4792                                 ~z28.background = Color.white; ~z4.background = Color.white;
4793                                 ~z29.background = Color.white; ~z5.background = Color.white;
4794                                 ~z30.background = Color.white; ~z6.background = Color.white;
4795                                 ~z31.background = Color.white; ~z7.background = Color.white;
4796                                 ~z32.background = Color.white; ~z8.background = Color.white;
4797                                 ~z33.background = Color.green; ~z9.background = Color.green;
4798                                 ~z34.background = Color.white; ~z10.background = Color.white;
4799                                 ~z35.background = Color.white; ~z11.background = Color.white;
4800                                 ~z36.background = Color.white; ~z12.background = Color.white;
4801                 });});
4802
4803                 if((~f10 >= ~freqmap.at(127)), {~freqmap.at(127)},
4804                         {if((keycodeb.value == 9) and: (((keycode == ~rightarrow_keycode) or: (keycode == ~rightarrow_keycode1)) or: (unicode == ~l_unicode)), {
4805                                 ~freqmapval10 = ~f10.cpsmidi.round;
4806                                 case
4807                                 {~l1a.isRunning == true}{
4808                                         ~l10a.set(\dur, ~f10 = ~freqmap.at(~freqmapval10 = ~freqmapval10.value+1));
4809                                         ~l10b.set(\dur, ~f10);
4810                                         ~l10c.set(\dur, ~f10/~icd3);
4811                                         ~l10d.set(\dur, ~f10/~icd3);
4812                                         ~l10e.set(\dur, ~f10/~icd6);
4813                                         ~l10f.set(\dur, ~f10/~icd6);
4814                                 }
4815                                 {~l1a1.isRunning == true}{
4816                                         ~l10a1.set(\dur, ~f10 = ~freqmap.at(~freqmapval10 = ~freqmapval10.value+1));
4817                                         ~l10b1.set(\dur, ~f10);
4818                                         ~l10c1.set(\dur, ~f10/~icd3);
4819                                         ~l10d1.set(\dur, ~f10/~icd3);
4820                                         ~l10e1.set(\dur, ~f10/~icd6);
4821                                         ~l10f1.set(\dur, ~f10/~icd6);
4822                                 };
4823                                 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;);});
4824                                 ~z25.background = Color.white; ~z1.background = Color.white;
4825                                 ~z26.background = Color.white; ~z2.background = Color.white;
4826                                 ~z27.background = Color.white; ~z3.background = Color.white;
4827                                 ~z28.background = Color.white; ~z4.background = Color.white;
4828                                 ~z29.background = Color.white; ~z5.background = Color.white;
4829                                 ~z30.background = Color.white; ~z6.background = Color.white;
4830                                 ~z31.background = Color.white; ~z7.background = Color.white;
4831                                 ~z32.background = Color.white; ~z8.background = Color.white;
4832                                 ~z33.background = Color.white; ~z9.background = Color.white;
4833                                 ~z34.background = Color.green; ~z10.background = Color.green;
4834                                 ~z35.background = Color.white; ~z11.background = Color.white;
4835                                 ~z36.background = Color.white; ~z12.background = Color.white;
4836                 });});
4837                 if((~f10 <= ~freqmap.at(0)), {~freqmap.at(0)},
4838                         {if((keycodeb.value == 9) and: (((keycode == ~leftarrow_keycode) or: (keycode == ~leftarrow_keycode1)) or: (unicode == ~j_unicode)), {
4839                                 ~freqmapval10 = ~f10.cpsmidi.round;
4840                                 case
4841                                 {~l1a.isRunning == true}{
4842                                         ~l10a.set(\dur, ~f10 = ~freqmap.at(~freqmapval10 = ~freqmapval10.value-1));
4843                                         ~l10b.set(\dur, ~f10);
4844                                         ~l10c.set(\dur, ~f10/~icd3);
4845                                         ~l10d.set(\dur, ~f10/~icd3);
4846                                         ~l10e.set(\dur, ~f10/~icd6);
4847                                         ~l10f.set(\dur, ~f10/~icd6);
4848                                 }
4849                                 {~l1a1.isRunning == true}{
4850                                         ~l10a1.set(\dur, ~f10 = ~freqmap.at(~freqmapval10 = ~freqmapval10.value-1));
4851                                         ~l10b1.set(\dur, ~f10);
4852                                         ~l10c1.set(\dur, ~f10/~icd3);
4853                                         ~l10d1.set(\dur, ~f10/~icd3);
4854                                         ~l10e1.set(\dur, ~f10/~icd6);
4855                                         ~l10f1.set(\dur, ~f10/~icd6);
4856                                 };
4857                                 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;);});
4858
4859                                 ~z25.background = Color.white; ~z1.background = Color.white;
4860                                 ~z26.background = Color.white; ~z2.background = Color.white;
4861                                 ~z27.background = Color.white; ~z3.background = Color.white;
4862                                 ~z28.background = Color.white; ~z4.background = Color.white;
4863                                 ~z29.background = Color.white; ~z5.background = Color.white;
4864                                 ~z30.background = Color.white; ~z6.background = Color.white;
4865                                 ~z31.background = Color.white; ~z7.background = Color.white;
4866                                 ~z32.background = Color.white; ~z8.background = Color.white;
4867                                 ~z33.background = Color.white; ~z9.background = Color.white;
4868                                 ~z34.background = Color.green; ~z10.background = Color.green;
4869                                 ~z35.background = Color.white; ~z11.background = Color.white;
4870                                 ~z36.background = Color.white; ~z12.background = Color.white;
4871                 });});
4872
4873                 if((~f11 >= ~freqmap.at(127)), {~freqmap.at(127)},
4874                         {if((keycodeb.value == 10) and: (((keycode == ~rightarrow_keycode) or: (keycode == ~rightarrow_keycode1)) or: (unicode == ~l_unicode)), {
4875                                 ~freqmapval11 = ~f11.cpsmidi.round;
4876                                 case
4877                                 {~l1a.isRunning == true}{
4878                                         ~l11a.set(\dur, ~f11 = ~freqmap.at(~freqmapval11 = ~freqmapval11.value+1));
4879                                         ~l11b.set(\dur, ~f11);
4880                                         ~l11c.set(\dur, ~f11/~icd3);
4881                                         ~l11d.set(\dur, ~f11/~icd3);
4882                                         ~l11e.set(\dur, ~f11/~icd6);
4883                                         ~l11f.set(\dur, ~f11/~icd6);
4884                                 }
4885                                 {~l1a1.isRunning == true}{
4886                                         ~l11a1.set(\dur, ~f11 = ~freqmap.at(~freqmapval11 = ~freqmapval11.value+1));
4887                                         ~l11b1.set(\dur, ~f11);
4888                                         ~l11c1.set(\dur, ~f11/~icd3);
4889                                         ~l11d1.set(\dur, ~f11/~icd3);
4890                                         ~l11e1.set(\dur, ~f11/~icd6);
4891                                         ~l11f1.set(\dur, ~f11/~icd6);
4892                                 };
4893                                 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;);});
4894                                 ~z25.background = Color.white; ~z1.background = Color.white;
4895                                 ~z26.background = Color.white; ~z2.background = Color.white;
4896                                 ~z27.background = Color.white; ~z3.background = Color.white;
4897                                 ~z28.background = Color.white; ~z4.background = Color.white;
4898                                 ~z29.background = Color.white; ~z5.background = Color.white;
4899                                 ~z30.background = Color.white; ~z6.background = Color.white;
4900                                 ~z31.background = Color.white; ~z7.background = Color.white;
4901                                 ~z32.background = Color.white; ~z8.background = Color.white;
4902                                 ~z33.background = Color.white; ~z9.background = Color.white;
4903                                 ~z34.background = Color.white; ~z10.background = Color.white;
4904                                 ~z35.background = Color.green; ~z11.background = Color.green;
4905                                 ~z36.background = Color.white; ~z12.background = Color.white;
4906                 });});
4907                 if((~f11 <= ~freqmap.at(0)), {~freqmap.at(0)},
4908                         {if((keycodeb.value == 10) and: (((keycode == ~leftarrow_keycode) or: (keycode == ~leftarrow_keycode1)) or: (unicode == ~j_unicode)), {
4909                                 ~freqmapval11 = ~f11.cpsmidi.round;
4910                                 case
4911                                 {~l1a.isRunning == true}{
4912                                         ~l11a.set(\dur, ~f11 = ~freqmap.at(~freqmapval11 = ~freqmapval11.value-1));
4913                                         ~l11b.set(\dur, ~f11);
4914                                         ~l11c.set(\dur, ~f11/~icd3);
4915                                         ~l11d.set(\dur, ~f11/~icd3);
4916                                         ~l11e.set(\dur, ~f11/~icd6);
4917                                         ~l11f.set(\dur, ~f11/~icd6);
4918                                 }
4919                                 {~l1a1.isRunning == true}{
4920                                         ~l11a1.set(\dur, ~f11 = ~freqmap.at(~freqmapval11 = ~freqmapval11.value-1));
4921                                         ~l11b1.set(\dur, ~f11);
4922                                         ~l11c1.set(\dur, ~f11/~icd3);
4923                                         ~l11d1.set(\dur, ~f11/~icd3);
4924                                         ~l11e1.set(\dur, ~f11/~icd6);
4925                                         ~l11f1.set(\dur, ~f11/~icd6);
4926                                 };
4927                                 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;);});
4928
4929                                 ~z25.background = Color.white; ~z1.background = Color.white;
4930                                 ~z26.background = Color.white; ~z2.background = Color.white;
4931                                 ~z27.background = Color.white; ~z3.background = Color.white;
4932                                 ~z28.background = Color.white; ~z4.background = Color.white;
4933                                 ~z29.background = Color.white; ~z5.background = Color.white;
4934                                 ~z30.background = Color.white; ~z6.background = Color.white;
4935                                 ~z31.background = Color.white; ~z7.background = Color.white;
4936                                 ~z32.background = Color.white; ~z8.background = Color.white;
4937                                 ~z33.background = Color.white; ~z9.background = Color.white;
4938                                 ~z34.background = Color.white; ~z10.background = Color.white;
4939                                 ~z35.background = Color.green; ~z11.background = Color.green;
4940                                 ~z36.background = Color.white; ~z12.background = Color.white;
4941                 });});
4942
4943                 if((~f12 >= ~freqmap.at(127)), {~freqmap.at(127)},
4944                         {if((keycodeb.value == 11) and: (((keycode == ~rightarrow_keycode) or: (keycode == ~rightarrow_keycode1)) or: (unicode == ~l_unicode)), {
4945                                 ~freqmapval12 = ~f12.cpsmidi.round;
4946                                 case
4947                                 {~l1a.isRunning == true}{
4948                                         ~l12a.set(\dur, ~f12 = ~freqmap.at(~freqmapval12 = ~freqmapval12.value+1));
4949                                         ~l12b.set(\dur, ~f12);
4950                                         ~l12c.set(\dur, ~f12/~icd3);
4951                                         ~l12d.set(\dur, ~f12/~icd3);
4952                                         ~l12e.set(\dur, ~f12/~icd6);
4953                                         ~l12f.set(\dur, ~f12/~icd6);
4954                                 }
4955                                 {~l1a1.isRunning == true}{
4956                                         ~l12a1.set(\dur, ~f12 = ~freqmap.at(~freqmapval12 = ~freqmapval12.value+1));
4957                                         ~l12b1.set(\dur, ~f12);
4958                                         ~l12c1.set(\dur, ~f12/~icd3);
4959                                         ~l12d1.set(\dur, ~f12/~icd3);
4960                                         ~l12e1.set(\dur, ~f12/~icd6);
4961                                         ~l12f1.set(\dur, ~f12/~icd6);
4962                                 };
4963                                 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;);});
4964                                 ~z25.background = Color.white; ~z1.background = Color.white;
4965                                 ~z26.background = Color.white; ~z2.background = Color.white;
4966                                 ~z27.background = Color.white; ~z3.background = Color.white;
4967                                 ~z28.background = Color.white; ~z4.background = Color.white;
4968                                 ~z29.background = Color.white; ~z5.background = Color.white;
4969                                 ~z30.background = Color.white; ~z6.background = Color.white;
4970                                 ~z31.background = Color.white; ~z7.background = Color.white;
4971                                 ~z32.background = Color.white; ~z8.background = Color.white;
4972                                 ~z33.background = Color.white; ~z9.background = Color.white;
4973                                 ~z34.background = Color.white; ~z10.background = Color.white;
4974                                 ~z35.background = Color.white; ~z11.background = Color.white;
4975                                 ~z36.background = Color.green; ~z12.background = Color.green;
4976                 });});
4977                 if((~f12 <= ~freqmap.at(0)), {~freqmap.at(0)},
4978                         {if((keycodeb.value == 11) and: (((keycode == ~leftarrow_keycode) or: (keycode == ~leftarrow_keycode1)) or: (unicode == ~j_unicode)), {
4979                                 ~freqmapval12 = ~f12.cpsmidi.round;
4980                                 case
4981                                 {~l1a.isRunning == true}{
4982                                         ~l12a.set(\dur, ~f12 = ~freqmap.at(~freqmapval12 = ~freqmapval12.value-1));
4983                                         ~l12b.set(\dur, ~f12);
4984                                         ~l12c.set(\dur, ~f12/~icd3);
4985                                         ~l12d.set(\dur, ~f12/~icd3);
4986                                         ~l12e.set(\dur, ~f12/~icd6);
4987                                         ~l12f.set(\dur, ~f12/~icd6);
4988                                 }
4989                                 {~l1a1.isRunning == true}{
4990                                         ~l12a1.set(\dur, ~f12 = ~freqmap.at(~freqmapval12 = ~freqmapval12.value-1));
4991                                         ~l12b1.set(\dur, ~f12);
4992                                         ~l12c1.set(\dur, ~f12/~icd3);
4993                                         ~l12d1.set(\dur, ~f12/~icd3);
4994                                         ~l12e1.set(\dur, ~f12/~icd6);
4995                                         ~l12f1.set(\dur, ~f12/~icd6);
4996                                 };
4997                                 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;);});
4998
4999                                 ~z25.background = Color.white; ~z1.background = Color.white;
5000                                 ~z26.background = Color.white; ~z2.background = Color.white;
5001                                 ~z27.background = Color.white; ~z3.background = Color.white;
5002                                 ~z28.background = Color.white; ~z4.background = Color.white;
5003                                 ~z29.background = Color.white; ~z5.background = Color.white;
5004                                 ~z30.background = Color.white; ~z6.background = Color.white;
5005                                 ~z31.background = Color.white; ~z7.background = Color.white;
5006                                 ~z32.background = Color.white; ~z8.background = Color.white;
5007                                 ~z33.background = Color.white; ~z9.background = Color.white;
5008                                 ~z34.background = Color.white; ~z10.background = Color.white;
5009                                 ~z35.background = Color.white; ~z11.background = Color.white;
5010                                 ~z36.background = Color.green; ~z12.background = Color.green;
5011                 });});
5012
5013
5014
5015         };
5016
5017
5018         //if routine function values are nil
5019
5020         if(~rslot1a == nil, {~rslot1a = ~bplaceo1;}); if(~rslot1b == nil, {~rslot1b = ~bplacef1;});
5021         if(~rslot2 == nil, {~rslot2 = ~bplacef2;});
5022         if(~rslot3 == nil, {~rslot3 = ~bplacef3;});
5023         if(~rslot4 == nil, {~rslot4 = ~bplacef4;});
5024         if(~rslot5 == nil, {~rslot5 = ~bplacef5;});
5025         if(~rslot6 == nil, {~rslot6 = ~bplacef6;});
5026         if(~rslot7 == nil, {~rslot7 = ~bplacef7;});
5027         if(~rslot8 == nil, {~rslot8 = ~bplacef8;});
5028         if(~rtimeall == nil, {~rtimeall = 4;});
5029         if(~rtime1 == nil, {~rtime1 = 4;});
5030         if(~rtime2 == nil, {~rtime2 = 4;});
5031         if(~rtime3 == nil, {~rtime3 = 4;});
5032         if(~rtime4 == nil, {~rtime4 = 4;});
5033         if(~rtime5 == nil, {~rtime5 = 4;});
5034         if(~rtime6 == nil, {~rtime6 = 4;});
5035         if(~rtime7 == nil, {~rtime7 = 4;});
5036         if(~rtime8 == nil, {~rtime8 = 4;});
5037         if(~rdoall == nil, {~rdoall = 1;});
5038         if(~rdo1a == nil, {~rdo1a = "o1";}); if(~rdo1b == nil, {~rdo1b = "f1";});
5039         if(~rdo2 == nil, {~rdo2 = "f2";});
5040         if(~rdo3 == nil, {~rdo3 = "f3";});
5041         if(~rdo4 == nil, {~rdo4 = "f4";});
5042         if(~rdo5 == nil, {~rdo5 = "f5";});
5043         if(~rdo6 == nil, {~rdo6 = "f6";});
5044         if(~rdo7 == nil, {~rdo7 = "f7";});
5045         if(~rdo8 == nil, {~rdo8 = "f8";});
5046
5047
5048         //misc. routine button functions (see below)
5049
5050         ~si1aset = {
5051                 if(~si1a.value == "o1", {~rslot1a = ~bplaceo1; ~rdo1a = ~si1a.value;});
5052                 if(~si1a.value == "f1", {~rslot1a = ~bplacef1; ~rdo1a = ~si1a.value;});
5053                 if(~si1a.value == "s1", {~rslot1a = ~bplaces1; ~rdo1a = ~si1a.value;});
5054                 if(~si1a.value == "o2", {~rslot1a = ~bplaceo2; ~rdo1a = ~si1a.value;});
5055                 if(~si1a.value == "f2", {~rslot1a = ~bplacef2; ~rdo1a = ~si1a.value;});
5056                 if(~si1a.value == "s2", {~rslot1a = ~bplaces2; ~rdo1a = ~si1a.value;});
5057                 if(~si1a.value == "o3", {~rslot1a = ~bplaceo3; ~rdo1a = ~si1a.value;});
5058                 if(~si1a.value == "f3", {~rslot1a = ~bplacef3; ~rdo1a = ~si1a.value;});
5059                 if(~si1a.value == "s3", {~rslot1a = ~bplaces3; ~rdo1a = ~si1a.value;});
5060                 if(~si1a.value == "o4", {~rslot1a = ~bplaceo4; ~rdo1a = ~si1a.value;});
5061                 if(~si1a.value == "f4", {~rslot1a = ~bplacef4; ~rdo1a = ~si1a.value;});
5062                 if(~si1a.value == "s4", {~rslot1a = ~bplaces4; ~rdo1a = ~si1a.value;});
5063                 if(~si1a.value == "o5", {~rslot1a = ~bplaceo5; ~rdo1a = ~si1a.value;});
5064                 if(~si1a.value == "f5", {~rslot1a = ~bplacef5; ~rdo1a = ~si1a.value;});
5065                 if(~si1a.value == "s5", {~rslot1a = ~bplaces5; ~rdo1a = ~si1a.value;});
5066                 if(~si1a.value == "o6", {~rslot1a = ~bplaceo6; ~rdo1a = ~si1a.value;});
5067                 if(~si1a.value == "f6", {~rslot1a = ~bplacef6; ~rdo1a = ~si1a.value;});
5068                 if(~si1a.value == "s6", {~rslot1a = ~bplaces6; ~rdo1a = ~si1a.value;});
5069                 if(~si1a.value == "o7", {~rslot1a = ~bplaceo7; ~rdo1a = ~si1a.value;});
5070                 if(~si1a.value == "f7", {~rslot1a = ~bplacef7; ~rdo1a = ~si1a.value;});
5071                 if(~si1a.value == "s7", {~rslot1a = ~bplaces7; ~rdo1a = ~si1a.value;});
5072                 if(~si1a.value == "o8", {~rslot1a = ~bplaceo8; ~rdo1a = ~si1a.value;});
5073                 if(~si1a.value == "f8", {~rslot1a = ~bplacef8; ~rdo1a = ~si1a.value;});
5074                 if(~si1a.value == "s8", {~rslot1a = ~bplaces8; ~rdo1a = ~si1a.value;});
5075         };
5076         ~si1bset = {
5077                 if(~si1b.value == "o1", {~rslot1b = ~bplaceo1; ~rdo1b = ~si1b.value;});
5078                 if(~si1b.value == "f1", {~rslot1b = ~bplacef1; ~rdo1b = ~si1b.value;});
5079                 if(~si1b.value == "s1", {~rslot1b = ~bplaces1; ~rdo1b = ~si1b.value;});
5080                 if(~si1b.value == "o2", {~rslot1b = ~bplaceo2; ~rdo1b = ~si1b.value;});
5081                 if(~si1b.value == "f2", {~rslot1b = ~bplacef2; ~rdo1b = ~si1b.value;});
5082                 if(~si1b.value == "s2", {~rslot1b = ~bplaces2; ~rdo1b = ~si1b.value;});
5083                 if(~si1b.value == "o3", {~rslot1b = ~bplaceo3; ~rdo1b = ~si1b.value;});
5084                 if(~si1b.value == "f3", {~rslot1b = ~bplacef3; ~rdo1b = ~si1b.value;});
5085                 if(~si1b.value == "s3", {~rslot1b = ~bplaces3; ~rdo1b = ~si1b.value;});
5086                 if(~si1b.value == "o4", {~rslot1b = ~bplaceo4; ~rdo1b = ~si1b.value;});
5087                 if(~si1b.value == "f4", {~rslot1b = ~bplacef4; ~rdo1b = ~si1b.value;});
5088                 if(~si1b.value == "s4", {~rslot1b = ~bplaces4; ~rdo1b = ~si1b.value;});
5089                 if(~si1b.value == "o5", {~rslot1b = ~bplaceo5; ~rdo1b = ~si1b.value;});
5090                 if(~si1b.value == "f5", {~rslot1b = ~bplacef5; ~rdo1b = ~si1b.value;});
5091                 if(~si1b.value == "s5", {~rslot1b = ~bplaces5; ~rdo1b = ~si1b.value;});
5092                 if(~si1b.value == "o6", {~rslot1b = ~bplaceo6; ~rdo1b = ~si1b.value;});
5093                 if(~si1b.value == "f6", {~rslot1b = ~bplacef6; ~rdo1b = ~si1b.value;});
5094                 if(~si1b.value == "s6", {~rslot1b = ~bplaces6; ~rdo1b = ~si1b.value;});
5095                 if(~si1b.value == "o7", {~rslot1b = ~bplaceo7; ~rdo1b = ~si1b.value;});
5096                 if(~si1b.value == "f7", {~rslot1b = ~bplacef7; ~rdo1b = ~si1b.value;});
5097                 if(~si1b.value == "s7", {~rslot1b = ~bplaces7; ~rdo1b = ~si1b.value;});
5098                 if(~si1b.value == "o8", {~rslot1b = ~bplaceo8; ~rdo1b = ~si1b.value;});
5099                 if(~si1b.value == "f8", {~rslot1b = ~bplacef8; ~rdo1b = ~si1b.value;});
5100                 if(~si1b.value == "s8", {~rslot1b = ~bplaces8; ~rdo1b = ~si1b.value;});
5101         };
5102         ~si2set = {
5103                 if(~si2.value == "o1", {~rslot2 = ~bplaceo1; ~rdo2 = ~si2.value;});
5104                 if(~si2.value == "f1", {~rslot2 = ~bplacef1; ~rdo2 = ~si2.value;});
5105                 if(~si2.value == "s1", {~rslot2 = ~bplaces1; ~rdo2 = ~si2.value;});
5106                 if(~si2.value == "o2", {~rslot2 = ~bplaceo2; ~rdo2 = ~si2.value;});
5107                 if(~si2.value == "f2", {~rslot2 = ~bplacef2; ~rdo2 = ~si2.value;});
5108                 if(~si2.value == "s2", {~rslot2 = ~bplaces2; ~rdo2 = ~si2.value;});
5109                 if(~si2.value == "o3", {~rslot2 = ~bplaceo3; ~rdo2 = ~si2.value;});
5110                 if(~si2.value == "f3", {~rslot2 = ~bplacef3; ~rdo2 = ~si2.value;});
5111                 if(~si2.value == "s3", {~rslot2 = ~bplaces3; ~rdo2 = ~si2.value;});
5112                 if(~si2.value == "o4", {~rslot2 = ~bplaceo4; ~rdo2 = ~si2.value;});
5113                 if(~si2.value == "f4", {~rslot2 = ~bplacef4; ~rdo2 = ~si2.value;});
5114                 if(~si2.value == "s4", {~rslot2 = ~bplaces4; ~rdo2 = ~si2.value;});
5115                 if(~si2.value == "o5", {~rslot2 = ~bplaceo5; ~rdo2 = ~si2.value;});
5116                 if(~si2.value == "f5", {~rslot2 = ~bplacef5; ~rdo2 = ~si2.value;});
5117                 if(~si2.value == "s5", {~rslot2 = ~bplaces5; ~rdo2 = ~si2.value;});
5118                 if(~si2.value == "o6", {~rslot2 = ~bplaceo6; ~rdo2 = ~si2.value;});
5119                 if(~si2.value == "f6", {~rslot2 = ~bplacef6; ~rdo2 = ~si2.value;});
5120                 if(~si2.value == "s6", {~rslot2 = ~bplaces6; ~rdo2 = ~si2.value;});
5121                 if(~si2.value == "o7", {~rslot2 = ~bplaceo7; ~rdo2 = ~si2.value;});
5122                 if(~si2.value == "f7", {~rslot2 = ~bplacef7; ~rdo2 = ~si2.value;});
5123                 if(~si2.value == "s7", {~rslot2 = ~bplaces7; ~rdo2 = ~si2.value;});
5124                 if(~si2.value == "o8", {~rslot2 = ~bplaceo8; ~rdo2 = ~si2.value;});
5125                 if(~si2.value == "f8", {~rslot2 = ~bplacef8; ~rdo2 = ~si2.value;});
5126                 if(~si2.value == "s8", {~rslot2 = ~bplaces8; ~rdo2 = ~si2.value;});
5127         };
5128         ~si3set = {
5129                 if(~si3.value == "o1", {~rslot3 = ~bplaceo1; ~rdo3 = ~si3.value;});
5130                 if(~si3.value == "f1", {~rslot3 = ~bplacef1; ~rdo3 = ~si3.value;});
5131                 if(~si3.value == "s1", {~rslot3 = ~bplaces1; ~rdo3 = ~si3.value;});
5132                 if(~si3.value == "o2", {~rslot3 = ~bplaceo2; ~rdo3 = ~si3.value;});
5133                 if(~si3.value == "f2", {~rslot3 = ~bplacef2; ~rdo3 = ~si3.value;});
5134                 if(~si3.value == "s2", {~rslot3 = ~bplaces2; ~rdo3 = ~si3.value;});
5135                 if(~si3.value == "o3", {~rslot3 = ~bplaceo3; ~rdo3 = ~si3.value;});
5136                 if(~si3.value == "f3", {~rslot3 = ~bplacef3; ~rdo3 = ~si3.value;});
5137                 if(~si3.value == "s3", {~rslot3 = ~bplaces3; ~rdo3 = ~si3.value;});
5138                 if(~si3.value == "o4", {~rslot3 = ~bplaceo4; ~rdo3 = ~si3.value;});
5139                 if(~si3.value == "f4", {~rslot3 = ~bplacef4; ~rdo3 = ~si3.value;});
5140                 if(~si3.value == "s4", {~rslot3 = ~bplaces4; ~rdo3 = ~si3.value;});
5141                 if(~si3.value == "o5", {~rslot3 = ~bplaceo5; ~rdo3 = ~si3.value;});
5142                 if(~si3.value == "f5", {~rslot3 = ~bplacef5; ~rdo3 = ~si3.value;});
5143                 if(~si3.value == "s5", {~rslot3 = ~bplaces5; ~rdo3 = ~si3.value;});
5144                 if(~si3.value == "o6", {~rslot3 = ~bplaceo6; ~rdo3 = ~si3.value;});
5145                 if(~si3.value == "f6", {~rslot3 = ~bplacef6; ~rdo3 = ~si3.value;});
5146                 if(~si3.value == "s6", {~rslot3 = ~bplaces6; ~rdo3 = ~si3.value;});
5147                 if(~si3.value == "o7", {~rslot3 = ~bplaceo7; ~rdo3 = ~si3.value;});
5148                 if(~si3.value == "f7", {~rslot3 = ~bplacef7; ~rdo3 = ~si3.value;});
5149                 if(~si3.value == "s7", {~rslot3 = ~bplaces7; ~rdo3 = ~si3.value;});
5150                 if(~si3.value == "o8", {~rslot3 = ~bplaceo8; ~rdo3 = ~si3.value;});
5151                 if(~si3.value == "f8", {~rslot3 = ~bplacef8; ~rdo3 = ~si3.value;});
5152                 if(~si3.value == "s8", {~rslot3 = ~bplaces8; ~rdo3 = ~si3.value;});
5153         };
5154         ~si4set = {
5155                 if(~si4.value == "o1", {~rslot4 = ~bplaceo1; ~rdo4 = ~si4.value;});
5156                 if(~si4.value == "f1", {~rslot4 = ~bplacef1; ~rdo4 = ~si4.value;});
5157                 if(~si4.value == "s1", {~rslot4 = ~bplaces1; ~rdo4 = ~si4.value;});
5158                 if(~si4.value == "o2", {~rslot4 = ~bplaceo2; ~rdo4 = ~si4.value;});
5159                 if(~si4.value == "f2", {~rslot4 = ~bplacef2; ~rdo4 = ~si4.value;});
5160                 if(~si4.value == "s2", {~rslot4 = ~bplaces2; ~rdo4 = ~si4.value;});
5161                 if(~si4.value == "o3", {~rslot4 = ~bplaceo3; ~rdo4 = ~si4.value;});
5162                 if(~si4.value == "f3", {~rslot4 = ~bplacef3; ~rdo4 = ~si4.value;});
5163                 if(~si4.value == "s3", {~rslot4 = ~bplaces3; ~rdo4 = ~si4.value;});
5164                 if(~si4.value == "o4", {~rslot4 = ~bplaceo4; ~rdo4 = ~si4.value;});
5165                 if(~si4.value == "f4", {~rslot4 = ~bplacef4; ~rdo4 = ~si4.value;});
5166                 if(~si4.value == "s4", {~rslot4 = ~bplaces4; ~rdo4 = ~si4.value;});
5167                 if(~si4.value == "o5", {~rslot4 = ~bplaceo5; ~rdo4 = ~si4.value;});
5168                 if(~si4.value == "f5", {~rslot4 = ~bplacef5; ~rdo4 = ~si4.value;});
5169                 if(~si4.value == "s5", {~rslot4 = ~bplaces5; ~rdo4 = ~si4.value;});
5170                 if(~si4.value == "o6", {~rslot4 = ~bplaceo6; ~rdo4 = ~si4.value;});
5171                 if(~si4.value == "f6", {~rslot4 = ~bplacef6; ~rdo4 = ~si4.value;});
5172                 if(~si4.value == "s6", {~rslot4 = ~bplaces6; ~rdo4 = ~si4.value;});
5173                 if(~si4.value == "o7", {~rslot4 = ~bplaceo7; ~rdo4 = ~si4.value;});
5174                 if(~si4.value == "f7", {~rslot4 = ~bplacef7; ~rdo4 = ~si4.value;});
5175                 if(~si4.value == "s7", {~rslot4 = ~bplaces7; ~rdo4 = ~si4.value;});
5176                 if(~si4.value == "o8", {~rslot4 = ~bplaceo8; ~rdo4 = ~si4.value;});
5177                 if(~si4.value == "f8", {~rslot4 = ~bplacef8; ~rdo4 = ~si4.value;});
5178                 if(~si4.value == "s8", {~rslot4 = ~bplaces8; ~rdo4 = ~si4.value;});
5179         };
5180         ~si5set = {
5181                 if(~si5.value == "o1", {~rslot5 = ~bplaceo1; ~rdo5 = ~si5.value;});
5182                 if(~si5.value == "f1", {~rslot5 = ~bplacef1; ~rdo5 = ~si5.value;});
5183                 if(~si5.value == "s1", {~rslot5 = ~bplaces1; ~rdo5 = ~si5.value;});
5184                 if(~si5.value == "o2", {~rslot5 = ~bplaceo2; ~rdo5 = ~si5.value;});
5185                 if(~si5.value == "f2", {~rslot5 = ~bplacef2; ~rdo5 = ~si5.value;});
5186                 if(~si5.value == "s2", {~rslot5 = ~bplaces2; ~rdo5 = ~si5.value;});
5187                 if(~si5.value == "o3", {~rslot5 = ~bplaceo3; ~rdo5 = ~si5.value;});
5188                 if(~si5.value == "f3", {~rslot5 = ~bplacef3; ~rdo5 = ~si5.value;});
5189                 if(~si5.value == "s3", {~rslot5 = ~bplaces3; ~rdo5 = ~si5.value;});
5190                 if(~si5.value == "o4", {~rslot5 = ~bplaceo4; ~rdo5 = ~si5.value;});
5191                 if(~si5.value == "f4", {~rslot5 = ~bplacef4; ~rdo5 = ~si5.value;});
5192                 if(~si5.value == "s4", {~rslot5 = ~bplaces4; ~rdo5 = ~si5.value;});
5193                 if(~si5.value == "o5", {~rslot5 = ~bplaceo5; ~rdo5 = ~si5.value;});
5194                 if(~si5.value == "f5", {~rslot5 = ~bplacef5; ~rdo5 = ~si5.value;});
5195                 if(~si5.value == "s5", {~rslot5 = ~bplaces5; ~rdo5 = ~si5.value;});
5196                 if(~si5.value == "o6", {~rslot5 = ~bplaceo6; ~rdo5 = ~si5.value;});
5197                 if(~si5.value == "f6", {~rslot5 = ~bplacef6; ~rdo5 = ~si5.value;});
5198                 if(~si5.value == "s6", {~rslot5 = ~bplaces6; ~rdo5 = ~si5.value;});
5199                 if(~si5.value == "o7", {~rslot5 = ~bplaceo7; ~rdo5 = ~si5.value;});
5200                 if(~si5.value == "f7", {~rslot5 = ~bplacef7; ~rdo5 = ~si5.value;});
5201                 if(~si5.value == "s7", {~rslot5 = ~bplaces7; ~rdo5 = ~si5.value;});
5202                 if(~si5.value == "o8", {~rslot5 = ~bplaceo8; ~rdo5 = ~si5.value;});
5203                 if(~si5.value == "f8", {~rslot5 = ~bplacef8; ~rdo5 = ~si5.value;});
5204                 if(~si5.value == "s8", {~rslot5 = ~bplaces8; ~rdo5 = ~si5.value;});
5205         };
5206         ~si6set = {
5207                 if(~si6.value == "o1", {~rslot6 = ~bplaceo1; ~rdo6 = ~si6.value;});
5208                 if(~si6.value == "f1", {~rslot6 = ~bplacef1; ~rdo6 = ~si6.value;});
5209                 if(~si6.value == "s1", {~rslot6 = ~bplaces1; ~rdo6 = ~si6.value;});
5210                 if(~si6.value == "o2", {~rslot6 = ~bplaceo2; ~rdo6 = ~si6.value;});
5211                 if(~si6.value == "f2", {~rslot6 = ~bplacef2; ~rdo6 = ~si6.value;});
5212                 if(~si6.value == "s2", {~rslot6 = ~bplaces2; ~rdo6 = ~si6.value;});
5213                 if(~si6.value == "o3", {~rslot6 = ~bplaceo3; ~rdo6 = ~si6.value;});
5214                 if(~si6.value == "f3", {~rslot6 = ~bplacef3; ~rdo6 = ~si6.value;});
5215                 if(~si6.value == "s3", {~rslot6 = ~bplaces3; ~rdo6 = ~si6.value;});
5216                 if(~si6.value == "o4", {~rslot6 = ~bplaceo4; ~rdo6 = ~si6.value;});
5217                 if(~si6.value == "f4", {~rslot6 = ~bplacef4; ~rdo6 = ~si6.value;});
5218                 if(~si6.value == "s4", {~rslot6 = ~bplaces4; ~rdo6 = ~si6.value;});
5219                 if(~si6.value == "o5", {~rslot6 = ~bplaceo5; ~rdo6 = ~si6.value;});
5220                 if(~si6.value == "f5", {~rslot6 = ~bplacef5; ~rdo6 = ~si6.value;});
5221                 if(~si6.value == "s5", {~rslot6 = ~bplaces5; ~rdo6 = ~si6.value;});
5222                 if(~si6.value == "o6", {~rslot6 = ~bplaceo6; ~rdo6 = ~si6.value;});
5223                 if(~si6.value == "f6", {~rslot6 = ~bplacef6; ~rdo6 = ~si6.value;});
5224                 if(~si6.value == "s6", {~rslot6 = ~bplaces6; ~rdo6 = ~si6.value;});
5225                 if(~si6.value == "o7", {~rslot6 = ~bplaceo7; ~rdo6 = ~si6.value;});
5226                 if(~si6.value == "f7", {~rslot6 = ~bplacef7; ~rdo6 = ~si6.value;});
5227                 if(~si6.value == "s7", {~rslot6 = ~bplaces7; ~rdo6 = ~si6.value;});
5228                 if(~si6.value == "o8", {~rslot6 = ~bplaceo8; ~rdo6 = ~si6.value;});
5229                 if(~si6.value == "f8", {~rslot6 = ~bplacef8; ~rdo6 = ~si6.value;});
5230                 if(~si6.value == "s8", {~rslot6 = ~bplaces8; ~rdo6 = ~si6.value;});
5231         };
5232         ~si7set = {
5233                 if(~si7.value == "o1", {~rslot7 = ~bplaceo1; ~rdo7 = ~si7.value;});
5234                 if(~si7.value == "f1", {~rslot7 = ~bplacef1; ~rdo7 = ~si7.value;});
5235                 if(~si7.value == "s1", {~rslot7 = ~bplaces1; ~rdo7 = ~si7.value;});
5236                 if(~si7.value == "o2", {~rslot7 = ~bplaceo2; ~rdo7 = ~si7.value;});
5237                 if(~si7.value == "f2", {~rslot7 = ~bplacef2; ~rdo7 = ~si7.value;});
5238                 if(~si7.value == "s2", {~rslot7 = ~bplaces2; ~rdo7 = ~si7.value;});
5239                 if(~si7.value == "o3", {~rslot7 = ~bplaceo3; ~rdo7 = ~si7.value;});
5240                 if(~si7.value == "f3", {~rslot7 = ~bplacef3; ~rdo7 = ~si7.value;});
5241                 if(~si7.value == "s3", {~rslot7 = ~bplaces3; ~rdo7 = ~si7.value;});
5242                 if(~si7.value == "o4", {~rslot7 = ~bplaceo4; ~rdo7 = ~si7.value;});
5243                 if(~si7.value == "f4", {~rslot7 = ~bplacef4; ~rdo7 = ~si7.value;});
5244                 if(~si7.value == "s4", {~rslot7 = ~bplaces4; ~rdo7 = ~si7.value;});
5245                 if(~si7.value == "o5", {~rslot7 = ~bplaceo5; ~rdo7 = ~si7.value;});
5246                 if(~si7.value == "f5", {~rslot7 = ~bplacef5; ~rdo7 = ~si7.value;});
5247                 if(~si7.value == "s5", {~rslot7 = ~bplaces5; ~rdo7 = ~si7.value;});
5248                 if(~si7.value == "o6", {~rslot7 = ~bplaceo6; ~rdo7 = ~si7.value;});
5249                 if(~si7.value == "f6", {~rslot7 = ~bplacef6; ~rdo7 = ~si7.value;});
5250                 if(~si7.value == "s6", {~rslot7 = ~bplaces6; ~rdo7 = ~si7.value;});
5251                 if(~si7.value == "o7", {~rslot7 = ~bplaceo7; ~rdo7 = ~si7.value;});
5252                 if(~si7.value == "f7", {~rslot7 = ~bplacef7; ~rdo7 = ~si7.value;});
5253                 if(~si7.value == "s7", {~rslot7 = ~bplaces7; ~rdo7 = ~si7.value;});
5254                 if(~si7.value == "o8", {~rslot7 = ~bplaceo8; ~rdo7 = ~si7.value;});
5255                 if(~si7.value == "f8", {~rslot7 = ~bplacef8; ~rdo7 = ~si7.value;});
5256                 if(~si7.value == "s8", {~rslot7 = ~bplaces8; ~rdo7 = ~si7.value;});
5257         };
5258         ~si8set = {
5259                 if(~si8.value == "o1", {~rslot8 = ~bplaceo1; ~rdo8 = ~si8.value;});
5260                 if(~si8.value == "f1", {~rslot8 = ~bplacef1; ~rdo8 = ~si8.value;});
5261                 if(~si8.value == "s1", {~rslot8 = ~bplaces1; ~rdo8 = ~si8.value;});
5262                 if(~si8.value == "o2", {~rslot8 = ~bplaceo2; ~rdo8 = ~si8.value;});
5263                 if(~si8.value == "f2", {~rslot8 = ~bplacef2; ~rdo8 = ~si8.value;});
5264                 if(~si8.value == "s2", {~rslot8 = ~bplaces2; ~rdo8 = ~si8.value;});
5265                 if(~si8.value == "o3", {~rslot8 = ~bplaceo3; ~rdo8 = ~si8.value;});
5266                 if(~si8.value == "f3", {~rslot8 = ~bplacef3; ~rdo8 = ~si8.value;});
5267                 if(~si8.value == "s3", {~rslot8 = ~bplaces3; ~rdo8 = ~si8.value;});
5268                 if(~si8.value == "o4", {~rslot8 = ~bplaceo4; ~rdo8 = ~si8.value;});
5269                 if(~si8.value == "f4", {~rslot8 = ~bplacef4; ~rdo8 = ~si8.value;});
5270                 if(~si8.value == "s4", {~rslot8 = ~bplaces4; ~rdo8 = ~si8.value;});
5271                 if(~si8.value == "o5", {~rslot8 = ~bplaceo5; ~rdo8 = ~si8.value;});
5272                 if(~si8.value == "f5", {~rslot8 = ~bplacef5; ~rdo8 = ~si8.value;});
5273                 if(~si8.value == "s5", {~rslot8 = ~bplaces5; ~rdo8 = ~si8.value;});
5274                 if(~si8.value == "o6", {~rslot8 = ~bplaceo6; ~rdo8 = ~si8.value;});
5275                 if(~si8.value == "f6", {~rslot8 = ~bplacef6; ~rdo8 = ~si8.value;});
5276                 if(~si8.value == "s6", {~rslot8 = ~bplaces6; ~rdo8 = ~si8.value;});
5277                 if(~si8.value == "o7", {~rslot8 = ~bplaceo7; ~rdo8 = ~si8.value;});
5278                 if(~si8.value == "f7", {~rslot8 = ~bplacef7; ~rdo8 = ~si8.value;});
5279                 if(~si8.value == "s7", {~rslot8 = ~bplaces7; ~rdo8 = ~si8.value;});
5280                 if(~si8.value == "o8", {~rslot8 = ~bplaceo8; ~rdo8 = ~si8.value;});
5281                 if(~si8.value == "f8", {~rslot8 = ~bplacef8; ~rdo8 = ~si8.value;});
5282                 if(~si8.value == "s8", {~rslot8 = ~bplaces8; ~rdo8 = ~si8.value;});
5283         };
5284
5285
5286         //routine function button
5287
5288         ~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;
5289
5290                 if(button.value == 1, {
5291                         ({
5292                                 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;
5293                                 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;
5294                                 ~rview = View(w, Rect(Window.screenBounds.width-(340+46),Window.screenBounds.height-(340+46/1.6180339887499)-110,340+46,340+46/1.6180339887499)).front;
5295                                 /*w.view.decorator=FlowLayout(w.view.bounds);
5296                                 w.view.decorator.gap=2@2;*/
5297
5298                                 top = 0;
5299
5300                                 i1 = StaticText(~rview, Rect(leftdo , top=top, width, height)).background_(Color.black).string_("rslot1").stringColor_(Color.white);
5301                                 i2 = StaticText(~rview, Rect(leftdo , top=top+height, width, height)).background_(Color.black).string_("rslot2").stringColor_(Color.white);
5302                                 i3 = StaticText(~rview, Rect(leftdo , top=top+height, width, height)).background_(Color.black).string_("rslot3").stringColor_(Color.white);
5303                                 i4 = StaticText(~rview, Rect(leftdo , top=top+height, width, height)).background_(Color.black).string_("rslot4").stringColor_(Color.white);
5304                                 i5 = StaticText(~rview, Rect(leftdo , top=top+height, width, height)).background_(Color.black).string_("rslot5").stringColor_(Color.white);
5305                                 i6 = StaticText(~rview, Rect(leftdo , top=top+height, width, height)).background_(Color.black).string_("rslot6").stringColor_(Color.white);
5306                                 i7 = StaticText(~rview, Rect(leftdo , top=top+height, width, height)).background_(Color.black).string_("rslot7").stringColor_(Color.white);
5307                                 i8 = StaticText(~rview, Rect(leftdo , top=top+height, width, height)).background_(Color.black).string_("rslot8").stringColor_(Color.white);
5308
5309                                 top = 0;
5310
5311                                 ~si1a=TextField(~rview, Rect(leftdobox , top=top, widthbox/2, heightbox)).background_(Color.black).stringColor_(Color.white).value_(~rdo1a);
5312                                 ~si1b=TextField(~rview, Rect(leftdobox+(widthbox/2) , top=top, widthbox/2, heightbox)).background_(Color.black).stringColor_(Color.white).value_(~rdo1b);
5313                                 ~si2=TextField(~rview, Rect(leftdobox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).stringColor_(Color.white).value_(~rdo2);
5314                                 ~si3=TextField(~rview, Rect(leftdobox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).stringColor_(Color.white).value_(~rdo3);
5315                                 ~si4=TextField(~rview, Rect(leftdobox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).stringColor_(Color.white).value_(~rdo4);
5316                                 ~si5=TextField(~rview, Rect(leftdobox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).stringColor_(Color.white).value_(~rdo5);
5317                                 ~si6=TextField(~rview, Rect(leftdobox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).stringColor_(Color.white).value_(~rdo6);
5318                                 ~si7=TextField(~rview, Rect(leftdobox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).stringColor_(Color.white).value_(~rdo7);
5319                                 ~si8=TextField(~rview, Rect(leftdobox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).stringColor_(Color.white).value_(~rdo8);
5320
5321                                 top = 0;
5322
5323                                 t1 = StaticText(~rview, Rect(lefttime , top=top, width, height)).background_(Color.black).string_("rtime1").stringColor_(Color.white);
5324                                 t2 = StaticText(~rview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("rtime2").stringColor_(Color.white);
5325                                 t3 = StaticText(~rview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("rtime3").stringColor_(Color.white);
5326                                 t4 = StaticText(~rview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("rtime4").stringColor_(Color.white);
5327                                 t5 = StaticText(~rview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("rtime5").stringColor_(Color.white);
5328                                 t6 = StaticText(~rview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("rtime6").stringColor_(Color.white);
5329                                 t7 = StaticText(~rview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("rtime7").stringColor_(Color.white);
5330                                 t8 = StaticText(~rview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("rtime8").stringColor_(Color.white);
5331                                 tall = StaticText(~rview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("all time").stringColor_(Color.white);
5332
5333
5334                                 top = 0;
5335
5336                                 st1=NumberBox(~rview, Rect(lefttimebox , top=top, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~rtime1);
5337                                 st2=NumberBox(~rview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~rtime2);
5338                                 st3=NumberBox(~rview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~rtime3);
5339                                 st4=NumberBox(~rview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~rtime4);
5340                                 st5=NumberBox(~rview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~rtime5);
5341                                 st6=NumberBox(~rview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~rtime6);
5342                                 st7=NumberBox(~rview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~rtime7);
5343                                 st8=NumberBox(~rview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~rtime8);
5344                                 stall=NumberBox(~rview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~rtimeall);
5345
5346
5347                                 ~si1a.action_({~si1aset.value});
5348                                 ~si1b.action_({~si1bset.value});
5349                                 ~si2.action_({~si2set.value});
5350                                 ~si3.action_({~si3set.value});
5351                                 ~si4.action_({~si4set.value});
5352                                 ~si5.action_({~si5set.value});
5353                                 ~si6.action_({~si6set.value});
5354                                 ~si7.action_({~si7set.value});
5355                                 ~si8.action_({~si8set.value});
5356
5357                                 stall.action_({arg val;
5358                                         ~rtimeall = val.value;
5359                                         ~rtime1 = val.value;
5360                                         ~rtime2 = val.value;
5361                                         ~rtime3 = val.value;
5362                                         ~rtime4 = val.value;
5363                                         ~rtime5 = val.value;
5364                                         ~rtime6 = val.value;
5365                                         ~rtime7 = val.value;
5366                                         ~rtime8 = val.value;
5367                                         ~rview.close; ~rviewbutton.valueAction_(1);
5368                                 });
5369                                 st1.action_({arg val; ~rtime1 = val.value;});
5370                                 st2.action_({arg val; ~rtime2 = val.value;});
5371                                 st3.action_({arg val; ~rtime3 = val.value;});
5372                                 st4.action_({arg val; ~rtime4 = val.value;});
5373                                 st5.action_({arg val; ~rtime5 = val.value;});
5374                                 st6.action_({arg val; ~rtime6 = val.value;});
5375                                 st7.action_({arg val; ~rtime7 = val.value;});
5376                                 st8.action_({arg val; ~rtime8 = val.value;});
5377
5378                                 ~rview.background_(Color.black);
5379
5380                                 ~metronomeincr = 1;
5381
5382                                 ~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;
5383
5384                                         if(button.value == 1, {
5385
5386                                                 ~metronome = Task({
5387                                                         inf.do({
5388                                                                 AppClock.sched(0, {~metronomebutton.value = 1;});
5389                                                                 ~metronomeincr.wait;
5390                                                                 AppClock.sched(0, {~metronomebutton.value = 0;});
5391                                                                 ~metronomeincr.wait;
5392                                                         });
5393                                                 });
5394
5395                                                 ~loop = Task({
5396                                                         1.do({
5397                                                                 {~rslot1a.valueAction_(0)}.defer;
5398                                                                 ~rtime1.wait;
5399                                                                 {~rslot2.valueAction_(0)}.defer;
5400                                                                 ~rtime2.wait;
5401                                                                 {~rslot3.valueAction_(0)}.defer;
5402                                                                 ~rtime3.wait;
5403                                                                 {~rslot4.valueAction_(0)}.defer;
5404                                                                 ~rtime4.wait;
5405                                                                 {~rslot5.valueAction_(0)}.defer;
5406                                                                 ~rtime5.wait;
5407                                                                 {~rslot6.valueAction_(0)}.defer;
5408                                                                 ~rtime6.wait;
5409                                                                 {~rslot7.valueAction_(0)}.defer;
5410                                                                 ~rtime7.wait;
5411                                                                 {~rslot8.valueAction_(0)}.defer;
5412                                                                 ~rtime8.wait;
5413                                                         });
5414                                                         inf.do({
5415                                                                 {~rslot1b.valueAction_(0)}.defer;
5416                                                                 ~rtime1.wait;
5417                                                                 {~rslot2.valueAction_(0)}.defer;
5418                                                                 ~rtime2.wait;
5419                                                                 {~rslot3.valueAction_(0)}.defer;
5420                                                                 ~rtime3.wait;
5421                                                                 {~rslot4.valueAction_(0)}.defer;
5422                                                                 ~rtime4.wait;
5423                                                                 {~rslot5.valueAction_(0)}.defer;
5424                                                                 ~rtime5.wait;
5425                                                                 {~rslot6.valueAction_(0)}.defer;
5426                                                                 ~rtime6.wait;
5427                                                                 {~rslot7.valueAction_(0)}.defer;
5428                                                                 ~rtime7.wait;
5429                                                                 {~rslot8.valueAction_(0)}.defer;
5430                                                                 ~rtime8.wait;
5431                                                         });
5432                                         }); SystemClock(~metronome.start); SystemClock(~loop.start); ~numsynths.stop;}, {
5433
5434                                                 SystemClock(~metronome.stop); SystemClock(~loop.stop); SystemClock(~loop.reset); ~synthfree.value; ~pauseroutinebutton.value = 0; ~numsynths.stop; ~numsynthsfunc.value;});
5435                                 });
5436
5437                                 ~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;
5438
5439                                         if(button.value == 1, {SystemClock(~loop.pause); ~synthpause.value;}, {SystemClock(~loop.resume); ~synthflow.value;});
5440                                 });
5441
5442                                 ~closeroutinebutton = Button.new(~rview,Rect(220, top+40, 40, 40/~gm)).states_([["close",Color.white,Color.black]]).action_({arg button;
5443
5444                                         ~rview.close; ~rviewbutton.value = 0;
5445                                 });
5446
5447                                 ~metronomebutton = Button.new(~rview,Rect(120, top+40, 40, 40/~gm)).states_([["",Color.white,Color.red],["",Color.white,Color.blue]]).action_({arg button;});
5448
5449                         }.value);
5450
5451                         if(~loop.isPlaying == true, {~routinebutton.value = 1;});
5452                         ~rview.front;
5453                 }, {~rview.close});
5454         });
5455
5456
5457         //synth identifier function
5458
5459         ~synthmonitor = StaticText(w, Rect(Window.screenBounds.width-14,~bpt+49,18,18/1.6180339887499)).background_(Color.black).stringColor_(Color.white);
5460         ~synthmonitor.string = if(~currentsynth == nil, {"nil".asString});
5461
5462         ~synthmonitorfunc = {
5463                 ~synthmonitor.close;
5464                 ~synthmonitor = StaticText(w, Rect(Window.screenBounds.width-14,~bpt+49,18,18/1.6180339887499)).background_(Color.black).stringColor_(Color.white);
5465                 ~synthmonitor.string = ~currentsynth.asString;
5466                 ~synthmonitor.font = Font(size: 10);
5467         };
5468
5469         ~synthmonitorfunc.value;
5470
5471
5472         //cpu, # of ugens, # of synths, and current frequencies display
5473
5474         ~cpumonitor = StaticText(w, Rect(Window.screenBounds.width-500,~bpt-200,500,90/1.6180339887499)).background_(Color.black).stringColor_(Color.white);
5475         ~cpumonitor.close;
5476
5477         ~cpumonitorfunc =  {
5478                 ~cpumonitor.close;
5479                 ~cpumonitor = StaticText(w, Rect(20,~bpt-100,800,124/1.6180339887499)).background_(Color.black).stringColor_(Color.white);
5480                 if(~settingsbutton.value == 1, {~cpumonitorbutton.valueAction = 0;});
5481                 ~cpumonitor.string =
5482                 "cpu: "+s.avgCPU.asString+"%"++"\n" ++
5483                 "ugens: "+s.numUGens.asString++"\n" ++
5484                 "synths: "+s.numSynths.asString++"\n" ++
5485                 /*"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)++","++
5486                 "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);
5487                 */              ~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);
5488                 /*[ ~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;
5489                 */      ~cpumonitor.font = Font(size: 14);
5490         };
5491
5492         ~cpumonitorroutine = Routine({
5493                 inf.do({
5494                         AppClock.sched(0, {
5495                                 ~cpumonitorfunc.value;
5496                         });
5497                         1.wait;
5498                 });
5499         });
5500
5501         ~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;
5502
5503                 if(button.value == 1, {
5504                         if(~settingsbutton.value == 1, {~settingsbutton.valueAction = 0;});
5505                         ~cpumonitorroutine.reset;
5506                         ~cpumonitorroutine.play;
5507                 }, {~cpumonitorroutine.stop; ~cpumonitor.close;});
5508
5509         });
5510
5511
5512         //information button
5513
5514         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;
5515
5516                 if(button.value == 1, {
5517                         ~hb = TextView(w, Rect(0,0, Window.screenBounds.width, Window.screenBounds.height-200)).background_(Color.black);
5518                         (~hb.string =
5519                                 "(scroll down to see more)"++"\n"++"\n"++"\n"++
5520                                 "ctrl/cmd-period: stop synth/free server"++"\n"++"\n"++"\n"++
5521                                 "GUI Buttons"++"\n"++"\n"++"\n"++
5522                                 "synth0/synth1: start/stop synth set"++"\n"++"\n"++
5523                                 "pause0/pause1: pause/unpause synth set"++"\n"++"\n"++
5524                                 "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"++
5525                                 "copy: copy frequency/note info"++"\n"++"\n"++
5526                                 "settings button:"++"\n"++"\n"++
5527                                 "     KWS number: change number of kw(King Wen) sequences in a timewave half-cycle (or amplitude x2). press set to load."++"\n"++"\n"++
5528                                 "     base(lowest) freq(hz): set the base(lowest) frequency of timewave cycle. default is "++~base_frequency.asString++". press set to load."++"\n"++"\n"++
5529                                 "     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"++
5530                                 "     lp filter limit(hz): change the low-pass filter frequency limit. default is "++~default_low_pass_filter_freq_limit.asString++". press set to load."++"\n"++"\n"++
5531                                 "     automate: setting for automated mid-timewave sequence events. press set to load."++"\n"++"\n"++
5532                                 "     automate period: setting for determining when sendreply triggers for the automate function. 1 is in 1 full timewave cycle, 0.5 is in 1/2 timewave cycle, 1.5 is 1 1/2 cycles,"++"\n"++"     2 is in 2 cycles, etc. press set to load."++"\n"++"\n"++
5533                                 "     volume: change volume, or more accurately amplitude. default is "++~vol_default.asString++". press set to load.""\n"++"\n"++
5534                                 "s1-s8: set/save note positions"++"\n"++"\n"++
5535                                 "g1-g8: groups of saved note positions"++"\n"++"\n"++
5536                                 "uc-u8: undo changes to set note positions. press set to load."++"\n"++"\n"++
5537                                 "rc, /rc: start recording/stop recording"++"\n"++"\n"++
5538                                 "prc: pause recording"++"\n"++"\n"++
5539                                 "o1-o8: play set/saved note positions by opening a new synth set"++"\n"++"\n"++
5540                                 "f1-f8: flow transition to set/saved note positions"++"\n"++"\n"++
5541                                 "s1-s8: slide transition to set/saved note positions"++"\n"++"\n"++
5542                                 "m/u: mute/unmute all"++"\n"++"\n"++
5543                                 "1-12: mute or unmute individual synth"++"\n"++"\n"++
5544                                 "cm: cpu percentage/number of ugens/number of synths display"++"\n"++"\n"++
5545                                 "rw: random western scale"++"\n"++"\n"++
5546                                 "re: random eastern scale"++"\n"++"\n"++
5547                                 "r: routine/loop function - rslot for synth set, rtime for time between transitions"++"\n"++"\n"++
5548                                 "eo: extra options - set frequencies, set slide time/increment"++"\n"++"\n"++
5549                                 "i: help"++"\n"++"\n"++
5550                                 "m: minimize window"++"\n"++"\n"++
5551                                 "c: close window"++"\n"++"\n"++"\n"++
5552                                 "Keyboard Functions (functionality will vary with device)"++"\n"++"\n"++"\n"++
5553                                 "s: start/stop synth set"++"\n"++"\n"++
5554                                 "space bar: pause/unpause synth set"++"\n"++"\n"++
5555                                 "ctrl-period/cmd-period: stop synth/free server"++"\n"++"\n"++
5556                                 "left/right arrow(or J and L): move down/up note"++"\n"++"\n"++
5557                                 "up/down arrow(or I and K): change synth for left/right arrow note function"++"\n"++"\n"++
5558                                 "#1-= on keyboard: choose synth for left/right arrow note function"++"\n"++"\n"++
5559                                 "r: routine/loop function - rslot for synth set, rtime for time between transitions"++"\n"++"\n"++
5560                                 "m: mute/unmute all"++"\n"++"\n"++
5561                                 "c: copy function"++"\n"++"\n"++
5562                                 "t: timed synth function"++"\n"++"\n"++
5563                                 "esc: minimize window"
5564                                 ;
5565                         );
5566                         ~hb.stringColor = Color.white;
5567                 },
5568                 {~hb.close;});
5569         });
5570
5571
5572         //random notes button 1
5573
5574         ~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;
5575
5576                 if((~l1a.isRunning == true) or: (~l1a1.isRunning == true), {
5577                         12.do(x = 0; {("f"++(x=x+1)).asSymbol.envirPut(~freqmap.at(rrand(36, 91));)});
5578                         ~synthflow.value;
5579                 });
5580         });
5581
5582
5583         //random notes button 2
5584
5585         ~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;
5586
5587                 if((~l1a.isRunning == true) or: (~l1a1.isRunning == true), {
5588                         12.do(x = 0; {("f"++(x=x+1)).asSymbol.envirPut((~freqmap.at(127)/8).rand;)});
5589                         ~synthflow.value;
5590                 });
5591         });
5592
5593
5594         //setgroup buttons, sg1-sg8
5595
5596         ~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;
5597
5598                 if(button.value == 1, {
5599                         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))});
5600                         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))});
5601                         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))});
5602                         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))});
5603                         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))});
5604                         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))});
5605                         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))});
5606                         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))});
5607
5608                         ~setgroup2.value = 0;
5609                         ~setgroup3.value = 0;
5610                         ~setgroup4.value = 0;
5611                         ~setgroup5.value = 0;
5612                         ~setgroup6.value = 0;
5613                         ~setgroup7.value = 0;
5614                         ~setgroup8.value = 0;
5615
5616                         ~setgroupval = 1;
5617                 });
5618         });
5619         ~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;
5620
5621                 if(button.value == 1, {
5622                         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))});
5623                         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))});
5624                         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))});
5625                         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))});
5626                         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))});
5627                         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))});
5628                         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))});
5629                         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))});
5630
5631                         ~setgroup1.value = 0;
5632                         ~setgroup3.value = 0;
5633                         ~setgroup4.value = 0;
5634                         ~setgroup5.value = 0;
5635                         ~setgroup6.value = 0;
5636                         ~setgroup7.value = 0;
5637                         ~setgroup8.value = 0;
5638
5639                         ~setgroupval = 2;
5640                 });
5641         });
5642         ~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;
5643
5644                 if(button.value == 1, {
5645                         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))});
5646                         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))});
5647                         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))});
5648                         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))});
5649                         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))});
5650                         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))});
5651                         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))});
5652                         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))});
5653
5654                         ~setgroup1.value = 0;
5655                         ~setgroup2.value = 0;
5656                         ~setgroup4.value = 0;
5657                         ~setgroup5.value = 0;
5658                         ~setgroup6.value = 0;
5659                         ~setgroup7.value = 0;
5660                         ~setgroup8.value = 0;
5661
5662                         ~setgroupval = 3;
5663                 });
5664         });
5665         ~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;
5666
5667                 if(button.value == 1, {
5668                         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))});
5669                         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))});
5670                         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))});
5671                         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))});
5672                         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))});
5673                         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))});
5674                         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))});
5675                         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))});
5676
5677                         ~setgroup1.value = 0;
5678                         ~setgroup2.value = 0;
5679                         ~setgroup3.value = 0;
5680                         ~setgroup5.value = 0;
5681                         ~setgroup6.value = 0;
5682                         ~setgroup7.value = 0;
5683                         ~setgroup8.value = 0;
5684
5685                         ~setgroupval = 4;
5686                 });
5687         });
5688         ~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;
5689
5690                 if(button.value == 1, {
5691                         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))});
5692                         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))});
5693                         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))});
5694                         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))});
5695                         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))});
5696                         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))});
5697                         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))});
5698                         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))});
5699
5700                         ~setgroup1.value = 0;
5701                         ~setgroup2.value = 0;
5702                         ~setgroup3.value = 0;
5703                         ~setgroup4.value = 0;
5704                         ~setgroup6.value = 0;
5705                         ~setgroup7.value = 0;
5706                         ~setgroup8.value = 0;
5707
5708                         ~setgroupval = 5;
5709                 });
5710         });
5711         ~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;
5712
5713                 if(button.value == 1, {
5714                         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))});
5715                         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))});
5716                         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))});
5717                         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))});
5718                         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))});
5719                         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))});
5720                         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))});
5721                         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))});
5722
5723                         ~setgroup1.value = 0;
5724                         ~setgroup2.value = 0;
5725                         ~setgroup3.value = 0;
5726                         ~setgroup4.value = 0;
5727                         ~setgroup5.value = 0;
5728                         ~setgroup7.value = 0;
5729                         ~setgroup8.value = 0;
5730
5731                         ~setgroupval = 6;
5732                 });
5733         });
5734         ~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;
5735
5736                 if(button.value == 1, {
5737                         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))});
5738                         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))});
5739                         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))});
5740                         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))});
5741                         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))});
5742                         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))});
5743                         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))});
5744                         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))});
5745
5746                         ~setgroup1.value = 0;
5747                         ~setgroup2.value = 0;
5748                         ~setgroup3.value = 0;
5749                         ~setgroup4.value = 0;
5750                         ~setgroup5.value = 0;
5751                         ~setgroup6.value = 0;
5752                         ~setgroup8.value = 0;
5753
5754                         ~setgroupval = 7;
5755                 });
5756         });
5757         ~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;
5758
5759                 if(button.value == 1, {
5760                         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))});
5761                         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))});
5762                         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))});
5763                         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))});
5764                         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))});
5765                         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))});
5766                         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))});
5767                         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))});
5768
5769                         ~setgroup1.value = 0;
5770                         ~setgroup2.value = 0;
5771                         ~setgroup3.value = 0;
5772                         ~setgroup4.value = 0;
5773                         ~setgroup5.value = 0;
5774                         ~setgroup6.value = 0;
5775                         ~setgroup7.value = 0;
5776
5777                         ~setgroupval = 8;
5778                 });
5779         });
5780
5781
5782         //if setgroup values are nil
5783
5784         if(~setgroupval == nil, {~setgroup1.value = 1;});
5785         if(~setgroupval == 1, {~setgroup1.value = 1;});
5786         if(~setgroupval == 2, {~setgroup2.value = 1;});
5787         if(~setgroupval == 3, {~setgroup3.value = 1;});
5788         if(~setgroupval == 4, {~setgroup4.value = 1;});
5789         if(~setgroupval == 5, {~setgroup5.value = 1;});
5790         if(~setgroupval == 6, {~setgroup6.value = 1;});
5791         if(~setgroupval == 7, {~setgroup7.value = 1;});
5792         if(~setgroupval == 8, {~setgroup8.value = 1;});
5793
5794
5795         //save chord notes buttons, s1-s8
5796
5797         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;
5798
5799                 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))});});
5800                 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))});});
5801                 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))});});
5802                 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))});});
5803                 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))});});
5804                 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))});});
5805                 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))});});
5806                 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))});});
5807
5808                 n1.states_([["s1",Color.green,Color.black]]);
5809                 n2.states_([["s2",Color.white,Color.black]]);
5810                 n3.states_([["s3",Color.white,Color.black]]);
5811                 n4.states_([["s4",Color.white,Color.black]]);
5812                 n5.states_([["s5",Color.white,Color.black]]);
5813                 n6.states_([["s6",Color.white,Color.black]]);
5814                 n7.states_([["s7",Color.white,Color.black]]);
5815                 n8.states_([["s8",Color.white,Color.black]]);
5816         });});
5817
5818         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;
5819
5820                 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))});});
5821                 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))});});
5822                 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))});});
5823                 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))});});
5824                 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))});});
5825                 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))});});
5826                 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))});});
5827                 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))});});
5828
5829                 n1.states_([["s1",Color.white,Color.black]]);
5830                 n2.states_([["s2",Color.green,Color.black]]);
5831                 n3.states_([["s3",Color.white,Color.black]]);
5832                 n4.states_([["s4",Color.white,Color.black]]);
5833                 n5.states_([["s5",Color.white,Color.black]]);
5834                 n6.states_([["s6",Color.white,Color.black]]);
5835                 n7.states_([["s7",Color.white,Color.black]]);
5836                 n8.states_([["s8",Color.white,Color.black]]);
5837         });});
5838         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;
5839
5840                 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))});});
5841                 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))});});
5842                 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))});});
5843                 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))});});
5844                 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))});});
5845                 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))});});
5846                 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))});});
5847                 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))});});
5848
5849                 n1.states_([["s1",Color.white,Color.black]]);
5850                 n2.states_([["s2",Color.white,Color.black]]);
5851                 n3.states_([["s3",Color.green,Color.black]]);
5852                 n4.states_([["s4",Color.white,Color.black]]);
5853                 n5.states_([["s5",Color.white,Color.black]]);
5854                 n6.states_([["s6",Color.white,Color.black]]);
5855                 n7.states_([["s7",Color.white,Color.black]]);
5856                 n8.states_([["s8",Color.white,Color.black]]);
5857         });});
5858         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;
5859
5860                 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))});});
5861                 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))});});
5862                 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))});});
5863                 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))});});
5864                 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))});});
5865                 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))});});
5866                 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))});});
5867                 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))});});
5868
5869                 n1.states_([["s1",Color.white,Color.black]]);
5870                 n2.states_([["s2",Color.white,Color.black]]);
5871                 n3.states_([["s3",Color.white,Color.black]]);
5872                 n4.states_([["s4",Color.green,Color.black]]);
5873                 n5.states_([["s5",Color.white,Color.black]]);
5874                 n6.states_([["s6",Color.white,Color.black]]);
5875                 n7.states_([["s7",Color.white,Color.black]]);
5876                 n8.states_([["s8",Color.white,Color.black]]);
5877         });});
5878         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;
5879
5880                 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))});});
5881                 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))});});
5882                 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))});});
5883                 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))});});
5884                 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))});});
5885                 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))});});
5886                 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))});});
5887                 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))});});
5888
5889                 n1.states_([["s1",Color.white,Color.black]]);
5890                 n2.states_([["s2",Color.white,Color.black]]);
5891                 n3.states_([["s3",Color.white,Color.black]]);
5892                 n4.states_([["s4",Color.white,Color.black]]);
5893                 n5.states_([["s5",Color.green,Color.black]]);
5894                 n6.states_([["s6",Color.white,Color.black]]);
5895                 n7.states_([["s7",Color.white,Color.black]]);
5896                 n8.states_([["s8",Color.white,Color.black]]);
5897         });});
5898         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;
5899
5900                 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))});});
5901                 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))});});
5902                 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))});});
5903                 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))});});
5904                 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))});});
5905                 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))});});
5906                 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))});});
5907                 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))});});
5908
5909                 n1.states_([["s1",Color.white,Color.black]]);
5910                 n2.states_([["s2",Color.white,Color.black]]);
5911                 n3.states_([["s3",Color.white,Color.black]]);
5912                 n4.states_([["s4",Color.white,Color.black]]);
5913                 n5.states_([["s5",Color.white,Color.black]]);
5914                 n6.states_([["s6",Color.green,Color.black]]);
5915                 n7.states_([["s7",Color.white,Color.black]]);
5916                 n8.states_([["s8",Color.white,Color.black]]);
5917         });});
5918         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;
5919
5920                 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))});});
5921                 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))});});
5922                 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))});});
5923                 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))});});
5924                 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))});});
5925                 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))});});
5926                 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))});});
5927                 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))});});
5928
5929                 n1.states_([["s1",Color.white,Color.black]]);
5930                 n2.states_([["s2",Color.white,Color.black]]);
5931                 n3.states_([["s3",Color.white,Color.black]]);
5932                 n4.states_([["s4",Color.white,Color.black]]);
5933                 n5.states_([["s5",Color.white,Color.black]]);
5934                 n6.states_([["s6",Color.white,Color.black]]);
5935                 n7.states_([["s7",Color.green,Color.black]]);
5936                 n8.states_([["s8",Color.white,Color.black]]);
5937         });});
5938         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;
5939
5940                 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))});});
5941                 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))});});
5942                 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))});});
5943                 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))});});
5944                 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))});});
5945                 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))});});
5946                 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))});});
5947                 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))});});
5948
5949                 n1.states_([["s1",Color.white,Color.black]]);
5950                 n2.states_([["s2",Color.white,Color.black]]);
5951                 n3.states_([["s3",Color.white,Color.black]]);
5952                 n4.states_([["s4",Color.white,Color.black]]);
5953                 n5.states_([["s5",Color.white,Color.black]]);
5954                 n6.states_([["s6",Color.white,Color.black]]);
5955                 n7.states_([["s7",Color.white,Color.black]]);
5956                 n8.states_([["s8",Color.green,Color.black]]);
5957         });});
5958
5959
5960         //undo saved chord pop-up menu
5961
5962         ~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;});
5963
5964
5965         //set button for undo pop-up menu
5966
5967         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;
5968                 case
5969                 {~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;}
5970                 {~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;}
5971                 {~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;}
5972                 {~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;}
5973                 {~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;}
5974                 {~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;}
5975                 {~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;}
5976                 {~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;}
5977                 {~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;};
5978         });
5979
5980
5981         //record/stop record button
5982
5983         ~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;
5984
5985                 if(button.value == 1, {~numsynths.stop; s.record; if(button.value == 0, {button.value = 1});},
5986                         {s.stopRecording; ~startrecord.value = 0; ~pauserecord.value = 0; ~numsynths.stop; ~numsynths.play;});
5987         });
5988
5989
5990         //pause record button
5991
5992         ~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});});
5993
5994
5995         //minimize GUI window button
5996
5997         ~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;
5998
5999                 ~fullscreen_correct = {w.fullScreen};
6000                 ~fscview = UserView(w, Rect(0,0, Window.screenBounds.width-100, Window.screenBounds.height;));
6001                 ~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;});
6002                 ~fscview.mouseEnterAction_{|v, x, y| ~fullscreen_correct.value; ~fullscreen_correct = nil; ~fscview.close; ~fscview = nil; ~fullscreen_button.close; ~fullscreen_button = nil;};
6003         });
6004
6005
6006         //close GUI window button
6007
6008         ~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;
6009
6010                 if(~closemessage != nil, {~closemessage.close}, {nil});
6011                 ~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;
6012                 ~closemessagestring = StaticText(~closemessage, Rect(0,0,340+46,340+46/1.6180339887499)).background_(Color.black);
6013                 ~closemessagestring.align = \center;
6014                 ~closemessagestring.string ="Close Timewave Synth?";
6015                 ~closemessagestring.stringColor = Color.white;
6016                 ~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;});});
6017                 ~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;});});
6018                 ~closemessage.front;
6019
6020         });
6021
6022
6023         w.front; w.fullScreen;
6024
6025         /* e-mail: ken_brant@ymail.com */
6026
6027 }.value);
6028 );
6029 );
6030
6031
6032 //Interpreted King Wen Sequences
6033
6034 /*
6035
6036 (#a,b,c,d,e,f = /*[ 128.43436842029,128.43436842029,128.43436842029,128.43436842029,128.43436842029,128.43436842029  ]*/
6037 [ ~basefreq,~basefreq,~basefreq,~basefreq,~basefreq,~basefreq  ];
6038 ~a = a; ~b = b; ~c =c; ~d = d; ~e = e;~f=f;);
6039
6040 ~fth = 1.4142135623729;
6041 ~bi  = ~fth; (~bi  = "binary interval" - intverval of key change to a hexagram line's opposite in King Wen sequence)
6042
6043
6044 (First Setting)
6045
6046 /*1*/   #a,b,c,d,e,f=[ ~a,~b,~c,~d,~e,~f  ],
6047 /*2*/   [ a = a/~bi, b = b/~bi, c = c/~bi, d = d/~bi, e = e/~bi, f = f/~bi ],
6048 /*3*/   [ a = a,     b = b*~bi, c = c,     d = d,     e = e,     f = f*~bi ],
6049 /*4*/   [ a = a*~bi, b = b/~bi, c = c,     d = d,     e = e*~bi, f = f/~bi ],
6050 /*5*/   [ a = a/~bi, b = b*~bi, c = c,     d = d*~bi, e = e,     f = f*~bi ],
6051 /*6*/   [ a = a*~bi, b = b,     c = c*~bi, d = d/~bi, e = e,     f = f/~bi ],
6052 /*7*/   [ a = a/~bi, b = b/~bi, c = c/~bi, d = d,     e = e,     f = f     ],
6053 /*8*/   [ a = a,     b = b*~bi, c = c,     d = d,     e = e/~bi, f = f     ],
6054 /*9*/   [ a = a*~bi, b = b,     c = c,     d = d*~bi, e = e*~bi, f = f*~bi ],
6055 /*10*/  [ a = a,     b = b,     c = c*~bi, d = d/~bi, e = e,     f = f     ],
6056 /*11*/  [ a = a/~bi, b = b/~bi, c = c/~bi, d = d*~bi, e = e,     f = f     ],
6057 /*12*/  [ a = a*~bi, b = b*~bi, c = c*~bi, d = d/~bi, e = e/~bi, f = f/~bi ],
6058 /*13*/  [ a = a,     b = b,     c = c,     d = d*~bi, e = e,     f = f*~bi ],
6059 /*14*/  [ a = a,     b = b/~bi, c = c,     d = d,     e = e*~bi, f = f     ],
6060 /*15*/  [ a = a/~bi, b = b,     c = c/~bi, d = d,     e = e/~bi, f = f/~bi ],
6061 /*16*/  [ a = a,     b = b,     c = c*~bi, d = d/~bi, e = e,     f = f     ],
6062 /*17*/  [ a = a,     b = b*~bi, c = c,     d = d,     e = e,     f = f*~bi ],
6063 /*18*/  [ a = a*~bi, b = b/~bi, c = c/~bi, d = d*~bi, e = e*~bi, f = f/~bi ],
6064 /*19*/  [ a = a/~bi, b = b,     c = c,     d = d/~bi, e = e,     f = f*~bi ],
6065 /*20*/  [ a = a*~bi, b = b*~bi, c = c,     d = d,     e = e/~bi, f = f/~bi ],
6066 /*21*/  [ a = a,     b = b/~bi, c = c*~bi, d = d,     e = e,     f = f*~bi ],
6067 /*22*/  [ a = a,     b = b,     c = c/~bi, d = d*~bi, e = e,     f = f     ],
6068 /*23*/  [ a = a,     b = b,     c = c,     d = d/~bi, e = e,     f = f/~bi ],
6069 /*24*/  [ a = a/~bi, b = b,     c = c,     d = d,     e = e,     f = f*~bi ],
6070 /*25*/  [ a = a*~bi, b = b*~bi, c = c*~bi, d = d,     e = e,     f = f     ],
6071 /*26*/  [ a = a,     b = b/~bi, c = c/~bi, d = d*~bi, e = e*~bi, f = f     ],
6072 /*27*/  [ a = a,     b = b,     c = c,     d = d/~bi, e = e/~bi, f = f     ],
6073 /*28*/  [ a = a/~bi, b = b*~bi, c = c*~bi, d = d*~bi, e = e*~bi, f = f/~bi ],
6074 /*29*/  [ a = a,     b = b,     c = c/~bi, d = d/~bi, e = e,     f = f     ],
6075 /*30*/  [ a = a*~bi, b = b/~bi, c = c*~bi, d = d*~bi, e = e/~bi, f = f*~bi ],
6076 /*31*/  [ a = a/~bi, b = b*~bi, c = c,     d = d,     e = e,     f = f/~bi ],
6077 /*32*/  [ a = a,     b = b/~bi, c = c,     d = d,     e = e*~bi, f = f     ],
6078 /*33*/  [ a = a*~bi, b = b*~bi, c = c,     d = d,     e = e/~bi, f = f     ],
6079 /*34*/  [ a = a/~bi, b = b/~bi, c = c,     d = d,     e = e*~bi, f = f*~bi ],
6080 /*35*/  [ a = a*~bi, b = b,     c = c,     d = d/~bi, e = e/~bi, f = f/~bi ],
6081 /*36*/  [ a = a/~bi, b = b,     c = c/~bi, d = d*~bi, e = e,     f = f*~bi ],
6082 /*37*/  [ a = a*~bi, b = b*~bi, c = c,     d = d,     e = e,     f = f     ],
6083 /*38*/  [ a = a,     b = b/~bi, c = c*~bi, d = d/~bi, e = e*~bi, f = f     ],
6084 /*39*/  [ a = a/~bi, b = b*~bi, c = c/~bi, d = d*~bi, e = e/~bi, f = f/~bi ],
6085 /*40*/  [ a = a,     b = b/~bi, c = c*~bi, d = d/~bi, e = e*~bi, f = f     ],
6086 /*41*/  [ a = a*~bi, b = b,     c = c/~bi, d = d,     e = e,     f = f*~bi ],
6087 /*42*/  [ a = a,     b = b*~bi, c = c,     d = d,     e = e/~bi, f = f     ],
6088 /*43*/  [ a = a/~bi, b = b,     c = c*~bi, d = d*~bi, e = e*~bi, f = f     ],
6089 /*44*/  [ a = a*~bi, b = b,     c = c,     d = d,     e = e,     f = f/~bi ],
6090 /*45*/  [ a = a/~bi, b = b,     c = c,     d = d/~bi, e = e/~bi, f = f     ],
6091 /*46*/  [ a = a,     b = b/~bi, c = c/~bi, d = d*~bi, e = e*~bi, f = f     ],
6092 /*47*/  [ a = a,     b = b*~bi, c = c*~bi, d = d/~bi, e = e,     f = f     ],
6093 /*48*/  [ a = a,     b = b,     c = c/~bi, d = d*~bi, e = e,     f = f     ],
6094 /*49*/  [ a = a,     b = b,     c = c*~bi, d = d,     e = e/~bi, f = f*~bi ],
6095 /*50*/  [ a = a*~bi, b = b/~bi, c = c,     d = d,     e = e*~bi, f = f/~bi ],
6096 /*51*/  [ a = a/~bi, b = b,     c = c,     d = d/~bi, e = e/~bi, f = f*~bi ],
6097 /*52*/  [ a = a*~bi, b = b,     c = c/~bi, d = d*~bi, e = e,     f = f/~bi ],
6098 /*53*/  [ a = a,     b = b*~bi, c = c,     d = d,     e = e,     f = f     ],
6099 /*54*/  [ a = a/~bi, b = b/~bi, c = c*~bi, d = d/~bi, e = e*~bi, f = f*~bi ],
6100 /*55*/  [ a = a,     b = b,     c = c,     d = d*~bi, e = e/~bi, f = f     ],
6101 /*56*/  [ a = a*~bi, b = b,     c = c,     d = d,     e = e,     f = f/~bi ],
6102 /*57*/  [ a = a,     b = b*~bi, c = c/~bi, d = d,     e = e*~bi, f = f     ],
6103 /*58*/  [ a = a/~bi, b = b,     c = c*~bi, d = d/~bi, e = e,     f = f*~bi ],
6104 /*59*/  [ a = a*~bi, b = b,     c = c/~bi, d = d,     e = e,     f = f/~bi ],
6105 /*60*/  [ a = a/~bi, b = b,     c = c,     d = d,     e = e,     f = f*~bi ],
6106 /*61*/  [ a = a*~bi, b = b,     c = c,     d = d,     e = e,     f = f     ],
6107 /*62*/  [ a = a/~bi, b = b/~bi, c = c*~bi, d = d*~bi, e = e/~bi, f = f/~bi ],
6108 /*63*/  [ a = a,     b = b*~bi, c = c/~bi, d = d,     e = e,     f = f*~bi ],
6109 /*64*/  [ a = a*~bi, b = b/~bi, c = c*~bi, d = d/~bi, e = e*~bi, f = f/~bi ]
6110
6111 /*1*/   [ a = a*~n1, b = b*~n1*~bi, c = c*~n1, d = d*~n1*~bi, e = e*~n1, f = f*~n1*~bi ],...
6112
6113
6114 (Second Setting)
6115
6116 /*1*/   #a,b,c,d,e,f=[ ~a,~b,~c,~d,~e,~f  ],
6117 /*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 ],
6118 /*3*/   [ a = a,         b = b*~bi,     c = c,         d = d,         e = e,         f = f*~bi     ],
6119 /*4*/   [ a = a*~bi,     b = b/~bi,     c = c,         d = d,         e = e*~bi,     f = f/~bi     ],
6120 /*5*/   [ a = a/~bi,     b = b*~bi,     c = c,         d = d*~bi,     e = e,         f = f*~bi     ],
6121 /*6*/   [ a = a*~bi,     b = b,         c = c*~bi,     d = d/~bi,     e = e,         f = f/~bi     ],
6122 /*7*/   [ a = a/~bi,     b = b/~bi,     c = c/~bi,     d = d,         e = e,         f = f         ],
6123 /*8*/   [ a = a,         b = b*~bi,     c = c,         d = d,         e = e/~bi,     f = f         ],
6124 /*9*/   [ a = a*~bi,     b = b,         c = c,         d = d*~bi,     e = e*~bi,     f = f*~bi     ],
6125 /*10*/  [ a = a,         b = b,         c = c*~bi,     d = d/~bi,     e = e,         f = f         ],
6126 /*11*/  [ a = a/~bi,     b = b/~bi,     c = c/~bi,     d = d*~bi,     e = e,         f = f         ],
6127 /*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 ],
6128 /*13*/  [ a = a,         b = b,         c = c,         d = d*~bi,     e = e,         f = f*~bi     ],
6129 /*14*/  [ a = a,         b = b/~bi,     c = c,         d = d,         e = e*~bi,     f = f         ],
6130 /*15*/  [ a = a/~bi,     b = b,         c = c/~bi,     d = d,         e = e/~bi,     f = f/~bi     ],
6131 /*16*/  [ a = a,         b = b,         c = c*~bi,     d = d/~bi,     e = e,         f = f         ],
6132 /*17*/  [ a = a,         b = b*~bi,     c = c,         d = d,         e = e,         f = f*~bi     ],
6133 /*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 ],
6134 /*19*/  [ a = a/~bi,     b = b,         c = c,         d = d/~bi,     e = e,         f = f*~bi     ],
6135 /*20*/  [ a = a*~bi,     b = b*~bi,     c = c,         d = d,         e = e/~bi,     f = f/~bi     ],
6136 /*21*/  [ a = a,         b = b/~bi,     c = c*~bi,     d = d,         e = e,         f = f*~bi     ],
6137 /*22*/  [ a = a,         b = b,         c = c/~bi,     d = d*~bi,     e = e,         f = f         ],
6138 /*23*/  [ a = a,         b = b,         c = c,         d = d/~bi,     e = e,         f = f/~bi     ],
6139 /*24*/  [ a = a/~bi,     b = b,         c = c,         d = d,         e = e,         f = f*~bi     ],
6140 /*25*/  [ a = a*~bi,     b = b*~bi,     c = c*~bi,     d = d,         e = e,         f = f         ],
6141 /*26*/  [ a = a,         b = b/~bi,     c = c/~bi,     d = d*~bi,     e = e*~bi,     f = f         ],
6142 /*27*/  [ a = a,         b = b,         c = c,         d = d/~bi,     e = e/~bi,     f = f         ],
6143 /*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 ],
6144 /*29*/  [ a = a,         b = b,         c = c/~bi,     d = d/~bi,     e = e,         f = f         ],
6145 /*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 ],
6146 /*31*/  [ a = a/~bi,     b = b*~bi,     c = c,         d = d,         e = e,         f = f/~bi     ],
6147 /*32*/  [ a = a,         b = b/~bi,     c = c,         d = d,         e = e*~bi,     f = f         ],
6148 /*33*/  [ a = a*~bi,     b = b*~bi,     c = c,         d = d,         e = e/~bi,     f = f         ],
6149 /*34*/  [ a = a/~bi,     b = b/~bi,     c = c,         d = d,         e = e*~bi,     f = f*~bi     ],
6150 /*35*/  [ a = a*~bi,     b = b,         c = c,         d = d/~bi,     e = e/~bi,     f = f/~bi     ],
6151 /*36*/  [ a = a/~bi,     b = b,         c = c/~bi,     d = d*~bi,     e = e,         f = f*~bi     ],
6152 /*37*/  [ a = a*~bi,     b = b*~bi,     c = c,         d = d,         e = e,         f = f         ],
6153 /*38*/  [ a = a,         b = b/~bi,     c = c*~bi,     d = d/~bi,     e = e*~bi,     f = f         ],
6154 /*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 ],
6155 /*40*/  [ a = a,         b = b/~bi,     c = c*~bi,     d = d/~bi,     e = e*~bi,     f = f         ],
6156 /*41*/  [ a = a*~bi,     b = b,         c = c/~bi,     d = d,         e = e,         f = f*~bi     ],
6157 /*42*/  [ a = a,         b = b*~bi,     c = c,         d = d,         e = e/~bi,     f = f         ],
6158 /*43*/  [ a = a/~bi,     b = b,         c = c*~bi,     d = d*~bi,     e = e*~bi,     f = f         ],
6159 /*44*/  [ a = a*~bi,     b = b,         c = c,         d = d,         e = e,         f = f/~bi     ],
6160 /*45*/  [ a = a/~bi,     b = b,         c = c,         d = d/~bi,     e = e/~bi,     f = f         ],
6161 /*46*/  [ a = a,         b = b/~bi,     c = c/~bi,     d = d*~bi,     e = e*~bi,     f = f         ],
6162 /*47*/  [ a = a,         b = b*~bi,     c = c*~bi,     d = d/~bi,     e = e,         f = f         ],
6163 /*48*/  [ a = a,         b = b,         c = c/~bi,     d = d*~bi,     e = e,         f = f         ],
6164 /*49*/  [ a = a,         b = b,         c = c*~bi,     d = d,         e = e/~bi,     f = f*~bi     ],
6165 /*50*/  [ a = a*~bi,     b = b/~bi,     c = c,         d = d,         e = e*~bi,     f = f/~bi     ],
6166 /*51*/  [ a = a/~bi,     b = b,         c = c,         d = d/~bi,     e = e/~bi,     f = f*~bi     ],
6167 /*52*/  [ a = a*~bi,     b = b,         c = c/~bi,     d = d*~bi,     e = e,         f = f/~bi     ],
6168 /*53*/  [ a = a,         b = b*~bi,     c = c,         d = d,         e = e,         f = f         ],
6169 /*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 ],
6170 /*55*/  [ a = a,         b = b,         c = c,         d = d*~bi,     e = e/~bi,     f = f         ],
6171 /*56*/  [ a = a*~bi,     b = b,         c = c,         d = d,         e = e,         f = f/~bi     ],
6172 /*57*/  [ a = a,         b = b*~bi,     c = c/~bi,     d = d,         e = e*~bi,     f = f         ],
6173 /*58*/  [ a = a/~bi,     b = b,         c = c*~bi,     d = d/~bi,     e = e,         f = f*~bi     ],
6174 /*59*/  [ a = a*~bi,     b = b,         c = c/~bi,     d = d,         e = e,         f = f/~bi     ],
6175 /*60*/  [ a = a/~bi,     b = b,         c = c,         d = d,         e = e,         f = f*~bi     ],
6176 /*61*/  [ a = a*~bi,     b = b,         c = c,         d = d,         e = e,         f = f         ],
6177 /*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 ],
6178 /*63*/  [ a = a,         b = b*~bi,     c = c/~bi,     d = d,         e = e,         f = f*~bi     ],
6179 /*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 ]
6180
6181 /*1*/   [ a = a,         b = b*~bi,     c = c,         d = d*~bi,     e = e,         f = f*~bi     ],...
6182
6183
6184 (Third Setting)
6185
6186 /*1*/   #a,b,c,d,e,f=[ ~a,~b,~c,~d,~e,~f  ],
6187 /*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 ],
6188 /*3*/   [ a = a*~n1,     b = b*~n1*~bi, c = c*~n1,     d = d*~n1,     e = e*~n1,     f = f*~n1*~bi ],
6189 /*4*/   [ a = a*~n1*~bi, b = b*~n1/~bi, c = c*~n1,     d = d*~n1,     e = e*~n1*~bi, f = f*~n1/~bi ],
6190 /*5*/   [ a = a*~n1/~bi, b = b*~n1*~bi, c = c*~n1,     d = d*~n1*~bi, e = e*~n1,     f = f*~n1*~bi ],
6191 /*6*/   [ a = a*~n1*~bi, b = b*~n1,     c = c*~n1*~bi, d = d*~n1/~bi, e = e*~n1,     f = f*~n1/~bi ],
6192 /*7*/   [ a = a*~n1/~bi, b = b*~n1/~bi, c = c*~n1/~bi, d = d*~n1,     e = e*~n1,     f = f*~n1     ],
6193 /*8*/   [ a = a*~n1,     b = b*~n1*~bi, c = c*~n1,     d = d*~n1,     e = e*~n1/~bi, f = f*~n1     ],
6194 /*9*/   [ a = a*~n1*~bi, b = b*~n1,     c = c*~n1,     d = d*~n1*~bi, e = e*~n1*~bi, f = f*~n1*~bi ],
6195 /*10*/  [ a = a*~n1,     b = b*~n1,     c = c*~n1*~bi, d = d*~n1/~bi, e = e*~n1,     f = f*~n1     ],
6196 /*11*/  [ a = a*~n1/~bi, b = b*~n1/~bi, c = c*~n1/~bi, d = d*~n1*~bi, e = e*~n1,     f = f*~n1     ],
6197 /*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 ],
6198 /*13*/  [ a = a*~n1,     b = b*~n1,     c = c*~n1,     d = d*~n1*~bi, e = e*~n1,     f = f*~n1*~bi ],
6199 /*14*/  [ a = a*~n1,     b = b*~n1/~bi, c = c*~n1,     d = d*~n1,     e = e*~n1*~bi, f = f*~n1     ],
6200 /*15*/  [ a = a*~n1/~bi, b = b*~n1,     c = c*~n1/~bi, d = d*~n1,     e = e*~n1/~bi, f = f*~n1/~bi ],
6201 /*16*/  [ a = a*~n1,     b = b*~n1,     c = c*~n1*~bi, d = d*~n1/~bi, e = e*~n1,     f = f*~n1     ],
6202 /*17*/  [ a = a*~n1,     b = b*~n1*~bi, c = c*~n1,     d = d*~n1,     e = e*~n1,     f = f*~n1*~bi ],
6203 /*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 ],
6204 /*19*/  [ a = a*~n1/~bi, b = b*~n1,     c = c*~n1,     d = d*~n1/~bi, e = e*~n1,     f = f*~n1*~bi ],
6205 /*20*/  [ a = a*~n1*~bi, b = b*~n1*~bi, c = c*~n1,     d = d*~n1,     e = e*~n1/~bi, f = f*~n1/~bi ],
6206 /*21*/  [ a = a*~n1,     b = b*~n1/~bi, c = c*~n1*~bi, d = d*~n1,     e = e*~n1,     f = f*~n1*~bi ],
6207 /*22*/  [ a = a*~n1,     b = b*~n1,     c = c*~n1/~bi, d = d*~n1*~bi, e = e*~n1,     f = f*~n1     ],
6208 /*23*/  [ a = a*~n1,     b = b*~n1,     c = c*~n1,     d = d*~n1/~bi, e = e*~n1,     f = f*~n1/~bi ],
6209 /*24*/  [ a = a*~n1/~bi, b = b*~n1,     c = c*~n1,     d = d*~n1,     e = e*~n1,     f = f*~n1*~bi ],
6210 /*25*/  [ a = a*~n1*~bi, b = b*~n1*~bi, c = c*~n1*~bi, d = d*~n1,     e = e*~n1,     f = f*~n1     ],
6211 /*26*/  [ a = a*~n1,     b = b*~n1/~bi, c = c*~n1/~bi, d = d*~n1*~bi, e = e*~n1*~bi, f = f*~n1     ],
6212 /*27*/  [ a = a*~n1,     b = b*~n1,     c = c*~n1,     d = d*~n1/~bi, e = e*~n1/~bi, f = f*~n1     ],
6213 /*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 ],
6214 /*29*/  [ a = a*~n1,     b = b*~n1,     c = c*~n1/~bi, d = d*~n1/~bi, e = e*~n1,     f = f*~n1     ],
6215 /*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 ],
6216 /*31*/  [ a = a*~n1/~bi, b = b*~n1*~bi, c = c*~n1,     d = d*~n1,     e = e*~n1,     f = f*~n1/~bi ],
6217 /*32*/  [ a = a*~n1,     b = b*~n1/~bi, c = c*~n1,     d = d*~n1,     e = e*~n1*~bi, f = f*~n1     ],
6218 /*33*/  [ a = a*~n1*~bi, b = b*~n1*~bi, c = c*~n1,     d = d*~n1,     e = e*~n1/~bi, f = f*~n1     ],
6219 /*34*/  [ a = a*~n1/~bi, b = b*~n1/~bi, c = c*~n1,     d = d*~n1,     e = e*~n1*~bi, f = f*~n1*~bi ],
6220 /*35*/  [ a = a*~n1*~bi, b = b*~n1,     c = c*~n1,     d = d*~n1/~bi, e = e*~n1/~bi, f = f*~n1/~bi ],
6221 /*36*/  [ a = a*~n1/~bi, b = b*~n1,     c = c*~n1/~bi, d = d*~n1*~bi, e = e*~n1,     f = f*~n1*~bi ],
6222 /*37*/  [ a = a*~n1*~bi, b = b*~n1*~bi, c = c*~n1,     d = d*~n1,     e = e*~n1,     f = f*~n1     ],
6223 /*38*/  [ a = a*~n1,     b = b*~n1/~bi, c = c*~n1*~bi, d = d*~n1/~bi, e = e*~n1*~bi, f = f*~n1     ],
6224 /*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 ],
6225 /*40*/  [ a = a*~n1,     b = b*~n1/~bi, c = c*~n1*~bi, d = d*~n1/~bi, e = e*~n1*~bi, f = f*~n1     ],
6226 /*41*/  [ a = a*~n1*~bi, b = b*~n1,     c = c*~n1/~bi, d = d*~n1,     e = e*~n1,     f = f*~n1*~bi ],
6227 /*42*/  [ a = a*~n1,     b = b*~n1*~bi, c = c*~n1,     d = d*~n1,     e = e*~n1/~bi, f = f*~n1     ],
6228 /*43*/  [ a = a*~n1/~bi, b = b*~n1,     c = c*~n1*~bi, d = d*~n1*~bi, e = e*~n1*~bi, f = f*~n1     ],
6229 /*44*/  [ a = a*~n1*~bi, b = b*~n1,     c = c*~n1,     d = d*~n1,     e = e*~n1,     f = f*~n1/~bi ],
6230 /*45*/  [ a = a*~n1/~bi, b = b*~n1,     c = c*~n1,     d = d*~n1/~bi, e = e*~n1/~bi, f = f*~n1     ],
6231 /*46*/  [ a = a*~n1,     b = b*~n1/~bi, c = c*~n1/~bi, d = d*~n1*~bi, e = e*~n1*~bi, f = f*~n1     ],
6232 /*47*/  [ a = a*~n1,     b = b*~n1*~bi, c = c*~n1*~bi, d = d*~n1/~bi, e = e*~n1,     f = f*~n1     ],
6233 /*48*/  [ a = a*~n1,     b = b*~n1,     c = c*~n1/~bi, d = d*~n1*~bi, e = e*~n1,     f = f*~n1     ],
6234 /*49*/  [ a = a*~n1,     b = b*~n1,     c = c*~n1*~bi, d = d*~n1,     e = e*~n1/~bi, f = f*~n1*~bi ],
6235 /*50*/  [ a = a*~n1*~bi, b = b*~n1/~bi, c = c*~n1,     d = d*~n1,     e = e*~n1*~bi, f = f*~n1/~bi ],
6236 /*51*/  [ a = a*~n1/~bi, b = b*~n1,     c = c*~n1,     d = d*~n1/~bi, e = e*~n1/~bi, f = f*~n1*~bi ],
6237 /*52*/  [ a = a*~n1*~bi, b = b*~n1,     c = c*~n1/~bi, d = d*~n1*~bi, e = e*~n1,     f = f*~n1/~bi ],
6238 /*53*/  [ a = a*~n1,     b = b*~n1*~bi, c = c*~n1,     d = d*~n1,     e = e*~n1,     f = f*~n1     ],
6239 /*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 ],
6240 /*55*/  [ a = a*~n1,     b = b*~n1,     c = c*~n1,     d = d*~n1*~bi, e = e*~n1/~bi, f = f*~n1     ],
6241 /*56*/  [ a = a*~n1*~bi, b = b*~n1,     c = c*~n1,     d = d*~n1,     e = e*~n1,     f = f*~n1/~bi ],
6242 /*57*/  [ a = a*~n1,     b = b*~n1*~bi, c = c*~n1/~bi, d = d*~n1,     e = e*~n1*~bi, f = f*~n1     ],
6243 /*58*/  [ a = a*~n1/~bi, b = b*~n1,     c = c*~n1*~bi, d = d*~n1/~bi, e = e*~n1,     f = f*~n1*~bi ],
6244 /*59*/  [ a = a*~n1*~bi, b = b*~n1,     c = c*~n1/~bi, d = d*~n1,     e = e*~n1,     f = f*~n1/~bi ],
6245 /*60*/  [ a = a*~n1/~bi, b = b*~n1,     c = c*~n1,     d = d*~n1,     e = e*~n1,     f = f*~n1*~bi ],
6246 /*61*/  [ a = a*~n1*~bi, b = b*~n1,     c = c*~n1,     d = d*~n1,     e = e*~n1,     f = f*~n1     ],
6247 /*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 ],
6248 /*63*/  [ a = a*~n1,     b = b*~n1*~bi, c = c*~n1/~bi, d = d*~n1,     e = e*~n1,     f = f*~n1*~bi ],
6249 /*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 ]
6250
6251 /*1*/   [ a = a*~n1,     b = b*~n1*~bi, c = c*~n1,     d = d*~n1*~bi, e = e*~n1,     f = f*~n1*~bi ],...
6252
6253 */