OSDN Git Service

Added new synthdefs, fixed bugs
[timewavesynth/Timewave_Synthesizer.git] / timewavesynth12.scd
1 (
2 //To run the synth, click anywhere within the parenthesis above and press "ctrl - enter" or "cmd - return".
3 //A guide to using the instrument is available by clicking on the "i" button in the bottom right corner of the GUI.
4 //Several lines down, where it says "//VARIABLES YOU MAY WISH TO CHANGE", are variables that you can change for various things,
5 //including key codes for keyboard functions.
6
7 //It is recommended to reboot the interpreter in the "Language" toolbar, or by hightlighting - (thisProcess.platform.recompile);
8 //and pressing "ctrl - enter" or "cmd - return", before each server boot. Rebooting the interpreter is not needed to
9 //evaluate the code below if the server is booted.
10
11 //You can program/make a song by using the "timewavesynth12script.scd" file
12
13 //This version is slightly CPU intensive due to the amount of synths it has, so a less powerful computer may experience trouble running it
14
15 s.options.memSize = 2097152/4;
16 MIDIIn.connectAll;
17
18 (
19 s.boot;
20 s.waitForBoot({
21         var point, w, view, view2,
22         vol = 0.02,mute1,mute2,mute3,mute4,mute5,mute6,mute7,mute8,mute9,mute10,mute11,mute12,muteall,unmuteall,
23         g1,g2,g6,g8,g33,g48,g64,g72,g88,gm,ngm1,ngm2,ngm6,set1,set2,menu1,menu2,
24         ts,sts,str,spaceb,b1,b2,b3,b4,button,button1,info,
25         n1,n2,n3,n4,n5,n6,n7,n8,keycodeb,
26         f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12,
27         fp1,fp2,fp3,fp4,fp5,fp6,fp7,fp8,fp9,fp10,fp11,fp12,
28         fp1b,fp2b,fp3b,fp4b,fp5b,fp6b,fp7b,fp8b,fp9b,fp10b,fp11b,fp12b,
29         fp1c,fp2c,fp3c,fp4c,fp5c,fp6c,fp7c,fp8c,fp9c,fp10c,fp11c,fp12c,
30         fp1d,fp2d,fp3d,fp4d,fp5d,fp6d,fp7d,fp8d,fp9d,fp10d,fp11d,fp12d,
31         fp1e,fp2e,fp3e,fp4e,fp5e,fp6e,fp7e,fp8e,fp9e,fp10e,fp11e,fp12e,
32         fp1f,fp2f,fp3f,fp4f,fp5f,fp6f,fp7f,fp8f,fp9f,fp10f,fp11f,fp12f,
33         fp1g,fp2g,fp3g,fp4g,fp5g,fp6g,fp7g,fp8g,fp9g,fp10g,fp11g,fp12g,
34         fp1h,fp2h,fp3h,fp4h,fp5h,fp6h,fp7h,fp8h,fp9h,fp10h,fp11h,fp12h;
35
36
37         //VARIABLES YOU MAY WISH TO CHANGE
38
39
40         //note A tuning frequency in hz
41
42         ~tuning_frequency = 432; //default 432 hz
43
44         ~freqmap = (
45                 i = ~tuning_frequency
46                 / (2 ** (69 / 12)); a = (-1); b = (-1);
47                 Array.fill(128, {i * (2 ** (((a=a+1) / 12).trunc)) * ( (2 ** (12.reciprocal)) ** ((b=b+1)  % 12));
48         }));/*~freqmap = (i = 8.0271480262684/*-0.0000000000024*/; ~stepratio = 1.0594630943593; Array.fill(128, { i = i*~stepratio;}));*/
49
50
51         //number of KW(King Wen) sequences in a timewave half-cycle (or amplitude x2)
52
53         ~synthdefnum = 12; //default 12
54
55
56         //timewave starting base (lowest) frequency
57
58         ~base_frequency = ~freqmap.at(38); //default 38 (72.081352125182 hz), replace "~freqmap.at(#)" for custom value
59
60
61         //starting synthdef setting
62
63         if((~kws_setting == nil) or: (~ratio_setting == nil), {
64
65                 ~kws_setting = 1; //type of King Wen sequence interpretation
66
67                 ~ratio_setting = "psine1"; //ratio setting for synthdef
68         });
69
70
71         //low-pass filter settings
72
73         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.
74
75         if(~low_pass_filter_set_value == nil, {~low_pass_filter_freq_limit = 1364.0007331375 * 1.6180339887499; //frequency limit for low-pass filter in synthdefs. default is (1500 * 1.6180339887499 or 2427.0509831249).
76         });
77
78         //volume
79
80         ~vol = 0.005; //default 0.005
81         ~vol1 = ~vol;
82         ~vol2 = ~vol;
83         ~vol3 = ~vol;
84         ~vol4 = ~vol;
85         ~vol5 = ~vol;
86         ~vol6 = ~vol;
87         ~vol7 = ~vol;
88         ~vol8 = ~vol;
89         ~vol9 = ~vol;
90         ~vol10 = ~vol;
91         ~vol11 = ~vol;
92         ~vol12 = ~vol;
93
94
95         //Key codes for keyboard functions - either unicode or keycode. To find key codes, see below:
96
97         ~rightarrow_keycode = 114; //next note change increase
98         ~leftarrow_keycode = 113; //next note change decrease
99         ~uparrow_keycode = 111; //change synth up
100         ~downarrow_keycode = 116; //change synth down
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 hexgram'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         ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
215
216
217         //starting notes
218
219         #f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12 = [
220                 (~freqmap.at(127)/8).rand,
221                 (~freqmap.at(127)/8).rand,
222                 (~freqmap.at(127)/8).rand,
223                 (~freqmap.at(127)/8).rand,
224                 (~freqmap.at(127)/8).rand,
225                 (~freqmap.at(127)/8).rand,
226                 (~freqmap.at(127)/8).rand,
227                 (~freqmap.at(127)/8).rand,
228                 (~freqmap.at(127)/8).rand,
229                 (~freqmap.at(127)/8).rand,
230                 (~freqmap.at(127)/8).rand,
231                 (~freqmap.at(127)/8).rand,
232         ];
233
234         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))});});
235
236         #fp1,fp2,fp3,fp4,fp5,fp6,fp7,fp8,fp9,fp10,fp11,fp12 = [~u1,~u2,~u3,~u4,~u5,~u6,~u7,~u8,~u9,~u10,~u11,~u12];
237         #fp1b,fp2b,fp3b,fp4b,fp5b,fp6b,fp7b,fp8b,fp9b,fp10b,fp11b,fp12b = [~u1b,~u2b,~u3b,~u4b,~u5b,~u6b,~u7b,~u8b,~u9b,~u10b,~u11b,~u12b];
238         #fp1c,fp2c,fp3c,fp4c,fp5c,fp6c,fp7c,fp8c,fp9c,fp10c,fp11c,fp12c = [~u1c,~u2c,~u3c,~u4c,~u5c,~u6c,~u7c,~u8c,~u9c,~u10c,~u11c,~u12c];
239         #fp1d,fp2d,fp3d,fp4d,fp5d,fp6d,fp7d,fp8d,fp9d,fp10d,fp11d,fp12d = [~u1d,~u2d,~u3d,~u4d,~u5d,~u6d,~u7d,~u8d,~u9d,~u10d,~u11d,~u12d];
240         #fp1e,fp2e,fp3e,fp4e,fp5e,fp6e,fp7e,fp8e,fp9e,fp10e,fp11e,fp12e = [~u1e,~u2e,~u3e,~u4e,~u5e,~u6e,~u7e,~u8e,~u9e,~u10e,~u11e,~u12e];
241         #fp1f,fp2f,fp3f,fp4f,fp5f,fp6f,fp7f,fp8f,fp9f,fp10f,fp11f,fp12f = [~u1f,~u2f,~u3f,~u4f,~u5f,~u6f,~u7f,~u8f,~u9f,~u10f,~u11f,~u12f];
242         #fp1g,fp2g,fp3g,fp4g,fp5g,fp6g,fp7g,fp8g,fp9g,fp10g,fp11g,fp12g = [~u1g,~u2g,~u3g,~u4g,~u5g,~u6g,~u7g,~u8g,~u9g,~u10g,~u11g,~u12g];
243         #fp1h,fp2h,fp3h,fp4h,fp5h,fp6h,fp7h,fp8h,fp9h,fp10h,fp11h,fp12h = [~u1h,~u2h,~u3h,~u4h,~u5h,~u6h,~u7h,~u8h,~u9h,~u10h,~u11h,~u12h];
244
245         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], {#fp1,fp2,fp3,fp4,fp5,fp6,fp7,fp8,fp9,fp10,fp11,fp12 = [ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ];});
246         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], {#fp1b,fp2b,fp3b,fp4b,fp5b,fp6b,fp7b,fp8b,fp9b,fp10b,fp11b,fp12b = [ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ];});
247         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], {#fp1c,fp2c,fp3c,fp4c,fp5c,fp6c,fp7c,fp8c,fp9c,fp10c,fp11c,fp12c = [ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ];});
248         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], {#fp1d,fp2d,fp3d,fp4d,fp5d,fp6d,fp7d,fp8d,fp9d,fp10d,fp11d,fp12d = [ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ];});
249         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], {#fp1e,fp2e,fp3e,fp4e,fp5e,fp6e,fp7e,fp8e,fp9e,fp10e,fp11e,fp12e = [ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ];});
250         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], {#fp1f,fp2f,fp3f,fp4f,fp5f,fp6f,fp7f,fp8f,fp9f,fp10f,fp11f,fp12f = [ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ];});
251         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], {#fp1g,fp2g,fp3g,fp4g,fp5g,fp6g,fp7g,fp8g,fp9g,fp10g,fp11g,fp12g = [ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ];});
252         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], {#fp1h,fp2h,fp3h,fp4h,fp5h,fp6h,fp7h,fp8h,fp9h,fp10h,fp11h,fp12h = [ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ];});
253
254         /*#fp1,fp2,fp3,fp4,fp5,fp6,fp7,fp8,fp9,fp10,fp11,fp12 = [];
255         #fp1b,fp2b,fp3b,fp4b,fp5b,fp6b,fp7b,fp8b,fp9b,fp10b,fp11b,fp12b = [];
256         #fp1c,fp2c,fp3c,fp4c,fp5c,fp6c,fp7c,fp8c,fp9c,fp10c,fp11c,fp12c = [];
257         #fp1d,fp2d,fp3d,fp4d,fp5d,fp6d,fp7d,fp8d,fp9d,fp10d,fp11d,fp12d = [];
258         #fp1e,fp2e,fp3e,fp4e,fp5e,fp6e,fp7e,fp8e,fp9e,fp10e,fp11e,fp12e = [];
259         #fp1f,fp2f,fp3f,fp4f,fp5f,fp6f,fp7f,fp8f,fp9f,fp10f,fp11f,fp12f = [];
260         #fp1g,fp2g,fp3g,fp4g,fp5g,fp6g,fp7g,fp8g,fp9g,fp10g,fp11g,fp12g = [];
261         #fp1h,fp2h,fp3h,fp4h,fp5h,fp6h,fp7h,fp8h,fp9h,fp10h,fp11h,fp12h = [];
262
263         [];*/
264
265         if([~sg1a1,~sg1a2,~sg1a3,~sg1a4,~sg1a5,~sg1a6,~sg1a7,~sg1a8,~sg1a9,~sg1a10,~sg1a11,~sg1a12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg1a1=~f1,~sg1a2=~f2,~sg1a3=~f3,~sg1a4=~f4,~sg1a5=~f5,~sg1a6=~f6,~sg1a7=~f7,~sg1a8=~f8,~sg1a9=~f9,~sg1a10=~f10,~sg1a11=~f11,~sg1a12=~f12];});
266         if([~sg1b1,~sg1b2,~sg1b3,~sg1b4,~sg1b5,~sg1b6,~sg1b7,~sg1b8,~sg1b9,~sg1b10,~sg1b11,~sg1b12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg1b1=~f1,~sg1b2=~f2,~sg1b3=~f3,~sg1b4=~f4,~sg1b5=~f5,~sg1b6=~f6,~sg1b7=~f7,~sg1b8=~f8,~sg1b9=~f9,~sg1b10=~f10,~sg1b11=~f11,~sg1b12=~f12];});
267         if([~sg1c1,~sg1c2,~sg1c3,~sg1c4,~sg1c5,~sg1c6,~sg1c7,~sg1c8,~sg1c9,~sg1c10,~sg1c11,~sg1c12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg1c1=~f1,~sg1c2=~f2,~sg1c3=~f3,~sg1c4=~f4,~sg1c5=~f5,~sg1c6=~f6,~sg1c7=~f7,~sg1c8=~f8,~sg1c9=~f9,~sg1c10=~f10,~sg1c11=~f11,~sg1c12=~f12];});
268         if([~sg1d1,~sg1d2,~sg1d3,~sg1d4,~sg1d5,~sg1d6,~sg1d7,~sg1d8,~sg1d9,~sg1d10,~sg1d11,~sg1d12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg1d1=~f1,~sg1d2=~f2,~sg1d3=~f3,~sg1d4=~f4,~sg1d5=~f5,~sg1d6=~f6,~sg1d7=~f7,~sg1d8=~f8,~sg1d9=~f9,~sg1d10=~f10,~sg1d11=~f11,~sg1d12=~f12];});
269         if([~sg1e1,~sg1e2,~sg1e3,~sg1e4,~sg1e5,~sg1e6,~sg1e7,~sg1e8,~sg1e9,~sg1e10,~sg1e11,~sg1e12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg1e1=~f1,~sg1e2=~f2,~sg1e3=~f3,~sg1e4=~f4,~sg1e5=~f5,~sg1e6=~f6,~sg1e7=~f7,~sg1e8=~f8,~sg1e9=~f9,~sg1e10=~f10,~sg1e11=~f11,~sg1e12=~f12];});
270         if([~sg1f1,~sg1f2,~sg1f3,~sg1f4,~sg1f5,~sg1f6,~sg1f7,~sg1f8,~sg1f9,~sg1f10,~sg1f11,~sg1f12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg1f1=~f1,~sg1f2=~f2,~sg1f3=~f3,~sg1f4=~f4,~sg1f5=~f5,~sg1f6=~f6,~sg1f7=~f7,~sg1f8=~f8,~sg1f9=~f9,~sg1f10=~f10,~sg1f11=~f11,~sg1f12=~f12];});
271         if([~sg1g1,~sg1g2,~sg1g3,~sg1g4,~sg1g5,~sg1g6,~sg1g7,~sg1g8,~sg1g9,~sg1g10,~sg1g11,~sg1g12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg1g1=~f1,~sg1g2=~f2,~sg1g3=~f3,~sg1g4=~f4,~sg1g5=~f5,~sg1g6=~f6,~sg1g7=~f7,~sg1g8=~f8,~sg1g9=~f9,~sg1g10=~f10,~sg1g11=~f11,~sg1g12=~f12];});
272         if([~sg1h1,~sg1h2,~sg1h3,~sg1h4,~sg1h5,~sg1h6,~sg1h7,~sg1h8,~sg1h9,~sg1h10,~sg1h11,~sg1h12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg1h1=~f1,~sg1h2=~f2,~sg1h3=~f3,~sg1h4=~f4,~sg1h5=~f5,~sg1h6=~f6,~sg1h7=~f7,~sg1h8=~f8,~sg1h9=~f9,~sg1h10=~f10,~sg1h11=~f11,~sg1h12=~f12];});
273         if([~sg2a1,~sg2a2,~sg2a3,~sg2a4,~sg2a5,~sg2a6,~sg2a7,~sg2a8,~sg2a9,~sg2a10,~sg2a11,~sg2a12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg2a1=~f1,~sg2a2=~f2,~sg2a3=~f3,~sg2a4=~f4,~sg2a5=~f5,~sg2a6=~f6,~sg2a7=~f7,~sg2a8=~f8,~sg2a9=~f9,~sg2a10=~f10,~sg2a11=~f11,~sg2a12=~f12];});
274         if([~sg2b1,~sg2b2,~sg2b3,~sg2b4,~sg2b5,~sg2b6,~sg2b7,~sg2b8,~sg2b9,~sg2b10,~sg2b11,~sg2b12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg2b1=~f1,~sg2b2=~f2,~sg2b3=~f3,~sg2b4=~f4,~sg2b5=~f5,~sg2b6=~f6,~sg2b7=~f7,~sg2b8=~f8,~sg2b9=~f9,~sg2b10=~f10,~sg2b11=~f11,~sg2b12=~f12];});
275         if([~sg2c1,~sg2c2,~sg2c3,~sg2c4,~sg2c5,~sg2c6,~sg2c7,~sg2c8,~sg2c9,~sg2c10,~sg2c11,~sg2c12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg2c1=~f1,~sg2c2=~f2,~sg2c3=~f3,~sg2c4=~f4,~sg2c5=~f5,~sg2c6=~f6,~sg2c7=~f7,~sg2c8=~f8,~sg2c9=~f9,~sg2c10=~f10,~sg2c11=~f11,~sg2c12=~f12];});
276         if([~sg2d1,~sg2d2,~sg2d3,~sg2d4,~sg2d5,~sg2d6,~sg2d7,~sg2d8,~sg2d9,~sg2d10,~sg2d11,~sg2d12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg2d1=~f1,~sg2d2=~f2,~sg2d3=~f3,~sg2d4=~f4,~sg2d5=~f5,~sg2d6=~f6,~sg2d7=~f7,~sg2d8=~f8,~sg2d9=~f9,~sg2d10=~f10,~sg2d11=~f11,~sg2d12=~f12];});
277         if([~sg2e1,~sg2e2,~sg2e3,~sg2e4,~sg2e5,~sg2e6,~sg2e7,~sg2e8,~sg2e9,~sg2e10,~sg2e11,~sg2e12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg2e1=~f1,~sg2e2=~f2,~sg2e3=~f3,~sg2e4=~f4,~sg2e5=~f5,~sg2e6=~f6,~sg2e7=~f7,~sg2e8=~f8,~sg2e9=~f9,~sg2e10=~f10,~sg2e11=~f11,~sg2e12=~f12];});
278         if([~sg2f1,~sg2f2,~sg2f3,~sg2f4,~sg2f5,~sg2f6,~sg2f7,~sg2f8,~sg2f9,~sg2f10,~sg2f11,~sg2f12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg2f1=~f1,~sg2f2=~f2,~sg2f3=~f3,~sg2f4=~f4,~sg2f5=~f5,~sg2f6=~f6,~sg2f7=~f7,~sg2f8=~f8,~sg2f9=~f9,~sg2f10=~f10,~sg2f11=~f11,~sg2f12=~f12];});
279         if([~sg2g1,~sg2g2,~sg2g3,~sg2g4,~sg2g5,~sg2g6,~sg2g7,~sg2g8,~sg2g9,~sg2g10,~sg2g11,~sg2g12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg2g1=~f1,~sg2g2=~f2,~sg2g3=~f3,~sg2g4=~f4,~sg2g5=~f5,~sg2g6=~f6,~sg2g7=~f7,~sg2g8=~f8,~sg2g9=~f9,~sg2g10=~f10,~sg2g11=~f11,~sg2g12=~f12];});
280         if([~sg2h1,~sg2h2,~sg2h3,~sg2h4,~sg2h5,~sg2h6,~sg2h7,~sg2h8,~sg2h9,~sg2h10,~sg2h11,~sg2h12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg2h1=~f1,~sg2h2=~f2,~sg2h3=~f3,~sg2h4=~f4,~sg2h5=~f5,~sg2h6=~f6,~sg2h7=~f7,~sg2h8=~f8,~sg2h9=~f9,~sg2h10=~f10,~sg2h11=~f11,~sg2h12=~f12];});
281         if([~sg3a1,~sg3a2,~sg3a3,~sg3a4,~sg3a5,~sg3a6,~sg3a7,~sg3a8,~sg3a9,~sg3a10,~sg3a11,~sg3a12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg3a1=~f1,~sg3a2=~f2,~sg3a3=~f3,~sg3a4=~f4,~sg3a5=~f5,~sg3a6=~f6,~sg3a7=~f7,~sg3a8=~f8,~sg3a9=~f9,~sg3a10=~f10,~sg3a11=~f11,~sg3a12=~f12];});
282         if([~sg3b1,~sg3b2,~sg3b3,~sg3b4,~sg3b5,~sg3b6,~sg3b7,~sg3b8,~sg3b9,~sg3b10,~sg3b11,~sg3b12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg3b1=~f1,~sg3b2=~f2,~sg3b3=~f3,~sg3b4=~f4,~sg3b5=~f5,~sg3b6=~f6,~sg3b7=~f7,~sg3b8=~f8,~sg3b9=~f9,~sg3b10=~f10,~sg3b11=~f11,~sg3b12=~f12];});
283         if([~sg3c1,~sg3c2,~sg3c3,~sg3c4,~sg3c5,~sg3c6,~sg3c7,~sg3c8,~sg3c9,~sg3c10,~sg3c11,~sg3c12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg3c1=~f1,~sg3c2=~f2,~sg3c3=~f3,~sg3c4=~f4,~sg3c5=~f5,~sg3c6=~f6,~sg3c7=~f7,~sg3c8=~f8,~sg3c9=~f9,~sg3c10=~f10,~sg3c11=~f11,~sg3c12=~f12];});
284         if([~sg3d1,~sg3d2,~sg3d3,~sg3d4,~sg3d5,~sg3d6,~sg3d7,~sg3d8,~sg3d9,~sg3d10,~sg3d11,~sg3d12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg3d1=~f1,~sg3d2=~f2,~sg3d3=~f3,~sg3d4=~f4,~sg3d5=~f5,~sg3d6=~f6,~sg3d7=~f7,~sg3d8=~f8,~sg3d9=~f9,~sg3d10=~f10,~sg3d11=~f11,~sg3d12=~f12];});
285         if([~sg3e1,~sg3e2,~sg3e3,~sg3e4,~sg3e5,~sg3e6,~sg3e7,~sg3e8,~sg3e9,~sg3e10,~sg3e11,~sg3e12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg3e1=~f1,~sg3e2=~f2,~sg3e3=~f3,~sg3e4=~f4,~sg3e5=~f5,~sg3e6=~f6,~sg3e7=~f7,~sg3e8=~f8,~sg3e9=~f9,~sg3e10=~f10,~sg3e11=~f11,~sg3e12=~f12];});
286         if([~sg3f1,~sg3f2,~sg3f3,~sg3f4,~sg3f5,~sg3f6,~sg3f7,~sg3f8,~sg3f9,~sg3f10,~sg3f11,~sg3f12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg3f1=~f1,~sg3f2=~f2,~sg3f3=~f3,~sg3f4=~f4,~sg3f5=~f5,~sg3f6=~f6,~sg3f7=~f7,~sg3f8=~f8,~sg3f9=~f9,~sg3f10=~f10,~sg3f11=~f11,~sg3f12=~f12];});
287         if([~sg3g1,~sg3g2,~sg3g3,~sg3g4,~sg3g5,~sg3g6,~sg3g7,~sg3g8,~sg3g9,~sg3g10,~sg3g11,~sg3g12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg3g1=~f1,~sg3g2=~f2,~sg3g3=~f3,~sg3g4=~f4,~sg3g5=~f5,~sg3g6=~f6,~sg3g7=~f7,~sg3g8=~f8,~sg3g9=~f9,~sg3g10=~f10,~sg3g11=~f11,~sg3g12=~f12];});
288         if([~sg3h1,~sg3h2,~sg3h3,~sg3h4,~sg3h5,~sg3h6,~sg3h7,~sg3h8,~sg3h9,~sg3h10,~sg3h11,~sg3h12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg3h1=~f1,~sg3h2=~f2,~sg3h3=~f3,~sg3h4=~f4,~sg3h5=~f5,~sg3h6=~f6,~sg3h7=~f7,~sg3h8=~f8,~sg3h9=~f9,~sg3h10=~f10,~sg3h11=~f11,~sg3h12=~f12];});
289         if([~sg4a1,~sg4a2,~sg4a3,~sg4a4,~sg4a5,~sg4a6,~sg4a7,~sg4a8,~sg4a9,~sg4a10,~sg4a11,~sg4a12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg4a1=~f1,~sg4a2=~f2,~sg4a3=~f3,~sg4a4=~f4,~sg4a5=~f5,~sg4a6=~f6,~sg4a7=~f7,~sg4a8=~f8,~sg4a9=~f9,~sg4a10=~f10,~sg4a11=~f11,~sg4a12=~f12];});
290         if([~sg4b1,~sg4b2,~sg4b3,~sg4b4,~sg4b5,~sg4b6,~sg4b7,~sg4b8,~sg4b9,~sg4b10,~sg4b11,~sg4b12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg4b1=~f1,~sg4b2=~f2,~sg4b3=~f3,~sg4b4=~f4,~sg4b5=~f5,~sg4b6=~f6,~sg4b7=~f7,~sg4b8=~f8,~sg4b9=~f9,~sg4b10=~f10,~sg4b11=~f11,~sg4b12=~f12];});
291         if([~sg4c1,~sg4c2,~sg4c3,~sg4c4,~sg4c5,~sg4c6,~sg4c7,~sg4c8,~sg4c9,~sg4c10,~sg4c11,~sg4c12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg4c1=~f1,~sg4c2=~f2,~sg4c3=~f3,~sg4c4=~f4,~sg4c5=~f5,~sg4c6=~f6,~sg4c7=~f7,~sg4c8=~f8,~sg4c9=~f9,~sg4c10=~f10,~sg4c11=~f11,~sg4c12=~f12];});
292         if([~sg4d1,~sg4d2,~sg4d3,~sg4d4,~sg4d5,~sg4d6,~sg4d7,~sg4d8,~sg4d9,~sg4d10,~sg4d11,~sg4d12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg4d1=~f1,~sg4d2=~f2,~sg4d3=~f3,~sg4d4=~f4,~sg4d5=~f5,~sg4d6=~f6,~sg4d7=~f7,~sg4d8=~f8,~sg4d9=~f9,~sg4d10=~f10,~sg4d11=~f11,~sg4d12=~f12];});
293         if([~sg4e1,~sg4e2,~sg4e3,~sg4e4,~sg4e5,~sg4e6,~sg4e7,~sg4e8,~sg4e9,~sg4e10,~sg4e11,~sg4e12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg4e1=~f1,~sg4e2=~f2,~sg4e3=~f3,~sg4e4=~f4,~sg4e5=~f5,~sg4e6=~f6,~sg4e7=~f7,~sg4e8=~f8,~sg4e9=~f9,~sg4e10=~f10,~sg4e11=~f11,~sg4e12=~f12];});
294         if([~sg4f1,~sg4f2,~sg4f3,~sg4f4,~sg4f5,~sg4f6,~sg4f7,~sg4f8,~sg4f9,~sg4f10,~sg4f11,~sg4f12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg4f1=~f1,~sg4f2=~f2,~sg4f3=~f3,~sg4f4=~f4,~sg4f5=~f5,~sg4f6=~f6,~sg4f7=~f7,~sg4f8=~f8,~sg4f9=~f9,~sg4f10=~f10,~sg4f11=~f11,~sg4f12=~f12];});
295         if([~sg4g1,~sg4g2,~sg4g3,~sg4g4,~sg4g5,~sg4g6,~sg4g7,~sg4g8,~sg4g9,~sg4g10,~sg4g11,~sg4g12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg4g1=~f1,~sg4g2=~f2,~sg4g3=~f3,~sg4g4=~f4,~sg4g5=~f5,~sg4g6=~f6,~sg4g7=~f7,~sg4g8=~f8,~sg4g9=~f9,~sg4g10=~f10,~sg4g11=~f11,~sg4g12=~f12];});
296         if([~sg4h1,~sg4h2,~sg4h3,~sg4h4,~sg4h5,~sg4h6,~sg4h7,~sg4h8,~sg4h9,~sg4h10,~sg4h11,~sg4h12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg4h1=~f1,~sg4h2=~f2,~sg4h3=~f3,~sg4h4=~f4,~sg4h5=~f5,~sg4h6=~f6,~sg4h7=~f7,~sg4h8=~f8,~sg4h9=~f9,~sg4h10=~f10,~sg4h11=~f11,~sg4h12=~f12];});
297         if([~sg5a1,~sg5a2,~sg5a3,~sg5a4,~sg5a5,~sg5a6,~sg5a7,~sg5a8,~sg5a9,~sg5a10,~sg5a11,~sg5a12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg5a1=~f1,~sg5a2=~f2,~sg5a3=~f3,~sg5a4=~f4,~sg5a5=~f5,~sg5a6=~f6,~sg5a7=~f7,~sg5a8=~f8,~sg5a9=~f9,~sg5a10=~f10,~sg5a11=~f11,~sg5a12=~f12];});
298         if([~sg5b1,~sg5b2,~sg5b3,~sg5b4,~sg5b5,~sg5b6,~sg5b7,~sg5b8,~sg5b9,~sg5b10,~sg5b11,~sg5b12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg5b1=~f1,~sg5b2=~f2,~sg5b3=~f3,~sg5b4=~f4,~sg5b5=~f5,~sg5b6=~f6,~sg5b7=~f7,~sg5b8=~f8,~sg5b9=~f9,~sg5b10=~f10,~sg5b11=~f11,~sg5b12=~f12];});
299         if([~sg5c1,~sg5c2,~sg5c3,~sg5c4,~sg5c5,~sg5c6,~sg5c7,~sg5c8,~sg5c9,~sg5c10,~sg5c11,~sg5c12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg5c1=~f1,~sg5c2=~f2,~sg5c3=~f3,~sg5c4=~f4,~sg5c5=~f5,~sg5c6=~f6,~sg5c7=~f7,~sg5c8=~f8,~sg5c9=~f9,~sg5c10=~f10,~sg5c11=~f11,~sg5c12=~f12];});
300         if([~sg5d1,~sg5d2,~sg5d3,~sg5d4,~sg5d5,~sg5d6,~sg5d7,~sg5d8,~sg5d9,~sg5d10,~sg5d11,~sg5d12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg5d1=~f1,~sg5d2=~f2,~sg5d3=~f3,~sg5d4=~f4,~sg5d5=~f5,~sg5d6=~f6,~sg5d7=~f7,~sg5d8=~f8,~sg5d9=~f9,~sg5d10=~f10,~sg5d11=~f11,~sg5d12=~f12];});
301         if([~sg5e1,~sg5e2,~sg5e3,~sg5e4,~sg5e5,~sg5e6,~sg5e7,~sg5e8,~sg5e9,~sg5e10,~sg5e11,~sg5e12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg5e1=~f1,~sg5e2=~f2,~sg5e3=~f3,~sg5e4=~f4,~sg5e5=~f5,~sg5e6=~f6,~sg5e7=~f7,~sg5e8=~f8,~sg5e9=~f9,~sg5e10=~f10,~sg5e11=~f11,~sg5e12=~f12];});
302         if([~sg5f1,~sg5f2,~sg5f3,~sg5f4,~sg5f5,~sg5f6,~sg5f7,~sg5f8,~sg5f9,~sg5f10,~sg5f11,~sg5f12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg5f1=~f1,~sg5f2=~f2,~sg5f3=~f3,~sg5f4=~f4,~sg5f5=~f5,~sg5f6=~f6,~sg5f7=~f7,~sg5f8=~f8,~sg5f9=~f9,~sg5f10=~f10,~sg5f11=~f11,~sg5f12=~f12];});
303         if([~sg5g1,~sg5g2,~sg5g3,~sg5g4,~sg5g5,~sg5g6,~sg5g7,~sg5g8,~sg5g9,~sg5g10,~sg5g11,~sg5g12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg5g1=~f1,~sg5g2=~f2,~sg5g3=~f3,~sg5g4=~f4,~sg5g5=~f5,~sg5g6=~f6,~sg5g7=~f7,~sg5g8=~f8,~sg5g9=~f9,~sg5g10=~f10,~sg5g11=~f11,~sg5g12=~f12];});
304         if([~sg5h1,~sg5h2,~sg5h3,~sg5h4,~sg5h5,~sg5h6,~sg5h7,~sg5h8,~sg5h9,~sg5h10,~sg5h11,~sg5h12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg5h1=~f1,~sg5h2=~f2,~sg5h3=~f3,~sg5h4=~f4,~sg5h5=~f5,~sg5h6=~f6,~sg5h7=~f7,~sg5h8=~f8,~sg5h9=~f9,~sg5h10=~f10,~sg5h11=~f11,~sg5h12=~f12];});
305         if([~sg6a1,~sg6a2,~sg6a3,~sg6a4,~sg6a5,~sg6a6,~sg6a7,~sg6a8,~sg6a9,~sg6a10,~sg6a11,~sg6a12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg6a1=~f1,~sg6a2=~f2,~sg6a3=~f3,~sg6a4=~f4,~sg6a5=~f5,~sg6a6=~f6,~sg6a7=~f7,~sg6a8=~f8,~sg6a9=~f9,~sg6a10=~f10,~sg6a11=~f11,~sg6a12=~f12];});
306         if([~sg6b1,~sg6b2,~sg6b3,~sg6b4,~sg6b5,~sg6b6,~sg6b7,~sg6b8,~sg6b9,~sg6b10,~sg6b11,~sg6b12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg6b1=~f1,~sg6b2=~f2,~sg6b3=~f3,~sg6b4=~f4,~sg6b5=~f5,~sg6b6=~f6,~sg6b7=~f7,~sg6b8=~f8,~sg6b9=~f9,~sg6b10=~f10,~sg6b11=~f11,~sg6b12=~f12];});
307         if([~sg6c1,~sg6c2,~sg6c3,~sg6c4,~sg6c5,~sg6c6,~sg6c7,~sg6c8,~sg6c9,~sg6c10,~sg6c11,~sg6c12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg6c1=~f1,~sg6c2=~f2,~sg6c3=~f3,~sg6c4=~f4,~sg6c5=~f5,~sg6c6=~f6,~sg6c7=~f7,~sg6c8=~f8,~sg6c9=~f9,~sg6c10=~f10,~sg6c11=~f11,~sg6c12=~f12];});
308         if([~sg6d1,~sg6d2,~sg6d3,~sg6d4,~sg6d5,~sg6d6,~sg6d7,~sg6d8,~sg6d9,~sg6d10,~sg6d11,~sg6d12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg6d1=~f1,~sg6d2=~f2,~sg6d3=~f3,~sg6d4=~f4,~sg6d5=~f5,~sg6d6=~f6,~sg6d7=~f7,~sg6d8=~f8,~sg6d9=~f9,~sg6d10=~f10,~sg6d11=~f11,~sg6d12=~f12];});
309         if([~sg6e1,~sg6e2,~sg6e3,~sg6e4,~sg6e5,~sg6e6,~sg6e7,~sg6e8,~sg6e9,~sg6e10,~sg6e11,~sg6e12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg6e1=~f1,~sg6e2=~f2,~sg6e3=~f3,~sg6e4=~f4,~sg6e5=~f5,~sg6e6=~f6,~sg6e7=~f7,~sg6e8=~f8,~sg6e9=~f9,~sg6e10=~f10,~sg6e11=~f11,~sg6e12=~f12];});
310         if([~sg6f1,~sg6f2,~sg6f3,~sg6f4,~sg6f5,~sg6f6,~sg6f7,~sg6f8,~sg6f9,~sg6f10,~sg6f11,~sg6f12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg6f1=~f1,~sg6f2=~f2,~sg6f3=~f3,~sg6f4=~f4,~sg6f5=~f5,~sg6f6=~f6,~sg6f7=~f7,~sg6f8=~f8,~sg6f9=~f9,~sg6f10=~f10,~sg6f11=~f11,~sg6f12=~f12];});
311         if([~sg6g1,~sg6g2,~sg6g3,~sg6g4,~sg6g5,~sg6g6,~sg6g7,~sg6g8,~sg6g9,~sg6g10,~sg6g11,~sg6g12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg6g1=~f1,~sg6g2=~f2,~sg6g3=~f3,~sg6g4=~f4,~sg6g5=~f5,~sg6g6=~f6,~sg6g7=~f7,~sg6g8=~f8,~sg6g9=~f9,~sg6g10=~f10,~sg6g11=~f11,~sg6g12=~f12];});
312         if([~sg6h1,~sg6h2,~sg6h3,~sg6h4,~sg6h5,~sg6h6,~sg6h7,~sg6h8,~sg6h9,~sg6h10,~sg6h11,~sg6h12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg6h1=~f1,~sg6h2=~f2,~sg6h3=~f3,~sg6h4=~f4,~sg6h5=~f5,~sg6h6=~f6,~sg6h7=~f7,~sg6h8=~f8,~sg6h9=~f9,~sg6h10=~f10,~sg6h11=~f11,~sg6h12=~f12];});
313         if([~sg7a1,~sg7a2,~sg7a3,~sg7a4,~sg7a5,~sg7a6,~sg7a7,~sg7a8,~sg7a9,~sg7a10,~sg7a11,~sg7a12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg7a1=~f1,~sg7a2=~f2,~sg7a3=~f3,~sg7a4=~f4,~sg7a5=~f5,~sg7a6=~f6,~sg7a7=~f7,~sg7a8=~f8,~sg7a9=~f9,~sg7a10=~f10,~sg7a11=~f11,~sg7a12=~f12];});
314         if([~sg7b1,~sg7b2,~sg7b3,~sg7b4,~sg7b5,~sg7b6,~sg7b7,~sg7b8,~sg7b9,~sg7b10,~sg7b11,~sg7b12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg7b1=~f1,~sg7b2=~f2,~sg7b3=~f3,~sg7b4=~f4,~sg7b5=~f5,~sg7b6=~f6,~sg7b7=~f7,~sg7b8=~f8,~sg7b9=~f9,~sg7b10=~f10,~sg7b11=~f11,~sg7b12=~f12];});
315         if([~sg7c1,~sg7c2,~sg7c3,~sg7c4,~sg7c5,~sg7c6,~sg7c7,~sg7c8,~sg7c9,~sg7c10,~sg7c11,~sg7c12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg7c1=~f1,~sg7c2=~f2,~sg7c3=~f3,~sg7c4=~f4,~sg7c5=~f5,~sg7c6=~f6,~sg7c7=~f7,~sg7c8=~f8,~sg7c9=~f9,~sg7c10=~f10,~sg7c11=~f11,~sg7c12=~f12];});
316         if([~sg7d1,~sg7d2,~sg7d3,~sg7d4,~sg7d5,~sg7d6,~sg7d7,~sg7d8,~sg7d9,~sg7d10,~sg7d11,~sg7d12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg7d1=~f1,~sg7d2=~f2,~sg7d3=~f3,~sg7d4=~f4,~sg7d5=~f5,~sg7d6=~f6,~sg7d7=~f7,~sg7d8=~f8,~sg7d9=~f9,~sg7d10=~f10,~sg7d11=~f11,~sg7d12=~f12];});
317         if([~sg7e1,~sg7e2,~sg7e3,~sg7e4,~sg7e5,~sg7e6,~sg7e7,~sg7e8,~sg7e9,~sg7e10,~sg7e11,~sg7e12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg7e1=~f1,~sg7e2=~f2,~sg7e3=~f3,~sg7e4=~f4,~sg7e5=~f5,~sg7e6=~f6,~sg7e7=~f7,~sg7e8=~f8,~sg7e9=~f9,~sg7e10=~f10,~sg7e11=~f11,~sg7e12=~f12];});
318         if([~sg7f1,~sg7f2,~sg7f3,~sg7f4,~sg7f5,~sg7f6,~sg7f7,~sg7f8,~sg7f9,~sg7f10,~sg7f11,~sg7f12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg7f1=~f1,~sg7f2=~f2,~sg7f3=~f3,~sg7f4=~f4,~sg7f5=~f5,~sg7f6=~f6,~sg7f7=~f7,~sg7f8=~f8,~sg7f9=~f9,~sg7f10=~f10,~sg7f11=~f11,~sg7f12=~f12];});
319         if([~sg7g1,~sg7g2,~sg7g3,~sg7g4,~sg7g5,~sg7g6,~sg7g7,~sg7g8,~sg7g9,~sg7g10,~sg7g11,~sg7g12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg7g1=~f1,~sg7g2=~f2,~sg7g3=~f3,~sg7g4=~f4,~sg7g5=~f5,~sg7g6=~f6,~sg7g7=~f7,~sg7g8=~f8,~sg7g9=~f9,~sg7g10=~f10,~sg7g11=~f11,~sg7g12=~f12];});
320         if([~sg7h1,~sg7h2,~sg7h3,~sg7h4,~sg7h5,~sg7h6,~sg7h7,~sg7h8,~sg7h9,~sg7h10,~sg7h11,~sg7h12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg7h1=~f1,~sg7h2=~f2,~sg7h3=~f3,~sg7h4=~f4,~sg7h5=~f5,~sg7h6=~f6,~sg7h7=~f7,~sg7h8=~f8,~sg7h9=~f9,~sg7h10=~f10,~sg7h11=~f11,~sg7h12=~f12];});
321         if([~sg8a1,~sg8a2,~sg8a3,~sg8a4,~sg8a5,~sg8a6,~sg8a7,~sg8a8,~sg8a9,~sg8a10,~sg8a11,~sg8a12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg8a1=~f1,~sg8a2=~f2,~sg8a3=~f3,~sg8a4=~f4,~sg8a5=~f5,~sg8a6=~f6,~sg8a7=~f7,~sg8a8=~f8,~sg8a9=~f9,~sg8a10=~f10,~sg8a11=~f11,~sg8a12=~f12];});
322         if([~sg8b1,~sg8b2,~sg8b3,~sg8b4,~sg8b5,~sg8b6,~sg8b7,~sg8b8,~sg8b9,~sg8b10,~sg8b11,~sg8b12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg8b1=~f1,~sg8b2=~f2,~sg8b3=~f3,~sg8b4=~f4,~sg8b5=~f5,~sg8b6=~f6,~sg8b7=~f7,~sg8b8=~f8,~sg8b9=~f9,~sg8b10=~f10,~sg8b11=~f11,~sg8b12=~f12];});
323         if([~sg8c1,~sg8c2,~sg8c3,~sg8c4,~sg8c5,~sg8c6,~sg8c7,~sg8c8,~sg8c9,~sg8c10,~sg8c11,~sg8c12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg8c1=~f1,~sg8c2=~f2,~sg8c3=~f3,~sg8c4=~f4,~sg8c5=~f5,~sg8c6=~f6,~sg8c7=~f7,~sg8c8=~f8,~sg8c9=~f9,~sg8c10=~f10,~sg8c11=~f11,~sg8c12=~f12];});
324         if([~sg8d1,~sg8d2,~sg8d3,~sg8d4,~sg8d5,~sg8d6,~sg8d7,~sg8d8,~sg8d9,~sg8d10,~sg8d11,~sg8d12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg8d1=~f1,~sg8d2=~f2,~sg8d3=~f3,~sg8d4=~f4,~sg8d5=~f5,~sg8d6=~f6,~sg8d7=~f7,~sg8d8=~f8,~sg8d9=~f9,~sg8d10=~f10,~sg8d11=~f11,~sg8d12=~f12];});
325         if([~sg8e1,~sg8e2,~sg8e3,~sg8e4,~sg8e5,~sg8e6,~sg8e7,~sg8e8,~sg8e9,~sg8e10,~sg8e11,~sg8e12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg8e1=~f1,~sg8e2=~f2,~sg8e3=~f3,~sg8e4=~f4,~sg8e5=~f5,~sg8e6=~f6,~sg8e7=~f7,~sg8e8=~f8,~sg8e9=~f9,~sg8e10=~f10,~sg8e11=~f11,~sg8e12=~f12];});
326         if([~sg8f1,~sg8f2,~sg8f3,~sg8f4,~sg8f5,~sg8f6,~sg8f7,~sg8f8,~sg8f9,~sg8f10,~sg8f11,~sg8f12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg8f1=~f1,~sg8f2=~f2,~sg8f3=~f3,~sg8f4=~f4,~sg8f5=~f5,~sg8f6=~f6,~sg8f7=~f7,~sg8f8=~f8,~sg8f9=~f9,~sg8f10=~f10,~sg8f11=~f11,~sg8f12=~f12];});
327         if([~sg8g1,~sg8g2,~sg8g3,~sg8g4,~sg8g5,~sg8g6,~sg8g7,~sg8g8,~sg8g9,~sg8g10,~sg8g11,~sg8g12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg8g1=~f1,~sg8g2=~f2,~sg8g3=~f3,~sg8g4=~f4,~sg8g5=~f5,~sg8g6=~f6,~sg8g7=~f7,~sg8g8=~f8,~sg8g9=~f9,~sg8g10=~f10,~sg8g11=~f11,~sg8g12=~f12];});
328         if([~sg8h1,~sg8h2,~sg8h3,~sg8h4,~sg8h5,~sg8h6,~sg8h7,~sg8h8,~sg8h9,~sg8h10,~sg8h11,~sg8h12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg8h1=~f1,~sg8h2=~f2,~sg8h3=~f3,~sg8h4=~f4,~sg8h5=~f5,~sg8h6=~f6,~sg8h7=~f7,~sg8h8=~f8,~sg8h9=~f9,~sg8h10=~f10,~sg8h11=~f11,~sg8h12=~f12];});
329
330
331         //set n1-n9 ratio values
332
333         case
334         {~ratio_setting == "psine1";}{~n_value1 = ~gm;    ~n_value2 = ~gm2;   ~n_value6 = ~gm6;}
335         {~ratio_setting == "psine2";}{~n_value1 = ~ngm1;  ~n_value2 = ~ngm2;  ~n_value6 = ~ngm6;}
336         {~ratio_setting == "psine3";}{~n_value1 = ~nngm1; ~n_value2 = ~nngm2; ~n_value6 = ~nngm6;}
337         {~ratio_setting == "hsine1";}{~n_value1 = ~h1;    ~n_value2 = ~h2;    ~n_value6 = ~h6;}
338         {~ratio_setting == "hsine2";}{~n_value1 = ~nh1;   ~n_value2 = ~nh2;   ~n_value6 = ~nh6;}
339         {~ratio_setting == "hsine3";}{~n_value1 = ~nnh1;  ~n_value2 = ~nnh2;  ~n_value6 = ~nnh6;};
340
341
342         //King Wen sequence interpretation settings 1-3 for synthdefs
343
344         ~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 ]]};
345         ~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 ]]};
346
347         ~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 ]]};
348         ~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 ]]};
349
350         ~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    ]]};
351         ~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    ]]};
352
353
354         //synthdefs
355
356         ~gsine = {
357
358                 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,
359                         a, b, c, d, e, f, pan=0, fc = 1;
360                         var s1, out, env1, s2, dseq;
361                         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
362                         dseq = Dseq(
363                                 case
364                                 {~kws_setting == 1}{~kws_setting_1_a.value;}
365                                 {~kws_setting == 2}{~kws_setting_2_a.value;}
366                                 {~kws_setting == 3}{~kws_setting_3_a.value;} ++ Array.fill((~gsinenum*~first_harmonic -1), {
367                                         case
368                                         {~kws_setting == 1}{~kws_setting_1_b.value;}
369                                         {~kws_setting == 2}{~kws_setting_2_b.value;}
370                                         {~kws_setting == 3}{~kws_setting_3_b.value;}}).flatten, inf);
371                         s1 = GrainSin.ar(1, Impulse.ar(dur), 1/(dur),Demand.ar(Impulse.ar(dur), 0, dseq));
372                         if(~low_pass_filter_on == 1, {s1 = BLowPass.ar(s1, ~low_pass_filter_freq_limit);}, {s1 = s1});
373                         OffsetOut.ar(0, s1.dup*vol);
374                 }, [\ir]).add;
375
376                 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,
377                         a, b, c, d, e, f, pan=0, fc = 1, id = -1;
378                         var s1, out, env1, s2, dseq;
379                         9.do(x = 0; {("n"++(x=x+1)).asSymbol.envirPut(~n_value1)});
380                         dseq = Dseq([
381                                 case
382                                 {~kws_setting == 1}{~kws_setting_1_a.value;}
383                                 {~kws_setting == 2}{~kws_setting_2_a.value;}
384                                 {~kws_setting == 3}{~kws_setting_3_a.value;} ++ Array.fill((~gsinenum*~first_harmonic -1), {
385                                         case
386                                         {~kws_setting == 1}{~kws_setting_1_b.value;}
387                                         {~kws_setting == 2}{~kws_setting_2_b.value;}
388                                         {~kws_setting == 3}{~kws_setting_3_b.value;}}).flatten].flatten.reverse, inf);
389                         s1 = GrainSin.ar(1, Impulse.ar(dur), 1/(dur), Demand.ar(Impulse.ar(dur), 0, dseq));
390                         if(~low_pass_filter_on == 1, {s1 = BLowPass.ar(s1, ~low_pass_filter_freq_limit);}, {s1 = s1});
391                         OffsetOut.ar(0, s1.dup*vol);
392                 }, [\ir]).add;
393
394                 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,
395                         a, b, c, d, e, f, pan=0, fc = 1;
396                         var s1, out, env1, s2, dseq;
397                         9.do(x = 0; {("n"++(x=x+1)).asSymbol.envirPut(~n_value2)});
398                         dseq = Dseq(
399                                 case
400                                 {~kws_setting == 1}{~kws_setting_1_a.value;}
401                                 {~kws_setting == 2}{~kws_setting_2_a.value;}
402                                 {~kws_setting == 3}{~kws_setting_3_a.value;} ++ Array.fill((~gsinenum*~second_harmonic -1), {
403                                         case
404                                         {~kws_setting == 1}{~kws_setting_1_b.value;}
405                                         {~kws_setting == 2}{~kws_setting_2_b.value;}
406                                         {~kws_setting == 3}{~kws_setting_3_b.value;}}).flatten, inf);
407                         s1 = GrainSin.ar(1, Impulse.ar(dur), 1/(dur),Demand.ar(Impulse.ar(dur), 0, dseq));
408                         if(~low_pass_filter_on == 1, {s1 = BLowPass.ar(s1, ~low_pass_filter_freq_limit);}, {s1 = s1});
409                         OffsetOut.ar(0, s1.dup*vol);
410                 }, [\ir]).add;
411
412                 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,
413                         a, b, c, d, e, f, pan=0, fc = 1, id = -1;
414                         var s1, out, env1, s2, dseq;
415                         9.do(x = 0; {("n"++(x=x+1)).asSymbol.envirPut(~n_value2)});
416                         dseq = Dseq([
417                                 case
418                                 {~kws_setting == 1}{~kws_setting_1_a.value;}
419                                 {~kws_setting == 2}{~kws_setting_2_a.value;}
420                                 {~kws_setting == 3}{~kws_setting_3_a.value;} ++ Array.fill((~gsinenum*~second_harmonic -1), {
421                                         case
422                                         {~kws_setting == 1}{~kws_setting_1_b.value;}
423                                         {~kws_setting == 2}{~kws_setting_2_b.value;}
424                                         {~kws_setting == 3}{~kws_setting_3_b.value;}}).flatten].flatten.reverse, inf);
425                         s1 = GrainSin.ar(1, Impulse.ar(dur), 1/(dur), Demand.ar(Impulse.ar(dur), 0, dseq));
426                         if(~low_pass_filter_on == 1, {s1 = BLowPass.ar(s1, ~low_pass_filter_freq_limit);}, {s1 = s1});
427                         OffsetOut.ar(0, s1.dup*vol);
428                 }, [\ir]).add;
429
430                 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,
431                         a, b, c, d, e, f, pan=0, fc = 1;
432                         var s1, out, env1, s2, dseq;
433                         9.do(x = 0; {("n"++(x=x+1)).asSymbol.envirPut(~n_value6)});
434                         dseq = Dseq(
435                                 case
436                                 {~kws_setting == 1}{~kws_setting_1_a.value;}
437                                 {~kws_setting == 2}{~kws_setting_2_a.value;}
438                                 {~kws_setting == 3}{~kws_setting_3_a.value;} ++ Array.fill((~gsinenum*~third_harmonic -1), {
439                                         case
440                                         {~kws_setting == 1}{~kws_setting_1_b.value;}
441                                         {~kws_setting == 2}{~kws_setting_2_b.value;}
442                                         {~kws_setting == 3}{~kws_setting_3_b.value;}}).flatten, inf);
443                         s1 = GrainSin.ar(1, Impulse.ar(dur), 1/(dur),Demand.ar(Impulse.ar(dur), 0, dseq));
444                         if(~low_pass_filter_on == 1, {s1 = BLowPass.ar(s1, ~low_pass_filter_freq_limit);}, {s1 = s1});
445                         OffsetOut.ar(0, s1.dup*vol);
446                 }, [\ir]).add;
447
448                 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,
449                         a, b, c, d, e, f, pan=0, fc = 1;
450                         var s1, out, env1, s2, dseq;
451                         9.do(x = 0; {("n"++(x=x+1)).asSymbol.envirPut(~n_value6)});
452                         dseq = Dseq([
453                                 case
454                                 {~kws_setting == 1}{~kws_setting_1_a.value;}
455                                 {~kws_setting == 2}{~kws_setting_2_a.value;}
456                                 {~kws_setting == 3}{~kws_setting_3_a.value;} ++ Array.fill((~gsinenum*~third_harmonic -1), {
457                                         case
458                                         {~kws_setting == 1}{~kws_setting_1_b.value;}
459                                         {~kws_setting == 2}{~kws_setting_2_b.value;}
460                                         {~kws_setting == 3}{~kws_setting_3_b.value;}}).flatten].flatten.reverse, inf);
461                         s1 = GrainSin.ar(1, Impulse.ar(dur), 1/(dur), Demand.ar(Impulse.ar(dur), 0, dseq));
462                         if(~low_pass_filter_on == 1, {s1 = BLowPass.ar(s1, ~low_pass_filter_freq_limit);}, {s1 = s1});
463                         OffsetOut.ar(0, s1.dup*vol);
464                 }, [\ir]).add;
465         };
466
467
468         //set base (lowest) frequencies, set starting values for synthdef, and load synthdef on server boot
469
470         if((~gsinenum == nil) or: (~synthdef != "gsineicld"), {
471                 (
472                         if(~basefreq == nil, {~basefreq = ~base_frequency});
473                         ~fmult = 16;
474                         (#a,b,c,d,e,f = [ ~basefreq,~basefreq,~basefreq,~basefreq,~basefreq,~basefreq  ];
475                                 ~a = a; ~b = b; ~c =c; ~d = d; ~e = e;~f=f;);
476
477                         ~synthdef = "gsineicld"; ~gsinenum = ~synthdefnum;
478
479                         ~gsine.value;
480                 );
481         });
482
483
484         //generate GUI window
485
486         w = Window("Timewave Synth", Rect(0,0,Window.screenBounds.width,Window.screenBounds.height), border:true);
487
488         view = UserView(w, Window.screenBounds);
489         view.clearOnRefresh = false;
490         view.background = Color.black;
491
492         //vertical grid (inactive)
493
494         /*~b1 = Window.screenBounds.width/(12*4) /*25.462962962963*/; ~btu = 31; ~btd = 375; ~bw = 0.5; ~bh = 120; ~bcolor = Color.grey;
495         CompositeView(w, Rect(~b1, ~btu, ~bw, ~bh)).background = ~bcolor;
496         CompositeView(w, Rect(~b1, ~btd, ~bw, ~bh)).background = ~bcolor;
497         54.do({CompositeView(w, Rect(~b1 = ~b1+(Window.screenBounds.width/(12*4)), ~btu, ~bw, ~bh)).background = ~bcolor;});
498         ~b1 = Window.screenBounds.width/(12*4);
499         54.do({CompositeView(w, Rect(~b1 = ~b1+(Window.screenBounds.width/(12*4)), ~btd, ~bw, ~bh)).background = ~bcolor;});*/
500
501         ~nh = 2;
502         ~nw = ~nh*1.6180339887499;
503
504         ~tgrid = 30;
505         ~bgrid = Window.screenBounds.height-(Window.screenBounds.height/1.6180339887499)+30;
506
507         ~dc1 = ~tgrid-5; ~dc2 = ~bgrid-5; ~dca = 10;
508
509         //horizontal grid
510
511         13.do(x=~tgrid-10; {CompositeView(w, Rect(1, x=x+10, Window.screenBounds.width, 0.5)).background = Color.new255(51, 51, 51)});
512         13.do(x=~bgrid-10; {CompositeView(w, Rect(1, x=x+10, Window.screenBounds.width, 0.5)).background = Color.new255(51, 51, 51)});
513
514         ~z1 = (CompositeView(w, Rect((if(~f1 == nil, {f1.value},{~f1.value}).explin(~outmin1,~outmax1,0,Window.screenBounds.width)), ~dc1=~dc1+10, ~nw, 2)).background = Color.white;);
515         ~z2 = (CompositeView(w, Rect((if(~f2 == nil, {f2.value},{~f2.value}).explin(~outmin1,~outmax1,0,Window.screenBounds.width)), ~dc1=~dc1+10, ~nw, 2)).background = Color.white;);
516         ~z3 = (CompositeView(w, Rect((if(~f3 == nil, {f3.value},{~f3.value}).explin(~outmin1,~outmax1,0,Window.screenBounds.width)), ~dc1=~dc1+10, ~nw, 2)).background = Color.white;);
517         ~z4 = (CompositeView(w, Rect((if(~f4 == nil, {f4.value},{~f4.value}).explin(~outmin1,~outmax1,0,Window.screenBounds.width)), ~dc1=~dc1+10, ~nw, 2)).background = Color.white;);
518         ~z5 = (CompositeView(w, Rect((if(~f5 == nil, {f5.value},{~f5.value}).explin(~outmin1,~outmax1,0,Window.screenBounds.width)), ~dc1=~dc1+10, ~nw, 2)).background = Color.white;);
519         ~z6 = (CompositeView(w, Rect((if(~f6 == nil, {f6.value},{~f6.value}).explin(~outmin1,~outmax1,0,Window.screenBounds.width)), ~dc1=~dc1+10, ~nw, 2)).background = Color.white;);
520         ~z7 = (CompositeView(w, Rect((if(~f7 == nil, {f7.value},{~f7.value}).explin(~outmin1,~outmax1,0,Window.screenBounds.width)), ~dc1=~dc1+10, ~nw, 2)).background = Color.white;);
521         ~z8 = (CompositeView(w, Rect((if(~f8 == nil, {f8.value},{~f8.value}).explin(~outmin1,~outmax1,0,Window.screenBounds.width)), ~dc1=~dc1+10, ~nw, 2)).background = Color.white;);
522         ~z9 = (CompositeView(w, Rect((if(~f9 == nil, {f9.value},{~f9.value}).explin(~outmin1,~outmax1,0,Window.screenBounds.width)), ~dc1=~dc1+10, ~nw, 2)).background = Color.white;);
523         ~z10 = (CompositeView(w, Rect((if(~f10 == nil, {f10.value},{~f10.value}).explin(~outmin1,~outmax1,0,Window.screenBounds.width)), ~dc1=~dc1+10, ~nw, 2)).background = Color.white;);
524         ~z11 = (CompositeView(w, Rect((if(~f11 == nil, {f11.value},{~f11.value}).explin(~outmin1,~outmax1,0,Window.screenBounds.width)), ~dc1=~dc1+10, ~nw, 2)).background = Color.white;);
525         ~z12 = (CompositeView(w, Rect((if(~f12 == nil, {f12.value},{~f12.value}).explin(~outmin1,~outmax1,0,Window.screenBounds.width)), ~dc1=~dc1+10, ~nw, 2)).background = Color.white;);
526         ~zmid = (CompositeView(w, Rect(x, 280, ~nw, 2)).background = Color.clear;);
527         ~z25 = (CompositeView(w, Rect((if(~f1 == nil, {f1.value},{~f1.value}).explin(~outmin2,~outmax2,0,Window.screenBounds.width)), ~dc2=~dc2+10, ~nw, 2)).background = Color.white;);
528         ~z26 = (CompositeView(w, Rect((if(~f2 == nil, {f2.value},{~f2.value}).explin(~outmin2,~outmax2,0,Window.screenBounds.width)), ~dc2=~dc2+10, ~nw, 2)).background = Color.white;);
529         ~z27 = (CompositeView(w, Rect((if(~f3 == nil, {f3.value},{~f3.value}).explin(~outmin2,~outmax2,0,Window.screenBounds.width)), ~dc2=~dc2+10, ~nw, 2)).background = Color.white;);
530         ~z28 = (CompositeView(w, Rect((if(~f4 == nil, {f4.value},{~f4.value}).explin(~outmin2,~outmax2,0,Window.screenBounds.width)), ~dc2=~dc2+10, ~nw, 2)).background = Color.white;);
531         ~z29 = (CompositeView(w, Rect((if(~f5 == nil, {f5.value},{~f5.value}).explin(~outmin2,~outmax2,0,Window.screenBounds.width)), ~dc2=~dc2+10, ~nw, 2)).background = Color.white;);
532         ~z30 = (CompositeView(w, Rect((if(~f6 == nil, {f6.value},{~f6.value}).explin(~outmin2,~outmax2,0,Window.screenBounds.width)), ~dc2=~dc2+10, ~nw, 2)).background = Color.white;);
533         ~z31 = (CompositeView(w, Rect((if(~f7 == nil, {f7.value},{~f7.value}).explin(~outmin2,~outmax2,0,Window.screenBounds.width)), ~dc2=~dc2+10, ~nw, 2)).background = Color.white;);
534         ~z32 = (CompositeView(w, Rect((if(~f8 == nil, {f8.value},{~f8.value}).explin(~outmin2,~outmax2,0,Window.screenBounds.width)), ~dc2=~dc2+10, ~nw, 2)).background = Color.white;);
535         ~z33 = (CompositeView(w, Rect((if(~f9 == nil, {f9.value},{~f9.value}).explin(~outmin2,~outmax2,0,Window.screenBounds.width)), ~dc2=~dc2+10, ~nw, 2)).background = Color.white;);
536         ~z34 = (CompositeView(w, Rect((if(~f10 == nil, {f10.value},{~f10.value}).explin(~outmin2,~outmax2,0,Window.screenBounds.width)), ~dc2=~dc2+10, ~nw, 2)).background = Color.white;);
537         ~z35 = (CompositeView(w, Rect((if(~f11 == nil, {f11.value},{~f11.value}).explin(~outmin2,~outmax2,0,Window.screenBounds.width)), ~dc2=~dc2+10, ~nw, 2)).background = Color.white;);
538         ~z36 = (CompositeView(w, Rect((if(~f12 == nil, {f12.value},{~f12.value}).explin(~outmin2,~outmax2,0,Window.screenBounds.width)), ~dc2=~dc2+10, ~nw, 2)).background = Color.white;);
539
540
541         ~dc1 = ~tgrid-5; ~dc2 = ~bgrid-5; ~dca = 10;
542
543
544         //synth functions (open, flow, slide, pause, free)
545
546         ~synthopen = {
547                 case
548                 {((~l1a.isRunning == false) and: (~l1a1.isRunning == false)) or: ~l1a1.isRunning == true}{
549                         if(~l1a1.isRunning == true, {
550                                 (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;
551                                         #vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8,vol9,vol10,vol11,vol12 = [~vol1,~vol2,~vol3,~vol4,~vol5,~vol6,~vol7,~vol8,~vol9,~vol10,~vol11,~vol12];
552                                         #f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12 = [ 0,0,0,0,0,0,0,0,0,0,0,0 ];
553                                         ~l1a1.set(\dur, f1,     \vol, vol1);  ~l1b1.set(\dur, f1,  \vol, vol1);
554                                         ~l1c1.set(\dur, f1/~icd3,       \vol, vol1);  ~l1d1.set(\dur, f1/~icd3,  \vol, vol1);
555                                         ~l1e1.set(\dur, f1/~icd6,       \vol, vol1);  ~l1f1.set(\dur, f1/~icd6,  \vol, vol1);
556                                         ~l2a1.set(\dur, f2,     \vol, vol2);          ~l2b1.set(\dur, f2,  \vol, vol2);
557                                         ~l2c1.set(\dur, f2/~icd3,       \vol, vol2);  ~l2d1.set(\dur, f2/~icd3,  \vol, vol2);
558                                         ~l2e1.set(\dur, f2/~icd6,       \vol, vol2);  ~l2f1.set(\dur, f2/~icd6,  \vol, vol2);
559                                         ~l3a1.set(\dur, f3,     \vol, vol3);          ~l3b1.set(\dur, f3,  \vol, vol3);
560                                         ~l3c1.set(\dur, f3/~icd3,       \vol, vol3);  ~l3d1.set(\dur, f3/~icd3,  \vol, vol3);
561                                         ~l3e1.set(\dur, f3/~icd6,       \vol, vol3);  ~l3f1.set(\dur, f3/~icd6,  \vol, vol3);
562                                         ~l4a1.set(\dur, f4,    \vol, vol4);           ~l4b1.set(\dur, f4,  \vol, vol4);
563                                         ~l4c1.set(\dur, f4/~icd3,       \vol, vol4);  ~l4d1.set(\dur, f4/~icd3,  \vol, vol4);
564                                         ~l4e1.set(\dur, f4/~icd6,       \vol, vol4);  ~l4f1.set(\dur, f4/~icd6,  \vol, vol4);
565                                         ~l5a1.set(\dur, f5,    \vol, vol5);           ~l5b1.set(\dur, f5,  \vol, vol5);
566                                         ~l5c1.set(\dur, f5/~icd3,       \vol, vol5);  ~l5d1.set(\dur, f5/~icd3,  \vol, vol5);
567                                         ~l5e1.set(\dur, f5/~icd6,       \vol, vol5);  ~l5f1.set(\dur, f5/~icd6,  \vol, vol5);
568                                         ~l6a1.set(\dur, f6,    \vol, vol6);           ~l6b1.set(\dur, f6,  \vol, vol6);
569                                         ~l6c1.set(\dur, f6/~icd3,       \vol, vol6);  ~l6d1.set(\dur, f6/~icd3,  \vol, vol6);
570                                         ~l6e1.set(\dur, f6/~icd6,       \vol, vol6);  ~l6f1.set(\dur, f6/~icd6,  \vol, vol6);
571                                         ~l7a1.set(\dur, f7,    \vol, vol7);           ~l7b1.set(\dur, f7,  \vol, vol7);
572                                         ~l7c1.set(\dur, f7/~icd3,       \vol, vol7);  ~l7d1.set(\dur, f7/~icd3,  \vol, vol7);
573                                         ~l7e1.set(\dur, f7/~icd6,       \vol, vol7);  ~l7f1.set(\dur, f7/~icd6,  \vol, vol7);
574                                         ~l8a1.set(\dur, f8,    \vol, vol8);           ~l8b1.set(\dur, f8,  \vol, vol8);
575                                         ~l8c1.set(\dur, f8/~icd3,       \vol, vol8);  ~l8d1.set(\dur, f8/~icd3,  \vol, vol8);
576                                         ~l8e1.set(\dur, f8/~icd6,       \vol, vol8);  ~l8f1.set(\dur, f8/~icd6,  \vol, vol8);
577                                         ~l9a1.set(\dur, f9,    \vol, vol9);          ~l9b1.set(\dur, f9,  \vol, vol9);
578                                         ~l9c1.set(\dur, f9/~icd3,       \vol, vol9); ~l9d1.set(\dur, f9/~icd3,  \vol, vol9);
579                                         ~l9e1.set(\dur, f9/~icd6,       \vol, vol9); ~l9f1.set(\dur, f9/~icd6,  \vol, vol9);
580                                         ~l10a1.set(\dur, f10,  \vol, vol10);         ~l10b1.set(\dur, f10,  \vol, vol10);
581                                         ~l10c1.set(\dur, f10/~icd3,     \vol, vol10);~l10d1.set(\dur, f10/~icd3,  \vol, vol10);
582                                         ~l10e1.set(\dur, f10/~icd6,     \vol, vol10);~l10f1.set(\dur, f10/~icd6,  \vol, vol10);
583                                         ~l11a1.set(\dur, f11,  \vol, vol11);         ~l11b1.set(\dur, f11,  \vol, vol11);
584                                         ~l11c1.set(\dur, f11/~icd3,     \vol, vol11);~l11d1.set(\dur, f11/~icd3,  \vol, vol11);
585                                         ~l11e1.set(\dur, f11/~icd6,     \vol, vol11);~l11f1.set(\dur, f11/~icd6,  \vol, vol11);
586                                         ~l12a1.set(\dur, f12,  \vol, vol12);         ~l12b1.set(\dur, f12,  \vol, vol12);
587                                         ~l12c1.set(\dur, f12/~icd3,     \vol, vol12);~l12d1.set(\dur, f12/~icd3,  \vol, vol12);
588                                         ~l12e1.set(\dur, f12/~icd6,     \vol, vol12);~l12f1.set(\dur, f12/~icd6,  \vol, vol12);
589                                 }););
590                         });
591
592                         (
593                                 1.do({var vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8,vol9,vol10,vol11,vol12,s1,s2,s3,s4,s5,s6;
594                                         #vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8,vol9,vol10,vol11,vol12 = [~vol1,~vol2,~vol3,~vol4,~vol5,~vol6,~vol7,~vol8,~vol9,~vol10,~vol11,~vol12];
595                                         #s1,s2,s3,s4,s5,s6 = [\gsineicfld6, \gsineicrld6, \gsineicfld2, \gsineicrld2, \gsineicfld1, \gsineicrld1];
596                                         ~l1a = Synth(s1, [\dur, ~f1,    \vol, vol1]).register;    ~l1b = Synth(s2, [\dur, ~f1,    \vol, vol1]);
597                                         ~l1c = Synth(s3, [\dur, ~f1/~icd3,  \vol, vol1]);   ~l1d = Synth(s4, [\dur, ~f1/~icd3,  \vol, vol1]);
598                                         ~l1e = Synth(s5, [\dur, ~f1/~icd6,  \vol, vol1]);   ~l1f = Synth(s6, [\dur, ~f1/~icd6,  \vol, vol1]);
599                                         ~l2a = Synth(s1, [\dur, ~f2,    \vol, vol2]);        ~l2b = Synth(s2, [\dur, ~f2,    \vol, vol2]);
600                                         ~l2c = Synth(s3, [\dur, ~f2/~icd3,  \vol, vol2]);   ~l2d = Synth(s4, [\dur, ~f2/~icd3,  \vol, vol2]);
601                                         ~l2e = Synth(s5, [\dur, ~f2/~icd6,  \vol, vol2]);   ~l2f = Synth(s6, [\dur, ~f2/~icd6,  \vol, vol2]);
602                                         ~l3a = Synth(s1, [\dur, ~f3,    \vol, vol3]);        ~l3b = Synth(s2, [\dur, ~f3,   \vol, vol3]);
603                                         ~l3c = Synth(s3, [\dur, ~f3/~icd3,  \vol, vol3]);   ~l3d = Synth(s4, [\dur, ~f3/~icd3, \vol, vol3]);
604                                         ~l3e = Synth(s5, [\dur, ~f3/~icd6,  \vol, vol3]);   ~l3f = Synth(s6, [\dur, ~f3/~icd6, \vol, vol3]);
605                                         ~l4a = Synth(s1, [\dur, ~f4,    \vol, vol4]);       ~l4b = Synth(s2, [\dur, ~f4,   \vol, vol4]);
606                                         ~l4c = Synth(s3, [\dur, ~f4/~icd3,  \vol, vol4]);  ~l4d = Synth(s4, [\dur, ~f4/~icd3, \vol, vol4]);
607                                         ~l4e = Synth(s5, [\dur, ~f4/~icd6,  \vol, vol4]);   ~l4f = Synth(s6, [\dur, ~f4/~icd6, \vol, vol4]);
608                                         ~l5a = Synth(s1, [\dur, ~f5,    \vol, vol5]);       ~l5b = Synth(s2, [\dur, ~f5,   \vol, vol5]);
609                                         ~l5c = Synth(s3, [\dur, ~f5/~icd3,  \vol, vol5]);   ~l5d = Synth(s4, [\dur, ~f5/~icd3, \vol, vol5]);
610                                         ~l5e = Synth(s5, [\dur, ~f5/~icd6,  \vol, vol5]);   ~l5f = Synth(s6, [\dur, ~f5/~icd6, \vol, vol5]);
611                                         ~l6a = Synth(s1, [\dur, ~f6,    \vol, vol6]);       ~l6b = Synth(s2, [\dur, ~f6,   \vol, vol6]);
612                                         ~l6c = Synth(s3, [\dur, ~f6/~icd3,  \vol, vol6]);   ~l6d = Synth(s4, [\dur, ~f6/~icd3, \vol, vol6]);
613                                         ~l6e = Synth(s5, [\dur, ~f6/~icd6,  \vol, vol6]);   ~l6f = Synth(s6, [\dur, ~f6/~icd6, \vol, vol6]);
614                                         ~l7a = Synth(s1, [\dur, ~f7,    \vol, vol7]);       ~l7b = Synth(s2, [\dur, ~f7,   \vol, vol7]);
615                                         ~l7c = Synth(s3, [\dur, ~f7/~icd3,  \vol, vol7]);   ~l7d = Synth(s4, [\dur, ~f7/~icd3, \vol, vol7]);
616                                         ~l7e = Synth(s5, [\dur, ~f7/~icd6,  \vol, vol7]);   ~l7f = Synth(s6, [\dur, ~f7/~icd6, \vol, vol7]);
617                                         ~l8a = Synth(s1, [\dur, ~f8,    \vol, vol8]);       ~l8b = Synth(s2, [\dur, ~f8,   \vol, vol8]);
618                                         ~l8c = Synth(s3, [\dur, ~f8/~icd3,  \vol, vol8]);   ~l8d = Synth(s4, [\dur, ~f8/~icd3, \vol, vol8]);
619                                         ~l8e = Synth(s5, [\dur, ~f8/~icd6,  \vol, vol8]);   ~l8f = Synth(s6, [\dur, ~f8/~icd6, \vol, vol8]);
620                                         ~l9a = Synth(s1, [\dur, ~f9,    \vol, vol9]);       ~l9b = Synth(s2, [\dur, ~f9,   \vol, vol9]);
621                                         ~l9c = Synth(s3, [\dur, ~f9/~icd3,  \vol, vol9]);   ~l9d = Synth(s4, [\dur, ~f9/~icd3, \vol, vol9]);
622                                         ~l9e = Synth(s5, [\dur, ~f9/~icd6,  \vol, vol9]);   ~l9f = Synth(s6, [\dur, ~f9/~icd6, \vol, vol9]);
623                                         ~l10a = Synth(s1, [\dur,~f10,  \vol, vol10]);       ~l10b = Synth(s2, [\dur, ~f10, \vol, vol10]);
624                                         ~l10c = Synth(s3, [\dur, ~f10/~icd3,  \vol, vol10]);~l10d = Synth(s4, [\dur, ~f10/~icd3,  \vol, vol10]);
625                                         ~l10e = Synth(s5, [\dur, ~f10/~icd6,  \vol, vol10]);~l10f = Synth(s6, [\dur, ~f10/~icd6,  \vol, vol10]);
626                                         ~l11a = Synth(s1, [\dur,~f11,   \vol, vol11]);      ~l11b = Synth(s2, [\dur, ~f11,    \vol, vol11]);
627                                         ~l11c = Synth(s3, [\dur, ~f11/~icd3,  \vol, vol11]);~l11d = Synth(s4, [\dur, ~f11/~icd3,  \vol, vol11]);
628                                         ~l11e = Synth(s5, [\dur, ~f11/~icd6,  \vol, vol11]);~l11f = Synth(s6, [\dur, ~f11/~icd6,  \vol, vol11]);
629                                         ~l12a = Synth(s1, [\dur,~f12,   \vol, vol12]);      ~l12b = Synth(s2, [\dur, ~f12,    \vol, vol12]);
630                                         ~l12c = Synth(s3, [\dur, ~f12/~icd3,  \vol, vol12]);~l12d = Synth(s4, [\dur, ~f12/~icd3,  \vol, vol12]);
631                                         ~l12e = Synth(s5, [\dur, ~f12/~icd6,  \vol, vol12]);~l12f = Synth(s6, [\dur, ~f12/~icd6,  \vol, vol12]);
632                                 });
633                         );
634                         if(~l1a1.isRunning == true, {
635                                 AppClock.sched(0.161803398875,{
636                                         ([~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;
637                                 });
638                         });
639                 }
640                 {~l1a.isRunning == true}{
641                         (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;
642                                 #vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8,vol9,vol10,vol11,vol12 = [~vol1,~vol2,~vol3,~vol4,~vol5,~vol6,~vol7,~vol8,~vol9,~vol10,~vol11,~vol12];
643                                 #f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12 = [ 0,0,0,0,0,0,0,0,0,0,0,0 ];
644                                 ~l1a.set(\dur, f1,     \vol, vol1);  ~l1b.set(\dur, f1,  \vol, vol1);
645                                 ~l1c.set(\dur, f1/~icd3,       \vol, vol1);  ~l1d.set(\dur, f1/~icd3,  \vol, vol1);
646                                 ~l1e.set(\dur, f1/~icd6,       \vol, vol1);  ~l1f.set(\dur, f1/~icd6,  \vol, vol1);
647                                 ~l2a.set(\dur, f2,     \vol, vol2);          ~l2b.set(\dur, f2,  \vol, vol2);
648                                 ~l2c.set(\dur, f2/~icd3,       \vol, vol2);  ~l2d.set(\dur, f2/~icd3,  \vol, vol2);
649                                 ~l2e.set(\dur, f2/~icd6,       \vol, vol2);  ~l2f.set(\dur, f2/~icd6,  \vol, vol2);
650                                 ~l3a.set(\dur, f3,     \vol, vol3);          ~l3b.set(\dur, f3,  \vol, vol3);
651                                 ~l3c.set(\dur, f3/~icd3,       \vol, vol3);  ~l3d.set(\dur, f3/~icd3,  \vol, vol3);
652                                 ~l3e.set(\dur, f3/~icd6,       \vol, vol3);  ~l3f.set(\dur, f3/~icd6,  \vol, vol3);
653                                 ~l4a.set(\dur, f4,    \vol, vol4);           ~l4b.set(\dur, f4,  \vol, vol4);
654                                 ~l4c.set(\dur, f4/~icd3,       \vol, vol4);  ~l4d.set(\dur, f4/~icd3,  \vol, vol4);
655                                 ~l4e.set(\dur, f4/~icd6,       \vol, vol4);  ~l4f.set(\dur, f4/~icd6,  \vol, vol4);
656                                 ~l5a.set(\dur, f5,    \vol, vol5);           ~l5b.set(\dur, f5,  \vol, vol5);
657                                 ~l5c.set(\dur, f5/~icd3,       \vol, vol5);  ~l5d.set(\dur, f5/~icd3,  \vol, vol5);
658                                 ~l5e.set(\dur, f5/~icd6,       \vol, vol5);  ~l5f.set(\dur, f5/~icd6,  \vol, vol5);
659                                 ~l6a.set(\dur, f6,    \vol, vol6);           ~l6b.set(\dur, f6,  \vol, vol6);
660                                 ~l6c.set(\dur, f6/~icd3,       \vol, vol6);  ~l6d.set(\dur, f6/~icd3,  \vol, vol6);
661                                 ~l6e.set(\dur, f6/~icd6,       \vol, vol6);  ~l6f.set(\dur, f6/~icd6,  \vol, vol6);
662                                 ~l7a.set(\dur, f7,    \vol, vol7);           ~l7b.set(\dur, f7,  \vol, vol7);
663                                 ~l7c.set(\dur, f7/~icd3,       \vol, vol7);  ~l7d.set(\dur, f7/~icd3,  \vol, vol7);
664                                 ~l7e.set(\dur, f7/~icd6,       \vol, vol7);  ~l7f.set(\dur, f7/~icd6,  \vol, vol7);
665                                 ~l8a.set(\dur, f8,    \vol, vol8);           ~l8b.set(\dur, f8,  \vol, vol8);
666                                 ~l8c.set(\dur, f8/~icd3,       \vol, vol8);  ~l8d.set(\dur, f8/~icd3,  \vol, vol8);
667                                 ~l8e.set(\dur, f8/~icd6,       \vol, vol8);  ~l8f.set(\dur, f8/~icd6,  \vol, vol8);
668                                 ~l9a.set(\dur, f9,    \vol, vol9);          ~l9b.set(\dur, f9,  \vol, vol9);
669                                 ~l9c.set(\dur, f9/~icd3,       \vol, vol9); ~l9d.set(\dur, f9/~icd3,  \vol, vol9);
670                                 ~l9e.set(\dur, f9/~icd6,       \vol, vol9); ~l9f.set(\dur, f9/~icd6,  \vol, vol9);
671                                 ~l10a.set(\dur, f10,  \vol, vol10);         ~l10b.set(\dur, f10,  \vol, vol10);
672                                 ~l10c.set(\dur, f10/~icd3,     \vol, vol10);~l10d.set(\dur, f10/~icd3,  \vol, vol10);
673                                 ~l10e.set(\dur, f10/~icd6,     \vol, vol10);~l10f.set(\dur, f10/~icd6,  \vol, vol10);
674                                 ~l11a.set(\dur, f11,  \vol, vol11);         ~l11b.set(\dur, f11,  \vol, vol11);
675                                 ~l11c.set(\dur, f11/~icd3,     \vol, vol11,);~l11d.set(\dur, f11/~icd3,  \vol, vol11);
676                                 ~l11e.set(\dur, f11/~icd6,     \vol, vol11);~l11f.set(\dur, f11/~icd6,  \vol, vol11);
677                                 ~l12a.set(\dur, f12,  \vol, vol12);         ~l12b.set(\dur, f12,  \vol, vol12);
678                                 ~l12c.set(\dur, f12/~icd3,     \vol, vol12,);~l12d.set(\dur, f12/~icd3,  \vol, vol12);
679                                 ~l12e.set(\dur, f12/~icd6,     \vol, vol12);~l12f.set(\dur, f12/~icd6,  \vol, vol12);
680                         }););
681
682                         (
683                                 1.do({var vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8,vol9,vol10,vol11,vol12,s1,s2,s3,s4,s5,s6;
684                                         #vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8,vol9,vol10,vol11,vol12 = [~vol1,~vol2,~vol3,~vol4,~vol5,~vol6,~vol7,~vol8,~vol9,~vol10,~vol11,~vol12];
685                                         #s1,s2,s3,s4,s5,s6 = [\gsineicfld6, \gsineicrld6, \gsineicfld2, \gsineicrld2, \gsineicfld1, \gsineicrld1];
686                                         ~l1a1 = Synth(s1, [\dur, ~f1,    \vol, vol1]).register;    ~l1b1 = Synth(s2, [\dur, ~f1,    \vol, vol1]);
687                                         ~l1c1 = Synth(s3, [\dur, ~f1/~icd3,  \vol, vol1]);   ~l1d1 = Synth(s4, [\dur, ~f1/~icd3,  \vol, vol1]);
688                                         ~l1e1 = Synth(s5, [\dur, ~f1/~icd6,  \vol, vol1]);   ~l1f1 = Synth(s6, [\dur, ~f1/~icd6,  \vol, vol1]);
689                                         ~l2a1 = Synth(s1, [\dur, ~f2,    \vol, vol2]);        ~l2b1 = Synth(s2, [\dur, ~f2,    \vol, vol2]);
690                                         ~l2c1 = Synth(s3, [\dur, ~f2/~icd3,  \vol, vol2]);   ~l2d1 = Synth(s4, [\dur, ~f2/~icd3,  \vol, vol2]);
691                                         ~l2e1 = Synth(s5, [\dur, ~f2/~icd6,  \vol, vol2]);   ~l2f1 = Synth(s6, [\dur, ~f2/~icd6,  \vol, vol2]);
692                                         ~l3a1 = Synth(s1, [\dur, ~f3,    \vol, vol3]);        ~l3b1 = Synth(s2, [\dur, ~f3,   \vol, vol3]);
693                                         ~l3c1 = Synth(s3, [\dur, ~f3/~icd3,  \vol, vol3]);   ~l3d1 = Synth(s4, [\dur, ~f3/~icd3, \vol, vol3]);
694                                         ~l3e1 = Synth(s5, [\dur, ~f3/~icd6,  \vol, vol3]);   ~l3f1 = Synth(s6, [\dur, ~f3/~icd6, \vol, vol3]);
695                                         ~l4a1 = Synth(s1, [\dur, ~f4,    \vol, vol4]);       ~l4b1 = Synth(s2, [\dur, ~f4,   \vol, vol4]);
696                                         ~l4c1 = Synth(s3, [\dur, ~f4/~icd3,  \vol, vol4]);  ~l4d1 = Synth(s4, [\dur, ~f4/~icd3, \vol, vol4]);
697                                         ~l4e1 = Synth(s5, [\dur, ~f4/~icd6,  \vol, vol4]);   ~l4f1 = Synth(s6, [\dur, ~f4/~icd6, \vol, vol4]);
698                                         ~l5a1 = Synth(s1, [\dur, ~f5,    \vol, vol5]);       ~l5b1 = Synth(s2, [\dur, ~f5,   \vol, vol5]);
699                                         ~l5c1 = Synth(s3, [\dur, ~f5/~icd3,  \vol, vol5]);   ~l5d1 = Synth(s4, [\dur, ~f5/~icd3, \vol, vol5]);
700                                         ~l5e1 = Synth(s5, [\dur, ~f5/~icd6,  \vol, vol5]);   ~l5f1 = Synth(s6, [\dur, ~f5/~icd6, \vol, vol5]);
701                                         ~l6a1 = Synth(s1, [\dur, ~f6,    \vol, vol6]);       ~l6b1 = Synth(s2, [\dur, ~f6,   \vol, vol6]);
702                                         ~l6c1 = Synth(s3, [\dur, ~f6/~icd3,  \vol, vol6]);   ~l6d1 = Synth(s4, [\dur, ~f6/~icd3, \vol, vol6]);
703                                         ~l6e1 = Synth(s5, [\dur, ~f6/~icd6,  \vol, vol6]);   ~l6f1 = Synth(s6, [\dur, ~f6/~icd6, \vol, vol6]);
704                                         ~l7a1 = Synth(s1, [\dur, ~f7,    \vol, vol7]);       ~l7b1 = Synth(s2, [\dur, ~f7,   \vol, vol7]);
705                                         ~l7c1 = Synth(s3, [\dur, ~f7/~icd3,  \vol, vol7]);   ~l7d1 = Synth(s4, [\dur, ~f7/~icd3, \vol, vol7]);
706                                         ~l7e1 = Synth(s5, [\dur, ~f7/~icd6,  \vol, vol7]);   ~l7f1 = Synth(s6, [\dur, ~f7/~icd6, \vol, vol7]);
707                                         ~l8a1 = Synth(s1, [\dur, ~f8,    \vol, vol8]);       ~l8b1 = Synth(s2, [\dur, ~f8,   \vol, vol8]);
708                                         ~l8c1 = Synth(s3, [\dur, ~f8/~icd3,  \vol, vol8]);   ~l8d1 = Synth(s4, [\dur, ~f8/~icd3, \vol, vol8]);
709                                         ~l8e1 = Synth(s5, [\dur, ~f8/~icd6,  \vol, vol8]);   ~l8f1 = Synth(s6, [\dur, ~f8/~icd6, \vol, vol8]);
710                                         ~l9a1 = Synth(s1, [\dur, ~f9,    \vol, vol9]);       ~l9b1 = Synth(s2, [\dur, ~f9,   \vol, vol9]);
711                                         ~l9c1 = Synth(s3, [\dur, ~f9/~icd3,  \vol, vol9]);   ~l9d1 = Synth(s4, [\dur, ~f9/~icd3, \vol, vol9]);
712                                         ~l9e1 = Synth(s5, [\dur, ~f9/~icd6,  \vol, vol9]);   ~l9f1 = Synth(s6, [\dur, ~f9/~icd6, \vol, vol9]);
713                                         ~l10a1 = Synth(s1, [\dur,~f10,  \vol, vol10]);       ~l10b1 = Synth(s2, [\dur, ~f10, \vol, vol10]);
714                                         ~l10c1 = Synth(s3, [\dur, ~f10/~icd3,  \vol, vol10]);~l10d1 = Synth(s4, [\dur, ~f10/~icd3,  \vol, vol10]);
715                                         ~l10e1 = Synth(s5, [\dur, ~f10/~icd6,  \vol, vol10]);~l10f1 = Synth(s6, [\dur, ~f10/~icd6,  \vol, vol10]);
716                                         ~l11a1 = Synth(s1, [\dur,~f11,   \vol, vol11]);      ~l11b1 = Synth(s2, [\dur, ~f11,    \vol, vol11]);
717                                         ~l11c1 = Synth(s3, [\dur, ~f11/~icd3,  \vol, vol11]);~l11d1 = Synth(s4, [\dur, ~f11/~icd3,  \vol, vol11]);
718                                         ~l11e1 = Synth(s5, [\dur, ~f11/~icd6,  \vol, vol11]);~l11f1 = Synth(s6, [\dur, ~f11/~icd6,  \vol, vol11]);
719                                         ~l12a1 = Synth(s1, [\dur,~f12,   \vol, vol12]);      ~l12b1 = Synth(s2, [\dur, ~f12,    \vol, vol12]);
720                                         ~l12c1 = Synth(s3, [\dur, ~f12/~icd3,  \vol, vol12]);~l12d1 = Synth(s4, [\dur, ~f12/~icd3,  \vol, vol12]);
721                                         ~l12e1 = Synth(s5, [\dur, ~f12/~icd6,  \vol, vol12]);~l12f1 = Synth(s6, [\dur, ~f12/~icd6,  \vol, vol12]);
722
723                                 });
724                         );
725                         AppClock.sched(0.161803398875,{
726                                 ([~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;
727                         });
728                 };
729
730                 if((~f1 > ~outmaxa) or: (~f1 < ~outmina), {~z25.close;~z1.close;~z25 = (CompositeView(w, Rect((~f1.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+10, ~nw, 2)).background = Color.white;);}, {~z1.close;~z25.close;~z1 = (CompositeView(w, Rect((~f1.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+10, ~nw, 2)).background = Color.white;);});
731                 if((~f2 > ~outmaxa) or: (~f2 < ~outmina), {~z26.close;~z2.close;~z26 = (CompositeView(w, Rect((~f2.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+20, ~nw, 2)).background = Color.white;);}, {~z2.close;~z26.close;~z2 = (CompositeView(w, Rect((~f2.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+20, ~nw, 2)).background = Color.white;);});
732                 if((~f3 > ~outmaxa) or: (~f3 < ~outmina), {~z27.close;~z3.close;~z27 = (CompositeView(w, Rect((~f3.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+30, ~nw, 2)).background = Color.white;);}, {~z3.close;~z27.close;~z3 = (CompositeView(w, Rect((~f3.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+30, ~nw, 2)).background = Color.white;);});
733                 if((~f4 > ~outmaxa) or: (~f4 < ~outmina), {~z28.close;~z4.close;~z28 = (CompositeView(w, Rect((~f4.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+40, ~nw, 2)).background = Color.white;);}, {~z4.close;~z28.close;~z4 = (CompositeView(w, Rect((~f4.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+40, ~nw, 2)).background = Color.white;);});
734                 if((~f5 > ~outmaxa) or: (~f5 < ~outmina), {~z29.close;~z5.close;~z29 = (CompositeView(w, Rect((~f5.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+50, ~nw, 2)).background = Color.white;);}, {~z5.close;~z29.close;~z5 = (CompositeView(w, Rect((~f5.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+50, ~nw, 2)).background = Color.white;);});
735                 if((~f6 > ~outmaxa) or: (~f6 < ~outmina), {~z30.close;~z6.close;~z30 = (CompositeView(w, Rect((~f6.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+60, ~nw, 2)).background = Color.white;);}, {~z6.close;~z30.close;~z6 = (CompositeView(w, Rect((~f6.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+60, ~nw, 2)).background = Color.white;);});
736                 if((~f7 > ~outmaxa) or: (~f7 < ~outmina), {~z31.close;~z7.close;~z31 = (CompositeView(w, Rect((~f7.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+70, ~nw, 2)).background = Color.white;);}, {~z7.close;~z31.close;~z7 = (CompositeView(w, Rect((~f7.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+70, ~nw, 2)).background = Color.white;);});
737                 if((~f8 > ~outmaxa) or: (~f8 < ~outmina), {~z32.close;~z8.close;~z32 = (CompositeView(w, Rect((~f8.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+80, ~nw, 2)).background = Color.white;);}, {~z8.close;~z32.close;~z8 = (CompositeView(w, Rect((~f8.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+80, ~nw, 2)).background = Color.white;);});
738                 if((~f9 > ~outmaxa) or: (~f9 < ~outmina), {~z33.close;~z9.close;~z33 = (CompositeView(w, Rect((~f9.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+90, ~nw, 2)).background = Color.white;);}, {~z9.close;~z33.close;~z9 = (CompositeView(w, Rect((~f9.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+90, ~nw, 2)).background = Color.white;);});
739                 if((~f10 > ~outmaxa) or: (~f10 < ~outmina), {~z34.close;~z10.close;~z34 = (CompositeView(w, Rect((~f10.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+100, ~nw, 2)).background = Color.white;);}, {~z10.close;~z34.close;~z10 = (CompositeView(w, Rect((~f10.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+100, ~nw, 2)).background = Color.white;);});
740                 if((~f11 > ~outmaxa) or: (~f11 < ~outmina), {~z35.close;~z11.close;~z35 = (CompositeView(w, Rect((~f11.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+110, ~nw, 2)).background = Color.white;);}, {~z11.close;~z35.close;~z11 = (CompositeView(w, Rect((~f11.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+110, ~nw, 2)).background = Color.white;);});
741                 if((~f12 > ~outmaxa) or: (~f12 < ~outmina), {~z36.close;~z12.close;~z36 = (CompositeView(w, Rect((~f12.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+120, ~nw, 2)).background = Color.white;);}, {~z12.close;~z36.close;~z12 = (CompositeView(w, Rect((~f12.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+120, ~nw, 2)).background = Color.white;);});
742
743                 b3.value = 1;
744         };
745
746         ~synthflow = {
747                 case
748                 {~l1a1.isRunning == true}{
749                         (1.do({var vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8,vol9,vol10,vol11,vol12,s1,s2,s3,s4,s5,s6;
750                                 #vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8,vol9,vol10,vol11,vol12 = [~vol1,~vol2,~vol3,~vol4,~vol5,~vol6,~vol7,~vol8,~vol9,~vol10,~vol11,~vol12];
751                                 ~l1a1.set(\dur, ~f1,     \vol, vol1);  ~l1b1.set(\dur, ~f1,  \vol, vol1);
752                                 ~l1c1.set(\dur, ~f1/~icd3,       \vol, vol1);  ~l1d1.set(\dur, ~f1/~icd3,  \vol, vol1);
753                                 ~l1e1.set(\dur, ~f1/~icd6,       \vol, vol1);  ~l1f1.set(\dur, ~f1/~icd6,  \vol, vol1);
754                                 ~l2a1.set(\dur, ~f2,     \vol, vol2);          ~l2b1.set(\dur, ~f2,  \vol, vol2);
755                                 ~l2c1.set(\dur, ~f2/~icd3,       \vol, vol2);  ~l2d1.set(\dur, ~f2/~icd3,  \vol, vol2);
756                                 ~l2e1.set(\dur, ~f2/~icd6,       \vol, vol2);  ~l2f1.set(\dur, ~f2/~icd6,  \vol, vol2);
757                                 ~l3a1.set(\dur, ~f3,     \vol, vol3);          ~l3b1.set(\dur, ~f3,  \vol, vol3);
758                                 ~l3c1.set(\dur, ~f3/~icd3,       \vol, vol3);  ~l3d1.set(\dur, ~f3/~icd3,  \vol, vol3);
759                                 ~l3e1.set(\dur, ~f3/~icd6,       \vol, vol3);  ~l3f1.set(\dur, ~f3/~icd6,  \vol, vol3);
760                                 ~l4a1.set(\dur, ~f4,    \vol, vol4);           ~l4b1.set(\dur, ~f4,  \vol, vol4);
761                                 ~l4c1.set(\dur, ~f4/~icd3,       \vol, vol4);  ~l4d1.set(\dur, ~f4/~icd3,  \vol, vol4);
762                                 ~l4e1.set(\dur, ~f4/~icd6,       \vol, vol4);  ~l4f1.set(\dur, ~f4/~icd6,  \vol, vol4);
763                                 ~l5a1.set(\dur, ~f5,    \vol, vol5);           ~l5b1.set(\dur, ~f5,  \vol, vol5);
764                                 ~l5c1.set(\dur, ~f5/~icd3,       \vol, vol5);  ~l5d1.set(\dur, ~f5/~icd3,  \vol, vol5);
765                                 ~l5e1.set(\dur, ~f5/~icd6,       \vol, vol5);  ~l5f1.set(\dur, ~f5/~icd6,  \vol, vol5);
766                                 ~l6a1.set(\dur, ~f6,    \vol, vol6);           ~l6b1.set(\dur, ~f6,  \vol, vol6);
767                                 ~l6c1.set(\dur, ~f6/~icd3,       \vol, vol6);  ~l6d1.set(\dur, ~f6/~icd3,  \vol, vol6);
768                                 ~l6e1.set(\dur, ~f6/~icd6,       \vol, vol6);  ~l6f1.set(\dur, ~f6/~icd6,  \vol, vol6);
769                                 ~l7a1.set(\dur, ~f7,    \vol, vol7);           ~l7b1.set(\dur, ~f7,  \vol, vol7);
770                                 ~l7c1.set(\dur, ~f7/~icd3,       \vol, vol7);  ~l7d1.set(\dur, ~f7/~icd3,  \vol, vol7);
771                                 ~l7e1.set(\dur, ~f7/~icd6,       \vol, vol7);  ~l7f1.set(\dur, ~f7/~icd6,  \vol, vol7);
772                                 ~l8a1.set(\dur, ~f8,    \vol, vol8);           ~l8b1.set(\dur, ~f8,  \vol, vol8);
773                                 ~l8c1.set(\dur, ~f8/~icd3,       \vol, vol8);  ~l8d1.set(\dur, ~f8/~icd3,  \vol, vol8);
774                                 ~l8e1.set(\dur, ~f8/~icd6,       \vol, vol8);  ~l8f1.set(\dur, ~f8/~icd6,  \vol, vol8);
775                                 ~l9a1.set(\dur, ~f9,    \vol, vol9);          ~l9b1.set(\dur, ~f9,  \vol, vol9);
776                                 ~l9c1.set(\dur, ~f9/~icd3,       \vol, vol9); ~l9d1.set(\dur, ~f9/~icd3,  \vol, vol9);
777                                 ~l9e1.set(\dur, ~f9/~icd6,       \vol, vol9); ~l9f1.set(\dur, ~f9/~icd6,  \vol, vol9);
778                                 ~l10a1.set(\dur, ~f10,  \vol, vol10);         ~l10b1.set(\dur, ~f10,  \vol, vol10);
779                                 ~l10c1.set(\dur, ~f10/~icd3,     \vol, vol10);~l10d1.set(\dur, ~f10/~icd3,  \vol, vol10);
780                                 ~l10e1.set(\dur, ~f10/~icd6,     \vol, vol10);~l10f1.set(\dur, ~f10/~icd6,  \vol, vol10);
781                                 ~l11a1.set(\dur, ~f11,  \vol, vol11);         ~l11b1.set(\dur, ~f11,  \vol, vol11);
782                                 ~l11c1.set(\dur, ~f11/~icd3,     \vol, vol11);~l11d1.set(\dur, ~f11/~icd3,  \vol, vol11);
783                                 ~l11e1.set(\dur, ~f11/~icd6,     \vol, vol11);~l11f1.set(\dur, ~f11/~icd6,  \vol, vol11);
784                                 ~l12a1.set(\dur, ~f12,  \vol, vol12);         ~l12b1.set(\dur, ~f12,  \vol, vol12);
785                                 ~l12c1.set(\dur, ~f12/~icd3,     \vol, vol12);~l12d1.set(\dur, ~f12/~icd3,  \vol, vol12);
786                                 ~l12e1.set(\dur, ~f12/~icd6,     \vol, vol12);~l12f1.set(\dur, ~f12/~icd6,  \vol, vol12);
787                         }););
788                 }
789                 {~l1a.isRunning == true} {
790                         (1.do({var vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8,vol9,vol10,vol11,vol12,s1,s2,s3,s4,s5,s6;
791                                 #vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8,vol9,vol10,vol11,vol12 = [~vol1,~vol2,~vol3,~vol4,~vol5,~vol6,~vol7,~vol8,~vol9,~vol10,~vol11,~vol12];
792                                 ~l1a.set(\dur, ~f1,     \vol, vol1);  ~l1b.set(\dur, ~f1,  \vol, vol1);
793                                 ~l1c.set(\dur, ~f1/~icd3,       \vol, vol1);  ~l1d.set(\dur, ~f1/~icd3,  \vol, vol1);
794                                 ~l1e.set(\dur, ~f1/~icd6,       \vol, vol1);  ~l1f.set(\dur, ~f1/~icd6,  \vol, vol1);
795                                 ~l2a.set(\dur, ~f2,     \vol, vol2);          ~l2b.set(\dur, ~f2,  \vol, vol2);
796                                 ~l2c.set(\dur, ~f2/~icd3,       \vol, vol2);  ~l2d.set(\dur, ~f2/~icd3,  \vol, vol2);
797                                 ~l2e.set(\dur, ~f2/~icd6,       \vol, vol2);  ~l2f.set(\dur, ~f2/~icd6,  \vol, vol2);
798                                 ~l3a.set(\dur, ~f3,     \vol, vol3);          ~l3b.set(\dur, ~f3,  \vol, vol3);
799                                 ~l3c.set(\dur, ~f3/~icd3,       \vol, vol3);  ~l3d.set(\dur, ~f3/~icd3,  \vol, vol3);
800                                 ~l3e.set(\dur, ~f3/~icd6,       \vol, vol3);  ~l3f.set(\dur, ~f3/~icd6,  \vol, vol3);
801                                 ~l4a.set(\dur, ~f4,    \vol, vol4);           ~l4b.set(\dur, ~f4,  \vol, vol4);
802                                 ~l4c.set(\dur, ~f4/~icd3,       \vol, vol4);  ~l4d.set(\dur, ~f4/~icd3,  \vol, vol4);
803                                 ~l4e.set(\dur, ~f4/~icd6,       \vol, vol4);  ~l4f.set(\dur, ~f4/~icd6,  \vol, vol4);
804                                 ~l5a.set(\dur, ~f5,    \vol, vol5);           ~l5b.set(\dur, ~f5,  \vol, vol5);
805                                 ~l5c.set(\dur, ~f5/~icd3,       \vol, vol5);  ~l5d.set(\dur, ~f5/~icd3,  \vol, vol5);
806                                 ~l5e.set(\dur, ~f5/~icd6,       \vol, vol5);  ~l5f.set(\dur, ~f5/~icd6,  \vol, vol5);
807                                 ~l6a.set(\dur, ~f6,    \vol, vol6);           ~l6b.set(\dur, ~f6,  \vol, vol6);
808                                 ~l6c.set(\dur, ~f6/~icd3,       \vol, vol6);  ~l6d.set(\dur, ~f6/~icd3,  \vol, vol6);
809                                 ~l6e.set(\dur, ~f6/~icd6,       \vol, vol6);  ~l6f.set(\dur, ~f6/~icd6,  \vol, vol6);
810                                 ~l7a.set(\dur, ~f7,    \vol, vol7);           ~l7b.set(\dur, ~f7,  \vol, vol7);
811                                 ~l7c.set(\dur, ~f7/~icd3,       \vol, vol7);  ~l7d.set(\dur, ~f7/~icd3,  \vol, vol7);
812                                 ~l7e.set(\dur, ~f7/~icd6,       \vol, vol7);  ~l7f.set(\dur, ~f7/~icd6,  \vol, vol7);
813                                 ~l8a.set(\dur, ~f8,    \vol, vol8);           ~l8b.set(\dur, ~f8,  \vol, vol8);
814                                 ~l8c.set(\dur, ~f8/~icd3,       \vol, vol8);  ~l8d.set(\dur, ~f8/~icd3,  \vol, vol8);
815                                 ~l8e.set(\dur, ~f8/~icd6,       \vol, vol8);  ~l8f.set(\dur, ~f8/~icd6,  \vol, vol8);
816                                 ~l9a.set(\dur, ~f9,    \vol, vol9);          ~l9b.set(\dur, ~f9,  \vol, vol9);
817                                 ~l9c.set(\dur, ~f9/~icd3,       \vol, vol9); ~l9d.set(\dur, ~f9/~icd3,  \vol, vol9);
818                                 ~l9e.set(\dur, ~f9/~icd6,       \vol, vol9); ~l9f.set(\dur, ~f9/~icd6,  \vol, vol9);
819                                 ~l10a.set(\dur, ~f10,  \vol, vol10);         ~l10b.set(\dur, ~f10,  \vol, vol10);
820                                 ~l10c.set(\dur, ~f10/~icd3,     \vol, vol10);~l10d.set(\dur, ~f10/~icd3,  \vol, vol10);
821                                 ~l10e.set(\dur, ~f10/~icd6,     \vol, vol10);~l10f.set(\dur, ~f10/~icd6,  \vol, vol10);
822                                 ~l11a.set(\dur, ~f11,  \vol, vol11);         ~l11b.set(\dur, ~f11,  \vol, vol11);
823                                 ~l11c.set(\dur, ~f11/~icd3,     \vol, vol11);~l11d.set(\dur, ~f11/~icd3,  \vol, vol11);
824                                 ~l11e.set(\dur, ~f11/~icd6,     \vol, vol11);~l11f.set(\dur, ~f11/~icd6,  \vol, vol11);
825                                 ~l12a.set(\dur, ~f12,  \vol, vol12);         ~l12b.set(\dur, ~f12,  \vol, vol12);
826                                 ~l12c.set(\dur, ~f12/~icd3,     \vol, vol12);~l12d.set(\dur, ~f12/~icd3,  \vol, vol12);
827                                 ~l12e.set(\dur, ~f12/~icd6,     \vol, vol12);~l12f.set(\dur, ~f12/~icd6,  \vol, vol12);
828
829                         }););
830                 };
831
832                 if((~f1 > ~outmaxa) or: (~f1 < ~outmina), {~z25.close;~z1.close;~z25 = (CompositeView(w, Rect((~f1.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+10, ~nw, 2)).background = Color.white;);}, {~z1.close;~z25.close;~z1 = (CompositeView(w, Rect((~f1.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+10, ~nw, 2)).background = Color.white;);});
833                 if((~f2 > ~outmaxa) or: (~f2 < ~outmina), {~z26.close;~z2.close;~z26 = (CompositeView(w, Rect((~f2.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+20, ~nw, 2)).background = Color.white;);}, {~z2.close;~z26.close;~z2 = (CompositeView(w, Rect((~f2.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+20, ~nw, 2)).background = Color.white;);});
834                 if((~f3 > ~outmaxa) or: (~f3 < ~outmina), {~z27.close;~z3.close;~z27 = (CompositeView(w, Rect((~f3.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+30, ~nw, 2)).background = Color.white;);}, {~z3.close;~z27.close;~z3 = (CompositeView(w, Rect((~f3.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+30, ~nw, 2)).background = Color.white;);});
835                 if((~f4 > ~outmaxa) or: (~f4 < ~outmina), {~z28.close;~z4.close;~z28 = (CompositeView(w, Rect((~f4.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+40, ~nw, 2)).background = Color.white;);}, {~z4.close;~z28.close;~z4 = (CompositeView(w, Rect((~f4.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+40, ~nw, 2)).background = Color.white;);});
836                 if((~f5 > ~outmaxa) or: (~f5 < ~outmina), {~z29.close;~z5.close;~z29 = (CompositeView(w, Rect((~f5.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+50, ~nw, 2)).background = Color.white;);}, {~z5.close;~z29.close;~z5 = (CompositeView(w, Rect((~f5.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+50, ~nw, 2)).background = Color.white;);});
837                 if((~f6 > ~outmaxa) or: (~f6 < ~outmina), {~z30.close;~z6.close;~z30 = (CompositeView(w, Rect((~f6.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+60, ~nw, 2)).background = Color.white;);}, {~z6.close;~z30.close;~z6 = (CompositeView(w, Rect((~f6.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+60, ~nw, 2)).background = Color.white;);});
838                 if((~f7 > ~outmaxa) or: (~f7 < ~outmina), {~z31.close;~z7.close;~z31 = (CompositeView(w, Rect((~f7.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+70, ~nw, 2)).background = Color.white;);}, {~z7.close;~z31.close;~z7 = (CompositeView(w, Rect((~f7.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+70, ~nw, 2)).background = Color.white;);});
839                 if((~f8 > ~outmaxa) or: (~f8 < ~outmina), {~z32.close;~z8.close;~z32 = (CompositeView(w, Rect((~f8.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+80, ~nw, 2)).background = Color.white;);}, {~z8.close;~z32.close;~z8 = (CompositeView(w, Rect((~f8.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+80, ~nw, 2)).background = Color.white;);});
840                 if((~f9 > ~outmaxa) or: (~f9 < ~outmina), {~z33.close;~z9.close;~z33 = (CompositeView(w, Rect((~f9.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+90, ~nw, 2)).background = Color.white;);}, {~z9.close;~z33.close;~z9 = (CompositeView(w, Rect((~f9.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+90, ~nw, 2)).background = Color.white;);});
841                 if((~f10 > ~outmaxa) or: (~f10 < ~outmina), {~z34.close;~z10.close;~z34 = (CompositeView(w, Rect((~f10.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+100, ~nw, 2)).background = Color.white;);}, {~z10.close;~z34.close;~z10 = (CompositeView(w, Rect((~f10.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+100, ~nw, 2)).background = Color.white;);});
842                 if((~f11 > ~outmaxa) or: (~f11 < ~outmina), {~z35.close;~z11.close;~z35 = (CompositeView(w, Rect((~f11.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+110, ~nw, 2)).background = Color.white;);}, {~z11.close;~z35.close;~z11 = (CompositeView(w, Rect((~f11.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+110, ~nw, 2)).background = Color.white;);});
843                 if((~f12 > ~outmaxa) or: (~f12 < ~outmina), {~z36.close;~z12.close;~z36 = (CompositeView(w, Rect((~f12.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+120, ~nw, 2)).background = Color.white;);}, {~z12.close;~z36.close;~z12 = (CompositeView(w, Rect((~f12.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+120, ~nw, 2)).background = Color.white;);});
844
845         };
846
847         ~synthslide = {
848                 case
849                 {~l1a1.isRunning == true}{(//fprog
850                         ~slideroutine = Routine({1.do({var vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8,vol9,vol10,vol11,vol12,s1,s2,s3,s4,s5,s6;
851                                 #vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8,vol9,vol10,vol11,vol12 = [~vol1,~vol2,~vol3,~vol4,~vol5,~vol6,~vol7,~vol8,~vol9,~vol10,~vol11,~vol12];
852                                 ~slidedo.do({~slidecount=~slidecount-1;
853                                         (
854                                                 [ ~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 ];
855                                                 ~l1a1.set(\dur, ~f1,     \vol, vol1);  ~l1b1.set(\dur, ~f1,  \vol, vol1);
856                                                 ~l1c1.set(\dur, ~f1/~icd3,       \vol, vol1);  ~l1d1.set(\dur, ~f1/~icd3,  \vol, vol1);
857                                                 ~l1e1.set(\dur, ~f1/~icd6,       \vol, vol1);  ~l1f1.set(\dur, ~f1/~icd6,  \vol, vol1);
858                                                 ~l2a1.set(\dur, ~f2,     \vol, vol2);          ~l2b1.set(\dur, ~f2,  \vol, vol2);
859                                                 ~l2c1.set(\dur, ~f2/~icd3,       \vol, vol2);  ~l2d1.set(\dur, ~f2/~icd3,  \vol, vol2);
860                                                 ~l2e1.set(\dur, ~f2/~icd6,       \vol, vol2);  ~l2f1.set(\dur, ~f2/~icd6,  \vol, vol2);
861                                                 ~l3a1.set(\dur, ~f3,     \vol, vol3);          ~l3b1.set(\dur, ~f3,  \vol, vol3);
862                                                 ~l3c1.set(\dur, ~f3/~icd3,       \vol, vol3);  ~l3d1.set(\dur, ~f3/~icd3,  \vol, vol3);
863                                                 ~l3e1.set(\dur, ~f3/~icd6,       \vol, vol3);  ~l3f1.set(\dur, ~f3/~icd6,  \vol, vol3);
864                                                 ~l4a1.set(\dur, ~f4,    \vol, vol4);           ~l4b1.set(\dur, ~f4,  \vol, vol4);
865                                                 ~l4c1.set(\dur, ~f4/~icd3,       \vol, vol4);  ~l4d1.set(\dur, ~f4/~icd3,  \vol, vol4);
866                                                 ~l4e1.set(\dur, ~f4/~icd6,       \vol, vol4);  ~l4f1.set(\dur, ~f4/~icd6,  \vol, vol4);
867                                                 ~l5a1.set(\dur, ~f5,    \vol, vol5);           ~l5b1.set(\dur, ~f5,  \vol, vol5);
868                                                 ~l5c1.set(\dur, ~f5/~icd3,       \vol, vol5);  ~l5d1.set(\dur, ~f5/~icd3,  \vol, vol5);
869                                                 ~l5e1.set(\dur, ~f5/~icd6,       \vol, vol5);  ~l5f1.set(\dur, ~f5/~icd6,  \vol, vol5);
870                                                 ~l6a1.set(\dur, ~f6,    \vol, vol6);           ~l6b1.set(\dur, ~f6,  \vol, vol6);
871                                                 ~l6c1.set(\dur, ~f6/~icd3,       \vol, vol6);  ~l6d1.set(\dur, ~f6/~icd3,  \vol, vol6);
872                                                 ~l6e1.set(\dur, ~f6/~icd6,       \vol, vol6);  ~l6f1.set(\dur, ~f6/~icd6,  \vol, vol6);
873                                                 ~l7a1.set(\dur, ~f7,    \vol, vol7);           ~l7b1.set(\dur, ~f7,  \vol, vol7);
874                                                 ~l7c1.set(\dur, ~f7/~icd3,       \vol, vol7);  ~l7d1.set(\dur, ~f7/~icd3,  \vol, vol7);
875                                                 ~l7e1.set(\dur, ~f7/~icd6,       \vol, vol7);  ~l7f1.set(\dur, ~f7/~icd6,  \vol, vol7);
876                                                 ~l8a1.set(\dur, ~f8,    \vol, vol8);           ~l8b1.set(\dur, ~f8,  \vol, vol8);
877                                                 ~l8c1.set(\dur, ~f8/~icd3,       \vol, vol8);  ~l8d1.set(\dur, ~f8/~icd3,  \vol, vol8);
878                                                 ~l8e1.set(\dur, ~f8/~icd6,       \vol, vol8);  ~l8f1.set(\dur, ~f8/~icd6,  \vol, vol8);
879                                                 ~l9a1.set(\dur, ~f9,    \vol, vol9);          ~l9b1.set(\dur, ~f9,  \vol, vol9);
880                                                 ~l9c1.set(\dur, ~f9/~icd3,       \vol, vol9); ~l9d1.set(\dur, ~f9/~icd3,  \vol, vol9);
881                                                 ~l9e1.set(\dur, ~f9/~icd6,       \vol, vol9); ~l9f1.set(\dur, ~f9/~icd6,  \vol, vol9);
882                                                 ~l10a1.set(\dur, ~f10,  \vol, vol10);         ~l10b1.set(\dur, ~f10,  \vol, vol10);
883                                                 ~l10c1.set(\dur, ~f10/~icd3,     \vol, vol10);~l10d1.set(\dur, ~f10/~icd3,  \vol, vol10);
884                                                 ~l10e1.set(\dur, ~f10/~icd6,     \vol, vol10);~l10f1.set(\dur, ~f10/~icd6,  \vol, vol10);
885                                                 ~l11a1.set(\dur, ~f11,  \vol, vol11);         ~l11b1.set(\dur, ~f11,  \vol, vol11);
886                                                 ~l11c1.set(\dur, ~f11/~icd3,     \vol, vol11);~l11d1.set(\dur, ~f11/~icd3,  \vol, vol11);
887                                                 ~l11e1.set(\dur, ~f11/~icd6,     \vol, vol11);~l11f1.set(\dur, ~f11/~icd6,  \vol, vol11);
888                                                 ~l12a1.set(\dur, ~f12,  \vol, vol12);         ~l12b1.set(\dur, ~f12,  \vol, vol12);
889                                                 ~l12c1.set(\dur, ~f12/~icd3,     \vol, vol12);~l12d1.set(\dur, ~f12/~icd3,  \vol, vol12);
890                                                 ~l12e1.set(\dur, ~f12/~icd6,     \vol, vol12);~l12f1.set(\dur, ~f12/~icd6,  \vol, vol12);
891
892                                         );
893
894                                         {if(~slidecount==0,{
895                                                 if((~f1 > ~outmaxa) or: (~f1 < ~outmina), {~z25.close;~z1.close;~z25 = (CompositeView(w, Rect((~f1.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+10, ~nw, 2)).background = Color.white;);}, {~z1.close;~z25.close;~z1 = (CompositeView(w, Rect((~f1.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+10, ~nw, 2)).background = Color.white;);});
896                                                 if((~f2 > ~outmaxa) or: (~f2 < ~outmina), {~z26.close;~z2.close;~z26 = (CompositeView(w, Rect((~f2.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+20, ~nw, 2)).background = Color.white;);}, {~z2.close;~z26.close;~z2 = (CompositeView(w, Rect((~f2.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+20, ~nw, 2)).background = Color.white;);});
897                                                 if((~f3 > ~outmaxa) or: (~f3 < ~outmina), {~z27.close;~z3.close;~z27 = (CompositeView(w, Rect((~f3.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+30, ~nw, 2)).background = Color.white;);}, {~z3.close;~z27.close;~z3 = (CompositeView(w, Rect((~f3.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+30, ~nw, 2)).background = Color.white;);});
898                                                 if((~f4 > ~outmaxa) or: (~f4 < ~outmina), {~z28.close;~z4.close;~z28 = (CompositeView(w, Rect((~f4.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+40, ~nw, 2)).background = Color.white;);}, {~z4.close;~z28.close;~z4 = (CompositeView(w, Rect((~f4.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+40, ~nw, 2)).background = Color.white;);});
899                                                 if((~f5 > ~outmaxa) or: (~f5 < ~outmina), {~z29.close;~z5.close;~z29 = (CompositeView(w, Rect((~f5.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+50, ~nw, 2)).background = Color.white;);}, {~z5.close;~z29.close;~z5 = (CompositeView(w, Rect((~f5.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+50, ~nw, 2)).background = Color.white;);});
900                                                 if((~f6 > ~outmaxa) or: (~f6 < ~outmina), {~z30.close;~z6.close;~z30 = (CompositeView(w, Rect((~f6.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+60, ~nw, 2)).background = Color.white;);}, {~z6.close;~z30.close;~z6 = (CompositeView(w, Rect((~f6.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+60, ~nw, 2)).background = Color.white;);});
901                                                 if((~f7 > ~outmaxa) or: (~f7 < ~outmina), {~z31.close;~z7.close;~z31 = (CompositeView(w, Rect((~f7.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+70, ~nw, 2)).background = Color.white;);}, {~z7.close;~z31.close;~z7 = (CompositeView(w, Rect((~f7.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+70, ~nw, 2)).background = Color.white;);});
902                                                 if((~f8 > ~outmaxa) or: (~f8 < ~outmina), {~z32.close;~z8.close;~z32 = (CompositeView(w, Rect((~f8.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+80, ~nw, 2)).background = Color.white;);}, {~z8.close;~z32.close;~z8 = (CompositeView(w, Rect((~f8.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+80, ~nw, 2)).background = Color.white;);});
903                                                 if((~f9 > ~outmaxa) or: (~f9 < ~outmina), {~z33.close;~z9.close;~z33 = (CompositeView(w, Rect((~f9.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+90, ~nw, 2)).background = Color.white;);}, {~z9.close;~z33.close;~z9 = (CompositeView(w, Rect((~f9.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+90, ~nw, 2)).background = Color.white;);});
904                                                 if((~f10 > ~outmaxa) or: (~f10 < ~outmina), {~z34.close;~z10.close;~z34 = (CompositeView(w, Rect((~f10.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+100, ~nw, 2)).background = Color.white;);}, {~z10.close;~z34.close;~z10 = (CompositeView(w, Rect((~f10.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+100, ~nw, 2)).background = Color.white;);});
905                                                 if((~f11 > ~outmaxa) or: (~f11 < ~outmina), {~z35.close;~z11.close;~z35 = (CompositeView(w, Rect((~f11.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+110, ~nw, 2)).background = Color.white;);}, {~z11.close;~z35.close;~z11 = (CompositeView(w, Rect((~f11.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+110, ~nw, 2)).background = Color.white;);});
906                                                 if((~f12 > ~outmaxa) or: (~f12 < ~outmina), {~z36.close;~z12.close;~z36 = (CompositeView(w, Rect((~f12.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+120, ~nw, 2)).background = Color.white;);}, {~z12.close;~z36.close;~z12 = (CompositeView(w, Rect((~f12.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+120, ~nw, 2)).background = Color.white;);});
907                                         });}.defer;
908
909                                         (~slidetime/~slidedo).wait;});});}).play;);}
910                 {~l1a.isRunning == true} {(//fprog
911                         ~slideroutine = Routine({1.do({var vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8,vol9,vol10,vol11,vol12,s1,s2,s3,s4,s5,s6;
912                                 #vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8,vol9,vol10,vol11,vol12 = [~vol1,~vol2,~vol3,~vol4,~vol5,~vol6,~vol7,~vol8,~vol9,~vol10,~vol11,~vol12];
913                                 ~slidedo.do({~slidecount=~slidecount-1;
914                                         (
915                                                 [ ~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 ];
916                                                 ~l1a.set(\dur, ~f1,     \vol, vol1);  ~l1b.set(\dur, ~f1,  \vol, vol1);
917                                                 ~l1c.set(\dur, ~f1/~icd3,       \vol, vol1);  ~l1d.set(\dur, ~f1/~icd3,  \vol, vol1);
918                                                 ~l1e.set(\dur, ~f1/~icd6,       \vol, vol1);  ~l1f.set(\dur, ~f1/~icd6,  \vol, vol1);
919                                                 ~l2a.set(\dur, ~f2,     \vol, vol2);          ~l2b.set(\dur, ~f2,  \vol, vol2);
920                                                 ~l2c.set(\dur, ~f2/~icd3,       \vol, vol2);  ~l2d.set(\dur, ~f2/~icd3,  \vol, vol2);
921                                                 ~l2e.set(\dur, ~f2/~icd6,       \vol, vol2);  ~l2f.set(\dur, ~f2/~icd6,  \vol, vol2);
922                                                 ~l3a.set(\dur, ~f3,     \vol, vol3);          ~l3b.set(\dur, ~f3,  \vol, vol3);
923                                                 ~l3c.set(\dur, ~f3/~icd3,       \vol, vol3);  ~l3d.set(\dur, ~f3/~icd3,  \vol, vol3);
924                                                 ~l3e.set(\dur, ~f3/~icd6,       \vol, vol3);  ~l3f.set(\dur, ~f3/~icd6,  \vol, vol3);
925                                                 ~l4a.set(\dur, ~f4,    \vol, vol4);           ~l4b.set(\dur, ~f4,  \vol, vol4);
926                                                 ~l4c.set(\dur, ~f4/~icd3,       \vol, vol4);  ~l4d.set(\dur, ~f4/~icd3,  \vol, vol4);
927                                                 ~l4e.set(\dur, ~f4/~icd6,       \vol, vol4);  ~l4f.set(\dur, ~f4/~icd6,  \vol, vol4);
928                                                 ~l5a.set(\dur, ~f5,    \vol, vol5);           ~l5b.set(\dur, ~f5,  \vol, vol5);
929                                                 ~l5c.set(\dur, ~f5/~icd3,       \vol, vol5);  ~l5d.set(\dur, ~f5/~icd3,  \vol, vol5);
930                                                 ~l5e.set(\dur, ~f5/~icd6,       \vol, vol5);  ~l5f.set(\dur, ~f5/~icd6,  \vol, vol5);
931                                                 ~l6a.set(\dur, ~f6,    \vol, vol6);           ~l6b.set(\dur, ~f6,  \vol, vol6);
932                                                 ~l6c.set(\dur, ~f6/~icd3,       \vol, vol6);  ~l6d.set(\dur, ~f6/~icd3,  \vol, vol6);
933                                                 ~l6e.set(\dur, ~f6/~icd6,       \vol, vol6);  ~l6f.set(\dur, ~f6/~icd6,  \vol, vol6);
934                                                 ~l7a.set(\dur, ~f7,    \vol, vol7);           ~l7b.set(\dur, ~f7,  \vol, vol7);
935                                                 ~l7c.set(\dur, ~f7/~icd3,       \vol, vol7);  ~l7d.set(\dur, ~f7/~icd3,  \vol, vol7);
936                                                 ~l7e.set(\dur, ~f7/~icd6,       \vol, vol7);  ~l7f.set(\dur, ~f7/~icd6,  \vol, vol7);
937                                                 ~l8a.set(\dur, ~f8,    \vol, vol8);           ~l8b.set(\dur, ~f8,  \vol, vol8);
938                                                 ~l8c.set(\dur, ~f8/~icd3,       \vol, vol8);  ~l8d.set(\dur, ~f8/~icd3,  \vol, vol8);
939                                                 ~l8e.set(\dur, ~f8/~icd6,       \vol, vol8);  ~l8f.set(\dur, ~f8/~icd6,  \vol, vol8);
940                                                 ~l9a.set(\dur, ~f9,    \vol, vol9);          ~l9b.set(\dur, ~f9,  \vol, vol9);
941                                                 ~l9c.set(\dur, ~f9/~icd3,       \vol, vol9); ~l9d.set(\dur, ~f9/~icd3,  \vol, vol9);
942                                                 ~l9e.set(\dur, ~f9/~icd6,       \vol, vol9); ~l9f.set(\dur, ~f9/~icd6,  \vol, vol9);
943                                                 ~l10a.set(\dur, ~f10,  \vol, vol10);         ~l10b.set(\dur, ~f10,  \vol, vol10);
944                                                 ~l10c.set(\dur, ~f10/~icd3,     \vol, vol10);~l10d.set(\dur, ~f10/~icd3,  \vol, vol10);
945                                                 ~l10e.set(\dur, ~f10/~icd6,     \vol, vol10);~l10f.set(\dur, ~f10/~icd6,  \vol, vol10);
946                                                 ~l11a.set(\dur, ~f11,  \vol, vol11);         ~l11b.set(\dur, ~f11,  \vol, vol11);
947                                                 ~l11c.set(\dur, ~f11/~icd3,     \vol, vol11);~l11d.set(\dur, ~f11/~icd3,  \vol, vol11);
948                                                 ~l11e.set(\dur, ~f11/~icd6,     \vol, vol11);~l11f.set(\dur, ~f11/~icd6,  \vol, vol11);
949                                                 ~l12a.set(\dur, ~f12,  \vol, vol12);         ~l12b.set(\dur, ~f12,  \vol, vol12);
950                                                 ~l12c.set(\dur, ~f12/~icd3,     \vol, vol12);~l12d.set(\dur, ~f12/~icd3,  \vol, vol12);
951                                                 ~l12e.set(\dur, ~f12/~icd6,     \vol, vol12);~l12f.set(\dur, ~f12/~icd6,  \vol, vol12);
952
953
954                                         );
955
956                                         {if(~slidecount==0,{
957                                                 if((~f1 > ~outmaxa) or: (~f1 < ~outmina), {~z25.close;~z1.close;~z25 = (CompositeView(w, Rect((~f1.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+10, ~nw, 2)).background = Color.white;);}, {~z1.close;~z25.close;~z1 = (CompositeView(w, Rect((~f1.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+10, ~nw, 2)).background = Color.white;);});
958                                                 if((~f2 > ~outmaxa) or: (~f2 < ~outmina), {~z26.close;~z2.close;~z26 = (CompositeView(w, Rect((~f2.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+20, ~nw, 2)).background = Color.white;);}, {~z2.close;~z26.close;~z2 = (CompositeView(w, Rect((~f2.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+20, ~nw, 2)).background = Color.white;);});
959                                                 if((~f3 > ~outmaxa) or: (~f3 < ~outmina), {~z27.close;~z3.close;~z27 = (CompositeView(w, Rect((~f3.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+30, ~nw, 2)).background = Color.white;);}, {~z3.close;~z27.close;~z3 = (CompositeView(w, Rect((~f3.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+30, ~nw, 2)).background = Color.white;);});
960                                                 if((~f4 > ~outmaxa) or: (~f4 < ~outmina), {~z28.close;~z4.close;~z28 = (CompositeView(w, Rect((~f4.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+40, ~nw, 2)).background = Color.white;);}, {~z4.close;~z28.close;~z4 = (CompositeView(w, Rect((~f4.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+40, ~nw, 2)).background = Color.white;);});
961                                                 if((~f5 > ~outmaxa) or: (~f5 < ~outmina), {~z29.close;~z5.close;~z29 = (CompositeView(w, Rect((~f5.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+50, ~nw, 2)).background = Color.white;);}, {~z5.close;~z29.close;~z5 = (CompositeView(w, Rect((~f5.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+50, ~nw, 2)).background = Color.white;);});
962                                                 if((~f6 > ~outmaxa) or: (~f6 < ~outmina), {~z30.close;~z6.close;~z30 = (CompositeView(w, Rect((~f6.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+60, ~nw, 2)).background = Color.white;);}, {~z6.close;~z30.close;~z6 = (CompositeView(w, Rect((~f6.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+60, ~nw, 2)).background = Color.white;);});
963                                                 if((~f7 > ~outmaxa) or: (~f7 < ~outmina), {~z31.close;~z7.close;~z31 = (CompositeView(w, Rect((~f7.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+70, ~nw, 2)).background = Color.white;);}, {~z7.close;~z31.close;~z7 = (CompositeView(w, Rect((~f7.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+70, ~nw, 2)).background = Color.white;);});
964                                                 if((~f8 > ~outmaxa) or: (~f8 < ~outmina), {~z32.close;~z8.close;~z32 = (CompositeView(w, Rect((~f8.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+80, ~nw, 2)).background = Color.white;);}, {~z8.close;~z32.close;~z8 = (CompositeView(w, Rect((~f8.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+80, ~nw, 2)).background = Color.white;);});
965                                                 if((~f9 > ~outmaxa) or: (~f9 < ~outmina), {~z33.close;~z9.close;~z33 = (CompositeView(w, Rect((~f9.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+90, ~nw, 2)).background = Color.white;);}, {~z9.close;~z33.close;~z9 = (CompositeView(w, Rect((~f9.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+90, ~nw, 2)).background = Color.white;);});
966                                                 if((~f10 > ~outmaxa) or: (~f10 < ~outmina), {~z34.close;~z10.close;~z34 = (CompositeView(w, Rect((~f10.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+100, ~nw, 2)).background = Color.white;);}, {~z10.close;~z34.close;~z10 = (CompositeView(w, Rect((~f10.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+100, ~nw, 2)).background = Color.white;);});
967                                                 if((~f11 > ~outmaxa) or: (~f11 < ~outmina), {~z35.close;~z11.close;~z35 = (CompositeView(w, Rect((~f11.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+110, ~nw, 2)).background = Color.white;);}, {~z11.close;~z35.close;~z11 = (CompositeView(w, Rect((~f11.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+110, ~nw, 2)).background = Color.white;);});
968                                                 if((~f12 > ~outmaxa) or: (~f12 < ~outmina), {~z36.close;~z12.close;~z36 = (CompositeView(w, Rect((~f12.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+120, ~nw, 2)).background = Color.white;);}, {~z12.close;~z36.close;~z12 = (CompositeView(w, Rect((~f12.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+120, ~nw, 2)).background = Color.white;);});
969                                         });}.defer;
970
971                                         (~slidetime/~slidedo).wait;});});}).play;);};
972         };
973
974         ~synthpause = {(
975                 case
976                 {~l1a1.isRunning == true}{
977                         (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;
978                                 #vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8,vol9,vol10,vol11,vol12 = [~vol1,~vol2,~vol3,~vol4,~vol5,~vol6,~vol7,~vol8,~vol9,~vol10,~vol11,~vol12];
979                                 #f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12 = [ 0,0,0,0,0,0,0,0,0,0,0,0 ];
980                                 ~l1a1.set(\dur, f1,     \vol, vol1);          ~l1b1.set(\dur, f1,  \vol, vol1);
981                                 ~l1c1.set(\dur, f1/~icd3,       \vol, vol1);  ~l1d1.set(\dur, f1/~icd3,  \vol, vol1);
982                                 ~l1e1.set(\dur, f1/~icd6,       \vol, vol1);  ~l1f1.set(\dur, f1/~icd6,  \vol, vol1);
983                                 ~l2a1.set(\dur, f2,     \vol, vol2);          ~l2b1.set(\dur, f2,  \vol, vol2);
984                                 ~l2c1.set(\dur, f2/~icd3,       \vol, vol2);  ~l2d1.set(\dur, f2/~icd3,  \vol, vol2);
985                                 ~l2e1.set(\dur, f2/~icd6,       \vol, vol2);  ~l2f1.set(\dur, f2/~icd6,  \vol, vol2);
986                                 ~l3a1.set(\dur, f3,     \vol, vol3);          ~l3b1.set(\dur, f3,  \vol, vol3);
987                                 ~l3c1.set(\dur, f3/~icd3,       \vol, vol3);  ~l3d1.set(\dur, f3/~icd3,  \vol, vol3);
988                                 ~l3e1.set(\dur, f3/~icd6,       \vol, vol3);  ~l3f1.set(\dur, f3/~icd6,  \vol, vol3);
989                                 ~l4a1.set(\dur, f4,    \vol, vol4);           ~l4b1.set(\dur, f4,  \vol, vol4);
990                                 ~l4c1.set(\dur, f4/~icd3,       \vol, vol4);  ~l4d1.set(\dur, f4/~icd3,  \vol, vol4);
991                                 ~l4e1.set(\dur, f4/~icd6,       \vol, vol4);  ~l4f1.set(\dur, f4/~icd6,  \vol, vol4);
992                                 ~l5a1.set(\dur, f5,    \vol, vol5);           ~l5b1.set(\dur, f5,  \vol, vol5);
993                                 ~l5c1.set(\dur, f5/~icd3,       \vol, vol5);  ~l5d1.set(\dur, f5/~icd3,  \vol, vol5);
994                                 ~l5e1.set(\dur, f5/~icd6,       \vol, vol5);  ~l5f1.set(\dur, f5/~icd6,  \vol, vol5);
995                                 ~l6a1.set(\dur, f6,    \vol, vol6);           ~l6b1.set(\dur, f6,  \vol, vol6);
996                                 ~l6c1.set(\dur, f6/~icd3,       \vol, vol6);  ~l6d1.set(\dur, f6/~icd3,  \vol, vol6);
997                                 ~l6e1.set(\dur, f6/~icd6,       \vol, vol6);  ~l6f1.set(\dur, f6/~icd6,  \vol, vol6);
998                                 ~l7a1.set(\dur, f7,    \vol, vol7);           ~l7b1.set(\dur, f7,  \vol, vol7);
999                                 ~l7c1.set(\dur, f7/~icd3,       \vol, vol7);  ~l7d1.set(\dur, f7/~icd3,  \vol, vol7);
1000                                 ~l7e1.set(\dur, f7/~icd6,       \vol, vol7);  ~l7f1.set(\dur, f7/~icd6,  \vol, vol7);
1001                                 ~l8a1.set(\dur, f8,    \vol, vol8);           ~l8b1.set(\dur, f8,  \vol, vol8);
1002                                 ~l8c1.set(\dur, f8/~icd3,       \vol, vol8);  ~l8d1.set(\dur, f8/~icd3,  \vol, vol8);
1003                                 ~l8e1.set(\dur, f8/~icd6,       \vol, vol8);  ~l8f1.set(\dur, f8/~icd6,  \vol, vol8);
1004                                 ~l9a1.set(\dur, f9,    \vol, vol9);          ~l9b1.set(\dur, f9,  \vol, vol9);
1005                                 ~l9c1.set(\dur, f9/~icd3,       \vol, vol9); ~l9d1.set(\dur, f9/~icd3,  \vol, vol9);
1006                                 ~l9e1.set(\dur, f9/~icd6,       \vol, vol9); ~l9f1.set(\dur, f9/~icd6,  \vol, vol9);
1007                                 ~l10a1.set(\dur, f10,  \vol, vol10);         ~l10b1.set(\dur, f10,  \vol, vol10);
1008                                 ~l10c1.set(\dur, f10/~icd3,     \vol, vol10);~l10d1.set(\dur, f10/~icd3,  \vol, vol10);
1009                                 ~l10e1.set(\dur, f10/~icd6,     \vol, vol10);~l10f1.set(\dur, f10/~icd6,  \vol, vol10);
1010                                 ~l11a1.set(\dur, f11,  \vol, vol11);         ~l11b1.set(\dur, f11,  \vol, vol11);
1011                                 ~l11c1.set(\dur, f11/~icd3,     \vol, vol11);~l11d1.set(\dur, f11/~icd3,  \vol, vol11);
1012                                 ~l11e1.set(\dur, f11/~icd6,     \vol, vol11);~l11f1.set(\dur, f11/~icd6,  \vol, vol11);
1013                                 ~l12a1.set(\dur, f12,  \vol, vol12);         ~l12b1.set(\dur, f12,  \vol, vol12);
1014                                 ~l12c1.set(\dur, f12/~icd3,     \vol, vol12);~l12d1.set(\dur, f12/~icd3,  \vol, vol12);
1015                                 ~l12e1.set(\dur, f12/~icd6,     \vol, vol12);~l12f1.set(\dur, f12/~icd6,  \vol, vol12);
1016                         }););
1017                 }
1018                 {~l1a.isRunning == true} {
1019                         (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;
1020                                 #vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8,vol9,vol10,vol11,vol12 = [~vol1,~vol2,~vol3,~vol4,~vol5,~vol6,~vol7,~vol8,~vol9,~vol10,~vol11,~vol12];
1021                                 #f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12 = [ 0,0,0,0,0,0,0,0,0,0,0,0 ];
1022                                 ~l1a.set(\dur, f1,     \vol, vol1);  ~l1b.set(\dur, f1,  \vol, vol1);
1023                                 ~l1c.set(\dur, f1/~icd3,       \vol, vol1);  ~l1d.set(\dur, f1/~icd3,  \vol, vol1);
1024                                 ~l1e.set(\dur, f1/~icd6,       \vol, vol1);  ~l1f.set(\dur, f1/~icd6,  \vol, vol1);
1025                                 ~l2a.set(\dur, f2,     \vol, vol2);          ~l2b.set(\dur, f2,  \vol, vol2);
1026                                 ~l2c.set(\dur, f2/~icd3,       \vol, vol2);  ~l2d.set(\dur, f2/~icd3,  \vol, vol2);
1027                                 ~l2e.set(\dur, f2/~icd6,       \vol, vol2);  ~l2f.set(\dur, f2/~icd6,  \vol, vol2);
1028                                 ~l3a.set(\dur, f3,     \vol, vol3);          ~l3b.set(\dur, f3,  \vol, vol3);
1029                                 ~l3c.set(\dur, f3/~icd3,       \vol, vol3);  ~l3d.set(\dur, f3/~icd3,  \vol, vol3);
1030                                 ~l3e.set(\dur, f3/~icd6,       \vol, vol3);  ~l3f.set(\dur, f3/~icd6,  \vol, vol3);
1031                                 ~l4a.set(\dur, f4,    \vol, vol4);           ~l4b.set(\dur, f4,  \vol, vol4);
1032                                 ~l4c.set(\dur, f4/~icd3,       \vol, vol4);  ~l4d.set(\dur, f4/~icd3,  \vol, vol4);
1033                                 ~l4e.set(\dur, f4/~icd6,       \vol, vol4);  ~l4f.set(\dur, f4/~icd6,  \vol, vol4);
1034                                 ~l5a.set(\dur, f5,    \vol, vol5);           ~l5b.set(\dur, f5,  \vol, vol5);
1035                                 ~l5c.set(\dur, f5/~icd3,       \vol, vol5);  ~l5d.set(\dur, f5/~icd3,  \vol, vol5);
1036                                 ~l5e.set(\dur, f5/~icd6,       \vol, vol5);  ~l5f.set(\dur, f5/~icd6,  \vol, vol5);
1037                                 ~l6a.set(\dur, f6,    \vol, vol6);           ~l6b.set(\dur, f6,  \vol, vol6);
1038                                 ~l6c.set(\dur, f6/~icd3,       \vol, vol6);  ~l6d.set(\dur, f6/~icd3,  \vol, vol6);
1039                                 ~l6e.set(\dur, f6/~icd6,       \vol, vol6);  ~l6f.set(\dur, f6/~icd6,  \vol, vol6);
1040                                 ~l7a.set(\dur, f7,    \vol, vol7);           ~l7b.set(\dur, f7,  \vol, vol7);
1041                                 ~l7c.set(\dur, f7/~icd3,       \vol, vol7);  ~l7d.set(\dur, f7/~icd3,  \vol, vol7);
1042                                 ~l7e.set(\dur, f7/~icd6,       \vol, vol7);  ~l7f.set(\dur, f7/~icd6,  \vol, vol7);
1043                                 ~l8a.set(\dur, f8,    \vol, vol8);           ~l8b.set(\dur, f8,  \vol, vol8);
1044                                 ~l8c.set(\dur, f8/~icd3,       \vol, vol8);  ~l8d.set(\dur, f8/~icd3,  \vol, vol8);
1045                                 ~l8e.set(\dur, f8/~icd6,       \vol, vol8);  ~l8f.set(\dur, f8/~icd6,  \vol, vol8);
1046                                 ~l9a.set(\dur, f9,    \vol, vol9);          ~l9b.set(\dur, f9,  \vol, vol9);
1047                                 ~l9c.set(\dur, f9/~icd3,       \vol, vol9); ~l9d.set(\dur, f9/~icd3,  \vol, vol9);
1048                                 ~l9e.set(\dur, f9/~icd6,       \vol, vol9); ~l9f.set(\dur, f9/~icd6,  \vol, vol9);
1049                                 ~l10a.set(\dur, f10,  \vol, vol10);         ~l10b.set(\dur, f10,  \vol, vol10);
1050                                 ~l10c.set(\dur, f10/~icd3,     \vol, vol10);~l10d.set(\dur, f10/~icd3,  \vol, vol10);
1051                                 ~l10e.set(\dur, f10/~icd6,     \vol, vol10);~l10f.set(\dur, f10/~icd6,  \vol, vol10);
1052                                 ~l11a.set(\dur, f11,  \vol, vol11);         ~l11b.set(\dur, f11,  \vol, vol11);
1053                                 ~l11c.set(\dur, f11/~icd3,     \vol, vol11);~l11d.set(\dur, f11/~icd3,  \vol, vol11);
1054                                 ~l11e.set(\dur, f11/~icd6,     \vol, vol11);~l11f.set(\dur, f11/~icd6,  \vol, vol11);
1055                                 ~l12a.set(\dur, f12,  \vol, vol12);         ~l12b.set(\dur, f12,  \vol, vol12);
1056                                 ~l12c.set(\dur, f12/~icd3,     \vol, vol12);~l12d.set(\dur, f12/~icd3,  \vol, vol12);
1057                                 ~l12e.set(\dur, f12/~icd6,     \vol, vol12);~l12f.set(\dur, f12/~icd6,  \vol, vol12);
1058
1059                         }););
1060                 };
1061                 );
1062         };
1063
1064         ~synthfree = {
1065                 (
1066                         case
1067                         {~l1a1.isRunning == true}{
1068                                 (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;
1069                                         #vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8,vol9,vol10,vol11,vol12 = [~vol1,~vol2,~vol3,~vol4,~vol5,~vol6,~vol7,~vol8,~vol9,~vol10,~vol11,~vol12];
1070                                         #f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12 = [ 0,0,0,0,0,0,0,0,0,0,0,0 ];
1071                                         ~l1a1.set(\dur, f1,     \vol, vol1);  ~l1b1.set(\dur, f1,  \vol, vol1);
1072                                         ~l1c1.set(\dur, f1/~icd3,       \vol, vol1);  ~l1d1.set(\dur, f1/~icd3,  \vol, vol1);
1073                                         ~l1e1.set(\dur, f1/~icd6,       \vol, vol1);  ~l1f1.set(\dur, f1/~icd6,  \vol, vol1);
1074                                         ~l2a1.set(\dur, f2,     \vol, vol2);          ~l2b1.set(\dur, f2,  \vol, vol2);
1075                                         ~l2c1.set(\dur, f2/~icd3,       \vol, vol2);  ~l2d1.set(\dur, f2/~icd3,  \vol, vol2);
1076                                         ~l2e1.set(\dur, f2/~icd6,       \vol, vol2);  ~l2f1.set(\dur, f2/~icd6,  \vol, vol2);
1077                                         ~l3a1.set(\dur, f3,     \vol, vol3);          ~l3b1.set(\dur, f3,  \vol, vol3);
1078                                         ~l3c1.set(\dur, f3/~icd3,       \vol, vol3);  ~l3d1.set(\dur, f3/~icd3,  \vol, vol3);
1079                                         ~l3e1.set(\dur, f3/~icd6,       \vol, vol3);  ~l3f1.set(\dur, f3/~icd6,  \vol, vol3);
1080                                         ~l4a1.set(\dur, f4,    \vol, vol4);           ~l4b1.set(\dur, f4,  \vol, vol4);
1081                                         ~l4c1.set(\dur, f4/~icd3,       \vol, vol4);  ~l4d1.set(\dur, f4/~icd3,  \vol, vol4);
1082                                         ~l4e1.set(\dur, f4/~icd6,       \vol, vol4);  ~l4f1.set(\dur, f4/~icd6,  \vol, vol4);
1083                                         ~l5a1.set(\dur, f5,    \vol, vol5);           ~l5b1.set(\dur, f5,  \vol, vol5);
1084                                         ~l5c1.set(\dur, f5/~icd3,       \vol, vol5);  ~l5d1.set(\dur, f5/~icd3,  \vol, vol5);
1085                                         ~l5e1.set(\dur, f5/~icd6,       \vol, vol5);  ~l5f1.set(\dur, f5/~icd6,  \vol, vol5);
1086                                         ~l6a1.set(\dur, f6,    \vol, vol6);           ~l6b1.set(\dur, f6,  \vol, vol6);
1087                                         ~l6c1.set(\dur, f6/~icd3,       \vol, vol6);  ~l6d1.set(\dur, f6/~icd3,  \vol, vol6);
1088                                         ~l6e1.set(\dur, f6/~icd6,       \vol, vol6);  ~l6f1.set(\dur, f6/~icd6,  \vol, vol6);
1089                                         ~l7a1.set(\dur, f7,    \vol, vol7);           ~l7b1.set(\dur, f7,  \vol, vol7);
1090                                         ~l7c1.set(\dur, f7/~icd3,       \vol, vol7);  ~l7d1.set(\dur, f7/~icd3,  \vol, vol7);
1091                                         ~l7e1.set(\dur, f7/~icd6,       \vol, vol7);  ~l7f1.set(\dur, f7/~icd6,  \vol, vol7);
1092                                         ~l8a1.set(\dur, f8,    \vol, vol8);           ~l8b1.set(\dur, f8,  \vol, vol8);
1093                                         ~l8c1.set(\dur, f8/~icd3,       \vol, vol8);  ~l8d1.set(\dur, f8/~icd3,  \vol, vol8);
1094                                         ~l8e1.set(\dur, f8/~icd6,       \vol, vol8);  ~l8f1.set(\dur, f8/~icd6,  \vol, vol8);
1095                                         ~l9a1.set(\dur, f9,    \vol, vol9);          ~l9b1.set(\dur, f9,  \vol, vol9);
1096                                         ~l9c1.set(\dur, f9/~icd3,       \vol, vol9); ~l9d1.set(\dur, f9/~icd3,  \vol, vol9);
1097                                         ~l9e1.set(\dur, f9/~icd6,       \vol, vol9); ~l9f1.set(\dur, f9/~icd6,  \vol, vol9);
1098                                         ~l10a1.set(\dur, f10,  \vol, vol10);         ~l10b1.set(\dur, f10,  \vol, vol10);
1099                                         ~l10c1.set(\dur, f10/~icd3,     \vol, vol10);~l10d1.set(\dur, f10/~icd3,  \vol, vol10);
1100                                         ~l10e1.set(\dur, f10/~icd6,     \vol, vol10);~l10f1.set(\dur, f10/~icd6,  \vol, vol10);
1101                                         ~l11a1.set(\dur, f11,  \vol, vol11);         ~l11b1.set(\dur, f11,  \vol, vol11);
1102                                         ~l11c1.set(\dur, f11/~icd3,     \vol, vol11);~l11d1.set(\dur, f11/~icd3,  \vol, vol11);
1103                                         ~l11e1.set(\dur, f11/~icd6,     \vol, vol11);~l11f1.set(\dur, f11/~icd6,  \vol, vol11);
1104                                         ~l12a1.set(\dur, f12,  \vol, vol12);         ~l12b1.set(\dur, f12,  \vol, vol12);
1105                                         ~l12c1.set(\dur, f12/~icd3,     \vol, vol12);~l12d1.set(\dur, f12/~icd3,  \vol, vol12);
1106                                         ~l12e1.set(\dur, f12/~icd6,     \vol, vol12);~l12f1.set(\dur, f12/~icd6,  \vol, vol12);
1107                                 }););
1108                                 AppClock.sched(0.161803398875,{
1109                                         ([~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;
1110                                 });
1111                         }
1112                         {~l1a.isRunning == true}{
1113                                 (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;
1114                                         #vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8,vol9,vol10,vol11,vol12 = [~vol1,~vol2,~vol3,~vol4,~vol5,~vol6,~vol7,~vol8,~vol9,~vol10,~vol11,~vol12];
1115                                         #f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12 = [ 0,0,0,0,0,0,0,0,0,0,0,0 ];
1116                                         ~l1a.set(\dur, f1,     \vol, vol1);  ~l1b.set(\dur, f1,  \vol, vol1);
1117                                         ~l1c.set(\dur, f1/~icd3,       \vol, vol1);  ~l1d.set(\dur, f1/~icd3,  \vol, vol1);
1118                                         ~l1e.set(\dur, f1/~icd6,       \vol, vol1);  ~l1f.set(\dur, f1/~icd6,  \vol, vol1);
1119                                         ~l2a.set(\dur, f2,     \vol, vol2);          ~l2b.set(\dur, f2,  \vol, vol2);
1120                                         ~l2c.set(\dur, f2/~icd3,       \vol, vol2);  ~l2d.set(\dur, f2/~icd3,  \vol, vol2);
1121                                         ~l2e.set(\dur, f2/~icd6,       \vol, vol2);  ~l2f.set(\dur, f2/~icd6,  \vol, vol2);
1122                                         ~l3a.set(\dur, f3,     \vol, vol3);          ~l3b.set(\dur, f3,  \vol, vol3);
1123                                         ~l3c.set(\dur, f3/~icd3,       \vol, vol3);  ~l3d.set(\dur, f3/~icd3,  \vol, vol3);
1124                                         ~l3e.set(\dur, f3/~icd6,       \vol, vol3);  ~l3f.set(\dur, f3/~icd6,  \vol, vol3);
1125                                         ~l4a.set(\dur, f4,    \vol, vol4);           ~l4b.set(\dur, f4,  \vol, vol4);
1126                                         ~l4c.set(\dur, f4/~icd3,       \vol, vol4);  ~l4d.set(\dur, f4/~icd3,  \vol, vol4);
1127                                         ~l4e.set(\dur, f4/~icd6,       \vol, vol4);  ~l4f.set(\dur, f4/~icd6,  \vol, vol4);
1128                                         ~l5a.set(\dur, f5,    \vol, vol5);           ~l5b.set(\dur, f5,  \vol, vol5);
1129                                         ~l5c.set(\dur, f5/~icd3,       \vol, vol5);  ~l5d.set(\dur, f5/~icd3,  \vol, vol5);
1130                                         ~l5e.set(\dur, f5/~icd6,       \vol, vol5);  ~l5f.set(\dur, f5/~icd6,  \vol, vol5);
1131                                         ~l6a.set(\dur, f6,    \vol, vol6);           ~l6b.set(\dur, f6,  \vol, vol6);
1132                                         ~l6c.set(\dur, f6/~icd3,       \vol, vol6);  ~l6d.set(\dur, f6/~icd3,  \vol, vol6);
1133                                         ~l6e.set(\dur, f6/~icd6,       \vol, vol6);  ~l6f.set(\dur, f6/~icd6,  \vol, vol6);
1134                                         ~l7a.set(\dur, f7,    \vol, vol7);           ~l7b.set(\dur, f7,  \vol, vol7);
1135                                         ~l7c.set(\dur, f7/~icd3,       \vol, vol7);  ~l7d.set(\dur, f7/~icd3,  \vol, vol7);
1136                                         ~l7e.set(\dur, f7/~icd6,       \vol, vol7);  ~l7f.set(\dur, f7/~icd6,  \vol, vol7);
1137                                         ~l8a.set(\dur, f8,    \vol, vol8);           ~l8b.set(\dur, f8,  \vol, vol8);
1138                                         ~l8c.set(\dur, f8/~icd3,       \vol, vol8);  ~l8d.set(\dur, f8/~icd3,  \vol, vol8);
1139                                         ~l8e.set(\dur, f8/~icd6,       \vol, vol8);  ~l8f.set(\dur, f8/~icd6,  \vol, vol8);
1140                                         ~l9a.set(\dur, f9,    \vol, vol9);          ~l9b.set(\dur, f9,  \vol, vol9);
1141                                         ~l9c.set(\dur, f9/~icd3,       \vol, vol9); ~l9d.set(\dur, f9/~icd3,  \vol, vol9);
1142                                         ~l9e.set(\dur, f9/~icd6,       \vol, vol9); ~l9f.set(\dur, f9/~icd6,  \vol, vol9);
1143                                         ~l10a.set(\dur, f10,  \vol, vol10);         ~l10b.set(\dur, f10,  \vol, vol10);
1144                                         ~l10c.set(\dur, f10/~icd3,     \vol, vol10);~l10d.set(\dur, f10/~icd3,  \vol, vol10);
1145                                         ~l10e.set(\dur, f10/~icd6,     \vol, vol10);~l10f.set(\dur, f10/~icd6,  \vol, vol10);
1146                                         ~l11a.set(\dur, f11,  \vol, vol11);         ~l11b.set(\dur, f11,  \vol, vol11);
1147                                         ~l11c.set(\dur, f11/~icd3,     \vol, vol11);~l11d.set(\dur, f11/~icd3,  \vol, vol11);
1148                                         ~l11e.set(\dur, f11/~icd6,     \vol, vol11);~l11f.set(\dur, f11/~icd6,  \vol, vol11);
1149                                         ~l12a.set(\dur, f12,  \vol, vol12);         ~l12b.set(\dur, f12,  \vol, vol12);
1150                                         ~l12c.set(\dur, f12/~icd3,     \vol, vol12);~l12d.set(\dur, f12/~icd3,  \vol, vol12);
1151                                         ~l12e.set(\dur, f12/~icd6,     \vol, vol12);~l12f.set(\dur, f12/~icd6,  \vol, vol12);
1152                                 }););
1153                                 AppClock.sched(0.161803398875,{
1154                                         ([~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;
1155                                 });
1156                         };
1157                 );
1158         };
1159
1160
1161         //timer values
1162
1163         case
1164         {~slot1 == nil}{""}
1165         {~slot2 == nil}{""}
1166         {~slot3 == nil}{""}
1167         {~slot4 == nil}{""}
1168         {~slot5 == nil}{""}
1169         {~slot6 == nil}{""}
1170         {~slot7 == nil}{""}
1171         {~slot8 == nil}{""};
1172
1173         ~timevals = {(~tst = TextView(w, Rect(~tspl,~tspt, ~tspw, ~tsph)).background_(Color.black);
1174                 (~tst.string =
1175                         "o1:_"++~time1o.value.asString++"_f1:_"++~time1f.value.asString++"_s1:_"++~time1s.value.asString++"\n" ++
1176                         "o2:_"++~time2o.value.asString++"_f2:_"++~time2f.value.asString++"_s2:_"++~time2s.value.asString++"\n" ++
1177                         "o3:_"++~time3o.value.asString++"_f3:_"++~time3f.value.asString++"_s3:_"++~time3s.value.asString++"\n" ++
1178                         "o4:_"++~time4o.value.asString++"_f4:_"++~time4f.value.asString++"_s4:_"++~time4s.value.asString++"\n" ++
1179                         "o5:_"++~time5o.value.asString++"_f5:_"++~time5f.value.asString++"_s5:_"++~time5s.value.asString++"\n" ++
1180                         "o6:_"++~time6o.value.asString++"_f6:_"++~time6f.value.asString++"_s6:_"++~time6s.value.asString++"\n" ++
1181                         "o7:_"++~time7o.value.asString++"_f7:_"++~time7f.value.asString++"_s7:_"++~time7s.value.asString++"\n" ++
1182                         "o8:_"++~time8o.value.asString++"_f8:_"++~time8f.value.asString++"_s8:_"++~time8s.value.asString++"\n" ++"\n" ++
1183                         if(~slot8 != ~slot, {
1184                                 (~slot1 = ~slot2).asString++"\n" ++
1185                                 (~slot2 = ~slot3).asString++"\n" ++
1186                                 (~slot3 = ~slot4).asString++"\n" ++
1187                                 (~slot4 = ~slot5).asString++"\n" ++
1188                                 (~slot5 = ~slot6).asString++"\n" ++
1189                                 (~slot6 = ~slot7).asString++"\n" ++
1190                                 (~slot7 = ~slot8).asString++"\n" ++
1191                                 (~slot8 = ~slot).asString;
1192                                 },{
1193                                         (~slot1).asString++"\n" ++
1194                                         (~slot2).asString++"\n" ++
1195                                         (~slot3).asString++"\n" ++
1196                                         (~slot4).asString++"\n" ++
1197                                         (~slot5).asString++"\n" ++
1198                                         (~slot6).asString++"\n" ++
1199                                         (~slot7).asString++"\n" ++
1200                                         (~slot8).asString;
1201                         });
1202
1203                 );
1204                 ~tst.stringColor = Color.white;
1205         )};
1206
1207
1208         //monitoring number of synths function
1209
1210         ~numsynthsfunc = {
1211                 if((~numsynths != nil) or: (~numsynths.isPlaying == true), {~numsynths.stop;});
1212                 ~numsynths = Routine({inf.do({if((s.numSynths > 73) and: (3.wait; s.numSynths > 73) and: (6.wait; s.numSynths > 73), {
1213
1214                         AppClock.sched(0, {
1215                                 if(~numsynthmessage != nil, {~numsynthmessage.close;});
1216                                 ~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;
1217                                 ~numsynthmessagestring = StaticText(~numsynthmessage, Rect(0,0,340+46,340+46/1.6180339887499)).background_(Color.black);
1218                                 ~numsynthmessagestring.align = \topLeft;
1219                                 ~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.";
1220                                 ~numsynthmessagestring.stringColor = Color.white;
1221                                 ~numsynthmessagebutton1 = Button.new(~numsynthmessage,Rect(320+46-100,340/1.6180339887499-30,46,46/1.6180339887499)).states_([["ok",Color.white,Color.black]]).action_({AppClock.sched(0, {~numsynthmessage.close; ~numsynths.play; ~midifunc.value;});});
1222                                 ~numsynthmessagebutton2 = Button.new(~numsynthmessage,Rect(120-46,340/1.6180339887499-30,46,46/1.6180339887499)).states_([["cancel",Color.white,Color.black]]).action_({AppClock.sched(0, {~numsynths.stop; ~numsynthmessage.close;});});
1223                                 ~numsynthmessage.front;
1224                         });
1225                 }); 1.wait;});}).play;
1226         };
1227
1228         ~numsynthsfunc.value;
1229
1230
1231         //mouse down action
1232
1233         view.mouseDownAction = {
1234                 |v, x, y, mod, butNum|
1235                 point = [x,y];
1236                 if(butNum == 0, { v.refresh;
1237
1238                         //generate dots on mouse down action
1239
1240                         ~tgrid = 30;
1241                         ~bgrid = Window.screenBounds.height-(Window.screenBounds.height/1.6180339887499)+30;
1242
1243                         case
1244                         {y<~tgrid} {nil}
1245                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z1.close;~z1 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1246                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z2.close;~z2 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1247                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z3.close;~z3 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1248                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z4.close;~z4 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1249                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z5.close;~z5 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1250                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z6.close;~z6 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1251                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z7.close;~z7 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1252                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z8.close;~z8 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1253                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z9.close;~z9 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1254                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z10.close;~z10 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1255                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z11.close;~z11 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1256                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z12.close;~z12 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1257                         {y>~tgrid and: y<~bgrid} {nil}
1258                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z1.close;~z1 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1259                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z2.close;~z2 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1260                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z3.close;~z3 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1261                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z4.close;~z4 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1262                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z5.close;~z5 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1263                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z6.close;~z6 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1264                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z7.close;~z7 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1265                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z8.close;~z8 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1266                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z9.close;~z9 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1267                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z10.close;~z10 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1268                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z11.close;~z11 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1269                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z12.close;~z12 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1270                 }, {});
1271
1272                 ~tgrid = 30;
1273                 ~bgrid = Window.screenBounds.height-(Window.screenBounds.height/1.6180339887499)+30;
1274
1275                 //set synth values on mouse down action
1276
1277                 case
1278                 {~l1a.isRunning == true}{
1279                         case
1280                         {y<~tgrid} {nil}
1281                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1282                                 ~l1a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1283                                 ~l1b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f1=q.value; ~undof1=~f1;
1284                                 ~l1c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1285                                 ~l1d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1286                                 ~l1e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1287                                 ~l1f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1288                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1289                                 ~l2a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1290                                 ~l2b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f2=q.value; ~undof2=~f2;
1291                                 ~l2c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1292                                 ~l2d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1293                                 ~l2e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1294                                 ~l2f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1295                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1296                                 ~l3a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1297                                 ~l3b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f3=q.value; ~undof3=~f3;
1298                                 ~l3c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1299                                 ~l3d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1300                                 ~l3e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1301                                 ~l3f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1302                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1303                                 ~l4a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1304                                 ~l4b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f4=q.value; ~undof4=~f4;
1305                                 ~l4c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1306                                 ~l4d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1307                                 ~l4e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1308                                 ~l4f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1309                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1310                                 ~l5a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1311                                 ~l5b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f5=q.value; ~undof5=~f5;
1312                                 ~l5c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1313                                 ~l5d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1314                                 ~l5e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1315                                 ~l5f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1316                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1317                                 ~l6a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1318                                 ~l6b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f6=q.value; ~undof6=~f6;
1319                                 ~l6c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1320                                 ~l6d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1321                                 ~l6e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1322                                 ~l6f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1323                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1324                                 ~l7a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1325                                 ~l7b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f7=q.value; ~undof7=~f7;
1326                                 ~l7c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1327                                 ~l7d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1328                                 ~l7e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1329                                 ~l7f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1330                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1331                                 ~l8a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1332                                 ~l8b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f8=q.value; ~undof8=~f8;
1333                                 ~l8c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1334                                 ~l8d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1335                                 ~l8e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1336                                 ~l8f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1337                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1338                                 ~l9a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1339                                 ~l9b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f9=q.value; ~undof9=~f9;
1340                                 ~l9c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1341                                 ~l9d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1342                                 ~l9e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1343                                 ~l9f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1344                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1345                                 ~l10a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1346                                 ~l10b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f10=q.value; ~undof10=~f10;
1347                                 ~l10c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1348                                 ~l10d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1349                                 ~l10e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1350                                 ~l10f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1351                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1352                                 ~l11a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1353                                 ~l11b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f11=q.value; ~undof11=~f11;
1354                                 ~l11c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1355                                 ~l11d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1356                                 ~l11e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1357                                 ~l11f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1358                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1359                                 ~l12a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1360                                 ~l12b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f12=q.value; ~undof12=~f12;
1361                                 ~l12c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1362                                 ~l12d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1363                                 ~l12e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1364                                 ~l12f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1365                         {y>~tgrid and: y<~bgrid} {nil}
1366                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1367                                 ~l1a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1368                                 ~l1b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f1=q.value; ~undof1=~f1;
1369                                 ~l1c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1370                                 ~l1d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1371                                 ~l1e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1372                                 ~l1f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1373                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1374                                 ~l2a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1375                                 ~l2b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f2=q.value; ~undof2=~f2;
1376                                 ~l2c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1377                                 ~l2d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1378                                 ~l2e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1379                                 ~l2f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1380                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1381                                 ~l3a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1382                                 ~l3b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f3=q.value; ~undof3=~f3;
1383                                 ~l3c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1384                                 ~l3d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1385                                 ~l3e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1386                                 ~l3f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1387                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1388                                 ~l4a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1389                                 ~l4b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f4=q.value; ~undof4=~f4;
1390                                 ~l4c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1391                                 ~l4d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1392                                 ~l4e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1393                                 ~l4f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1394                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1395                                 ~l5a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1396                                 ~l5b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f5=q.value; ~undof5=~f5;
1397                                 ~l5c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1398                                 ~l5d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1399                                 ~l5e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1400                                 ~l5f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1401                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1402                                 ~l6a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1403                                 ~l6b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f6=q.value; ~undof6=~f6;
1404                                 ~l6c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1405                                 ~l6d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1406                                 ~l6e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1407                                 ~l6f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1408                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1409                                 ~l7a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1410                                 ~l7b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f7=q.value; ~undof7=~f7;
1411                                 ~l7c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1412                                 ~l7d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1413                                 ~l7e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1414                                 ~l7f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1415                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1416                                 ~l8a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1417                                 ~l8b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f8=q.value; ~undof8=~f8;
1418                                 ~l8c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1419                                 ~l8d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1420                                 ~l8e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1421                                 ~l8f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1422                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1423                                 ~l9a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1424                                 ~l9b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f9=q.value; ~undof9=~f9;
1425                                 ~l9c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1426                                 ~l9d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1427                                 ~l9e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1428                                 ~l9f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1429                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1430                                 ~l10a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1431                                 ~l10b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f10=q.value; ~undof10=~f10;
1432                                 ~l10c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1433                                 ~l10d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1434                                 ~l10e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1435                                 ~l10f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1436                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1437                                 ~l11a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1438                                 ~l11b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f11=q.value; ~undof11=~f11;
1439                                 ~l11c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1440                                 ~l11d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1441                                 ~l11e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1442                                 ~l11f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1443                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1444                                 ~l12a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1445                                 ~l12b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f12=q.value; ~undof12=~f12;
1446                                 ~l12c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1447                                 ~l12d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1448                                 ~l12e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1449                                 ~l12f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);};
1450                 }
1451                 {~l1a1.isRunning == true}{
1452                         case
1453                         {y<~tgrid} {nil}
1454                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1455                                 ~l1a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1456                                 ~l1b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f1=q.value; ~undof1=~f1;
1457                                 ~l1c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1458                                 ~l1d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1459                                 ~l1e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1460                                 ~l1f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1461                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1462                                 ~l2a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1463                                 ~l2b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f2=q.value; ~undof2=~f2;
1464                                 ~l2c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1465                                 ~l2d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1466                                 ~l2e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1467                                 ~l2f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1468                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1469                                 ~l3a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1470                                 ~l3b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f3=q.value; ~undof3=~f3;
1471                                 ~l3c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1472                                 ~l3d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1473                                 ~l3e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1474                                 ~l3f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1475                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1476                                 ~l4a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1477                                 ~l4b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f4=q.value; ~undof4=~f4;
1478                                 ~l4c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1479                                 ~l4d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1480                                 ~l4e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1481                                 ~l4f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1482                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1483                                 ~l5a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1484                                 ~l5b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f5=q.value; ~undof5=~f5;
1485                                 ~l5c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1486                                 ~l5d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1487                                 ~l5e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1488                                 ~l5f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1489                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1490                                 ~l6a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1491                                 ~l6b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f6=q.value; ~undof6=~f6;
1492                                 ~l6c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1493                                 ~l6d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1494                                 ~l6e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1495                                 ~l6f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1496                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1497                                 ~l7a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1498                                 ~l7b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f7=q.value; ~undof7=~f7;
1499                                 ~l7c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1500                                 ~l7d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1501                                 ~l7e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1502                                 ~l7f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1503                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1504                                 ~l8a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1505                                 ~l8b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f8=q.value; ~undof8=~f8;
1506                                 ~l8c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1507                                 ~l8d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1508                                 ~l8e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1509                                 ~l8f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1510                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1511                                 ~l9a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1512                                 ~l9b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f9=q.value; ~undof9=~f9;
1513                                 ~l9c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1514                                 ~l9d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1515                                 ~l9e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1516                                 ~l9f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1517                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1518                                 ~l10a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1519                                 ~l10b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f10=q.value; ~undof10=~f10;
1520                                 ~l10c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1521                                 ~l10d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1522                                 ~l10e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1523                                 ~l10f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1524                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1525                                 ~l11a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1526                                 ~l11b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f11=q.value; ~undof11=~f11;
1527                                 ~l11c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1528                                 ~l11d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1529                                 ~l11e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1530                                 ~l11f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1531                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1532                                 ~l12a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1533                                 ~l12b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f12=q.value; ~undof12=~f12;
1534                                 ~l12c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1535                                 ~l12d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1536                                 ~l12e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1537                                 ~l12f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1538                         {y>~tgrid and: y<~bgrid} {nil}
1539                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1540                                 ~l1a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1541                                 ~l1b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f1=q.value; ~undof1=~f1;
1542                                 ~l1c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1543                                 ~l1d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1544                                 ~l1e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1545                                 ~l1f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1546                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1547                                 ~l2a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1548                                 ~l2b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f2=q.value; ~undof2=~f2;
1549                                 ~l2c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1550                                 ~l2d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1551                                 ~l2e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1552                                 ~l2f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1553                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1554                                 ~l3a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1555                                 ~l3b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f3=q.value; ~undof3=~f3;
1556                                 ~l3c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1557                                 ~l3d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1558                                 ~l3e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1559                                 ~l3f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1560                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1561                                 ~l4a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1562                                 ~l4b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f4=q.value; ~undof4=~f4;
1563                                 ~l4c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1564                                 ~l4d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1565                                 ~l4e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1566                                 ~l4f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1567                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1568                                 ~l5a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1569                                 ~l5b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f5=q.value; ~undof5=~f5;
1570                                 ~l5c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1571                                 ~l5d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1572                                 ~l5e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1573                                 ~l5f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1574                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1575                                 ~l6a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1576                                 ~l6b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f6=q.value; ~undof6=~f6;
1577                                 ~l6c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1578                                 ~l6d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1579                                 ~l6e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1580                                 ~l6f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1581                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1582                                 ~l7a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1583                                 ~l7b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f7=q.value; ~undof7=~f7;
1584                                 ~l7c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1585                                 ~l7d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1586                                 ~l7e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1587                                 ~l7f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1588                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1589                                 ~l8a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1590                                 ~l8b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f8=q.value; ~undof8=~f8;
1591                                 ~l8c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1592                                 ~l8d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1593                                 ~l8e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1594                                 ~l8f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1595                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1596                                 ~l9a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1597                                 ~l9b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f9=q.value; ~undof9=~f9;
1598                                 ~l9c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1599                                 ~l9d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1600                                 ~l9e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1601                                 ~l9f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1602                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1603                                 ~l10a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1604                                 ~l10b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f10=q.value; ~undof10=~f10;
1605                                 ~l10c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1606                                 ~l10d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1607                                 ~l10e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1608                                 ~l10f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1609                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1610                                 ~l11a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1611                                 ~l11b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f11=q.value; ~undof11=~f11;
1612                                 ~l11c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1613                                 ~l11d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1614                                 ~l11e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1615                                 ~l11f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1616                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1617                                 ~l12a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1618                                 ~l12b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f12=q.value; ~undof12=~f12;
1619                                 ~l12c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1620                                 ~l12d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1621                                 ~l12e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1622                                 ~l12f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);};
1623                 };
1624         };
1625
1626
1627         //mouse move action
1628
1629         view.mouseMoveAction = {
1630                 |v, x, y|
1631
1632                 ~nh = 2;
1633                 ~nw = ~nh*1.6180339887499;
1634
1635                 //generate dots on mouse move action
1636
1637                 ~tgrid = 30;
1638                 ~bgrid = Window.screenBounds.height-(Window.screenBounds.height/1.6180339887499)+30;
1639
1640                 case
1641                 {y<~tgrid} {nil}
1642                 {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z1.close;~z25.close;~z1 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1643                 {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z2.close;~z26.close;~z2 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1644                 {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z3.close;~z27.close;~z3 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1645                 {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z4.close;~z28.close;~z4 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1646                 {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z5.close;~z29.close;~z5 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1647                 {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z6.close;~z30.close;~z6 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1648                 {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z7.close;~z31.close;~z7 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1649                 {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z8.close;~z32.close;~z8 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1650                 {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z9.close;~z33.close;~z9 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1651                 {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z10.close;~z34.close;~z10 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1652                 {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z11.close;~z35.close;~z11 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1653                 {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z12.close;~z36.close;~z12 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1654                 {y>~tgrid and: y<~bgrid} {nil}
1655                 {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z1.close;~z25.close;~z1 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1656                 {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z2.close;~z26.close;~z2 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1657                 {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z3.close;~z27.close;~z3 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1658                 {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z4.close;~z28.close;~z4 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1659                 {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z5.close;~z29.close;~z5 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1660                 {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z6.close;~z30.close;~z6 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1661                 {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z7.close;~z31.close;~z7 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1662                 {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z8.close;~z32.close;~z8 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1663                 {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z9.close;~z33.close;~z9 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1664                 {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z10.close;~z34.close;~z10 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1665                 {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z11.close;~z35.close;~z11 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1666                 {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z12.close;~z36.close;~z12 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)};
1667                 w.refresh;
1668
1669                 ~tgrid = 30;
1670                 ~bgrid = Window.screenBounds.height-(Window.screenBounds.height/1.6180339887499)+30;
1671
1672                 //set synth values on mouse move action
1673
1674                 case
1675                 {~l1a.isRunning == true}{
1676                         case
1677                         {y<~tgrid} {nil}
1678                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1679                                 ~l1a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1680                                 ~l1b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f1=q.value; ~undof1=~f1;
1681                                 ~l1c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1682                                 ~l1d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1683                                 ~l1e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1684                                 ~l1f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1685                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1686                                 ~l2a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1687                                 ~l2b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f2=q.value; ~undof2=~f2;
1688                                 ~l2c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1689                                 ~l2d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1690                                 ~l2e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1691                                 ~l2f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1692                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1693                                 ~l3a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1694                                 ~l3b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f3=q.value; ~undof3=~f3;
1695                                 ~l3c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1696                                 ~l3d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1697                                 ~l3e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1698                                 ~l3f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1699                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1700                                 ~l4a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1701                                 ~l4b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f4=q.value; ~undof4=~f4;
1702                                 ~l4c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1703                                 ~l4d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1704                                 ~l4e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1705                                 ~l4f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1706                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1707                                 ~l5a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1708                                 ~l5b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f5=q.value; ~undof5=~f5;
1709                                 ~l5c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1710                                 ~l5d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1711                                 ~l5e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1712                                 ~l5f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1713                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1714                                 ~l6a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1715                                 ~l6b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f6=q.value; ~undof6=~f6;
1716                                 ~l6c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1717                                 ~l6d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1718                                 ~l6e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1719                                 ~l6f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1720                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1721                                 ~l7a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1722                                 ~l7b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f7=q.value; ~undof7=~f7;
1723                                 ~l7c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1724                                 ~l7d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1725                                 ~l7e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1726                                 ~l7f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1727                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1728                                 ~l8a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1729                                 ~l8b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f8=q.value; ~undof8=~f8;
1730                                 ~l8c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1731                                 ~l8d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1732                                 ~l8e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1733                                 ~l8f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1734                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1735                                 ~l9a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1736                                 ~l9b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f9=q.value; ~undof9=~f9;
1737                                 ~l9c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1738                                 ~l9d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1739                                 ~l9e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1740                                 ~l9f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1741                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1742                                 ~l10a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1743                                 ~l10b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f10=q.value; ~undof10=~f10;
1744                                 ~l10c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1745                                 ~l10d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1746                                 ~l10e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1747                                 ~l10f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1748                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1749                                 ~l11a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1750                                 ~l11b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f11=q.value; ~undof11=~f11;
1751                                 ~l11c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1752                                 ~l11d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1753                                 ~l11e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1754                                 ~l11f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1755                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1756                                 ~l12a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1757                                 ~l12b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f12=q.value; ~undof12=~f12;
1758                                 ~l12c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1759                                 ~l12d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1760                                 ~l12e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1761                                 ~l12f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1762                         {y>~tgrid and: y<~bgrid} {nil}
1763                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1764                                 ~l1a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1765                                 ~l1b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f1=q.value; ~undof1=~f1;
1766                                 ~l1c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1767                                 ~l1d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1768                                 ~l1e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1769                                 ~l1f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1770                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1771                                 ~l2a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1772                                 ~l2b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f2=q.value; ~undof2=~f2;
1773                                 ~l2c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1774                                 ~l2d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1775                                 ~l2e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1776                                 ~l2f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1777                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1778                                 ~l3a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1779                                 ~l3b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f3=q.value; ~undof3=~f3;
1780                                 ~l3c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1781                                 ~l3d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1782                                 ~l3e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1783                                 ~l3f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1784                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1785                                 ~l4a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1786                                 ~l4b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f4=q.value; ~undof4=~f4;
1787                                 ~l4c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1788                                 ~l4d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1789                                 ~l4e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1790                                 ~l4f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1791                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1792                                 ~l5a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1793                                 ~l5b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f5=q.value; ~undof5=~f5;
1794                                 ~l5c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1795                                 ~l5d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1796                                 ~l5e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1797                                 ~l5f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1798                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1799                                 ~l6a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1800                                 ~l6b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f6=q.value; ~undof6=~f6;
1801                                 ~l6c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1802                                 ~l6d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1803                                 ~l6e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1804                                 ~l6f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1805                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1806                                 ~l7a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1807                                 ~l7b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f7=q.value; ~undof7=~f7;
1808                                 ~l7c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1809                                 ~l7d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1810                                 ~l7e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1811                                 ~l7f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1812                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1813                                 ~l8a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1814                                 ~l8b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f8=q.value; ~undof8=~f8;
1815                                 ~l8c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1816                                 ~l8d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1817                                 ~l8e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1818                                 ~l8f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1819                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1820                                 ~l9a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1821                                 ~l9b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f9=q.value; ~undof9=~f9;
1822                                 ~l9c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1823                                 ~l9d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1824                                 ~l9e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1825                                 ~l9f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1826                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1827                                 ~l10a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1828                                 ~l10b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f10=q.value; ~undof10=~f10;
1829                                 ~l10c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1830                                 ~l10d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1831                                 ~l10e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1832                                 ~l10f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1833                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1834                                 ~l11a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1835                                 ~l11b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f11=q.value; ~undof11=~f11;
1836                                 ~l11c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1837                                 ~l11d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1838                                 ~l11e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1839                                 ~l11f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1840                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1841                                 ~l12a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1842                                 ~l12b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f12=q.value; ~undof12=~f12;
1843                                 ~l12c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1844                                 ~l12d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1845                                 ~l12e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1846                                 ~l12f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);};
1847                 }
1848                 {~l1a1.isRunning == true}{
1849                         case
1850                         {y<~tgrid} {nil}
1851                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1852                                 ~l1a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1853                                 ~l1b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f1=q.value; ~undof1=~f1;
1854                                 ~l1c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1855                                 ~l1d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1856                                 ~l1e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1857                                 ~l1f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1858                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1859                                 ~l2a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1860                                 ~l2b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f2=q.value; ~undof2=~f2;
1861                                 ~l2c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1862                                 ~l2d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1863                                 ~l2e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1864                                 ~l2f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1865                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1866                                 ~l3a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1867                                 ~l3b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f3=q.value; ~undof3=~f3;
1868                                 ~l3c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1869                                 ~l3d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1870                                 ~l3e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1871                                 ~l3f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1872                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1873                                 ~l4a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1874                                 ~l4b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f4=q.value; ~undof4=~f4;
1875                                 ~l4c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1876                                 ~l4d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1877                                 ~l4e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1878                                 ~l4f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1879                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1880                                 ~l5a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1881                                 ~l5b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f5=q.value; ~undof5=~f5;
1882                                 ~l5c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1883                                 ~l5d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1884                                 ~l5e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1885                                 ~l5f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1886                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1887                                 ~l6a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1888                                 ~l6b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f6=q.value; ~undof6=~f6;
1889                                 ~l6c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1890                                 ~l6d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1891                                 ~l6e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1892                                 ~l6f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1893                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1894                                 ~l7a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1895                                 ~l7b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f7=q.value; ~undof7=~f7;
1896                                 ~l7c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1897                                 ~l7d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1898                                 ~l7e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1899                                 ~l7f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1900                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1901                                 ~l8a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1902                                 ~l8b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f8=q.value; ~undof8=~f8;
1903                                 ~l8c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1904                                 ~l8d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1905                                 ~l8e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1906                                 ~l8f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1907                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1908                                 ~l9a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1909                                 ~l9b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f9=q.value; ~undof9=~f9;
1910                                 ~l9c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1911                                 ~l9d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1912                                 ~l9e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1913                                 ~l9f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1914                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1915                                 ~l10a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1916                                 ~l10b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f10=q.value; ~undof10=~f10;
1917                                 ~l10c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1918                                 ~l10d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1919                                 ~l10e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1920                                 ~l10f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1921                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1922                                 ~l11a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1923                                 ~l11b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f11=q.value; ~undof11=~f11;
1924                                 ~l11c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1925                                 ~l11d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1926                                 ~l11e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1927                                 ~l11f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1928                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1929                                 ~l12a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1930                                 ~l12b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f12=q.value; ~undof12=~f12;
1931                                 ~l12c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1932                                 ~l12d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1933                                 ~l12e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1934                                 ~l12f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1935                         {y>~tgrid and: y<~bgrid} {nil}
1936                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1937                                 ~l1a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1938                                 ~l1b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f1=q.value; ~undof1=~f1;
1939                                 ~l1c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1940                                 ~l1d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1941                                 ~l1e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1942                                 ~l1f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1943                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1944                                 ~l2a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1945                                 ~l2b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f2=q.value; ~undof2=~f2;
1946                                 ~l2c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1947                                 ~l2d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1948                                 ~l2e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1949                                 ~l2f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1950                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1951                                 ~l3a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1952                                 ~l3b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f3=q.value; ~undof3=~f3;
1953                                 ~l3c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1954                                 ~l3d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1955                                 ~l3e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1956                                 ~l3f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1957                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1958                                 ~l4a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1959                                 ~l4b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f4=q.value; ~undof4=~f4;
1960                                 ~l4c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1961                                 ~l4d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1962                                 ~l4e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1963                                 ~l4f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1964                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1965                                 ~l5a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1966                                 ~l5b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f5=q.value; ~undof5=~f5;
1967                                 ~l5c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1968                                 ~l5d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1969                                 ~l5e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1970                                 ~l5f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1971                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1972                                 ~l6a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1973                                 ~l6b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f6=q.value; ~undof6=~f6;
1974                                 ~l6c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1975                                 ~l6d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1976                                 ~l6e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1977                                 ~l6f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1978                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1979                                 ~l7a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1980                                 ~l7b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f7=q.value; ~undof7=~f7;
1981                                 ~l7c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1982                                 ~l7d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1983                                 ~l7e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1984                                 ~l7f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1985                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1986                                 ~l8a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1987                                 ~l8b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f8=q.value; ~undof8=~f8;
1988                                 ~l8c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1989                                 ~l8d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1990                                 ~l8e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1991                                 ~l8f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1992                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1993                                 ~l9a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1994                                 ~l9b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f9=q.value; ~undof9=~f9;
1995                                 ~l9c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1996                                 ~l9d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1997                                 ~l9e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1998                                 ~l9f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1999                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
2000                                 ~l10a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
2001                                 ~l10b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f10=q.value; ~undof10=~f10;
2002                                 ~l10c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
2003                                 ~l10d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
2004                                 ~l10e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
2005                                 ~l10f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
2006                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
2007                                 ~l11a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
2008                                 ~l11b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f11=q.value; ~undof11=~f11;
2009                                 ~l11c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
2010                                 ~l11d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
2011                                 ~l11e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
2012                                 ~l11f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
2013                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
2014                                 ~l12a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
2015                                 ~l12b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f12=q.value; ~undof12=~f12;
2016                                 ~l12c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
2017                                 ~l12d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
2018                                 ~l12e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
2019                                 ~l12f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);};
2020                 };
2021         };
2022
2023         ~tgrid = 30;
2024         ~bgrid = Window.screenBounds.height-(Window.screenBounds.height/1.6180339887499)+30;
2025         ~dc1 = ~tgrid-5; ~dc2 = ~bgrid-5; ~dca = 10;
2026
2027         ~bpl = Window.screenBounds.width-340;
2028         ~bpt = Window.screenBounds.height-88;
2029         ~bph = 40;
2030         ~bpw = 40/1.6180339887499;
2031
2032
2033         //copy button
2034
2035         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;
2036                 if(button.value == 1, {
2037
2038                         ~tsc = TextView(w, Rect(0,0, 1600*2, 354)).background_(Color.black);
2039                         (~tsc.string =
2040                                 "saved open/flow 1-8: "++"\n"++"\n"++
2041                                 "[~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"++
2042                                 "[~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"++
2043                                 "[~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"++
2044                                 "[~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"++
2045                                 "[~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"++
2046                                 "[~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"++
2047                                 "[~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"++
2048                                 "[~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"++
2049
2050                                 "saved slide 1-8: "++"\n"++"\n"++
2051
2052                                 "#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"++
2053                                 "#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"++
2054                                 "#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"++
2055                                 "#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"++
2056                                 "#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"++
2057                                 "#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"++
2058                                 "#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"++
2059                                 "#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;"++"\n"++"\n"++
2060
2061                                 "current: "++"\n"++
2062                                 "[~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++"]"
2063
2064                         );
2065                         ~tsc.stringColor = Color.white;
2066                         (str= [ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ];("echo"+str+"| xclip -selection clipboard").unixCmd;);
2067                         [ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ].postln;},
2068                         {~tsc.close;});
2069         });
2070
2071
2072         //stop timer button
2073
2074         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;
2075                 if(~timer.isPlaying == true, {
2076                         if(~tst.value == nil, {~timer.stop; ~systemclock.stop; ~systemclock.clear;},{~tst.close;
2077                                 ~timevals.value;
2078                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear;});
2079                 });
2080         });
2081
2082
2083         //timer button
2084
2085         ~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, {
2086                 if(~tst != nil, {~tst.close});
2087                 ~timevals.value;
2088                 ~timer.stop; ~systemclock.stop; ~systemclock.clear;},{if(~tst.value == nil, {~timer.stop; ~systemclock.stop; ~systemclock.clear;},{~timer.stop; ~systemclock.stop; ~systemclock.clear; ~tst.close;})})});
2089
2090
2091         //start/stop synth button
2092
2093         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_({
2094                 arg synthbutton; if(synthbutton.value == 1, {
2095                         ~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);
2096                         ~synthopen.value;
2097                         ~numsynths.stop; ~numsynthsfunc.value;
2098                         ~midifunc.value;
2099                         },
2100                         {~synthfree.value; b4.value = 0;})
2101         });
2102
2103
2104         //pause/unpause button
2105
2106         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_({
2107                 arg synthbutton; if(synthbutton.value == 1, {~synthpause.value; ~timer.stop;},
2108                         {~synthflow.value; if(~time == 0, {~timer.stop;}, {~timer = Routine({inf.do({~time = ~time+0.01; ~time.postln; 0.01.wait;});}); SystemClock.play(~timer);})})
2109         });
2110
2111
2112         //generate values for number of KW(King Wen) sequences in a timewave half-cycle (or amplitude x2) pop-up menu
2113
2114         x=0;
2115         ~menu2values = Array.fill(24, {(x=x+1).asString++" kws"});
2116
2117
2118         //number of KW(King Wen) sequences in a timewave half-cycle (or amplitude x2) upon starting value
2119
2120         case
2121         {~gsinenum == nil}{~menu2start = ~menu2values.at(~synthdefnum-1)}
2122         {~gsinenum == 1}{~menu2start = ~menu2values.at(0)}
2123         {~gsinenum == 2}{~menu2start = ~menu2values.at(1)}
2124         {~gsinenum == 3}{~menu2start = ~menu2values.at(2)}
2125         {~gsinenum == 4}{~menu2start = ~menu2values.at(3)}
2126         {~gsinenum == 5}{~menu2start = ~menu2values.at(4)}
2127         {~gsinenum == 6}{~menu2start = ~menu2values.at(5)}
2128         {~gsinenum == 7}{~menu2start = ~menu2values.at(6)}
2129         {~gsinenum == 8}{~menu2start = ~menu2values.at(7)}
2130         {~gsinenum == 9}{~menu2start = ~menu2values.at(8)}
2131         {~gsinenum == 10}{~menu2start = ~menu2values.at(9)}
2132         {~gsinenum == 11}{~menu2start = ~menu2values.at(10)}
2133         {~gsinenum == 12}{~menu2start = ~menu2values.at(11)}
2134         {~gsinenum == 13}{~menu2start = ~menu2values.at(12)}
2135         {~gsinenum == 14}{~menu2start = ~menu2values.at(13)}
2136         {~gsinenum == 15}{~menu2start = ~menu2values.at(14)}
2137         {~gsinenum == 16}{~menu2start = ~menu2values.at(15)}
2138         {~gsinenum == 17}{~menu2start = ~menu2values.at(16)}
2139         {~gsinenum == 18}{~menu2start = ~menu2values.at(17)}
2140         {~gsinenum == 19}{~menu2start = ~menu2values.at(18)}
2141         {~gsinenum == 20}{~menu2start = ~menu2values.at(19)}
2142         {~gsinenum == 21}{~menu2start = ~menu2values.at(20)}
2143         {~gsinenum == 22}{~menu2start = ~menu2values.at(21)}
2144         {~gsinenum == 23}{~menu2start = ~menu2values.at(22)}
2145         {~gsinenum == 24}{~menu2start = ~menu2values.at(23)};
2146         if(~menu2synthdefstart.value == nil, {~menu2synthdefstart = ~synthdefnum}, {~menu2synthdefstart = ~gsinenum});
2147
2148
2149         //number of KW(King Wen) sequences in a timewave half-cycle (or amplitude x2) pop-up menu
2150
2151         menu2=PopUpMenu(w,Rect(20+60*2+16,Window.screenBounds.height-88+(30/1.6180339887499*0),86,60/1.6180339887499)).items_(~mvalue = (-1); [~menu2start.asString]++Array.fill(24, {~menu2values.at(~mvalue = ~mvalue+1);});).background_(Color.black).stringColor_(Color.white).action_({arg button;
2152
2153                 if(~st != nil, {~st.close});
2154                 ~st = StaticText(w, Rect(20+60*2+16+231,Window.screenBounds.height-88+(30/1.6180339887499*0), 80, 60)).background_(Color.black);
2155                 ~st.stringColor = Color.white;
2156                 ~st.string = "# of kws in halfcycle selected";
2157                 AppClock.sched(~gm,{~st.close;});
2158         });
2159
2160
2161         //pop-menu for timewave base (lowest) frequency
2162
2163         ~bfreqstart = ~basefreq;
2164         ~bfreq = PopUpMenu(w, Rect(20+60*2+16+86,Window.screenBounds.height-88+(30/1.6180339887499*0),140,60/1.6180339887499)).items_(~bfreqv = (-1); [~basefreq.asString++" hz"]++Array.fill(140, {~freqmap.at(~bfreqv=~bfreqv+1).asString})).background_(Color.black).stringColor_(Color.white).action_({arg button;
2165
2166                 if(~st != nil, {~st.close});
2167                 ~st = StaticText(w, Rect(20+60*2+16+231,Window.screenBounds.height-88+(30/1.6180339887499*0), 80, 40)).background_(Color.black);
2168                 ~st.stringColor = Color.white;
2169                 ~st.string = "basefreq selected";
2170                 AppClock.sched(~gm,{~st.close;});
2171         });
2172
2173
2174         //synthdef pop-up menu
2175
2176         ~gsinemenu = PopUpMenu(w, Rect(20+60*2+16,Window.screenBounds.height-52+(30/1.6180339887499*0),86,60/1.6180339887499)).items_(["psine1","psine2","psine3","hsine1","hsine2","hsine3","psineuf1","psineuf2","psineuf3","hsineuf1","hsineuf2","hsineuf3"]).background_(Color.black).stringColor_(Color.white).action_({arg button;
2177
2178                 if(~gsinemenu.value == 0,  {~kws_setting = 1; ~ratio_setting = "psine1"; ~low_pass_filter_on = 1; ~gs = 0;});
2179                 if(~gsinemenu.value == 1,  {~kws_setting = 2; ~ratio_setting = "psine2"; ~low_pass_filter_on = 1; ~gs = 1;});
2180                 if(~gsinemenu.value == 2,  {~kws_setting = 3; ~ratio_setting = "psine3"; ~low_pass_filter_on = 1; ~gs = 2;});
2181                 if(~gsinemenu.value == 3,  {~kws_setting = 1; ~ratio_setting = "hsine1"; ~low_pass_filter_on = 1; ~gs = 3;});
2182                 if(~gsinemenu.value == 4,  {~kws_setting = 2; ~ratio_setting = "hsine2"; ~low_pass_filter_on = 1; ~gs = 4;});
2183                 if(~gsinemenu.value == 5,  {~kws_setting = 3; ~ratio_setting = "hsine3"; ~low_pass_filter_on = 1; ~gs = 5;});
2184                 if(~gsinemenu.value == 6,  {~kws_setting = 1; ~ratio_setting = "psine1"; ~low_pass_filter_on = 0; ~gs = 6;});
2185                 if(~gsinemenu.value == 7,  {~kws_setting = 2; ~ratio_setting = "psine2"; ~low_pass_filter_on = 0; ~gs = 7;});
2186                 if(~gsinemenu.value == 8,  {~kws_setting = 3; ~ratio_setting = "psine3"; ~low_pass_filter_on = 0; ~gs = 8;});
2187                 if(~gsinemenu.value == 9,  {~kws_setting = 1; ~ratio_setting = "hsine1"; ~low_pass_filter_on = 0; ~gs = 9;});
2188                 if(~gsinemenu.value == 10, {~kws_setting = 2; ~ratio_setting = "hsine2"; ~low_pass_filter_on = 0; ~gs = 10;});
2189                 if(~gsinemenu.value == 11, {~kws_setting = 3; ~ratio_setting = "hsine3"; ~low_pass_filter_on = 0; ~gs = 11;});
2190
2191                 if(~st != nil, {~st.close});
2192                 ~st = StaticText(w, Rect(20+60*2+16+231,Window.screenBounds.height-88+(30/1.6180339887499*0), 80, 60)).background_(Color.black);
2193                 ~st.stringColor = Color.white;
2194                 ~st.string = "synthdef setting selected";
2195                 AppClock.sched(~gm,{~st.close;});
2196         });
2197
2198         if(~gs == nil, {~gs = 0;});
2199
2200         case
2201         {~gs == 0}{~gsinemenu.value = 0;}
2202         {~gs == 1}{~gsinemenu.value = 1;}
2203         {~gs == 2}{~gsinemenu.value = 2;}
2204         {~gs == 3}{~gsinemenu.value = 3;}
2205         {~gs == 4}{~gsinemenu.value = 4;}
2206         {~gs == 5}{~gsinemenu.value = 5;}
2207         {~gs == 0}{~gsinemenu.value = 6;}
2208         {~gs == 1}{~gsinemenu.value = 7;}
2209         {~gs == 2}{~gsinemenu.value = 8;}
2210         {~gs == 3}{~gsinemenu.value = 9;}
2211         {~gs == 4}{~gsinemenu.value = 10;}
2212         {~gs == 5}{~gsinemenu.value = 11;};
2213
2214
2215         //set low-pass filter frequency limit
2216
2217         if(~low_pass_filter_set_value == nil, {~low_pass_filter_set_value = ~low_pass_filter_freq_limit});
2218         if(~low_pass_filter_set_value != ~low_pass_filter_freq_limit, {~low_pass_filter_set_value = ~low_pass_filter_freq_limit});
2219
2220         ~low_pass_filter_textfield = TextField(w, Rect(20+60*2+16+86,Window.screenBounds.height-52+(30/1.6180339887499*0),80,60/1.6180339887499));
2221         ~low_pass_filter_textfield.string = ~low_pass_filter_set_value.asString;
2222         ~low_pass_filter_textfield.background_(Color.black);
2223         ~low_pass_filter_textfield.stringColor_(Color.white);
2224         ~low_pass_filter_textfield.action = {arg value; ~low_pass_filter_set_value = value;
2225
2226                 ~low_pass_filter_set_value = ~low_pass_filter_set_value.value;
2227
2228                 ~low_pass_filter_set_value = ~low_pass_filter_set_value.separate;
2229
2230                 ~low_pass_filter_set_value = ~low_pass_filter_set_value.reject{arg item;
2231                         (item != "1") and:
2232                         (item != "2") and:
2233                         (item != "3") and:
2234                         (item != "4") and:
2235                         (item != "5") and:
2236                         (item != "6") and:
2237                         (item != "7") and:
2238                         (item != "8") and:
2239                         (item != "9") and:
2240                         (item != "0") and:
2241                         (item != ".")
2242                 };
2243
2244                 ~low_pass_filter_set_value = ~low_pass_filter_set_value.join.asString.asFloat;
2245
2246                 ~low_pass_filter_textfield.string = ~low_pass_filter_set_value.asString;
2247
2248                 if(~low_pass_filter_set_value != 0, {
2249                         if(~st != nil, {~st.close});
2250                         ~st = StaticText(w, Rect(20+60*2+16+231,Window.screenBounds.height-88+(30/1.6180339887499*0), 80, 80)).background_(Color.black);
2251                         ~st.stringColor = Color.white;
2252                         ~st.string = "low-pass filter freq limit selected";
2253                         AppClock.sched(~gm,{~st.close;});
2254                 }, {~low_pass_filter_set_value = ~low_pass_filter_freq_limit; ~low_pass_filter_textfield.string = ~low_pass_filter_set_value.asString;});
2255         };
2256
2257
2258         //set button for number of KW sequences in a timewave half-cycle (or amplitude x2), basefreq, and gsine(evaluate synthdefs)
2259
2260         set1=Button(w,Rect(20+60*2+16+166, Window.screenBounds.height-52+(16/1.6180339887499*0),60,60/1.6180339887499)).states_([["set",Color.white,Color.black]]).mouseDownAction_({
2261
2262                 if(~st != nil, {~st.close});
2263                 ~st = StaticText(w, Rect(20+60*2+16+231,Window.screenBounds.height-40, 62, 20)).background_(Color.black);
2264                 ~st.stringColor = Color.white;
2265                 ~st.string = "loading...";
2266                 AppClock.sched(0.2,{
2267                         ~st.close;
2268                 });
2269
2270                 AppClock.sched(0,{
2271
2272                         if(~bfreq.value > 0, {~basefreq = ~freqmap.at(~bfreq.value - 1)}, {~basefreq = ~bfreqstart});
2273
2274                         (#a,b,c,d,e,f = [ ~basefreq,~basefreq,~basefreq,~basefreq,~basefreq,~basefreq  ]; ~a = a; ~b = b; ~c =c; ~d = d; ~e = e;~f=f;);
2275
2276                         ~low_pass_filter_freq_limit = ~low_pass_filter_set_value;
2277
2278
2279                         //set n1-n9 values
2280
2281                         case
2282                         {~ratio_setting == "psine1";}{~n_value1 = ~gm;    ~n_value2 = ~gm2;   ~n_value6 = ~gm6;}
2283                         {~ratio_setting == "psine2";}{~n_value1 = ~ngm1;  ~n_value2 = ~ngm2;  ~n_value6 = ~ngm6;}
2284                         {~ratio_setting == "psine3";}{~n_value1 = ~nngm1; ~n_value2 = ~nngm2; ~n_value6 = ~nngm6;}
2285                         {~ratio_setting == "hsine1";}{~n_value1 = ~h1;    ~n_value2 = ~h2;    ~n_value6 = ~h6;}
2286                         {~ratio_setting == "hsine2";}{~n_value1 = ~nh1;   ~n_value2 = ~nh2;   ~n_value6 = ~nh6;}
2287                         {~ratio_setting == "hsine3";}{~n_value1 = ~nnh1;  ~n_value2 = ~nnh2;  ~n_value6 = ~nnh6;};
2288
2289
2290                         //evaluate synthdefs(gsine)
2291
2292                         case
2293                         {menu2.value == 0}{~gsinenum = ~menu2synthdefstart; ~gsine.value;}
2294                         {menu2.value == 1}{~gsinenum = 1; ~gsine.value;}
2295                         {menu2.value == 2}{~gsinenum = 2; ~gsine.value;}
2296                         {menu2.value == 3}{~gsinenum = 3; ~gsine.value;}
2297                         {menu2.value == 4}{~gsinenum = 4; ~gsine.value;}
2298                         {menu2.value == 5}{~gsinenum = 5; ~gsine.value;}
2299                         {menu2.value == 6}{~gsinenum = 6; ~gsine.value;}
2300                         {menu2.value == 7}{~gsinenum = 7; ~gsine.value;}
2301                         {menu2.value == 8}{~gsinenum = 8; ~gsine.value;}
2302                         {menu2.value == 9}{~gsinenum = 9; ~gsine.value;}
2303                         {menu2.value == 10}{~gsinenum = 10; ~gsine.value;}
2304                         {menu2.value == 11}{~gsinenum = 11; ~gsine.value;}
2305                         {menu2.value == 12}{~gsinenum = 12; ~gsine.value;}
2306                         {menu2.value == 13}{~gsinenum = 13; ~gsine.value;}
2307                         {menu2.value == 14}{~gsinenum = 14; ~gsine.value;}
2308                         {menu2.value == 15}{~gsinenum = 15; ~gsine.value;}
2309                         {menu2.value == 16}{~gsinenum = 16; ~gsine.value;}
2310                         {menu2.value == 17}{~gsinenum = 17; ~gsine.value;}
2311                         {menu2.value == 18}{~gsinenum = 18; ~gsine.value;}
2312                         {menu2.value == 19}{~gsinenum = 19; ~gsine.value;}
2313                         {menu2.value == 20}{~gsinenum = 20; ~gsine.value;}
2314                         {menu2.value == 21}{~gsinenum = 21; ~gsine.value;}
2315                         {menu2.value == 22}{~gsinenum = 22; ~gsine.value;}
2316                         {menu2.value == 23}{~gsinenum = 23; ~gsine.value;}
2317                         {menu2.value == 24}{~gsinenum = 24; ~gsine.value;};
2318                 });
2319
2320         })
2321         .action_({
2322         });
2323
2324
2325         //open/flow/slide buttons coordinate values
2326
2327         ~bph = 26;
2328         ~bpw = 26/1.6180339887499;
2329         ~bpl = Window.screenBounds.width-(~bph*8)-20;
2330         ~bpt = Window.screenBounds.height-88;
2331
2332         ~bp01l = ~bpl;
2333         ~bp02l = ~bpl+(~bph*1);
2334         ~bp03l = ~bpl+(~bph*2);
2335         ~bp04l = ~bpl+(~bph*3);
2336         ~bp05l = ~bpl+(~bph*4);
2337         ~bp06l = ~bpl+(~bph*5);
2338         ~bp07l = ~bpl+(~bph*6);
2339         ~bp08l = ~bpl+(~bph*7);
2340         ~bpf1l = ~bpl;
2341         ~bpf2l = ~bpl+(~bph*1);
2342         ~bpf3l = ~bpl+(~bph*2);
2343         ~bpf4l = ~bpl+(~bph*3);
2344         ~bpf5l = ~bpl+(~bph*4);
2345         ~bpf6l = ~bpl+(~bph*5);
2346         ~bpf7l = ~bpl+(~bph*6);
2347         ~bpf8l = ~bpl+(~bph*7);
2348
2349         ~bp01t = ~bpt;
2350         ~bp02t = ~bpt;
2351         ~bp03t = ~bpt;
2352         ~bp04t = ~bpt;
2353         ~bp05t = ~bpt;
2354         ~bp06t = ~bpt;
2355         ~bp07t = ~bpt;
2356         ~bp08t = ~bpt;
2357         ~bpf1t = ~bpt+~bpw;
2358         ~bpf2t = ~bpt+~bpw;
2359         ~bpf3t = ~bpt+~bpw;
2360         ~bpf4t = ~bpt+~bpw;
2361         ~bpf5t = ~bpt+~bpw;
2362         ~bpf6t = ~bpt+~bpw;
2363         ~bpf7t = ~bpt+~bpw;
2364         ~bpf8t = ~bpt+~bpw;
2365
2366         ~bp01h = ~bph;
2367         ~bp02h = ~bph;
2368         ~bp03h = ~bph;
2369         ~bp04h = ~bph;
2370         ~bp05h = ~bph;
2371         ~bp06h = ~bph;
2372         ~bp07h = ~bph;
2373         ~bp08h = ~bph;
2374         ~bpf1h = ~bph;
2375         ~bpf2h = ~bph;
2376         ~bpf3h = ~bph;
2377         ~bpf4h = ~bph;
2378         ~bpf5h = ~bph;
2379         ~bpf6h = ~bph;
2380         ~bpf7h = ~bph;
2381         ~bpf8h = ~bph;
2382
2383         ~bp01w = ~bpw;
2384         ~bp02w = ~bpw;
2385         ~bp03w = ~bpw;
2386         ~bp04w = ~bpw;
2387         ~bp05w = ~bpw;
2388         ~bp06w = ~bpw;
2389         ~bp07w = ~bpw;
2390         ~bp08w = ~bpw;
2391         ~bpf1w = ~bpw;
2392         ~bpf2w = ~bpw;
2393         ~bpf3w = ~bpw;
2394         ~bpf4w = ~bpw;
2395         ~bpf5w = ~bpw;
2396         ~bpf6w = ~bpw;
2397         ~bpf7w = ~bpw;
2398         ~bpf8w = ~bpw;
2399
2400         ~tspw=280+210;
2401         ~tsph=280+210/~gm;
2402         ~tspl=Window.screenBounds.width-~tspw;
2403         ~tspt=~bpt-310;
2404
2405
2406         //synthopen 1-8 buttons
2407
2408         ~bplaceo1 = Button.new(w,Rect(~bp01l,~bp01t,~bp01h,~bp01w)).states_([["o1",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
2409
2410                 [~f1=fp1,~f2=fp2,~f3=fp3,~f4=fp4,~f5=fp5,~f6=fp6,~f7=fp7,~f8=fp8,~f9=fp9,~f10=fp10,~f11=fp11,~f12=fp12];
2411
2412                 ~synthopen.value;
2413                 ~currentsynth = "o1"; ~synthmonitorfunc.value;
2414
2415                 if(~ts.value == 1,
2416                         {if(~tst == nil, {nil}, {~tst.close;});
2417                                 ~timevals.value;
2418                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time1o = 0;
2419                                 ~timer = Routine({inf.do({
2420                                         ~time1o =
2421                                         ~time1o+0.01; ~slot = "o1_"+~time1o.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
2422                         {nil});
2423         });
2424
2425         ~bplaceo2 = Button.new(w,Rect(~bp02l,~bp02t,~bp02h,~bp02w)).states_([["o2",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
2426
2427                 [~f1=fp1b,~f2=fp2b,~f3=fp3b,~f4=fp4b,~f5=fp5b,~f6=fp6b,~f7=fp7b,~f8=fp8b,~f9=fp9b,~f10=fp10b,~f11=fp11b,~f12=fp12b];
2428
2429                 ~synthopen.value;
2430                 ~currentsynth = "o2"; ~synthmonitorfunc.value;
2431
2432                 if(~ts.value == 1,
2433                         {if(~tst == nil, {nil}, {~tst.close;});
2434                                 ~timevals.value;
2435                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time2o = 0;
2436                                 ~timer = Routine({inf.do({
2437                                         ~time2o =
2438                                         ~time2o+0.01; ~slot = "o2_"+~time2o.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
2439                         {nil});
2440         });
2441         ~bplaceo3 = Button.new(w,Rect(~bp03l,~bp03t,~bp03h,~bp03w)).states_([["o3",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
2442
2443                 [~f1=fp1c,~f2=fp2c,~f3=fp3c,~f4=fp4c,~f5=fp5c,~f6=fp6c,~f7=fp7c,~f8=fp8c,~f9=fp9c,~f10=fp10c,~f11=fp11c,~f12=fp12c];
2444
2445                 ~synthopen.value;
2446                 ~currentsynth = "o3"; ~synthmonitorfunc.value;
2447
2448                 if(~ts.value == 1,
2449                         {if(~tst == nil, {nil}, {~tst.close;});
2450                                 ~timevals.value;
2451                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time3o = 0;
2452                                 ~timer = Routine({inf.do({
2453                                         ~time3o =
2454                                         ~time3o+0.01; ~slot = "o3_"+~time3o.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
2455                         {nil});
2456         });
2457         ~bplaceo4 = Button.new(w,Rect(~bp04l,~bp04t,~bp04h,~bp04w)).states_([["o4",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
2458
2459                 [~f1=fp1d,~f2=fp2d,~f3=fp3d,~f4=fp4d,~f5=fp5d,~f6=fp6d,~f7=fp7d,~f8=fp8d,~f9=fp9d,~f10=fp10d,~f11=fp11d,~f12=fp12d];
2460
2461                 ~synthopen.value;
2462                 ~currentsynth = "o4"; ~synthmonitorfunc.value;
2463
2464                 if(~ts.value == 1,
2465                         {if(~tst == nil, {nil}, {~tst.close;});
2466                                 ~timevals.value;
2467                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time4o = 0;
2468                                 ~timer = Routine({inf.do({
2469                                         ~time4o =
2470                                         ~time4o+0.01; ~slot = "o4_"+~time4o.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
2471                         {nil});
2472
2473         });
2474
2475         ~bplaceo5 = Button.new(w,Rect(~bp05l,~bp05t,~bp05h,~bp05w)).states_([["o5",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
2476
2477                 [~f1=fp1e,~f2=fp2e,~f3=fp3e,~f4=fp4e,~f5=fp5e,~f6=fp6e,~f7=fp7e,~f8=fp8e,~f9=fp9e,~f10=fp10e,~f11=fp11e,~f12=fp12e];
2478
2479                 ~synthopen.value;
2480                 ~currentsynth = "o5"; ~synthmonitorfunc.value;
2481
2482                 if(~ts.value == 1,
2483                         {if(~tst == nil, {nil}, {~tst.close;});
2484                                 ~timevals.value;
2485                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time5o = 0;
2486                                 ~timer = Routine({inf.do({
2487                                         ~time5o =
2488                                         ~time5o+0.01; ~slot = "o5_"+~time5o.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
2489                         {nil});
2490
2491         });
2492         ~bplaceo6 = Button.new(w,Rect(~bp06l,~bp06t,~bp06h,~bp06w)).states_([["o6",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
2493
2494                 [~f1=fp1f,~f2=fp2f,~f3=fp3f,~f4=fp4f,~f5=fp5f,~f6=fp6f,~f7=fp7f,~f8=fp8f,~f9=fp9f,~f10=fp10f,~f11=fp11f,~f12=fp12f];
2495
2496                 ~synthopen.value;
2497                 ~currentsynth = "o6"; ~synthmonitorfunc.value;
2498
2499                 if(~ts.value == 1,
2500                         {if(~tst == nil, {nil}, {~tst.close;});
2501                                 ~timevals.value;
2502                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time6o = 0;
2503                                 ~timer = Routine({inf.do({
2504                                         ~time6o =
2505                                         ~time6o+0.01; ~slot = "o6_"+~time6o.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
2506                         {nil});
2507         });
2508         ~bplaceo7 = Button.new(w,Rect(~bp07l,~bp07t,~bp07h,~bp07w)).states_([["o7",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
2509
2510                 [~f1=fp1g,~f2=fp2g,~f3=fp3g,~f4=fp4g,~f5=fp5g,~f6=fp6g,~f7=fp7g,~f8=fp8g,~f9=fp9g,~f10=fp10g,~f11=fp11g,~f12=fp12g];
2511
2512                 ~synthopen.value;
2513                 ~currentsynth = "o7"; ~synthmonitorfunc.value;
2514
2515                 if(~ts.value == 1,
2516                         {if(~tst == nil, {nil}, {~tst.close;});
2517                                 ~timevals.value;
2518                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time7o = 0;
2519                                 ~timer = Routine({inf.do({
2520                                         ~time7o =
2521                                         ~time7o+0.01; ~slot = "o7_"+~time7o.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
2522                         {nil});
2523         });
2524         ~bplaceo8 = Button.new(w,Rect(~bp08l,~bp08t,~bp08h,~bp08w)).states_([["o8",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
2525
2526                 [~f1=fp1h,~f2=fp2h,~f3=fp3h,~f4=fp4h,~f5=fp5h,~f6=fp6h,~f7=fp7h,~f8=fp8h,~f9=fp9h,~f10=fp10h,~f11=fp11h,~f12=fp12h];
2527
2528                 ~synthopen.value;
2529                 ~currentsynth = "o8"; ~synthmonitorfunc.value;
2530
2531                 if(~ts.value == 1,
2532                         {if(~tst == nil, {nil}, {~tst.close;});
2533                                 ~timevals.value;
2534                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time8o = 0;
2535                                 ~timer = Routine({inf.do({
2536                                         ~time8o =
2537                                         ~time8o+0.01; ~slot = "o8_"+~time8o.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
2538                         {nil});
2539         });
2540
2541
2542         //synthflow 1-8 buttons
2543
2544         ~bplacef1 = Button.new(w,Rect(~bpf1l,~bpf1t,~bpf1h,~bpf1w)).states_([["f1",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
2545
2546                 [~f1=fp1,~f2=fp2,~f3=fp3,~f4=fp4,~f5=fp5,~f6=fp6,~f7=fp7,~f8=fp8,~f9=fp9,~f10=fp10,~f11=fp11,~f12=fp12];
2547
2548                 ~synthflow.value;
2549                 ~currentsynth = "f1"; ~synthmonitorfunc.value;
2550
2551                 if(~ts.value == 1,
2552                         {if(~tst == nil, {nil}, {~tst.close;});
2553                                 ~timevals.value;
2554                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time1f = 0;
2555                                 ~timer = Routine({inf.do({
2556                                         ~time1f =
2557                                         ~time1f+0.01; ~slot = "f1_"+~time1f.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
2558                         {nil});
2559         });
2560         ~bplacef2 = Button.new(w,Rect(~bpf2l,~bpf2t,~bpf2h,~bpf2w)).states_([["f2",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
2561
2562                 [~f1=fp1b,~f2=fp2b,~f3=fp3b,~f4=fp4b,~f5=fp5b,~f6=fp6b,~f7=fp7b,~f8=fp8b,~f9=fp9b,~f10=fp10b,~f11=fp11b,~f12=fp12b];
2563
2564                 ~synthflow.value;
2565                 ~currentsynth = "f2"; ~synthmonitorfunc.value;
2566
2567                 if(~ts.value == 1,
2568                         {if(~tst == nil, {nil}, {~tst.close;});
2569                                 ~timevals.value;
2570                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time2f = 0;
2571                                 ~timer = Routine({inf.do({
2572                                         ~time2f =
2573                                         ~time2f+0.01; ~slot = "f2_"+~time2f.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
2574                         {nil});
2575         });
2576
2577         ~bplacef3 = Button.new(w,Rect(~bpf3l,~bpf3t,~bpf3h,~bpf3w)).states_([["f3",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
2578
2579                 [~f1=fp1c,~f2=fp2c,~f3=fp3c,~f4=fp4c,~f5=fp5c,~f6=fp6c,~f7=fp7c,~f8=fp8c,~f9=fp9c,~f10=fp10c,~f11=fp11c,~f12=fp12c];
2580
2581                 ~synthflow.value;
2582                 ~currentsynth = "f3"; ~synthmonitorfunc.value;
2583
2584                 if(~ts.value == 1,
2585                         {if(~tst == nil, {nil}, {~tst.close;});
2586                                 ~timevals.value;
2587                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time3f = 0;
2588                                 ~timer = Routine({inf.do({
2589                                         ~time3f =
2590                                         ~time3f+0.01; ~slot = "f3_"+~time3f.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
2591                         {nil});
2592         });
2593         ~bplacef4 = Button.new(w,Rect(~bpf4l,~bpf4t,~bpf4h,~bpf4w)).states_([["f4",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
2594
2595                 [~f1=fp1d,~f2=fp2d,~f3=fp3d,~f4=fp4d,~f5=fp5d,~f6=fp6d,~f7=fp7d,~f8=fp8d,~f9=fp9d,~f10=fp10d,~f11=fp11d,~f12=fp12d];
2596
2597                 ~synthflow.value;
2598                 ~currentsynth = "f4"; ~synthmonitorfunc.value;
2599
2600                 if(~ts.value == 1,
2601                         {if(~tst == nil, {nil}, {~tst.close;});
2602                                 ~timevals.value;
2603                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time4f = 0;
2604                                 ~timer = Routine({inf.do({
2605                                         ~time4f =
2606                                         ~time4f+0.01; ~slot = "f4_"+~time4f.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
2607                         {nil});
2608         });
2609
2610         ~bplacef5 = Button.new(w,Rect(~bpf5l,~bpf5t,~bpf5h,~bpf5w)).states_([["f5",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
2611
2612                 [~f1=fp1e,~f2=fp2e,~f3=fp3e,~f4=fp4e,~f5=fp5e,~f6=fp6e,~f7=fp7e,~f8=fp8e,~f9=fp9e,~f10=fp10e,~f11=fp11e,~f12=fp12e];
2613
2614                 ~synthflow.value;
2615                 ~currentsynth = "f5"; ~synthmonitorfunc.value;
2616
2617                 if(~ts.value == 1,
2618                         {if(~tst == nil, {nil}, {~tst.close;});
2619                                 ~timevals.value;
2620                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time5f = 0;
2621                                 ~timer = Routine({inf.do({
2622                                         ~time5f =
2623                                         ~time5f+0.01; ~slot = "f5_"+~time5f.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
2624                         {nil});
2625         });
2626
2627         ~bplacef6 = Button.new(w,Rect(~bpf6l,~bpf6t,~bpf6h,~bpf6w)).states_([["f6",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
2628
2629                 [~f1=fp1f,~f2=fp2f,~f3=fp3f,~f4=fp4f,~f5=fp5f,~f6=fp6f,~f7=fp7f,~f8=fp8f,~f9=fp9f,~f10=fp10f,~f11=fp11f,~f12=fp12f];
2630
2631                 ~synthflow.value;
2632                 ~currentsynth = "f6"; ~synthmonitorfunc.value;
2633
2634                 if(~ts.value == 1,
2635                         {if(~tst == nil, {nil}, {~tst.close;});
2636                                 ~timevals.value;
2637                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time6f = 0;
2638                                 ~timer = Routine({inf.do({
2639                                         ~time6f =
2640                                         ~time6f+0.01; ~slot = "f6_"+~time6f.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
2641                         {nil});
2642         });
2643
2644
2645         ~bplacef7 = Button.new(w,Rect(~bpf7l,~bpf7t,~bpf7h,~bpf7w)).states_([["f7",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
2646
2647                 [~f1=fp1g,~f2=fp2g,~f3=fp3g,~f4=fp4g,~f5=fp5g,~f6=fp6g,~f7=fp7g,~f8=fp8g,~f9=fp9g,~f10=fp10g,~f11=fp11g,~f12=fp12g];
2648
2649                 ~synthflow.value;
2650                 ~currentsynth = "f7"; ~synthmonitorfunc.value;
2651
2652                 if(~ts.value == 1,
2653                         {if(~tst == nil, {nil}, {~tst.close;});
2654                                 ~timevals.value;
2655                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time7f = 0;
2656                                 ~timer = Routine({inf.do({
2657                                         ~time7f =
2658                                         ~time7f+0.01; ~slot = "f7_"+~time7f.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
2659                         {nil});
2660         });
2661         ~bplacef8 = Button.new(w,Rect(~bpf8l,~bpf8t,~bpf8h,~bpf8w)).states_([["f8",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
2662
2663                 [~f1=fp1h,~f2=fp2h,~f3=fp3h,~f4=fp4h,~f5=fp5h,~f6=fp6h,~f7=fp7h,~f8=fp8h,~f9=fp9h,~f10=fp10h,~f11=fp11h,~f12=fp12h];
2664
2665                 ~synthflow.value;
2666                 ~currentsynth = "f8"; ~synthmonitorfunc.value;
2667
2668                 if(~ts.value == 1,
2669                         {if(~tst == nil, {nil}, {~tst.close;});
2670                                 ~timevals.value;
2671                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time8f = 0;
2672                                 ~timer = Routine({inf.do({
2673                                         ~time8f =
2674                                         ~time8f+0.01; ~slot = "f8_"+~time8f.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
2675                         {nil});
2676         });
2677
2678
2679         //synthslide 1-8 buttons
2680
2681         ~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;
2682
2683                 if(~slidetime1 == nil, {~slidetime1 = 4}); if(~slidedo1 == nil, {~slidedo1 = 2000;}); ~slidecount = ~slidedo1;
2684                 #g,h,i,j,k,l,m,n,o,p,q,r = (([ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ]-
2685                         [ fp1,fp2,fp3,fp4,fp5,fp6,fp7,fp8,fp9,fp10,fp11,fp12 ])*(-1)/~slidedo1);
2686
2687                 ~slidetime =~slidetime1; ~slidedo = ~slidedo1;
2688
2689                 ~slideroutine.stop;
2690
2691                 ~synthslide.value;
2692                 ~currentsynth = "s1"; ~synthmonitorfunc.value;
2693
2694                 if(~ts.value == 1,
2695                         {if(~tst == nil, {nil}, {~tst.close;});
2696                                 ~timevals.value;
2697                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time1s = 0;
2698                                 ~timer = Routine({inf.do({
2699                                         ~time1s =
2700                                         ~time1s+0.01; ~slot = "s1_"+~time1s.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
2701                         {nil});
2702
2703         });
2704         ~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;
2705
2706                 if(~slidetime2 == nil, {~slidetime2 = 4}); if(~slidedo2 == nil, {~slidedo2 = 2000;}); ~slidecount = ~slidedo2;
2707                 #g,h,i,j,k,l,m,n,o,p,q,r = (([ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ]-
2708                         [ fp1b,fp2b,fp3b,fp4b,fp5b,fp6b,fp7b,fp8b,fp9b,fp10b,fp11b,fp12b ])*(-1)/~slidedo2);
2709
2710                 ~slidetime = ~slidetime2; ~slidedo = ~slidedo2;
2711
2712                 ~slideroutine.stop;
2713
2714                 ~synthslide.value;
2715                 ~currentsynth = "s2"; ~synthmonitorfunc.value;
2716
2717                 if(~ts.value == 1,
2718                         {if(~tst == nil, {nil}, {~tst.close;});
2719                                 ~timevals.value;
2720                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time2s = 0;
2721                                 ~timer = Routine({inf.do({
2722                                         ~time2s =
2723                                         ~time2s+0.01; ~slot = "s2_"+~time2s.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
2724                         {nil});
2725
2726         });
2727         ~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;
2728
2729                 if(~slidetime3 == nil, {~slidetime3 = 4}); if(~slidedo3 == nil, {~slidedo3 = 2000;}); ~slidecount = ~slidedo3;
2730                 #g,h,i,j,k,l,m,n,o,p,q,r = (([ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ]-
2731                         [ fp1c,fp2c,fp3c,fp4c,fp5c,fp6c,fp7c,fp8c,fp9c,fp10c,fp11c,fp12c ])*(-1)/~slidedo3);
2732
2733                 ~slidetime = ~slidetime3; ~slidedo = ~slidedo3;
2734
2735                 ~slideroutine.stop;
2736
2737                 ~synthslide.value;
2738                 ~currentsynth = "s3"; ~synthmonitorfunc.value;
2739
2740                 if(~ts.value == 1,
2741                         {if(~tst == nil, {nil}, {~tst.close;});
2742                                 ~timevals.value;
2743                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time3s = 0;
2744                                 ~timer = Routine({inf.do({
2745                                         ~time3s =
2746                                         ~time3s+0.01; ~slot = "s3_"+~time3s.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
2747                         {nil});
2748
2749         });
2750         ~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;
2751
2752                 if(~slidetime4 == nil, {~slidetime4 = 4}); if(~slidedo4 == nil, {~slidedo4 = 2000;}); ~slidecount = ~slidedo4;
2753                 #g,h,i,j,k,l,m,n,o,p,q,r = (([ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ]-
2754                         [ fp1d,fp2d,fp3d,fp4d,fp5d,fp6d,fp7d,fp8d,fp9d,fp10d,fp11d,fp12d ])*(-1)/~slidedo4);
2755
2756                 ~slidetime = ~slidetime4; ~slidedo = ~slidedo4;
2757
2758                 ~slideroutine.stop;
2759
2760                 ~synthslide.value;
2761                 ~currentsynth = "s4"; ~synthmonitorfunc.value;
2762
2763                 if(~ts.value == 1,
2764                         {if(~tst == nil, {nil}, {~tst.close;});
2765                                 ~timevals.value;
2766                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time4s = 0;
2767                                 ~timer = Routine({inf.do({
2768                                         ~time4s =
2769                                         ~time4s+0.01; ~slot = "s4_"+~time4s.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
2770                         {nil});
2771         });
2772         ~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;
2773
2774                 if(~slidetime5 == nil, {~slidetime5 = 4}); if(~slidedo5 == nil, {~slidedo5 = 2000;}); ~slidecount = ~slidedo5;
2775                 #g,h,i,j,k,l,m,n,o,p,q,r = (([ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ]-
2776                         [ fp1e,fp2e,fp3e,fp4e,fp5e,fp6e,fp7e,fp8e,fp9e,fp10e,fp11e,fp12e ])*(-1)/~slidedo5);
2777
2778                 ~slidetime = ~slidetime5; ~slidedo = ~slidedo5;
2779
2780                 ~slideroutine.stop;
2781
2782                 ~synthslide.value;
2783                 ~currentsynth = "s5"; ~synthmonitorfunc.value;
2784
2785                 if(~ts.value == 1,
2786                         {if(~tst == nil, {nil}, {~tst.close;});
2787                                 ~timevals.value;
2788                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time5s = 0;
2789                                 ~timer = Routine({inf.do({
2790                                         ~time5s =
2791                                         ~time5s+0.01; ~slot = "s5_"+~time5s.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
2792                         {nil});
2793
2794         });
2795         ~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;
2796
2797                 if(~slidetime6 == nil, {~slidetime6 = 4}); if(~slidedo6 == nil, {~slidedo6 = 2000;}); ~slidecount = ~slidedo6;
2798                 #g,h,i,j,k,l,m,n,o,p,q,r = (([ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ]-
2799                         [ fp1f,fp2f,fp3f,fp4f,fp5f,fp6f,fp7f,fp8f,fp9f,fp10f,fp11f,fp12f ])*(-1)/~slidedo6);
2800
2801                 ~slidetime = ~slidetime6; ~slidedo = ~slidedo6;
2802                 ~slideroutine.stop;
2803
2804                 ~synthslide.value;
2805                 ~currentsynth = "s6"; ~synthmonitorfunc.value;
2806
2807                 if(~ts.value == 1,
2808                         {if(~tst == nil, {nil}, {~tst.close;});
2809                                 ~timevals.value;
2810                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time6s = 0;
2811                                 ~timer = Routine({inf.do({
2812                                         ~time6s =
2813                                         ~time6s+0.01; ~slot = "s6_"+~time6s.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
2814                         {nil});
2815
2816         });
2817         ~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;
2818
2819                 if(~slidetime7 == nil, {~slidetime7 = 4}); if(~slidedo7 == nil, {~slidedo7 = 2000;}); ~slidecount = ~slidedo7;
2820                 #g,h,i,j,k,l,m,n,o,p,q,r = (([ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ]-
2821                         [ fp1g,fp2g,fp3g,fp4g,fp5g,fp6g,fp7g,fp8g,fp9g,fp10g,fp11g,fp12g ])*(-1)/~slidedo7);
2822
2823                 ~slidetime = ~slidetime7; ~slidedo = ~slidedo7;
2824                 ~slideroutine.stop;
2825
2826                 ~synthslide.value;
2827                 ~currentsynth = "s7"; ~synthmonitorfunc.value;
2828
2829                 if(~ts.value == 1,
2830                         {if(~tst == nil, {nil}, {~tst.close;});
2831                                 ~timevals.value;
2832                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time7s = 0;
2833                                 ~timer = Routine({inf.do({
2834                                         ~time7s =
2835                                         ~time7s+0.01; ~slot = "s7_"+~time7s.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
2836                         {nil});
2837
2838         });
2839         ~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;
2840
2841                 if(~slidetime8 == nil, {~slidetime8 = 4}); if(~slidedo8 == nil, {~slidedo8 = 2000;}); ~slidecount = ~slidedo8;
2842                 #g,h,i,j,k,l,m,n,o,p,q,r = (([ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ]-
2843                         [ fp1h,fp2h,fp3h,fp4h,fp5h,fp6h,fp7h,fp8h,fp9h,fp10h,fp11h,fp12h ])*(-1)/~slidedo8);
2844
2845                 ~slidetime = ~slidetime8; ~slidedo = ~slidedo8;
2846
2847                 ~slideroutine.stop;
2848
2849                 ~synthslide.value;
2850                 ~currentsynth = "s8"; ~synthmonitorfunc.value;
2851
2852                 if(~ts.value == 1,
2853                         {if(~tst == nil, {nil}, {~tst.close;});
2854                                 ~timevals.value;
2855                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time8s = 0;
2856                                 ~timer = Routine({inf.do({
2857                                         ~time8s =
2858                                         ~time8s+0.01; ~slot = "s8_"+~time8s.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
2859                         {nil});
2860         });
2861
2862
2863         //if slidetime/slidedo is nil
2864
2865         if(~slidetimeall == nil, {~slidetimeall = 1});
2866         if(~slidetime1 == nil, {~slidetime1 = 1});
2867         if(~slidetime2 == nil, {~slidetime2 = 1});
2868         if(~slidetime3 == nil, {~slidetime3 = 1});
2869         if(~slidetime4 == nil, {~slidetime4 = 1});
2870         if(~slidetime5 == nil, {~slidetime5 = 1});
2871         if(~slidetime6 == nil, {~slidetime6 = 1});
2872         if(~slidetime7 == nil, {~slidetime7 = 1});
2873         if(~slidetime8 == nil, {~slidetime8 = 1});
2874
2875         if(~slidedoall == nil, {~slidedoall = 432});
2876         if(~slidedo1 == nil, {~slidedo1 = 432});
2877         if(~slidedo2 == nil, {~slidedo2 = 432});
2878         if(~slidedo3 == nil, {~slidedo3 = 432});
2879         if(~slidedo4 == nil, {~slidedo4 = 432});
2880         if(~slidedo5 == nil, {~slidedo5 = 432});
2881         if(~slidedo6 == nil, {~slidedo6 = 432});
2882         if(~slidedo7 == nil, {~slidedo7 = 432});
2883         if(~slidedo8 == nil, {~slidedo8 = 432});
2884
2885
2886         //set slide values button
2887
2888         ~slidevals = Button.new(w,Rect(Window.screenBounds.width-20-20-20,~bpt+69+5,20,20/1.6180339887499)).states_([["s",Color.white,Color.black],["s",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
2889
2890                 if(button.value == 1, {
2891                         ({
2892                                 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;
2893                                 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;
2894                                 ~slideview = View(w, Rect(Window.screenBounds.width-(340+46),Window.screenBounds.height-(340+46/1.6180339887499)-110,340+46,340+46/1.6180339887499)).front;
2895                                 /*w.view.decorator=FlowLayout(w.view.bounds);
2896                                 w.view.decorator.gap=2@2;*/
2897
2898                                 tall = StaticText(~slideview, Rect(lefttime , top=top, width, height)).background_(Color.black).string_("all time").stringColor_(Color.white);
2899                                 t1 = StaticText(~slideview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("s1 time").stringColor_(Color.white);
2900                                 t2 = StaticText(~slideview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("s2 time").stringColor_(Color.white);
2901                                 t3 = StaticText(~slideview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("s3 time").stringColor_(Color.white);
2902                                 t4 = StaticText(~slideview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("s4 time").stringColor_(Color.white);
2903                                 t5 = StaticText(~slideview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("s5 time").stringColor_(Color.white);
2904                                 t6 = StaticText(~slideview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("s6 time").stringColor_(Color.white);
2905                                 t7 = StaticText(~slideview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("s7 time").stringColor_(Color.white);
2906                                 t8 = StaticText(~slideview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("s8 time").stringColor_(Color.white);
2907
2908                                 top = 0;
2909
2910                                 stall=NumberBox(~slideview, Rect(lefttimebox , top=top, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~slidetimeall);
2911                                 st1=NumberBox(~slideview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~slidetime1);
2912                                 st2=NumberBox(~slideview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~slidetime2);
2913                                 st3=NumberBox(~slideview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~slidetime3);
2914                                 st4=NumberBox(~slideview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~slidetime4);
2915                                 st5=NumberBox(~slideview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~slidetime5);
2916                                 st6=NumberBox(~slideview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~slidetime6);
2917                                 st7=NumberBox(~slideview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~slidetime7);
2918                                 st8=NumberBox(~slideview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~slidetime8);
2919
2920                                 top = 0;
2921
2922                                 iall = StaticText(~slideview, Rect(leftdo , top=top, width, height)).background_(Color.black).string_("all incr").stringColor_(Color.white);
2923                                 i1 = StaticText(~slideview, Rect(leftdo , top=top+height, width, height)).background_(Color.black).string_("s1 incr").stringColor_(Color.white);
2924                                 i2 = StaticText(~slideview, Rect(leftdo , top=top+height, width, height)).background_(Color.black).string_("s2 incr").stringColor_(Color.white);
2925                                 i3 = StaticText(~slideview, Rect(leftdo , top=top+height, width, height)).background_(Color.black).string_("s3 incr").stringColor_(Color.white);
2926                                 i4 = StaticText(~slideview, Rect(leftdo , top=top+height, width, height)).background_(Color.black).string_("s4 incr").stringColor_(Color.white);
2927                                 i5 = StaticText(~slideview, Rect(leftdo , top=top+height, width, height)).background_(Color.black).string_("s5 incr").stringColor_(Color.white);
2928                                 i6 = StaticText(~slideview, Rect(leftdo , top=top+height, width, height)).background_(Color.black).string_("s6 incr").stringColor_(Color.white);
2929                                 i7 = StaticText(~slideview, Rect(leftdo , top=top+height, width, height)).background_(Color.black).string_("s7 incr").stringColor_(Color.white);
2930                                 i8 = StaticText(~slideview, Rect(leftdo , top=top+height, width, height)).background_(Color.black).string_("s8 incr").stringColor_(Color.white);
2931
2932                                 top = 0;
2933
2934                                 siall=NumberBox(~slideview, Rect(leftdobox , top=top, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~slidedoall);
2935                                 si1=NumberBox(~slideview, Rect(leftdobox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~slidedo1);
2936                                 si2=NumberBox(~slideview, Rect(leftdobox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~slidedo2);
2937                                 si3=NumberBox(~slideview, Rect(leftdobox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~slidedo3);
2938                                 si4=NumberBox(~slideview, Rect(leftdobox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~slidedo4);
2939                                 si5=NumberBox(~slideview, Rect(leftdobox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~slidedo5);
2940                                 si6=NumberBox(~slideview, Rect(leftdobox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~slidedo6);
2941                                 si7=NumberBox(~slideview, Rect(leftdobox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~slidedo7);
2942                                 si8=NumberBox(~slideview, Rect(leftdobox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~slidedo8);
2943
2944                                 stall.action_({arg val;
2945                                         ~slidetimeall = val.value;
2946                                         ~slidetime1 = val.value;
2947                                         ~slidetime2 = val.value;
2948                                         ~slidetime3 = val.value;
2949                                         ~slidetime4 = val.value;
2950                                         ~slidetime5 = val.value;
2951                                         ~slidetime6 = val.value;
2952                                         ~slidetime7 = val.value;
2953                                         ~slidetime8 = val.value;
2954                                         ~slideview.close; ~slidevals.valueAction_(1);
2955                                 });
2956                                 st1.action_({arg val; ~slidetime1 = val.value;});
2957                                 st2.action_({arg val; ~slidetime2 = val.value;});
2958                                 st3.action_({arg val; ~slidetime3 = val.value;});
2959                                 st4.action_({arg val; ~slidetime4 = val.value;});
2960                                 st5.action_({arg val; ~slidetime5 = val.value;});
2961                                 st6.action_({arg val; ~slidetime6 = val.value;});
2962                                 st7.action_({arg val; ~slidetime7 = val.value;});
2963                                 st8.action_({arg val; ~slidetime8 = val.value;});
2964
2965                                 siall.action_({arg val;
2966                                         ~slidedoall = val.value;
2967                                         ~slidedo1 = val.value;
2968                                         ~slidedo2 = val.value;
2969                                         ~slidedo3 = val.value;
2970                                         ~slidedo4 = val.value;
2971                                         ~slidedo5 = val.value;
2972                                         ~slidedo6 = val.value;
2973                                         ~slidedo7 = val.value;
2974                                         ~slidedo8 = val.value;
2975                                         ~slideview.close; ~slidevals.valueAction_(1);
2976                                 });
2977                                 si1.action_({arg val; ~slidedo1 = val.value;});
2978                                 si2.action_({arg val; ~slidedo2 = val.value;});
2979                                 si3.action_({arg val; ~slidedo3 = val.value;});
2980                                 si4.action_({arg val; ~slidedo4 = val.value;});
2981                                 si5.action_({arg val; ~slidedo5 = val.value;});
2982                                 si6.action_({arg val; ~slidedo6 = val.value;});
2983                                 si7.action_({arg val; ~slidedo7 = val.value;});
2984                                 si8.action_({arg val; ~slidedo8 = val.value;});
2985
2986                                 ~slideview.background_(Color.black);
2987
2988                                 ~closeslidebutton = Button.new(~slideview,Rect(220, top+40, 40, 40/~gm)).states_([["close",Color.white,Color.black]]).action_({arg button;
2989
2990                                         ~slideview.close; ~slidevals.value = 0;
2991                                 });
2992
2993                         }.value);
2994
2995                         ~slideview.front;
2996                 }, {~slideview.close});
2997         });
2998
2999
3000         //mute/unmute 1-8 buttons
3001
3002         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;
3003                 case
3004                 {~l1a1.isRunning == true}{
3005                         if(button.value == 0, {
3006                                 (~vol1 = ~vol;
3007                                         1.do({
3008                                                 ~l1a1.set(\vol, ~vol1);  ~l1b1.set(\vol, ~vol1);
3009                                                 ~l1c1.set(\vol, ~vol1);  ~l1d1.set(\vol, ~vol1);
3010                                                 ~l1e1.set(\vol, ~vol1);  ~l1f1.set(\vol, ~vol1);
3011
3012                                 }););
3013                                 }, {(~vol1 = 0;
3014                                         1.do({
3015                                                 ~l1a1.set(\vol, ~vol1);  ~l1b1.set(\vol, ~vol1);
3016                                                 ~l1c1.set(\vol, ~vol1);  ~l1d1.set(\vol, ~vol1);
3017                                                 ~l1e1.set(\vol, ~vol1);  ~l1f1.set(\vol, ~vol1);
3018
3019                                         }););
3020                         });
3021                 }
3022                 {~l1a.isRunning == true}{
3023                         if(button.value == 0, {
3024                                 (~vol1 = ~vol;
3025                                         1.do({
3026                                                 ~l1a.set(\vol, ~vol1);  ~l1b.set(\vol, ~vol1);
3027                                                 ~l1c.set(\vol, ~vol1);  ~l1d.set(\vol, ~vol1);
3028                                                 ~l1e.set(\vol, ~vol1);  ~l1f.set(\vol, ~vol1);
3029
3030                                 }););
3031                                 }, {(~vol1 = 0;
3032                                         1.do({
3033                                                 ~l1a.set(\vol, ~vol1);  ~l1b.set(\vol, ~vol1);
3034                                                 ~l1c.set(\vol, ~vol1);  ~l1d.set(\vol, ~vol1);
3035                                                 ~l1e.set(\vol, ~vol1);  ~l1f.set(\vol, ~vol1);
3036
3037                                         }););
3038                         });
3039                 };
3040         });
3041
3042         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;
3043                 case
3044                 {~l1a1.isRunning == true}{
3045                         if(button.value == 0, {
3046                                 (~vol2 = ~vol;
3047                                         1.do({
3048                                                 ~l2a1.set(\vol, ~vol2);  ~l2b1.set(\vol, ~vol2);
3049                                                 ~l2c1.set(\vol, ~vol2);  ~l2d1.set(\vol, ~vol2);
3050                                                 ~l2e1.set(\vol, ~vol2);  ~l2f1.set(\vol, ~vol2);
3051
3052                                 }););
3053                                 }, {(~vol2 = 0;
3054                                         1.do({
3055                                                 ~l2a1.set(\vol, ~vol2);  ~l2b1.set(\vol, ~vol2);
3056                                                 ~l2c1.set(\vol, ~vol2);  ~l2d1.set(\vol, ~vol2);
3057                                                 ~l2e1.set(\vol, ~vol2);  ~l2f1.set(\vol, ~vol2);
3058
3059                                         }););
3060                         });
3061                 }
3062                 {~l1a.isRunning == true}{
3063                         if(button.value == 0, {
3064                                 (~vol2 = ~vol;
3065                                         1.do({
3066                                                 ~l2a.set(\vol, ~vol2);  ~l2b.set(\vol, ~vol2);
3067                                                 ~l2c.set(\vol, ~vol2);  ~l2d.set(\vol, ~vol2);
3068                                                 ~l2e.set(\vol, ~vol2);  ~l2f.set(\vol, ~vol2);
3069
3070                                 }););
3071                                 }, {(~vol2 = 0;
3072                                         1.do({
3073                                                 ~l2a.set(\vol, ~vol2);  ~l2b.set(\vol, ~vol2);
3074                                                 ~l2c.set(\vol, ~vol2);  ~l2d.set(\vol, ~vol2);
3075                                                 ~l2e.set(\vol, ~vol2);  ~l2f.set(\vol, ~vol2);
3076
3077                                         }););
3078                         });
3079                 };
3080         });
3081         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;
3082                 case
3083                 {~l1a1.isRunning == true}{
3084                         if(button.value == 0, {
3085                                 (~vol3 = ~vol;
3086                                         1.do({
3087                                                 ~l3a1.set(\vol, ~vol3);  ~l3b1.set(\vol, ~vol3);
3088                                                 ~l3c1.set(\vol, ~vol3);  ~l3d1.set(\vol, ~vol3);
3089                                                 ~l3e1.set(\vol, ~vol3);  ~l3f1.set(\vol, ~vol3);
3090
3091                                 }););
3092                                 }, {(~vol3 = 0;
3093                                         1.do({
3094                                                 ~l3a1.set(\vol, ~vol3);  ~l3b1.set(\vol, ~vol3);
3095                                                 ~l3c1.set(\vol, ~vol3);  ~l3d1.set(\vol, ~vol3);
3096                                                 ~l3e1.set(\vol, ~vol3);  ~l3f1.set(\vol, ~vol3);
3097
3098                                         }););
3099                         });
3100                 }
3101                 {~l1a.isRunning == true}{
3102                         if(button.value == 0, {
3103                                 (~vol3 = ~vol;
3104                                         1.do({
3105                                                 ~l3a.set(\vol, ~vol3);  ~l3b.set(\vol, ~vol3);
3106                                                 ~l3c.set(\vol, ~vol3);  ~l3d.set(\vol, ~vol3);
3107                                                 ~l3e.set(\vol, ~vol3);  ~l3f.set(\vol, ~vol3);
3108
3109                                 }););
3110                                 }, {(~vol3 = 0;
3111                                         1.do({
3112                                                 ~l3a.set(\vol, ~vol3);  ~l3b.set(\vol, ~vol3);
3113                                                 ~l3c.set(\vol, ~vol3);  ~l3d.set(\vol, ~vol3);
3114                                                 ~l3e.set(\vol, ~vol3);  ~l3f.set(\vol, ~vol3);
3115
3116                                         }););
3117                         });
3118                 };
3119         });
3120         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;
3121                 case
3122                 {~l1a1.isRunning == true}{
3123                         if(button.value == 0, {
3124                                 (~vol4 = ~vol;
3125                                         1.do({
3126                                                 ~l4a1.set(\vol, ~vol4);  ~l4b1.set(\vol, ~vol4);
3127                                                 ~l4c1.set(\vol, ~vol4);  ~l4d1.set(\vol, ~vol4);
3128                                                 ~l4e1.set(\vol, ~vol4);  ~l4f1.set(\vol, ~vol4);
3129
3130                                 }););
3131                                 }, {(~vol4 = 0;
3132                                         1.do({
3133                                                 ~l4a1.set(\vol, ~vol4);  ~l4b1.set(\vol, ~vol4);
3134                                                 ~l4c1.set(\vol, ~vol4);  ~l4d1.set(\vol, ~vol4);
3135                                                 ~l4e1.set(\vol, ~vol4);  ~l4f1.set(\vol, ~vol4);
3136
3137                                         }););
3138                         });
3139                 }
3140                 {~l1a.isRunning == true}{
3141                         if(button.value == 0, {
3142                                 (~vol4 = ~vol;
3143                                         1.do({
3144                                                 ~l4a.set(\vol, ~vol4);  ~l4b.set(\vol, ~vol4);
3145                                                 ~l4c.set(\vol, ~vol4);  ~l4d.set(\vol, ~vol4);
3146                                                 ~l4e.set(\vol, ~vol4);  ~l4f.set(\vol, ~vol4);
3147
3148                                 }););
3149                                 }, {(~vol4 = 0;
3150                                         1.do({
3151                                                 ~l4a.set(\vol, ~vol4);  ~l4b.set(\vol, ~vol4);
3152                                                 ~l4c.set(\vol, ~vol4);  ~l4d.set(\vol, ~vol4);
3153                                                 ~l4e.set(\vol, ~vol4);  ~l4f.set(\vol, ~vol4);
3154
3155                                         }););
3156                         });
3157                 };
3158         });
3159         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;
3160                 case
3161                 {~l1a1.isRunning == true}{
3162                         if(button.value == 0, {
3163                                 (~vol5 = ~vol;
3164                                         1.do({
3165                                                 ~l5a1.set(\vol, ~vol5);  ~l5b1.set(\vol, ~vol5);
3166                                                 ~l5c1.set(\vol, ~vol5);  ~l5d1.set(\vol, ~vol5);
3167                                                 ~l5e1.set(\vol, ~vol5);  ~l5f1.set(\vol, ~vol5);
3168
3169                                 }););
3170                                 }, {(~vol5 = 0;
3171                                         1.do({
3172                                                 ~l5a1.set(\vol, ~vol5);  ~l5b1.set(\vol, ~vol5);
3173                                                 ~l5c1.set(\vol, ~vol5);  ~l5d1.set(\vol, ~vol5);
3174                                                 ~l5e1.set(\vol, ~vol5);  ~l5f1.set(\vol, ~vol5);
3175
3176                                         }););
3177                         });
3178                 }
3179                 {~l1a.isRunning == true}{
3180                         if(button.value == 0, {
3181                                 (~vol5 = ~vol;
3182                                         1.do({
3183                                                 ~l5a.set(\vol, ~vol5);  ~l5b.set(\vol, ~vol5);
3184                                                 ~l5c.set(\vol, ~vol5);  ~l5d.set(\vol, ~vol5);
3185                                                 ~l5e.set(\vol, ~vol5);  ~l5f.set(\vol, ~vol5);
3186
3187                                 }););
3188                                 }, {(~vol5 = 0;
3189                                         1.do({
3190                                                 ~l5a.set(\vol, ~vol5);  ~l5b.set(\vol, ~vol5);
3191                                                 ~l5c.set(\vol, ~vol5);  ~l5d.set(\vol, ~vol5);
3192                                                 ~l5e.set(\vol, ~vol5);  ~l5f.set(\vol, ~vol5);
3193
3194                                         }););
3195                         });
3196                 };
3197         });
3198         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;
3199                 case
3200                 {~l1a1.isRunning == true}{
3201                         if(button.value == 0, {
3202                                 (~vol6 = ~vol;
3203                                         1.do({
3204                                                 ~l6a1.set(\vol, ~vol6);  ~l6b1.set(\vol, ~vol6);
3205                                                 ~l6c1.set(\vol, ~vol6);  ~l6d1.set(\vol, ~vol6);
3206                                                 ~l6e1.set(\vol, ~vol6);  ~l6f1.set(\vol, ~vol6);
3207
3208                                 }););
3209                                 }, {(~vol6 = 0;
3210                                         1.do({
3211                                                 ~l6a1.set(\vol, ~vol6);  ~l6b1.set(\vol, ~vol6);
3212                                                 ~l6c1.set(\vol, ~vol6);  ~l6d1.set(\vol, ~vol6);
3213                                                 ~l6e1.set(\vol, ~vol6);  ~l6f1.set(\vol, ~vol6);
3214
3215                                         }););
3216                         });
3217                 }
3218                 {~l1a.isRunning == true}{
3219                         if(button.value == 0, {
3220                                 (~vol6 = ~vol;
3221                                         1.do({
3222                                                 ~l6a.set(\vol, ~vol6);  ~l6b.set(\vol, ~vol6);
3223                                                 ~l6c.set(\vol, ~vol6);  ~l6d.set(\vol, ~vol6);
3224                                                 ~l6e.set(\vol, ~vol6);  ~l6f.set(\vol, ~vol6);
3225
3226                                 }););
3227                                 }, {(~vol6 = 0;
3228                                         1.do({
3229                                                 ~l6a.set(\vol, ~vol6);  ~l6b.set(\vol, ~vol6);
3230                                                 ~l6c.set(\vol, ~vol6);  ~l6d.set(\vol, ~vol6);
3231                                                 ~l6e.set(\vol, ~vol6);  ~l6f.set(\vol, ~vol6);
3232
3233                                         }););
3234                         });
3235                 };
3236
3237         });
3238         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;
3239                 case
3240                 {~l1a1.isRunning == true}{
3241                         if(button.value == 0, {
3242                                 (~vol7 = ~vol;
3243                                         1.do({
3244                                                 ~l7a1.set(\vol, ~vol7);  ~l7b1.set(\vol, ~vol7);
3245                                                 ~l7c1.set(\vol, ~vol7);  ~l7d1.set(\vol, ~vol7);
3246                                                 ~l7e1.set(\vol, ~vol7);  ~l7f1.set(\vol, ~vol7);
3247
3248                                 }););
3249                                 }, {(~vol7 = 0;
3250                                         1.do({
3251                                                 ~l7a1.set(\vol, ~vol7);  ~l7b1.set(\vol, ~vol7);
3252                                                 ~l7c1.set(\vol, ~vol7);  ~l7d1.set(\vol, ~vol7);
3253                                                 ~l7e1.set(\vol, ~vol7);  ~l7f1.set(\vol, ~vol7);
3254
3255                                         }););
3256                         });
3257                 }
3258                 {~l1a.isRunning == true}{
3259                         if(button.value == 0, {
3260                                 (~vol7 = ~vol;
3261                                         1.do({
3262                                                 ~l7a.set(\vol, ~vol7);  ~l7b.set(\vol, ~vol7);
3263                                                 ~l7c.set(\vol, ~vol7);  ~l7d.set(\vol, ~vol7);
3264                                                 ~l7e.set(\vol, ~vol7);  ~l7f.set(\vol, ~vol7);
3265
3266                                 }););
3267                                 }, {(~vol7 = 0;
3268                                         1.do({
3269                                                 ~l7a.set(\vol, ~vol7);  ~l7b.set(\vol, ~vol7);
3270                                                 ~l7c.set(\vol, ~vol7);  ~l7d.set(\vol, ~vol7);
3271                                                 ~l7e.set(\vol, ~vol7);  ~l7f.set(\vol, ~vol7);
3272
3273                                         }););
3274                         });
3275                 };
3276         });
3277         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;
3278                 case
3279                 {~l1a1.isRunning == true}{
3280                         if(button.value == 0, {
3281                                 (~vol8 = ~vol;
3282                                         1.do({
3283                                                 ~l8a1.set(\vol, ~vol8);  ~l8b1.set(\vol, ~vol8);
3284                                                 ~l8c1.set(\vol, ~vol8);  ~l8d1.set(\vol, ~vol8);
3285                                                 ~l8e1.set(\vol, ~vol8);  ~l8f1.set(\vol, ~vol8);
3286
3287                                 }););
3288                                 }, {(~vol8 = 0;
3289                                         1.do({
3290                                                 ~l8a1.set(\vol, ~vol8);  ~l8b1.set(\vol, ~vol8);
3291                                                 ~l8c1.set(\vol, ~vol8);  ~l8d1.set(\vol, ~vol8);
3292                                                 ~l8e1.set(\vol, ~vol8);  ~l8f1.set(\vol, ~vol8);
3293
3294                                         }););
3295                         });
3296                 }
3297                 {~l1a.isRunning == true}{
3298                         if(button.value == 0, {
3299                                 (~vol8 = ~vol;
3300                                         1.do({
3301                                                 ~l8a.set(\vol, ~vol8);  ~l8b.set(\vol, ~vol8);
3302                                                 ~l8c.set(\vol, ~vol8);  ~l8d.set(\vol, ~vol8);
3303                                                 ~l8e.set(\vol, ~vol8);  ~l8f.set(\vol, ~vol8);
3304
3305                                 }););
3306                                 }, {(~vol8 = 0;
3307                                         1.do({
3308                                                 ~l8a.set(\vol, ~vol8);  ~l8b.set(\vol, ~vol8);
3309                                                 ~l8c.set(\vol, ~vol8);  ~l8d.set(\vol, ~vol8);
3310                                                 ~l8e.set(\vol, ~vol8);  ~l8f.set(\vol, ~vol8);
3311
3312                                         }););
3313                         });
3314                 };
3315         });
3316         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;
3317                 case
3318                 {~l1a1.isRunning == true}{
3319                         if(button.value == 0, {
3320                                 (~vol9 = ~vol;
3321                                         1.do({
3322                                                 ~l9a1.set(\vol, ~vol9);  ~l9b1.set(\vol, ~vol9);
3323                                                 ~l9c1.set(\vol, ~vol9);  ~l9d1.set(\vol, ~vol9);
3324                                                 ~l9e1.set(\vol, ~vol9);  ~l9f1.set(\vol, ~vol9);
3325
3326                                 }););
3327                                 }, {(~vol9 = 0;
3328                                         1.do({
3329                                                 ~l9a1.set(\vol, ~vol9);  ~l9b1.set(\vol, ~vol9);
3330                                                 ~l9c1.set(\vol, ~vol9);  ~l9d1.set(\vol, ~vol9);
3331                                                 ~l9e1.set(\vol, ~vol9);  ~l9f1.set(\vol, ~vol9);
3332
3333                                         }););
3334                         });
3335                 }
3336                 {~l1a.isRunning == true}{
3337                         if(button.value == 0, {
3338                                 (~vol9 = ~vol;
3339                                         1.do({
3340                                                 ~l9a.set(\vol, ~vol9);  ~l9b.set(\vol, ~vol9);
3341                                                 ~l9c.set(\vol, ~vol9);  ~l9d.set(\vol, ~vol9);
3342                                                 ~l9e.set(\vol, ~vol9);  ~l9f.set(\vol, ~vol9);
3343
3344                                 }););
3345                                 }, {(~vol9 = 0;
3346                                         1.do({
3347                                                 ~l9a.set(\vol, ~vol9);  ~l9b.set(\vol, ~vol9);
3348                                                 ~l9c.set(\vol, ~vol9);  ~l9d.set(\vol, ~vol9);
3349                                                 ~l9e.set(\vol, ~vol9);  ~l9f.set(\vol, ~vol9);
3350
3351                                         }););
3352                         });
3353                 };
3354         });
3355         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;
3356                 case
3357                 {~l1a1.isRunning == true}{
3358                         if(button.value == 0, {
3359                                 (~vol10 = ~vol;
3360                                         1.do({
3361                                                 ~l10a1.set(\vol, ~vol10);  ~l10b1.set(\vol, ~vol10);
3362                                                 ~l10c1.set(\vol, ~vol10);  ~l10d1.set(\vol, ~vol10);
3363                                                 ~l10e1.set(\vol, ~vol10);  ~l10f1.set(\vol, ~vol10);
3364
3365                                 }););
3366                                 }, {(~vol10 = 0;
3367                                         1.do({
3368                                                 ~l10a1.set(\vol, ~vol10);  ~l10b1.set(\vol, ~vol10);
3369                                                 ~l10c1.set(\vol, ~vol10);  ~l10d1.set(\vol, ~vol10);
3370                                                 ~l10e1.set(\vol, ~vol10);  ~l10f1.set(\vol, ~vol10);
3371
3372                                         }););
3373                         });
3374                 }
3375                 {~l1a.isRunning == true}{
3376                         if(button.value == 0, {
3377                                 (~vol10 = ~vol;
3378                                         1.do({
3379                                                 ~l10a.set(\vol, ~vol10);  ~l10b.set(\vol, ~vol10);
3380                                                 ~l10c.set(\vol, ~vol10);  ~l10d.set(\vol, ~vol10);
3381                                                 ~l10e.set(\vol, ~vol10);  ~l10f.set(\vol, ~vol10);
3382
3383                                 }););
3384                                 }, {(~vol10 = 0;
3385                                         1.do({
3386                                                 ~l10a.set(\vol, ~vol10);  ~l10b.set(\vol, ~vol10);
3387                                                 ~l10c.set(\vol, ~vol10);  ~l10d.set(\vol, ~vol10);
3388                                                 ~l10e.set(\vol, ~vol10);  ~l10f.set(\vol, ~vol10);
3389
3390                                         }););
3391                         });
3392                 };
3393         });
3394         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;
3395                 case
3396                 {~l1a1.isRunning == true}{
3397                         if(button.value == 0, {
3398                                 (~vol11 = ~vol;
3399                                         1.do({
3400                                                 ~l11a1.set(\vol, ~vol11);  ~l11b1.set(\vol, ~vol11);
3401                                                 ~l11c1.set(\vol, ~vol11);  ~l11d1.set(\vol, ~vol11);
3402                                                 ~l11e1.set(\vol, ~vol11);  ~l11f1.set(\vol, ~vol11);
3403
3404                                 }););
3405                                 }, {(~vol11 = 0;
3406                                         1.do({
3407                                                 ~l11a1.set(\vol, ~vol11);  ~l8b1.set(\vol, ~vol11);
3408                                                 ~l11c1.set(\vol, ~vol11);  ~l8d1.set(\vol, ~vol11);
3409                                                 ~l11e1.set(\vol, ~vol11);  ~l8f1.set(\vol, ~vol11);
3410
3411                                         }););
3412                         });
3413                 }
3414                 {~l1a.isRunning == true}{
3415                         if(button.value == 0, {
3416                                 (~vol11 = ~vol;
3417                                         1.do({
3418                                                 ~l11a.set(\vol, ~vol11);  ~l11b.set(\vol, ~vol11);
3419                                                 ~l11c.set(\vol, ~vol11);  ~l11d.set(\vol, ~vol11);
3420                                                 ~l11e.set(\vol, ~vol11);  ~l11f.set(\vol, ~vol11);
3421
3422                                 }););
3423                                 }, {(~vol11 = 0;
3424                                         1.do({
3425                                                 ~l11a.set(\vol, ~vol11);  ~l11b.set(\vol, ~vol11);
3426                                                 ~l11c.set(\vol, ~vol11);  ~l11d.set(\vol, ~vol11);
3427                                                 ~l11e.set(\vol, ~vol11);  ~l11f.set(\vol, ~vol11);
3428
3429                                         }););
3430                         });
3431                 };
3432         });
3433         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;
3434                 case
3435                 {~l1a1.isRunning == true}{
3436                         if(button.value == 0, {
3437                                 (~vol12 = ~vol;
3438                                         1.do({
3439                                                 ~l12a1.set(\vol, ~vol12);  ~l12b1.set(\vol, ~vol12);
3440                                                 ~l12c1.set(\vol, ~vol12);  ~l12d1.set(\vol, ~vol12);
3441                                                 ~l12e1.set(\vol, ~vol12);  ~l12f1.set(\vol, ~vol12);
3442
3443                                 }););
3444                                 }, {(~vol12 = 0;
3445                                         1.do({
3446                                                 ~l12a1.set(\vol, ~vol12);  ~l12b1.set(\vol, ~vol12);
3447                                                 ~l12c1.set(\vol, ~vol12);  ~l12d1.set(\vol, ~vol12);
3448                                                 ~l12e1.set(\vol, ~vol12);  ~l12f1.set(\vol, ~vol12);
3449
3450                                         }););
3451                         });
3452                 }
3453                 {~l1a.isRunning == true}{
3454                         if(button.value == 0, {
3455                                 (~vol12 = ~vol;
3456                                         1.do({
3457                                                 ~l12a.set(\vol, ~vol12);  ~l12b.set(\vol, ~vol12);
3458                                                 ~l12c.set(\vol, ~vol12);  ~l12d.set(\vol, ~vol12);
3459                                                 ~l12e.set(\vol, ~vol12);  ~l12f.set(\vol, ~vol12);
3460
3461                                 }););
3462                                 }, {(~vol12 = 0;
3463                                         1.do({
3464                                                 ~l12a.set(\vol, ~vol12);  ~l12b.set(\vol, ~vol12);
3465                                                 ~l12c.set(\vol, ~vol12);  ~l12d.set(\vol, ~vol12);
3466                                                 ~l12e.set(\vol, ~vol12);  ~l12f.set(\vol, ~vol12);
3467
3468                                         }););
3469                         });
3470                 };
3471         });
3472
3473
3474         //mute/unmute all button
3475
3476         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;
3477
3478                 if(button.value == 0, {
3479                         mute1.value = 0;
3480                         mute2.value = 0;
3481                         mute3.value = 0;
3482                         mute4.value = 0;
3483                         mute5.value = 0;
3484                         mute6.value = 0;
3485                         mute7.value = 0;
3486                         mute8.value = 0;
3487                         mute9.value = 0;
3488                         mute10.value = 0;
3489                         mute11.value = 0;
3490                         mute12.value = 0;
3491
3492                         ~vol1 = ~vol;
3493                         ~vol2 = ~vol;
3494                         ~vol3 = ~vol;
3495                         ~vol4 = ~vol;
3496                         ~vol5 = ~vol;
3497                         ~vol6 = ~vol;
3498                         ~vol7 = ~vol;
3499                         ~vol8 = ~vol;
3500                         ~vol9 = ~vol;
3501                         ~vol10 = ~vol;
3502                         ~vol11 = ~vol;
3503                         ~vol12 = ~vol;
3504                         },
3505                         {
3506                                 mute1.value = 1;
3507                                 mute2.value = 1;
3508                                 mute3.value = 1;
3509                                 mute4.value = 1;
3510                                 mute5.value = 1;
3511                                 mute6.value = 1;
3512                                 mute7.value = 1;
3513                                 mute8.value = 1;
3514                                 mute9.value = 1;
3515                                 mute10.value = 1;
3516                                 mute11.value = 1;
3517                                 mute12.value = 1;
3518
3519                                 ~vol1 = 0;
3520                                 ~vol2 = 0;
3521                                 ~vol3 = 0;
3522                                 ~vol4 = 0;
3523                                 ~vol5 = 0;
3524                                 ~vol6 = 0;
3525                                 ~vol7 = 0;
3526                                 ~vol8 = 0;
3527                                 ~vol9 = 0;
3528                                 ~vol10 = 0;
3529                                 ~vol11 = 0;
3530                                 ~vol12 = 0;
3531                 });
3532                 ~synthflow.value;
3533         });
3534
3535
3536         //keyboard number buttons to choose synth
3537
3538         keycodeb = Button.new(w,Rect(Window.screenBounds.width-20-16,~bpt+160,16,16/1.6180339887499)).states_([
3539                 ["1",Color.white,Color.black],
3540                 ["2",Color.white,Color.black],
3541                 ["3",Color.white,Color.black],
3542                 ["4",Color.white,Color.black],
3543                 ["5",Color.white,Color.black],
3544                 ["6",Color.white,Color.black],
3545                 ["7",Color.white,Color.black],
3546                 ["8",Color.white,Color.black],
3547                 ["9",Color.white,Color.black],
3548                 ["10",Color.white,Color.black],
3549                 ["11",Color.white,Color.black],
3550                 ["12",Color.white,Color.black]]).action_({arg button;
3551
3552                 case
3553                 {button.value == 0}{
3554                         ~z25.background = Color.green; ~z1.background = Color.green;
3555                         ~z26.background = Color.white; ~z2.background = Color.white;
3556                         ~z27.background = Color.white; ~z3.background = Color.white;
3557                         ~z28.background = Color.white; ~z4.background = Color.white;
3558                         ~z29.background = Color.white; ~z5.background = Color.white;
3559                         ~z30.background = Color.white; ~z6.background = Color.white;
3560                         ~z31.background = Color.white; ~z7.background = Color.white;
3561                         ~z32.background = Color.white; ~z8.background = Color.white;
3562                         ~z33.background = Color.white; ~z9.background = Color.white;
3563                         ~z34.background = Color.white; ~z10.background = Color.white;
3564                         ~z35.background = Color.white; ~z11.background = Color.white;
3565                         ~z36.background = Color.white; ~z12.background = Color.white;
3566                 }
3567                 {button.value == 1}{
3568                         ~z25.background = Color.white; ~z1.background = Color.white;
3569                         ~z26.background = Color.green; ~z2.background = Color.green;
3570                         ~z27.background = Color.white; ~z3.background = Color.white;
3571                         ~z28.background = Color.white; ~z4.background = Color.white;
3572                         ~z29.background = Color.white; ~z5.background = Color.white;
3573                         ~z30.background = Color.white; ~z6.background = Color.white;
3574                         ~z31.background = Color.white; ~z7.background = Color.white;
3575                         ~z32.background = Color.white; ~z8.background = Color.white;
3576                         ~z33.background = Color.white; ~z9.background = Color.white;
3577                         ~z34.background = Color.white; ~z10.background = Color.white;
3578                         ~z35.background = Color.white; ~z11.background = Color.white;
3579                         ~z36.background = Color.white; ~z12.background = Color.white;
3580                 }
3581                 {button.value == 2}{
3582                         ~z25.background = Color.white; ~z1.background = Color.white;
3583                         ~z26.background = Color.white; ~z2.background = Color.white;
3584                         ~z27.background = Color.green; ~z3.background = Color.green;
3585                         ~z28.background = Color.white; ~z4.background = Color.white;
3586                         ~z29.background = Color.white; ~z5.background = Color.white;
3587                         ~z30.background = Color.white; ~z6.background = Color.white;
3588                         ~z31.background = Color.white; ~z7.background = Color.white;
3589                         ~z32.background = Color.white; ~z8.background = Color.white;
3590                         ~z33.background = Color.white; ~z9.background = Color.white;
3591                         ~z34.background = Color.white; ~z10.background = Color.white;
3592                         ~z35.background = Color.white; ~z11.background = Color.white;
3593                         ~z36.background = Color.white; ~z12.background = Color.white;
3594                 }
3595                 {button.value == 3}{
3596                         ~z25.background = Color.white; ~z1.background = Color.white;
3597                         ~z26.background = Color.white; ~z2.background = Color.white;
3598                         ~z27.background = Color.white; ~z3.background = Color.white;
3599                         ~z28.background = Color.green; ~z4.background = Color.green;
3600                         ~z29.background = Color.white; ~z5.background = Color.white;
3601                         ~z30.background = Color.white; ~z6.background = Color.white;
3602                         ~z31.background = Color.white; ~z7.background = Color.white;
3603                         ~z32.background = Color.white; ~z8.background = Color.white;
3604                         ~z33.background = Color.white; ~z9.background = Color.white;
3605                         ~z34.background = Color.white; ~z10.background = Color.white;
3606                         ~z35.background = Color.white; ~z11.background = Color.white;
3607                         ~z36.background = Color.white; ~z12.background = Color.white;
3608                 }
3609                 {button.value == 4}{
3610                         ~z25.background = Color.white; ~z1.background = Color.white;
3611                         ~z26.background = Color.white; ~z2.background = Color.white;
3612                         ~z27.background = Color.white; ~z3.background = Color.white;
3613                         ~z28.background = Color.white; ~z4.background = Color.white;
3614                         ~z29.background = Color.green; ~z5.background = Color.green;
3615                         ~z30.background = Color.white; ~z6.background = Color.white;
3616                         ~z31.background = Color.white; ~z7.background = Color.white;
3617                         ~z32.background = Color.white; ~z8.background = Color.white;
3618                         ~z33.background = Color.white; ~z9.background = Color.white;
3619                         ~z34.background = Color.white; ~z10.background = Color.white;
3620                         ~z35.background = Color.white; ~z11.background = Color.white;
3621                         ~z36.background = Color.white; ~z12.background = Color.white;
3622                 }
3623                 {button.value == 5}{
3624                         ~z25.background = Color.white; ~z1.background = Color.white;
3625                         ~z26.background = Color.white; ~z2.background = Color.white;
3626                         ~z27.background = Color.white; ~z3.background = Color.white;
3627                         ~z28.background = Color.white; ~z4.background = Color.white;
3628                         ~z29.background = Color.white; ~z5.background = Color.white;
3629                         ~z30.background = Color.green; ~z6.background = Color.green;
3630                         ~z31.background = Color.white; ~z7.background = Color.white;
3631                         ~z32.background = Color.white; ~z8.background = Color.white;
3632                         ~z33.background = Color.white; ~z9.background = Color.white;
3633                         ~z34.background = Color.white; ~z10.background = Color.white;
3634                         ~z35.background = Color.white; ~z11.background = Color.white;
3635                         ~z36.background = Color.white; ~z12.background = Color.white;
3636                 }
3637                 {button.value == 6}{
3638                         ~z25.background = Color.white; ~z1.background = Color.white;
3639                         ~z26.background = Color.white; ~z2.background = Color.white;
3640                         ~z27.background = Color.white; ~z3.background = Color.white;
3641                         ~z28.background = Color.white; ~z4.background = Color.white;
3642                         ~z29.background = Color.white; ~z5.background = Color.white;
3643                         ~z30.background = Color.white; ~z6.background = Color.white;
3644                         ~z31.background = Color.green; ~z7.background = Color.green;
3645                         ~z32.background = Color.white; ~z8.background = Color.white;
3646                         ~z33.background = Color.white; ~z9.background = Color.white;
3647                         ~z34.background = Color.white; ~z10.background = Color.white;
3648                         ~z35.background = Color.white; ~z11.background = Color.white;
3649                         ~z36.background = Color.white; ~z12.background = Color.white;
3650                 }
3651                 {button.value == 7}{
3652                         ~z25.background = Color.white; ~z1.background = Color.white;
3653                         ~z26.background = Color.white; ~z2.background = Color.white;
3654                         ~z27.background = Color.white; ~z3.background = Color.white;
3655                         ~z28.background = Color.white; ~z4.background = Color.white;
3656                         ~z29.background = Color.white; ~z5.background = Color.white;
3657                         ~z30.background = Color.white; ~z6.background = Color.white;
3658                         ~z31.background = Color.white; ~z7.background = Color.white;
3659                         ~z32.background = Color.green; ~z8.background = Color.green;
3660                         ~z33.background = Color.white; ~z9.background = Color.white;
3661                         ~z34.background = Color.white; ~z10.background = Color.white;
3662                         ~z35.background = Color.white; ~z11.background = Color.white;
3663                         ~z36.background = Color.white; ~z12.background = Color.white;
3664                 }
3665                 {button.value == 8}{
3666                         ~z25.background = Color.white; ~z1.background = Color.white;
3667                         ~z26.background = Color.white; ~z2.background = Color.white;
3668                         ~z27.background = Color.white; ~z3.background = Color.white;
3669                         ~z28.background = Color.white; ~z4.background = Color.white;
3670                         ~z29.background = Color.white; ~z5.background = Color.white;
3671                         ~z30.background = Color.white; ~z6.background = Color.white;
3672                         ~z31.background = Color.white; ~z7.background = Color.white;
3673                         ~z32.background = Color.white; ~z8.background = Color.white;
3674                         ~z33.background = Color.green; ~z9.background = Color.green;
3675                         ~z34.background = Color.white; ~z10.background = Color.white;
3676                         ~z35.background = Color.white; ~z11.background = Color.white;
3677                         ~z36.background = Color.white; ~z12.background = Color.white;
3678                 }
3679                 {button.value == 9}{
3680                         ~z25.background = Color.white; ~z1.background = Color.white;
3681                         ~z26.background = Color.white; ~z2.background = Color.white;
3682                         ~z27.background = Color.white; ~z3.background = Color.white;
3683                         ~z28.background = Color.white; ~z4.background = Color.white;
3684                         ~z29.background = Color.white; ~z5.background = Color.white;
3685                         ~z30.background = Color.white; ~z6.background = Color.white;
3686                         ~z31.background = Color.white; ~z7.background = Color.white;
3687                         ~z32.background = Color.white; ~z8.background = Color.white;
3688                         ~z33.background = Color.white; ~z9.background = Color.white;
3689                         ~z34.background = Color.green; ~z10.background = Color.green;
3690                         ~z35.background = Color.white; ~z11.background = Color.white;
3691                         ~z36.background = Color.white; ~z12.background = Color.white;
3692                 }
3693                 {button.value == 10}{
3694                         ~z25.background = Color.white; ~z1.background = Color.white;
3695                         ~z26.background = Color.white; ~z2.background = Color.white;
3696                         ~z27.background = Color.white; ~z3.background = Color.white;
3697                         ~z28.background = Color.white; ~z4.background = Color.white;
3698                         ~z29.background = Color.white; ~z5.background = Color.white;
3699                         ~z30.background = Color.white; ~z6.background = Color.white;
3700                         ~z31.background = Color.white; ~z7.background = Color.white;
3701                         ~z32.background = Color.white; ~z8.background = Color.white;
3702                         ~z33.background = Color.white; ~z9.background = Color.white;
3703                         ~z34.background = Color.white; ~z10.background = Color.white;
3704                         ~z35.background = Color.green; ~z11.background = Color.green;
3705                         ~z36.background = Color.white; ~z12.background = Color.white;
3706                 }
3707                 {button.value == 11}{
3708                         ~z25.background = Color.white; ~z1.background = Color.white;
3709                         ~z26.background = Color.white; ~z2.background = Color.white;
3710                         ~z27.background = Color.white; ~z3.background = Color.white;
3711                         ~z28.background = Color.white; ~z4.background = Color.white;
3712                         ~z29.background = Color.white; ~z5.background = Color.white;
3713                         ~z30.background = Color.white; ~z6.background = Color.white;
3714                         ~z31.background = Color.white; ~z7.background = Color.white;
3715                         ~z32.background = Color.white; ~z8.background = Color.white;
3716                         ~z33.background = Color.white; ~z9.background = Color.white;
3717                         ~z34.background = Color.white; ~z10.background = Color.white;
3718                         ~z35.background = Color.white; ~z11.background = Color.white;
3719                         ~z36.background = Color.green; ~z12.background = Color.green;
3720                 }
3721
3722         });
3723
3724
3725         //misc. keyboard buttons
3726
3727         w.view.keyDownAction = { arg view, char, modifiers, unicode, keycode;
3728                 [char, modifiers, unicode, keycode];
3729
3730                 //copy
3731                 if(unicode == ~c_unicode, {
3732                         case
3733                         {b.value == 0}{b.valueAction = 1}
3734                         {b.value == 1}{b.valueAction = 0};
3735                 });
3736
3737                 //start/stop synth
3738                 if(unicode == ~s_unicode, {
3739                         case
3740                         {b3.value == 0}{b3.valueAction = 1}
3741                         {b3.value == 1}{b3.valueAction = 0};
3742                 });
3743
3744                 //pause/unpause synth
3745                 if(unicode == ~spacebar_unicode, {
3746                         case
3747                         {b4.value == 0}{b4.valueAction = 1}
3748                         {b4.value == 1}{b4.valueAction = 0};
3749                 });
3750
3751                 //timer function
3752                 if(unicode == ~t_unicode, {
3753                         case
3754                         {~ts.value == 0}{~ts.valueAction = 1}
3755                         {~ts.value == 1}{~ts.valueAction = 0};
3756                 });
3757
3758                 //routine function
3759                 if(unicode == ~r_unicode, {
3760                         case
3761                         {~rviewbutton.value == 0}{~rviewbutton.valueAction = 1}
3762                         {~rviewbutton.value == 1}{~rviewbutton.valueAction = 0};
3763                 });
3764
3765                 //mute/unmute all synths
3766                 if(unicode == ~m_unicode, {
3767                         case
3768                         {muteall.value == 0}{muteall.valueAction = 1}
3769                         {muteall.value == 1}{muteall.valueAction = 0};
3770                 });
3771
3772                 //minimize GUI window
3773                 if(unicode == ~escape_unicode, {w.minimize;});
3774
3775
3776                 //keyboard number actions
3777
3778                 case
3779                 {unicode == ~one_unicode}{keycodeb.valueAction_(0)}
3780                 {unicode == ~two_unicode}{keycodeb.valueAction_(1)}
3781                 {unicode == ~three_unicode}{keycodeb.valueAction_(2)}
3782                 {unicode == ~four_unicode}{keycodeb.valueAction_(3)}
3783                 {unicode == ~five_unicode}{keycodeb.valueAction_(4)}
3784                 {unicode == ~six_unicode}{keycodeb.valueAction_(5)}
3785                 {unicode == ~seven_unicode}{keycodeb.valueAction_(6)}
3786                 {unicode == ~eight_unicode}{keycodeb.valueAction_(7)}
3787                 {unicode == ~nine_unicode}{keycodeb.valueAction_(8)}
3788                 {unicode == ~ten_unicode}{keycodeb.valueAction_(9)}
3789                 {unicode == ~eleven_unicode}{keycodeb.valueAction_(10)}
3790                 {unicode == ~twelve_unicode}{keycodeb.valueAction_(11)}
3791
3792
3793                 //keyboard up/down arrow actions
3794
3795                 {(keycode == ~uparrow_keycode) or: (unicode == ~i_unicode)}{keycodeb.valueAction_(keycodeb.value-1)}
3796                 {(keycode == ~downarrow_keycode) or: (unicode == ~k_unicode)}{keycodeb.valueAction_(keycodeb.value+1)};
3797
3798
3799                 //set synth frequency using left/right arrow keys or j/l keys
3800
3801                 if((~f1 >= ~freqmap.at(127)), {~freqmap.at(127)},
3802                         {if((keycodeb.value == 0) and: ((keycode == ~rightarrow_keycode) or: (unicode == ~l_unicode)), {
3803                                 ~freqmapval1 = ~f1.cpsmidi.round;
3804                                 case
3805                                 {~l1a.isRunning == true}{
3806                                         ~l1a.set(\dur, ~f1 = ~freqmap.at(~freqmapval1 = ~freqmapval1.value+1));
3807                                         ~l1b.set(\dur, ~f1);
3808                                         ~l1c.set(\dur, ~f1/~icd3);
3809                                         ~l1d.set(\dur, ~f1/~icd3);
3810                                         ~l1e.set(\dur, ~f1/~icd6);
3811                                         ~l1f.set(\dur, ~f1/~icd6);
3812                                 }
3813                                 {~l1a1.isRunning == true}{
3814                                         ~l1a1.set(\dur, ~f1 = ~freqmap.at(~freqmapval1 = ~freqmapval1.value+1));
3815                                         ~l1b1.set(\dur, ~f1);
3816                                         ~l1c1.set(\dur, ~f1/~icd3);
3817                                         ~l1d1.set(\dur, ~f1/~icd3);
3818                                         ~l1e1.set(\dur, ~f1/~icd6);
3819                                         ~l1f1.set(\dur, ~f1/~icd6);
3820                                 };
3821                                 if((~f1 > ~outmaxa) or: (~f1 < ~outmina), {~z25.close;~z1.close;~z25 = (CompositeView(w, Rect((~f1.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+10, ~nw, 2)).background = Color.white;);}, {~z1.close;~z25.close;~z1 = (CompositeView(w, Rect((~f1.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+10, ~nw, 2)).background = Color.white;);});
3822                                 ~z25.background = Color.green; ~z1.background = Color.green;
3823                                 ~z26.background = Color.white; ~z2.background = Color.white;
3824                                 ~z27.background = Color.white; ~z3.background = Color.white;
3825                                 ~z28.background = Color.white; ~z4.background = Color.white;
3826                                 ~z29.background = Color.white; ~z5.background = Color.white;
3827                                 ~z30.background = Color.white; ~z6.background = Color.white;
3828                                 ~z31.background = Color.white; ~z7.background = Color.white;
3829                                 ~z32.background = Color.white; ~z8.background = Color.white;
3830                                 ~z33.background = Color.white; ~z9.background = Color.white;
3831                                 ~z34.background = Color.white; ~z10.background = Color.white;
3832                                 ~z35.background = Color.white; ~z11.background = Color.white;
3833                                 ~z36.background = Color.white; ~z12.background = Color.white;
3834                 });});
3835                 if((~f1 <= ~freqmap.at(0)), {~freqmap.at(0)},
3836                         {if((keycodeb.value == 0) and: ((keycode == ~leftarrow_keycode) or: (unicode == ~j_unicode)), {
3837                                 ~freqmapval1 = ~f1.cpsmidi.round;
3838                                 case
3839                                 {~l1a.isRunning == true}{
3840                                         ~l1a.set(\dur, ~f1 = ~freqmap.at(~freqmapval1 = ~freqmapval1.value-1));
3841                                         ~l1b.set(\dur, ~f1);
3842                                         ~l1c.set(\dur, ~f1/~icd3);
3843                                         ~l1d.set(\dur, ~f1/~icd3);
3844                                         ~l1e.set(\dur, ~f1/~icd6);
3845                                         ~l1f.set(\dur, ~f1/~icd6);
3846                                 }
3847                                 {~l1a1.isRunning == true}{
3848                                         ~l1a1.set(\dur, ~f1 = ~freqmap.at(~freqmapval1 = ~freqmapval1.value-1));
3849                                         ~l1b1.set(\dur, ~f1);
3850                                         ~l1c1.set(\dur, ~f1/~icd3);
3851                                         ~l1d1.set(\dur, ~f1/~icd3);
3852                                         ~l1e1.set(\dur, ~f1/~icd6);
3853                                         ~l1f1.set(\dur, ~f1/~icd6);
3854                                 };
3855                                 if((~f1 > ~outmaxa) or: (~f1 < ~outmina), {~z25.close;~z1.close;~z25 = (CompositeView(w, Rect((~f1.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+10, ~nw, 2)).background = Color.white;);}, {~z1.close;~z25.close;~z1 = (CompositeView(w, Rect((~f1.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+10, ~nw, 2)).background = Color.white;);});
3856
3857                                 ~z25.background = Color.green; ~z1.background = Color.green;
3858                                 ~z26.background = Color.white; ~z2.background = Color.white;
3859                                 ~z27.background = Color.white; ~z3.background = Color.white;
3860                                 ~z28.background = Color.white; ~z4.background = Color.white;
3861                                 ~z29.background = Color.white; ~z5.background = Color.white;
3862                                 ~z30.background = Color.white; ~z6.background = Color.white;
3863                                 ~z31.background = Color.white; ~z7.background = Color.white;
3864                                 ~z32.background = Color.white; ~z8.background = Color.white;
3865                                 ~z33.background = Color.white; ~z9.background = Color.white;
3866                                 ~z34.background = Color.white; ~z10.background = Color.white;
3867                                 ~z35.background = Color.white; ~z11.background = Color.white;
3868                                 ~z36.background = Color.white; ~z12.background = Color.white;
3869                 });});
3870
3871                 if((~f2 >= ~freqmap.at(127)), {~freqmap.at(127)},
3872                         {if((keycodeb.value == 1) and: ((keycode == ~rightarrow_keycode) or: (unicode == ~l_unicode)), {
3873                                 ~freqmapval2 = ~f2.cpsmidi.round;
3874                                 case
3875                                 {~l1a.isRunning == true}{
3876                                         ~l2a.set(\dur, ~f2 = ~freqmap.at(~freqmapval2 = ~freqmapval2.value+1));
3877                                         ~l2b.set(\dur, ~f2);
3878                                         ~l2c.set(\dur, ~f2/~icd3);
3879                                         ~l2d.set(\dur, ~f2/~icd3);
3880                                         ~l2e.set(\dur, ~f2/~icd6);
3881                                         ~l2f.set(\dur, ~f2/~icd6);
3882                                 }
3883                                 {~l1a1.isRunning == true}{
3884                                         ~l2a1.set(\dur, ~f2 = ~freqmap.at(~freqmapval2 = ~freqmapval2.value+1));
3885                                         ~l2b1.set(\dur, ~f2);
3886                                         ~l2c1.set(\dur, ~f2/~icd3);
3887                                         ~l2d1.set(\dur, ~f2/~icd3);
3888                                         ~l2e1.set(\dur, ~f2/~icd6);
3889                                         ~l2f1.set(\dur, ~f2/~icd6);
3890                                 };
3891                                 if((~f2 > ~outmaxa) or: (~f2 < ~outmina), {~z26.close;~z2.close;~z26 = (CompositeView(w, Rect((~f2.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+20, ~nw, 2)).background = Color.white;);}, {~z2.close;~z26.close;~z2 = (CompositeView(w, Rect((~f2.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+20, ~nw, 2)).background = Color.white;);});
3892                                 ~z25.background = Color.white; ~z1.background = Color.white;
3893                                 ~z26.background = Color.green; ~z2.background = Color.green;
3894                                 ~z27.background = Color.white; ~z3.background = Color.white;
3895                                 ~z28.background = Color.white; ~z4.background = Color.white;
3896                                 ~z29.background = Color.white; ~z5.background = Color.white;
3897                                 ~z30.background = Color.white; ~z6.background = Color.white;
3898                                 ~z31.background = Color.white; ~z7.background = Color.white;
3899                                 ~z32.background = Color.white; ~z8.background = Color.white;
3900                                 ~z33.background = Color.white; ~z9.background = Color.white;
3901                                 ~z34.background = Color.white; ~z10.background = Color.white;
3902                                 ~z35.background = Color.white; ~z11.background = Color.white;
3903                                 ~z36.background = Color.white; ~z12.background = Color.white;
3904                 });});
3905                 if((~f2 <= ~freqmap.at(0)), {~freqmap.at(0)},
3906                         {if((keycodeb.value == 1) and: ((keycode == ~leftarrow_keycode) or: (unicode == ~j_unicode)), {
3907                                 ~freqmapval2 = ~f2.cpsmidi.round;
3908                                 case
3909                                 {~l1a.isRunning == true}{
3910                                         ~l2a.set(\dur, ~f2 = ~freqmap.at(~freqmapval2 = ~freqmapval2.value-1));
3911                                         ~l2b.set(\dur, ~f2);
3912                                         ~l2c.set(\dur, ~f2/~icd3);
3913                                         ~l2d.set(\dur, ~f2/~icd3);
3914                                         ~l2e.set(\dur, ~f2/~icd6);
3915                                         ~l2f.set(\dur, ~f2/~icd6);
3916                                 }
3917                                 {~l1a1.isRunning == true}{
3918                                         ~l2a1.set(\dur, ~f2 = ~freqmap.at(~freqmapval2 = ~freqmapval2.value-1));
3919                                         ~l2b1.set(\dur, ~f2);
3920                                         ~l2c1.set(\dur, ~f2/~icd3);
3921                                         ~l2d1.set(\dur, ~f2/~icd3);
3922                                         ~l2e1.set(\dur, ~f2/~icd6);
3923                                         ~l2f1.set(\dur, ~f2/~icd6);
3924                                 };
3925                                 if((~f2 > ~outmaxa) or: (~f2 < ~outmina), {~z26.close;~z2.close;~z26 = (CompositeView(w, Rect((~f2.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+20, ~nw, 2)).background = Color.white;);}, {~z2.close;~z26.close;~z2 = (CompositeView(w, Rect((~f2.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+20, ~nw, 2)).background = Color.white;);});
3926
3927                                 ~z25.background = Color.white; ~z1.background = Color.white;
3928                                 ~z26.background = Color.green; ~z2.background = Color.green;
3929                                 ~z27.background = Color.white; ~z3.background = Color.white;
3930                                 ~z28.background = Color.white; ~z4.background = Color.white;
3931                                 ~z29.background = Color.white; ~z5.background = Color.white;
3932                                 ~z30.background = Color.white; ~z6.background = Color.white;
3933                                 ~z31.background = Color.white; ~z7.background = Color.white;
3934                                 ~z32.background = Color.white; ~z8.background = Color.white;
3935                                 ~z33.background = Color.white; ~z9.background = Color.white;
3936                                 ~z34.background = Color.white; ~z10.background = Color.white;
3937                                 ~z35.background = Color.white; ~z11.background = Color.white;
3938                                 ~z36.background = Color.white; ~z12.background = Color.white;
3939                 });});
3940
3941                 if((~f3 >= ~freqmap.at(127)), {~freqmap.at(127)},
3942                         {if((keycodeb.value == 2) and: ((keycode == ~rightarrow_keycode) or: (unicode == ~l_unicode)), {
3943                                 ~freqmapval3 = ~f3.cpsmidi.round;
3944                                 case
3945                                 {~l1a.isRunning == true}{
3946                                         ~l3a.set(\dur, ~f3 = ~freqmap.at(~freqmapval3 = ~freqmapval3.value+1));
3947                                         ~l3b.set(\dur, ~f3);
3948                                         ~l3c.set(\dur, ~f3/~icd3);
3949                                         ~l3d.set(\dur, ~f3/~icd3);
3950                                         ~l3e.set(\dur, ~f3/~icd6);
3951                                         ~l3f.set(\dur, ~f3/~icd6);
3952                                 }
3953                                 {~l1a1.isRunning == true}{
3954                                         ~l3a1.set(\dur, ~f3 = ~freqmap.at(~freqmapval3 = ~freqmapval3.value+1));
3955                                         ~l3b1.set(\dur, ~f3);
3956                                         ~l3c1.set(\dur, ~f3/~icd3);
3957                                         ~l3d1.set(\dur, ~f3/~icd3);
3958                                         ~l3e1.set(\dur, ~f3/~icd6);
3959                                         ~l3f1.set(\dur, ~f3/~icd6);
3960                                 };
3961                                 if((~f3 > ~outmaxa) or: (~f3 < ~outmina), {~z27.close;~z3.close;~z27 = (CompositeView(w, Rect((~f3.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+30, ~nw, 2)).background = Color.white;);}, {~z3.close;~z27.close;~z3 = (CompositeView(w, Rect((~f3.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+30, ~nw, 2)).background = Color.white;);});
3962                                 ~z25.background = Color.white; ~z1.background = Color.white;
3963                                 ~z26.background = Color.white; ~z2.background = Color.white;
3964                                 ~z27.background = Color.green; ~z3.background = Color.green;
3965                                 ~z28.background = Color.white; ~z4.background = Color.white;
3966                                 ~z29.background = Color.white; ~z5.background = Color.white;
3967                                 ~z30.background = Color.white; ~z6.background = Color.white;
3968                                 ~z31.background = Color.white; ~z7.background = Color.white;
3969                                 ~z32.background = Color.white; ~z8.background = Color.white;
3970                                 ~z33.background = Color.white; ~z9.background = Color.white;
3971                                 ~z34.background = Color.white; ~z10.background = Color.white;
3972                                 ~z35.background = Color.white; ~z11.background = Color.white;
3973                                 ~z36.background = Color.white; ~z12.background = Color.white;
3974                 });});
3975                 if((~f3 <= ~freqmap.at(0)), {~freqmap.at(0)},
3976                         {if((keycodeb.value == 2) and: ((keycode == ~leftarrow_keycode) or: (unicode == ~j_unicode)), {
3977                                 ~freqmapval3 = ~f3.cpsmidi.round;
3978                                 case
3979                                 {~l1a.isRunning == true}{
3980                                         ~l3a.set(\dur, ~f3 = ~freqmap.at(~freqmapval3 = ~freqmapval3.value-1));
3981                                         ~l3b.set(\dur, ~f3);
3982                                         ~l3c.set(\dur, ~f3/~icd3);
3983                                         ~l3d.set(\dur, ~f3/~icd3);
3984                                         ~l3e.set(\dur, ~f3/~icd6);
3985                                         ~l3f.set(\dur, ~f3/~icd6);
3986                                 }
3987                                 {~l1a1.isRunning == true}{
3988                                         ~l3a1.set(\dur, ~f3 = ~freqmap.at(~freqmapval3 = ~freqmapval3.value-1));
3989                                         ~l3b1.set(\dur, ~f3);
3990                                         ~l3c1.set(\dur, ~f3/~icd3);
3991                                         ~l3d1.set(\dur, ~f3/~icd3);
3992                                         ~l3e1.set(\dur, ~f3/~icd6);
3993                                         ~l3f1.set(\dur, ~f3/~icd6);
3994                                 };
3995                                 if((~f3 > ~outmaxa) or: (~f3 < ~outmina), {~z27.close;~z3.close;~z27 = (CompositeView(w, Rect((~f3.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+30, ~nw, 2)).background = Color.white;);}, {~z3.close;~z27.close;~z3 = (CompositeView(w, Rect((~f3.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+30, ~nw, 2)).background = Color.white;);});
3996
3997                                 ~z25.background = Color.white; ~z1.background = Color.white;
3998                                 ~z26.background = Color.white; ~z2.background = Color.white;
3999                                 ~z27.background = Color.green; ~z3.background = Color.green;
4000                                 ~z28.background = Color.white; ~z4.background = Color.white;
4001                                 ~z29.background = Color.white; ~z5.background = Color.white;
4002                                 ~z30.background = Color.white; ~z6.background = Color.white;
4003                                 ~z31.background = Color.white; ~z7.background = Color.white;
4004                                 ~z32.background = Color.white; ~z8.background = Color.white;
4005                                 ~z33.background = Color.white; ~z9.background = Color.white;
4006                                 ~z34.background = Color.white; ~z10.background = Color.white;
4007                                 ~z35.background = Color.white; ~z11.background = Color.white;
4008                                 ~z36.background = Color.white; ~z12.background = Color.white;
4009                 });});
4010
4011                 if((~f4 >= ~freqmap.at(127)), {~freqmap.at(127)},
4012                         {if((keycodeb.value == 3) and: ((keycode == ~rightarrow_keycode) or: (unicode == ~l_unicode)), {
4013                                 ~freqmapval4 = ~f4.cpsmidi.round;
4014                                 case
4015                                 {~l1a.isRunning == true}{
4016                                         ~l4a.set(\dur, ~f4 = ~freqmap.at(~freqmapval4 = ~freqmapval4.value+1));
4017                                         ~l4b.set(\dur, ~f4);
4018                                         ~l4c.set(\dur, ~f4/~icd3);
4019                                         ~l4d.set(\dur, ~f4/~icd3);
4020                                         ~l4e.set(\dur, ~f4/~icd6);
4021                                         ~l4f.set(\dur, ~f4/~icd6);
4022                                 }
4023                                 {~l1a1.isRunning == true}{
4024                                         ~l4a1.set(\dur, ~f4 = ~freqmap.at(~freqmapval4 = ~freqmapval4.value+1));
4025                                         ~l4b1.set(\dur, ~f4);
4026                                         ~l4c1.set(\dur, ~f4/~icd3);
4027                                         ~l4d1.set(\dur, ~f4/~icd3);
4028                                         ~l4e1.set(\dur, ~f4/~icd6);
4029                                         ~l4f1.set(\dur, ~f4/~icd6);
4030                                 };
4031                                 if((~f4 > ~outmaxa) or: (~f4 < ~outmina), {~z28.close;~z4.close;~z28 = (CompositeView(w, Rect((~f4.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+40, ~nw, 2)).background = Color.white;);}, {~z4.close;~z28.close;~z4 = (CompositeView(w, Rect((~f4.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+40, ~nw, 2)).background = Color.white;);});
4032                                 ~z25.background = Color.white; ~z1.background = Color.white;
4033                                 ~z26.background = Color.white; ~z2.background = Color.white;
4034                                 ~z27.background = Color.white; ~z3.background = Color.white;
4035                                 ~z28.background = Color.green; ~z4.background = Color.green;
4036                                 ~z29.background = Color.white; ~z5.background = Color.white;
4037                                 ~z30.background = Color.white; ~z6.background = Color.white;
4038                                 ~z31.background = Color.white; ~z7.background = Color.white;
4039                                 ~z32.background = Color.white; ~z8.background = Color.white;
4040                                 ~z33.background = Color.white; ~z9.background = Color.white;
4041                                 ~z34.background = Color.white; ~z10.background = Color.white;
4042                                 ~z35.background = Color.white; ~z11.background = Color.white;
4043                                 ~z36.background = Color.white; ~z12.background = Color.white;
4044                 });});
4045                 if((~f4 <= ~freqmap.at(0)), {~freqmap.at(0)},
4046                         {if((keycodeb.value == 3) and: ((keycode == ~leftarrow_keycode) or: (unicode == ~j_unicode)), {
4047                                 ~freqmapval4 = ~f4.cpsmidi.round;
4048                                 case
4049                                 {~l1a.isRunning == true}{
4050                                         ~l4a.set(\dur, ~f4 = ~freqmap.at(~freqmapval4 = ~freqmapval4.value-1));
4051                                         ~l4b.set(\dur, ~f4);
4052                                         ~l4c.set(\dur, ~f4/~icd3);
4053                                         ~l4d.set(\dur, ~f4/~icd3);
4054                                         ~l4e.set(\dur, ~f4/~icd6);
4055                                         ~l4f.set(\dur, ~f4/~icd6);
4056                                 }
4057                                 {~l1a1.isRunning == true}{
4058                                         ~l4a1.set(\dur, ~f4 = ~freqmap.at(~freqmapval4 = ~freqmapval4.value-1));
4059                                         ~l4b1.set(\dur, ~f4);
4060                                         ~l4c1.set(\dur, ~f4/~icd3);
4061                                         ~l4d1.set(\dur, ~f4/~icd3);
4062                                         ~l4e1.set(\dur, ~f4/~icd6);
4063                                         ~l4f1.set(\dur, ~f4/~icd6);
4064                                 };
4065                                 if((~f4 > ~outmaxa) or: (~f4 < ~outmina), {~z28.close;~z4.close;~z28 = (CompositeView(w, Rect((~f4.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+40, ~nw, 2)).background = Color.white;);}, {~z4.close;~z28.close;~z4 = (CompositeView(w, Rect((~f4.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+40, ~nw, 2)).background = Color.white;);});
4066
4067                                 ~z25.background = Color.white; ~z1.background = Color.white;
4068                                 ~z26.background = Color.white; ~z2.background = Color.white;
4069                                 ~z27.background = Color.white; ~z3.background = Color.white;
4070                                 ~z28.background = Color.green; ~z4.background = Color.green;
4071                                 ~z29.background = Color.white; ~z5.background = Color.white;
4072                                 ~z30.background = Color.white; ~z6.background = Color.white;
4073                                 ~z31.background = Color.white; ~z7.background = Color.white;
4074                                 ~z32.background = Color.white; ~z8.background = Color.white;
4075                                 ~z33.background = Color.white; ~z9.background = Color.white;
4076                                 ~z34.background = Color.white; ~z10.background = Color.white;
4077                                 ~z35.background = Color.white; ~z11.background = Color.white;
4078                                 ~z36.background = Color.white; ~z12.background = Color.white;
4079                 });});
4080
4081                 if((~f5 >= ~freqmap.at(127)), {~freqmap.at(127)},
4082                         {if((keycodeb.value == 4) and: ((keycode == ~rightarrow_keycode) or: (unicode == ~l_unicode)), {
4083                                 ~freqmapval5 = ~f5.cpsmidi.round;
4084                                 case
4085                                 {~l1a.isRunning == true}{
4086                                         ~l5a.set(\dur, ~f5 = ~freqmap.at(~freqmapval5 = ~freqmapval5.value+1));
4087                                         ~l5b.set(\dur, ~f5);
4088                                         ~l5c.set(\dur, ~f5/~icd3);
4089                                         ~l5d.set(\dur, ~f5/~icd3);
4090                                         ~l5e.set(\dur, ~f5/~icd6);
4091                                         ~l5f.set(\dur, ~f5/~icd6);
4092                                 }
4093                                 {~l1a1.isRunning == true}{
4094                                         ~l5a1.set(\dur, ~f5 = ~freqmap.at(~freqmapval5 = ~freqmapval5.value+1));
4095                                         ~l5b1.set(\dur, ~f5);
4096                                         ~l5c1.set(\dur, ~f5/~icd3);
4097                                         ~l5d1.set(\dur, ~f5/~icd3);
4098                                         ~l5e1.set(\dur, ~f5/~icd6);
4099                                         ~l5f1.set(\dur, ~f5/~icd6);
4100                                 };
4101                                 if((~f5 > ~outmaxa) or: (~f5 < ~outmina), {~z29.close;~z5.close;~z29 = (CompositeView(w, Rect((~f5.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+50, ~nw, 2)).background = Color.white;);}, {~z5.close;~z29.close;~z5 = (CompositeView(w, Rect((~f5.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+50, ~nw, 2)).background = Color.white;);});
4102                                 ~z25.background = Color.white; ~z1.background = Color.white;
4103                                 ~z26.background = Color.white; ~z2.background = Color.white;
4104                                 ~z27.background = Color.white; ~z3.background = Color.white;
4105                                 ~z28.background = Color.white; ~z4.background = Color.white;
4106                                 ~z29.background = Color.green; ~z5.background = Color.green;
4107                                 ~z30.background = Color.white; ~z6.background = Color.white;
4108                                 ~z31.background = Color.white; ~z7.background = Color.white;
4109                                 ~z32.background = Color.white; ~z8.background = Color.white;
4110                                 ~z33.background = Color.white; ~z9.background = Color.white;
4111                                 ~z34.background = Color.white; ~z10.background = Color.white;
4112                                 ~z35.background = Color.white; ~z11.background = Color.white;
4113                                 ~z36.background = Color.white; ~z12.background = Color.white;
4114                 });});
4115                 if((~f5 <= ~freqmap.at(0)), {~freqmap.at(0)},
4116                         {if((keycodeb.value == 4) and: ((keycode == ~leftarrow_keycode) or: (unicode == ~j_unicode)), {
4117                                 ~freqmapval5 = ~f5.cpsmidi.round;
4118                                 case
4119                                 {~l1a.isRunning == true}{
4120                                         ~l5a.set(\dur, ~f5 = ~freqmap.at(~freqmapval5 = ~freqmapval5.value-1));
4121                                         ~l5b.set(\dur, ~f5);
4122                                         ~l5c.set(\dur, ~f5/~icd3);
4123                                         ~l5d.set(\dur, ~f5/~icd3);
4124                                         ~l5e.set(\dur, ~f5/~icd6);
4125                                         ~l5f.set(\dur, ~f5/~icd6);
4126                                 }
4127                                 {~l1a1.isRunning == true}{
4128                                         ~l5a1.set(\dur, ~f5 = ~freqmap.at(~freqmapval5 = ~freqmapval5.value-1));
4129                                         ~l5b1.set(\dur, ~f5);
4130                                         ~l5c1.set(\dur, ~f5/~icd3);
4131                                         ~l5d1.set(\dur, ~f5/~icd3);
4132                                         ~l5e1.set(\dur, ~f5/~icd6);
4133                                         ~l5f1.set(\dur, ~f5/~icd6);
4134                                 };
4135                                 if((~f5 > ~outmaxa) or: (~f5 < ~outmina), {~z29.close;~z5.close;~z29 = (CompositeView(w, Rect((~f5.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+50, ~nw, 2)).background = Color.white;);}, {~z5.close;~z29.close;~z5 = (CompositeView(w, Rect((~f5.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+50, ~nw, 2)).background = Color.white;);});
4136
4137                                 ~z25.background = Color.white; ~z1.background = Color.white;
4138                                 ~z26.background = Color.white; ~z2.background = Color.white;
4139                                 ~z27.background = Color.white; ~z3.background = Color.white;
4140                                 ~z28.background = Color.white; ~z4.background = Color.white;
4141                                 ~z29.background = Color.green; ~z5.background = Color.green;
4142                                 ~z30.background = Color.white; ~z6.background = Color.white;
4143                                 ~z31.background = Color.white; ~z7.background = Color.white;
4144                                 ~z32.background = Color.white; ~z8.background = Color.white;
4145                                 ~z33.background = Color.white; ~z9.background = Color.white;
4146                                 ~z34.background = Color.white; ~z10.background = Color.white;
4147                                 ~z35.background = Color.white; ~z11.background = Color.white;
4148                                 ~z36.background = Color.white; ~z12.background = Color.white;
4149                 });});
4150
4151                 if((~f6 >= ~freqmap.at(127)), {~freqmap.at(127)},
4152                         {if((keycodeb.value == 5) and: ((keycode == ~rightarrow_keycode) or: (unicode == ~l_unicode)), {
4153                                 ~freqmapval6 = ~f6.cpsmidi.round;
4154                                 case
4155                                 {~l1a.isRunning == true}{
4156                                         ~l6a.set(\dur, ~f6 = ~freqmap.at(~freqmapval6 = ~freqmapval6.value+1));
4157                                         ~l6b.set(\dur, ~f6);
4158                                         ~l6c.set(\dur, ~f6/~icd3);
4159                                         ~l6d.set(\dur, ~f6/~icd3);
4160                                         ~l6e.set(\dur, ~f6/~icd6);
4161                                         ~l6f.set(\dur, ~f6/~icd6);
4162                                 }
4163                                 {~l1a1.isRunning == true}{
4164                                         ~l6a1.set(\dur, ~f6 = ~freqmap.at(~freqmapval6 = ~freqmapval6.value+1));
4165                                         ~l6b1.set(\dur, ~f6);
4166                                         ~l6c1.set(\dur, ~f6/~icd3);
4167                                         ~l6d1.set(\dur, ~f6/~icd3);
4168                                         ~l6e1.set(\dur, ~f6/~icd6);
4169                                         ~l6f1.set(\dur, ~f6/~icd6);
4170                                 };
4171                                 if((~f6 > ~outmaxa) or: (~f6 < ~outmina), {~z30.close;~z6.close;~z30 = (CompositeView(w, Rect((~f6.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+60, ~nw, 2)).background = Color.white;);}, {~z6.close;~z30.close;~z6 = (CompositeView(w, Rect((~f6.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+60, ~nw, 2)).background = Color.white;);});
4172                                 ~z25.background = Color.white; ~z1.background = Color.white;
4173                                 ~z26.background = Color.white; ~z2.background = Color.white;
4174                                 ~z27.background = Color.white; ~z3.background = Color.white;
4175                                 ~z28.background = Color.white; ~z4.background = Color.white;
4176                                 ~z29.background = Color.white; ~z5.background = Color.white;
4177                                 ~z30.background = Color.green; ~z6.background = Color.green;
4178                                 ~z31.background = Color.white; ~z7.background = Color.white;
4179                                 ~z32.background = Color.white; ~z8.background = Color.white;
4180                                 ~z33.background = Color.white; ~z9.background = Color.white;
4181                                 ~z34.background = Color.white; ~z10.background = Color.white;
4182                                 ~z35.background = Color.white; ~z11.background = Color.white;
4183                                 ~z36.background = Color.white; ~z12.background = Color.white;
4184                 });});
4185                 if((~f6 <= ~freqmap.at(0)), {~freqmap.at(0)},
4186                         {if((keycodeb.value == 5) and: ((keycode == ~leftarrow_keycode) or: (unicode == ~j_unicode)), {
4187                                 ~freqmapval6 = ~f6.cpsmidi.round;
4188                                 case
4189                                 {~l1a.isRunning == true}{
4190                                         ~l6a.set(\dur, ~f6 = ~freqmap.at(~freqmapval6 = ~freqmapval6.value-1));
4191                                         ~l6b.set(\dur, ~f6);
4192                                         ~l6c.set(\dur, ~f6/~icd3);
4193                                         ~l6d.set(\dur, ~f6/~icd3);
4194                                         ~l6e.set(\dur, ~f6/~icd6);
4195                                         ~l6f.set(\dur, ~f6/~icd6);
4196                                 }
4197                                 {~l1a1.isRunning == true}{
4198                                         ~l6a1.set(\dur, ~f6 = ~freqmap.at(~freqmapval6 = ~freqmapval6.value-1));
4199                                         ~l6b1.set(\dur, ~f6);
4200                                         ~l6c1.set(\dur, ~f6/~icd3);
4201                                         ~l6d1.set(\dur, ~f6/~icd3);
4202                                         ~l6e1.set(\dur, ~f6/~icd6);
4203                                         ~l6f1.set(\dur, ~f6/~icd6);
4204                                 };
4205                                 if((~f6 > ~outmaxa) or: (~f6 < ~outmina), {~z30.close;~z6.close;~z30 = (CompositeView(w, Rect((~f6.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+60, ~nw, 2)).background = Color.white;);}, {~z6.close;~z30.close;~z6 = (CompositeView(w, Rect((~f6.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+60, ~nw, 2)).background = Color.white;);});
4206
4207                                 ~z25.background = Color.white; ~z1.background = Color.white;
4208                                 ~z26.background = Color.white; ~z2.background = Color.white;
4209                                 ~z27.background = Color.white; ~z3.background = Color.white;
4210                                 ~z28.background = Color.white; ~z4.background = Color.white;
4211                                 ~z29.background = Color.white; ~z5.background = Color.white;
4212                                 ~z30.background = Color.green; ~z6.background = Color.green;
4213                                 ~z31.background = Color.white; ~z7.background = Color.white;
4214                                 ~z32.background = Color.white; ~z8.background = Color.white;
4215                                 ~z33.background = Color.white; ~z9.background = Color.white;
4216                                 ~z34.background = Color.white; ~z10.background = Color.white;
4217                                 ~z35.background = Color.white; ~z11.background = Color.white;
4218                                 ~z36.background = Color.white; ~z12.background = Color.white;
4219                 });});
4220
4221                 if((~f7 >= ~freqmap.at(127)), {~freqmap.at(127)},
4222                         {if((keycodeb.value == 6) and: ((keycode == ~rightarrow_keycode) or: (unicode == ~l_unicode)), {
4223                                 ~freqmapval7 = ~f7.cpsmidi.round;
4224                                 case
4225                                 {~l1a.isRunning == true}{
4226                                         ~l7a.set(\dur, ~f7 = ~freqmap.at(~freqmapval7 = ~freqmapval7.value+1));
4227                                         ~l7b.set(\dur, ~f7);
4228                                         ~l7c.set(\dur, ~f7/~icd3);
4229                                         ~l7d.set(\dur, ~f7/~icd3);
4230                                         ~l7e.set(\dur, ~f7/~icd6);
4231                                         ~l7f.set(\dur, ~f7/~icd6);
4232                                 }
4233                                 {~l1a1.isRunning == true}{
4234                                         ~l7a1.set(\dur, ~f7 = ~freqmap.at(~freqmapval7 = ~freqmapval7.value+1));
4235                                         ~l7b1.set(\dur, ~f7);
4236                                         ~l7c1.set(\dur, ~f7/~icd3);
4237                                         ~l7d1.set(\dur, ~f7/~icd3);
4238                                         ~l7e1.set(\dur, ~f7/~icd6);
4239                                         ~l7f1.set(\dur, ~f7/~icd6);
4240                                 };
4241                                 if((~f7 > ~outmaxa) or: (~f7 < ~outmina), {~z31.close;~z7.close;~z31 = (CompositeView(w, Rect((~f7.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+70, ~nw, 2)).background = Color.white;);}, {~z7.close;~z31.close;~z7 = (CompositeView(w, Rect((~f7.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+70, ~nw, 2)).background = Color.white;);});
4242                                 ~z25.background = Color.white; ~z1.background = Color.white;
4243                                 ~z26.background = Color.white; ~z2.background = Color.white;
4244                                 ~z27.background = Color.white; ~z3.background = Color.white;
4245                                 ~z28.background = Color.white; ~z4.background = Color.white;
4246                                 ~z29.background = Color.white; ~z5.background = Color.white;
4247                                 ~z30.background = Color.white; ~z6.background = Color.white;
4248                                 ~z31.background = Color.green; ~z7.background = Color.green;
4249                                 ~z32.background = Color.white; ~z8.background = Color.white;
4250                                 ~z33.background = Color.white; ~z9.background = Color.white;
4251                                 ~z34.background = Color.white; ~z10.background = Color.white;
4252                                 ~z35.background = Color.white; ~z11.background = Color.white;
4253                                 ~z36.background = Color.white; ~z12.background = Color.white;
4254                 });});
4255                 if((~f7 <= ~freqmap.at(0)), {~freqmap.at(0)},
4256                         {if((keycodeb.value == 6) and: ((keycode == ~leftarrow_keycode) or: (unicode == ~j_unicode)), {
4257                                 ~freqmapval7 = ~f7.cpsmidi.round;
4258                                 case
4259                                 {~l1a.isRunning == true}{
4260                                         ~l7a.set(\dur, ~f7 = ~freqmap.at(~freqmapval7 = ~freqmapval7.value-1));
4261                                         ~l7b.set(\dur, ~f7);
4262                                         ~l7c.set(\dur, ~f7/~icd3);
4263                                         ~l7d.set(\dur, ~f7/~icd3);
4264                                         ~l7e.set(\dur, ~f7/~icd6);
4265                                         ~l7f.set(\dur, ~f7/~icd6);
4266                                 }
4267                                 {~l1a1.isRunning == true}{
4268                                         ~l7a1.set(\dur, ~f7 = ~freqmap.at(~freqmapval7 = ~freqmapval7.value-1));
4269                                         ~l7b1.set(\dur, ~f7);
4270                                         ~l7c1.set(\dur, ~f7/~icd3);
4271                                         ~l7d1.set(\dur, ~f7/~icd3);
4272                                         ~l7e1.set(\dur, ~f7/~icd6);
4273                                         ~l7f1.set(\dur, ~f7/~icd6);
4274                                 };
4275                                 if((~f7 > ~outmaxa) or: (~f7 < ~outmina), {~z31.close;~z7.close;~z31 = (CompositeView(w, Rect((~f7.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+70, ~nw, 2)).background = Color.white;);}, {~z7.close;~z31.close;~z7 = (CompositeView(w, Rect((~f7.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+70, ~nw, 2)).background = Color.white;);});
4276
4277                                 ~z25.background = Color.white; ~z1.background = Color.white;
4278                                 ~z26.background = Color.white; ~z2.background = Color.white;
4279                                 ~z27.background = Color.white; ~z3.background = Color.white;
4280                                 ~z28.background = Color.white; ~z4.background = Color.white;
4281                                 ~z29.background = Color.white; ~z5.background = Color.white;
4282                                 ~z30.background = Color.white; ~z6.background = Color.white;
4283                                 ~z31.background = Color.green; ~z7.background = Color.green;
4284                                 ~z32.background = Color.white; ~z8.background = Color.white;
4285                                 ~z33.background = Color.white; ~z9.background = Color.white;
4286                                 ~z34.background = Color.white; ~z10.background = Color.white;
4287                                 ~z35.background = Color.white; ~z11.background = Color.white;
4288                                 ~z36.background = Color.white; ~z12.background = Color.white;
4289                 });});
4290
4291                 if((~f8 >= ~freqmap.at(127)), {~freqmap.at(127)},
4292                         {if((keycodeb.value == 7) and: ((keycode == ~rightarrow_keycode) or: (unicode == ~l_unicode)), {
4293                                 ~freqmapval8 = ~f8.cpsmidi.round;
4294                                 case
4295                                 {~l1a.isRunning == true}{
4296                                         ~l8a.set(\dur, ~f8 = ~freqmap.at(~freqmapval8 = ~freqmapval8.value+1));
4297                                         ~l8b.set(\dur, ~f8);
4298                                         ~l8c.set(\dur, ~f8/~icd3);
4299                                         ~l8d.set(\dur, ~f8/~icd3);
4300                                         ~l8e.set(\dur, ~f8/~icd6);
4301                                         ~l8f.set(\dur, ~f8/~icd6);
4302                                 }
4303                                 {~l1a1.isRunning == true}{
4304                                         ~l8a1.set(\dur, ~f8 = ~freqmap.at(~freqmapval8 = ~freqmapval8.value+1));
4305                                         ~l8b1.set(\dur, ~f8);
4306                                         ~l8c1.set(\dur, ~f8/~icd3);
4307                                         ~l8d1.set(\dur, ~f8/~icd3);
4308                                         ~l8e1.set(\dur, ~f8/~icd6);
4309                                         ~l8f1.set(\dur, ~f8/~icd6);
4310                                 };
4311                                 if((~f8 > ~outmaxa) or: (~f8 < ~outmina), {~z32.close;~z8.close;~z32 = (CompositeView(w, Rect((~f8.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+80, ~nw, 2)).background = Color.white;);}, {~z8.close;~z32.close;~z8 = (CompositeView(w, Rect((~f8.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+80, ~nw, 2)).background = Color.white;);});
4312                                 ~z25.background = Color.white; ~z1.background = Color.white;
4313                                 ~z26.background = Color.white; ~z2.background = Color.white;
4314                                 ~z27.background = Color.white; ~z3.background = Color.white;
4315                                 ~z28.background = Color.white; ~z4.background = Color.white;
4316                                 ~z29.background = Color.white; ~z5.background = Color.white;
4317                                 ~z30.background = Color.white; ~z6.background = Color.white;
4318                                 ~z31.background = Color.white; ~z7.background = Color.white;
4319                                 ~z32.background = Color.green; ~z8.background = Color.green;
4320                                 ~z33.background = Color.white; ~z9.background = Color.white;
4321                                 ~z34.background = Color.white; ~z10.background = Color.white;
4322                                 ~z35.background = Color.white; ~z11.background = Color.white;
4323                                 ~z36.background = Color.white; ~z12.background = Color.white;
4324                 });});
4325                 if((~f8 <= ~freqmap.at(0)), {~freqmap.at(0)},
4326                         {if((keycodeb.value == 7) and: ((keycode == ~leftarrow_keycode) or: (unicode == ~j_unicode)), {
4327                                 ~freqmapval8 = ~f8.cpsmidi.round;
4328                                 case
4329                                 {~l1a.isRunning == true}{
4330                                         ~l8a.set(\dur, ~f8 = ~freqmap.at(~freqmapval8 = ~freqmapval8.value-1));
4331                                         ~l8b.set(\dur, ~f8);
4332                                         ~l8c.set(\dur, ~f8/~icd3);
4333                                         ~l8d.set(\dur, ~f8/~icd3);
4334                                         ~l8e.set(\dur, ~f8/~icd6);
4335                                         ~l8f.set(\dur, ~f8/~icd6);
4336                                 }
4337                                 {~l1a1.isRunning == true}{
4338                                         ~l8a1.set(\dur, ~f8 = ~freqmap.at(~freqmapval8 = ~freqmapval8.value-1));
4339                                         ~l8b1.set(\dur, ~f8);
4340                                         ~l8c1.set(\dur, ~f8/~icd3);
4341                                         ~l8d1.set(\dur, ~f8/~icd3);
4342                                         ~l8e1.set(\dur, ~f8/~icd6);
4343                                         ~l8f1.set(\dur, ~f8/~icd6);
4344                                 };
4345                                 if((~f8 > ~outmaxa) or: (~f8 < ~outmina), {~z32.close;~z8.close;~z32 = (CompositeView(w, Rect((~f8.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+80, ~nw, 2)).background = Color.white;);}, {~z8.close;~z32.close;~z8 = (CompositeView(w, Rect((~f8.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+80, ~nw, 2)).background = Color.white;);});
4346
4347                                 ~z25.background = Color.white; ~z1.background = Color.white;
4348                                 ~z26.background = Color.white; ~z2.background = Color.white;
4349                                 ~z27.background = Color.white; ~z3.background = Color.white;
4350                                 ~z28.background = Color.white; ~z4.background = Color.white;
4351                                 ~z29.background = Color.white; ~z5.background = Color.white;
4352                                 ~z30.background = Color.white; ~z6.background = Color.white;
4353                                 ~z31.background = Color.white; ~z7.background = Color.white;
4354                                 ~z32.background = Color.green; ~z8.background = Color.green;
4355                                 ~z33.background = Color.white; ~z9.background = Color.white;
4356                                 ~z34.background = Color.white; ~z10.background = Color.white;
4357                                 ~z35.background = Color.white; ~z11.background = Color.white;
4358                                 ~z36.background = Color.white; ~z12.background = Color.white;
4359                 });});
4360
4361                 if((~f9 >= ~freqmap.at(127)), {~freqmap.at(127)},
4362                         {if((keycodeb.value == 8) and: ((keycode == ~rightarrow_keycode) or: (unicode == ~l_unicode)), {
4363                                 ~freqmapval9 = ~f9.cpsmidi.round;
4364                                 case
4365                                 {~l1a.isRunning == true}{
4366                                         ~l9a.set(\dur, ~f9 = ~freqmap.at(~freqmapval9 = ~freqmapval9.value+1));
4367                                         ~l9b.set(\dur, ~f9);
4368                                         ~l9c.set(\dur, ~f9/~icd3);
4369                                         ~l9d.set(\dur, ~f9/~icd3);
4370                                         ~l9e.set(\dur, ~f9/~icd6);
4371                                         ~l9f.set(\dur, ~f9/~icd6);
4372                                 }
4373                                 {~l1a1.isRunning == true}{
4374                                         ~l9a1.set(\dur, ~f9 = ~freqmap.at(~freqmapval9 = ~freqmapval9.value+1));
4375                                         ~l9b1.set(\dur, ~f9);
4376                                         ~l9c1.set(\dur, ~f9/~icd3);
4377                                         ~l9d1.set(\dur, ~f9/~icd3);
4378                                         ~l9e1.set(\dur, ~f9/~icd6);
4379                                         ~l9f1.set(\dur, ~f9/~icd6);
4380                                 };
4381                                 if((~f9 > ~outmaxa) or: (~f9 < ~outmina), {~z33.close;~z9.close;~z33 = (CompositeView(w, Rect((~f9.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+90, ~nw, 2)).background = Color.white;);}, {~z9.close;~z33.close;~z9 = (CompositeView(w, Rect((~f9.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+90, ~nw, 2)).background = Color.white;);});
4382                                 ~z25.background = Color.white; ~z1.background = Color.white;
4383                                 ~z26.background = Color.white; ~z2.background = Color.white;
4384                                 ~z27.background = Color.white; ~z3.background = Color.white;
4385                                 ~z28.background = Color.white; ~z4.background = Color.white;
4386                                 ~z29.background = Color.white; ~z5.background = Color.white;
4387                                 ~z30.background = Color.white; ~z6.background = Color.white;
4388                                 ~z31.background = Color.white; ~z7.background = Color.white;
4389                                 ~z32.background = Color.white; ~z8.background = Color.white;
4390                                 ~z33.background = Color.green; ~z9.background = Color.green;
4391                                 ~z34.background = Color.white; ~z10.background = Color.white;
4392                                 ~z35.background = Color.white; ~z11.background = Color.white;
4393                                 ~z36.background = Color.white; ~z12.background = Color.white;
4394                 });});
4395                 if((~f9 <= ~freqmap.at(0)), {~freqmap.at(0)},
4396                         {if((keycodeb.value == 8) and: ((keycode == ~leftarrow_keycode) or: (unicode == ~j_unicode)), {
4397                                 ~freqmapval9 = ~f9.cpsmidi.round;
4398                                 case
4399                                 {~l1a.isRunning == true}{
4400                                         ~l9a.set(\dur, ~f9 = ~freqmap.at(~freqmapval9 = ~freqmapval9.value-1));
4401                                         ~l9b.set(\dur, ~f9);
4402                                         ~l9c.set(\dur, ~f9/~icd3);
4403                                         ~l9d.set(\dur, ~f9/~icd3);
4404                                         ~l9e.set(\dur, ~f9/~icd6);
4405                                         ~l9f.set(\dur, ~f9/~icd6);
4406                                 }
4407                                 {~l1a1.isRunning == true}{
4408                                         ~l9a1.set(\dur, ~f9 = ~freqmap.at(~freqmapval9 = ~freqmapval9.value-1));
4409                                         ~l9b1.set(\dur, ~f9);
4410                                         ~l9c1.set(\dur, ~f9/~icd3);
4411                                         ~l9d1.set(\dur, ~f9/~icd3);
4412                                         ~l9e1.set(\dur, ~f9/~icd6);
4413                                         ~l9f1.set(\dur, ~f9/~icd6);
4414                                 };
4415                                 if((~f9 > ~outmaxa) or: (~f9 < ~outmina), {~z33.close;~z9.close;~z33 = (CompositeView(w, Rect((~f9.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+90, ~nw, 2)).background = Color.white;);}, {~z9.close;~z33.close;~z9 = (CompositeView(w, Rect((~f9.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+90, ~nw, 2)).background = Color.white;);});
4416
4417                                 ~z25.background = Color.white; ~z1.background = Color.white;
4418                                 ~z26.background = Color.white; ~z2.background = Color.white;
4419                                 ~z27.background = Color.white; ~z3.background = Color.white;
4420                                 ~z28.background = Color.white; ~z4.background = Color.white;
4421                                 ~z29.background = Color.white; ~z5.background = Color.white;
4422                                 ~z30.background = Color.white; ~z6.background = Color.white;
4423                                 ~z31.background = Color.white; ~z7.background = Color.white;
4424                                 ~z32.background = Color.white; ~z8.background = Color.white;
4425                                 ~z33.background = Color.green; ~z9.background = Color.green;
4426                                 ~z34.background = Color.white; ~z10.background = Color.white;
4427                                 ~z35.background = Color.white; ~z11.background = Color.white;
4428                                 ~z36.background = Color.white; ~z12.background = Color.white;
4429                 });});
4430
4431                 if((~f10 >= ~freqmap.at(127)), {~freqmap.at(127)},
4432                         {if((keycodeb.value == 9) and: ((keycode == ~rightarrow_keycode) or: (unicode == ~l_unicode)), {
4433                                 ~freqmapval10 = ~f10.cpsmidi.round;
4434                                 case
4435                                 {~l1a.isRunning == true}{
4436                                         ~l10a.set(\dur, ~f10 = ~freqmap.at(~freqmapval10 = ~freqmapval10.value+1));
4437                                         ~l10b.set(\dur, ~f10);
4438                                         ~l10c.set(\dur, ~f10/~icd3);
4439                                         ~l10d.set(\dur, ~f10/~icd3);
4440                                         ~l10e.set(\dur, ~f10/~icd6);
4441                                         ~l10f.set(\dur, ~f10/~icd6);
4442                                 }
4443                                 {~l1a1.isRunning == true}{
4444                                         ~l10a1.set(\dur, ~f10 = ~freqmap.at(~freqmapval10 = ~freqmapval10.value+1));
4445                                         ~l10b1.set(\dur, ~f10);
4446                                         ~l10c1.set(\dur, ~f10/~icd3);
4447                                         ~l10d1.set(\dur, ~f10/~icd3);
4448                                         ~l10e1.set(\dur, ~f10/~icd6);
4449                                         ~l10f1.set(\dur, ~f10/~icd6);
4450                                 };
4451                                 if((~f10 > ~outmaxa) or: (~f10 < ~outmina), {~z34.close;~z10.close;~z34 = (CompositeView(w, Rect((~f10.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+100, ~nw, 2)).background = Color.white;);}, {~z10.close;~z34.close;~z10 = (CompositeView(w, Rect((~f10.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+100, ~nw, 2)).background = Color.white;);});
4452                                 ~z25.background = Color.white; ~z1.background = Color.white;
4453                                 ~z26.background = Color.white; ~z2.background = Color.white;
4454                                 ~z27.background = Color.white; ~z3.background = Color.white;
4455                                 ~z28.background = Color.white; ~z4.background = Color.white;
4456                                 ~z29.background = Color.white; ~z5.background = Color.white;
4457                                 ~z30.background = Color.white; ~z6.background = Color.white;
4458                                 ~z31.background = Color.white; ~z7.background = Color.white;
4459                                 ~z32.background = Color.white; ~z8.background = Color.white;
4460                                 ~z33.background = Color.white; ~z9.background = Color.white;
4461                                 ~z34.background = Color.green; ~z10.background = Color.green;
4462                                 ~z35.background = Color.white; ~z11.background = Color.white;
4463                                 ~z36.background = Color.white; ~z12.background = Color.white;
4464                 });});
4465                 if((~f10 <= ~freqmap.at(0)), {~freqmap.at(0)},
4466                         {if((keycodeb.value == 9) and: ((keycode == ~leftarrow_keycode) or: (unicode == ~j_unicode)), {
4467                                 ~freqmapval10 = ~f10.cpsmidi.round;
4468                                 case
4469                                 {~l1a.isRunning == true}{
4470                                         ~l10a.set(\dur, ~f10 = ~freqmap.at(~freqmapval10 = ~freqmapval10.value-1));
4471                                         ~l10b.set(\dur, ~f10);
4472                                         ~l10c.set(\dur, ~f10/~icd3);
4473                                         ~l10d.set(\dur, ~f10/~icd3);
4474                                         ~l10e.set(\dur, ~f10/~icd6);
4475                                         ~l10f.set(\dur, ~f10/~icd6);
4476                                 }
4477                                 {~l1a1.isRunning == true}{
4478                                         ~l10a1.set(\dur, ~f10 = ~freqmap.at(~freqmapval10 = ~freqmapval10.value-1));
4479                                         ~l10b1.set(\dur, ~f10);
4480                                         ~l10c1.set(\dur, ~f10/~icd3);
4481                                         ~l10d1.set(\dur, ~f10/~icd3);
4482                                         ~l10e1.set(\dur, ~f10/~icd6);
4483                                         ~l10f1.set(\dur, ~f10/~icd6);
4484                                 };
4485                                 if((~f10 > ~outmaxa) or: (~f10 < ~outmina), {~z34.close;~z10.close;~z34 = (CompositeView(w, Rect((~f10.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+100, ~nw, 2)).background = Color.white;);}, {~z10.close;~z34.close;~z10 = (CompositeView(w, Rect((~f10.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+100, ~nw, 2)).background = Color.white;);});
4486
4487                                 ~z25.background = Color.white; ~z1.background = Color.white;
4488                                 ~z26.background = Color.white; ~z2.background = Color.white;
4489                                 ~z27.background = Color.white; ~z3.background = Color.white;
4490                                 ~z28.background = Color.white; ~z4.background = Color.white;
4491                                 ~z29.background = Color.white; ~z5.background = Color.white;
4492                                 ~z30.background = Color.white; ~z6.background = Color.white;
4493                                 ~z31.background = Color.white; ~z7.background = Color.white;
4494                                 ~z32.background = Color.white; ~z8.background = Color.white;
4495                                 ~z33.background = Color.white; ~z9.background = Color.white;
4496                                 ~z34.background = Color.green; ~z10.background = Color.green;
4497                                 ~z35.background = Color.white; ~z11.background = Color.white;
4498                                 ~z36.background = Color.white; ~z12.background = Color.white;
4499                 });});
4500
4501                 if((~f11 >= ~freqmap.at(127)), {~freqmap.at(127)},
4502                         {if((keycodeb.value == 10) and: ((keycode == ~rightarrow_keycode) or: (unicode == ~l_unicode)), {
4503                                 ~freqmapval11 = ~f11.cpsmidi.round;
4504                                 case
4505                                 {~l1a.isRunning == true}{
4506                                         ~l11a.set(\dur, ~f11 = ~freqmap.at(~freqmapval11 = ~freqmapval11.value+1));
4507                                         ~l11b.set(\dur, ~f11);
4508                                         ~l11c.set(\dur, ~f11/~icd3);
4509                                         ~l11d.set(\dur, ~f11/~icd3);
4510                                         ~l11e.set(\dur, ~f11/~icd6);
4511                                         ~l11f.set(\dur, ~f11/~icd6);
4512                                 }
4513                                 {~l1a1.isRunning == true}{
4514                                         ~l11a1.set(\dur, ~f11 = ~freqmap.at(~freqmapval11 = ~freqmapval11.value+1));
4515                                         ~l11b1.set(\dur, ~f11);
4516                                         ~l11c1.set(\dur, ~f11/~icd3);
4517                                         ~l11d1.set(\dur, ~f11/~icd3);
4518                                         ~l11e1.set(\dur, ~f11/~icd6);
4519                                         ~l11f1.set(\dur, ~f11/~icd6);
4520                                 };
4521                                 if((~f11 > ~outmaxa) or: (~f11 < ~outmina), {~z35.close;~z11.close;~z35 = (CompositeView(w, Rect((~f11.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+110, ~nw, 2)).background = Color.white;);}, {~z11.close;~z35.close;~z11 = (CompositeView(w, Rect((~f11.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+110, ~nw, 2)).background = Color.white;);});
4522                                 ~z25.background = Color.white; ~z1.background = Color.white;
4523                                 ~z26.background = Color.white; ~z2.background = Color.white;
4524                                 ~z27.background = Color.white; ~z3.background = Color.white;
4525                                 ~z28.background = Color.white; ~z4.background = Color.white;
4526                                 ~z29.background = Color.white; ~z5.background = Color.white;
4527                                 ~z30.background = Color.white; ~z6.background = Color.white;
4528                                 ~z31.background = Color.white; ~z7.background = Color.white;
4529                                 ~z32.background = Color.white; ~z8.background = Color.white;
4530                                 ~z33.background = Color.white; ~z9.background = Color.white;
4531                                 ~z34.background = Color.white; ~z10.background = Color.white;
4532                                 ~z35.background = Color.green; ~z11.background = Color.green;
4533                                 ~z36.background = Color.white; ~z12.background = Color.white;
4534                 });});
4535                 if((~f11 <= ~freqmap.at(0)), {~freqmap.at(0)},
4536                         {if((keycodeb.value == 10) and: ((keycode == ~leftarrow_keycode) or: (unicode == ~j_unicode)), {
4537                                 ~freqmapval11 = ~f11.cpsmidi.round;
4538                                 case
4539                                 {~l1a.isRunning == true}{
4540                                         ~l11a.set(\dur, ~f11 = ~freqmap.at(~freqmapval11 = ~freqmapval11.value-1));
4541                                         ~l11b.set(\dur, ~f11);
4542                                         ~l11c.set(\dur, ~f11/~icd3);
4543                                         ~l11d.set(\dur, ~f11/~icd3);
4544                                         ~l11e.set(\dur, ~f11/~icd6);
4545                                         ~l11f.set(\dur, ~f11/~icd6);
4546                                 }
4547                                 {~l1a1.isRunning == true}{
4548                                         ~l11a1.set(\dur, ~f11 = ~freqmap.at(~freqmapval11 = ~freqmapval11.value-1));
4549                                         ~l11b1.set(\dur, ~f11);
4550                                         ~l11c1.set(\dur, ~f11/~icd3);
4551                                         ~l11d1.set(\dur, ~f11/~icd3);
4552                                         ~l11e1.set(\dur, ~f11/~icd6);
4553                                         ~l11f1.set(\dur, ~f11/~icd6);
4554                                 };
4555                                 if((~f11 > ~outmaxa) or: (~f11 < ~outmina), {~z35.close;~z11.close;~z35 = (CompositeView(w, Rect((~f11.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+110, ~nw, 2)).background = Color.white;);}, {~z11.close;~z35.close;~z11 = (CompositeView(w, Rect((~f11.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+110, ~nw, 2)).background = Color.white;);});
4556
4557                                 ~z25.background = Color.white; ~z1.background = Color.white;
4558                                 ~z26.background = Color.white; ~z2.background = Color.white;
4559                                 ~z27.background = Color.white; ~z3.background = Color.white;
4560                                 ~z28.background = Color.white; ~z4.background = Color.white;
4561                                 ~z29.background = Color.white; ~z5.background = Color.white;
4562                                 ~z30.background = Color.white; ~z6.background = Color.white;
4563                                 ~z31.background = Color.white; ~z7.background = Color.white;
4564                                 ~z32.background = Color.white; ~z8.background = Color.white;
4565                                 ~z33.background = Color.white; ~z9.background = Color.white;
4566                                 ~z34.background = Color.white; ~z10.background = Color.white;
4567                                 ~z35.background = Color.green; ~z11.background = Color.green;
4568                                 ~z36.background = Color.white; ~z12.background = Color.white;
4569                 });});
4570
4571                 if((~f12 >= ~freqmap.at(127)), {~freqmap.at(127)},
4572                         {if((keycodeb.value == 11) and: ((keycode == ~rightarrow_keycode) or: (unicode == ~l_unicode)), {
4573                                 ~freqmapval12 = ~f12.cpsmidi.round;
4574                                 case
4575                                 {~l1a.isRunning == true}{
4576                                         ~l12a.set(\dur, ~f12 = ~freqmap.at(~freqmapval12 = ~freqmapval12.value+1));
4577                                         ~l12b.set(\dur, ~f12);
4578                                         ~l12c.set(\dur, ~f12/~icd3);
4579                                         ~l12d.set(\dur, ~f12/~icd3);
4580                                         ~l12e.set(\dur, ~f12/~icd6);
4581                                         ~l12f.set(\dur, ~f12/~icd6);
4582                                 }
4583                                 {~l1a1.isRunning == true}{
4584                                         ~l12a1.set(\dur, ~f12 = ~freqmap.at(~freqmapval12 = ~freqmapval12.value+1));
4585                                         ~l12b1.set(\dur, ~f12);
4586                                         ~l12c1.set(\dur, ~f12/~icd3);
4587                                         ~l12d1.set(\dur, ~f12/~icd3);
4588                                         ~l12e1.set(\dur, ~f12/~icd6);
4589                                         ~l12f1.set(\dur, ~f12/~icd6);
4590                                 };
4591                                 if((~f12 > ~outmaxa) or: (~f12 < ~outmina), {~z36.close;~z12.close;~z36 = (CompositeView(w, Rect((~f12.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+120, ~nw, 2)).background = Color.white;);}, {~z12.close;~z36.close;~z12 = (CompositeView(w, Rect((~f12.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+120, ~nw, 2)).background = Color.white;);});
4592                                 ~z25.background = Color.white; ~z1.background = Color.white;
4593                                 ~z26.background = Color.white; ~z2.background = Color.white;
4594                                 ~z27.background = Color.white; ~z3.background = Color.white;
4595                                 ~z28.background = Color.white; ~z4.background = Color.white;
4596                                 ~z29.background = Color.white; ~z5.background = Color.white;
4597                                 ~z30.background = Color.white; ~z6.background = Color.white;
4598                                 ~z31.background = Color.white; ~z7.background = Color.white;
4599                                 ~z32.background = Color.white; ~z8.background = Color.white;
4600                                 ~z33.background = Color.white; ~z9.background = Color.white;
4601                                 ~z34.background = Color.white; ~z10.background = Color.white;
4602                                 ~z35.background = Color.white; ~z11.background = Color.white;
4603                                 ~z36.background = Color.green; ~z12.background = Color.green;
4604                 });});
4605                 if((~f12 <= ~freqmap.at(0)), {~freqmap.at(0)},
4606                         {if((keycodeb.value == 11) and: ((keycode == ~leftarrow_keycode) or: (unicode == ~j_unicode)), {
4607                                 ~freqmapval12 = ~f12.cpsmidi.round;
4608                                 case
4609                                 {~l1a.isRunning == true}{
4610                                         ~l12a.set(\dur, ~f12 = ~freqmap.at(~freqmapval12 = ~freqmapval12.value-1));
4611                                         ~l12b.set(\dur, ~f12);
4612                                         ~l12c.set(\dur, ~f12/~icd3);
4613                                         ~l12d.set(\dur, ~f12/~icd3);
4614                                         ~l12e.set(\dur, ~f12/~icd6);
4615                                         ~l12f.set(\dur, ~f12/~icd6);
4616                                 }
4617                                 {~l1a1.isRunning == true}{
4618                                         ~l12a1.set(\dur, ~f12 = ~freqmap.at(~freqmapval12 = ~freqmapval12.value-1));
4619                                         ~l12b1.set(\dur, ~f12);
4620                                         ~l12c1.set(\dur, ~f12/~icd3);
4621                                         ~l12d1.set(\dur, ~f12/~icd3);
4622                                         ~l12e1.set(\dur, ~f12/~icd6);
4623                                         ~l12f1.set(\dur, ~f12/~icd6);
4624                                 };
4625                                 if((~f12 > ~outmaxa) or: (~f12 < ~outmina), {~z36.close;~z12.close;~z36 = (CompositeView(w, Rect((~f12.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+120, ~nw, 2)).background = Color.white;);}, {~z12.close;~z36.close;~z12 = (CompositeView(w, Rect((~f12.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+120, ~nw, 2)).background = Color.white;);});
4626
4627                                 ~z25.background = Color.white; ~z1.background = Color.white;
4628                                 ~z26.background = Color.white; ~z2.background = Color.white;
4629                                 ~z27.background = Color.white; ~z3.background = Color.white;
4630                                 ~z28.background = Color.white; ~z4.background = Color.white;
4631                                 ~z29.background = Color.white; ~z5.background = Color.white;
4632                                 ~z30.background = Color.white; ~z6.background = Color.white;
4633                                 ~z31.background = Color.white; ~z7.background = Color.white;
4634                                 ~z32.background = Color.white; ~z8.background = Color.white;
4635                                 ~z33.background = Color.white; ~z9.background = Color.white;
4636                                 ~z34.background = Color.white; ~z10.background = Color.white;
4637                                 ~z35.background = Color.white; ~z11.background = Color.white;
4638                                 ~z36.background = Color.green; ~z12.background = Color.green;
4639                 });});
4640
4641
4642
4643         };
4644
4645
4646         //if routine function values are nil
4647
4648         if(~rslot1a == nil, {~rslot1a = ~bplaceo1;}); if(~rslot1b == nil, {~rslot1b = ~bplacef1;});
4649         if(~rslot2 == nil, {~rslot2 = ~bplacef2;});
4650         if(~rslot3 == nil, {~rslot3 = ~bplacef3;});
4651         if(~rslot4 == nil, {~rslot4 = ~bplacef4;});
4652         if(~rslot5 == nil, {~rslot5 = ~bplacef5;});
4653         if(~rslot6 == nil, {~rslot6 = ~bplacef6;});
4654         if(~rslot7 == nil, {~rslot7 = ~bplacef7;});
4655         if(~rslot8 == nil, {~rslot8 = ~bplacef8;});
4656         if(~rtimeall == nil, {~rtimeall = 8;});
4657         if(~rtime1 == nil, {~rtime1 = 8;});
4658         if(~rtime2 == nil, {~rtime2 = 8;});
4659         if(~rtime3 == nil, {~rtime3 = 8;});
4660         if(~rtime4 == nil, {~rtime4 = 8;});
4661         if(~rtime5 == nil, {~rtime5 = 8;});
4662         if(~rtime6 == nil, {~rtime6 = 8;});
4663         if(~rtime7 == nil, {~rtime7 = 8;});
4664         if(~rtime8 == nil, {~rtime8 = 8;});
4665         if(~rdoall == nil, {~rdoall = 1;});
4666         if(~rdo1a == nil, {~rdo1a = "o1";}); if(~rdo1b == nil, {~rdo1b = "f1";});
4667         if(~rdo2 == nil, {~rdo2 = "f2";});
4668         if(~rdo3 == nil, {~rdo3 = "f3";});
4669         if(~rdo4 == nil, {~rdo4 = "f4";});
4670         if(~rdo5 == nil, {~rdo5 = "f5";});
4671         if(~rdo6 == nil, {~rdo6 = "f6";});
4672         if(~rdo7 == nil, {~rdo7 = "f7";});
4673         if(~rdo8 == nil, {~rdo8 = "f8";});
4674
4675
4676         //misc. routine button functions (see below)
4677
4678         ~si1aset = {
4679                 if(~si1a.value == "o1", {~rslot1a = ~bplaceo1; ~rdo1a = ~si1a.value;});
4680                 if(~si1a.value == "f1", {~rslot1a = ~bplacef1; ~rdo1a = ~si1a.value;});
4681                 if(~si1a.value == "s1", {~rslot1a = ~bplaces1; ~rdo1a = ~si1a.value;});
4682                 if(~si1a.value == "o2", {~rslot1a = ~bplaceo2; ~rdo1a = ~si1a.value;});
4683                 if(~si1a.value == "f2", {~rslot1a = ~bplacef2; ~rdo1a = ~si1a.value;});
4684                 if(~si1a.value == "s2", {~rslot1a = ~bplaces2; ~rdo1a = ~si1a.value;});
4685                 if(~si1a.value == "o3", {~rslot1a = ~bplaceo3; ~rdo1a = ~si1a.value;});
4686                 if(~si1a.value == "f3", {~rslot1a = ~bplacef3; ~rdo1a = ~si1a.value;});
4687                 if(~si1a.value == "s3", {~rslot1a = ~bplaces3; ~rdo1a = ~si1a.value;});
4688                 if(~si1a.value == "o4", {~rslot1a = ~bplaceo4; ~rdo1a = ~si1a.value;});
4689                 if(~si1a.value == "f4", {~rslot1a = ~bplacef4; ~rdo1a = ~si1a.value;});
4690                 if(~si1a.value == "s4", {~rslot1a = ~bplaces4; ~rdo1a = ~si1a.value;});
4691                 if(~si1a.value == "o5", {~rslot1a = ~bplaceo5; ~rdo1a = ~si1a.value;});
4692                 if(~si1a.value == "f5", {~rslot1a = ~bplacef5; ~rdo1a = ~si1a.value;});
4693                 if(~si1a.value == "s5", {~rslot1a = ~bplaces5; ~rdo1a = ~si1a.value;});
4694                 if(~si1a.value == "o6", {~rslot1a = ~bplaceo6; ~rdo1a = ~si1a.value;});
4695                 if(~si1a.value == "f6", {~rslot1a = ~bplacef6; ~rdo1a = ~si1a.value;});
4696                 if(~si1a.value == "s6", {~rslot1a = ~bplaces6; ~rdo1a = ~si1a.value;});
4697                 if(~si1a.value == "o7", {~rslot1a = ~bplaceo7; ~rdo1a = ~si1a.value;});
4698                 if(~si1a.value == "f7", {~rslot1a = ~bplacef7; ~rdo1a = ~si1a.value;});
4699                 if(~si1a.value == "s7", {~rslot1a = ~bplaces7; ~rdo1a = ~si1a.value;});
4700                 if(~si1a.value == "o8", {~rslot1a = ~bplaceo8; ~rdo1a = ~si1a.value;});
4701                 if(~si1a.value == "f8", {~rslot1a = ~bplacef8; ~rdo1a = ~si1a.value;});
4702                 if(~si1a.value == "s8", {~rslot1a = ~bplaces8; ~rdo1a = ~si1a.value;});
4703         };
4704         ~si1bset = {
4705                 if(~si1b.value == "o1", {~rslot1b = ~bplaceo1; ~rdo1b = ~si1b.value;});
4706                 if(~si1b.value == "f1", {~rslot1b = ~bplacef1; ~rdo1b = ~si1b.value;});
4707                 if(~si1b.value == "s1", {~rslot1b = ~bplaces1; ~rdo1b = ~si1b.value;});
4708                 if(~si1b.value == "o2", {~rslot1b = ~bplaceo2; ~rdo1b = ~si1b.value;});
4709                 if(~si1b.value == "f2", {~rslot1b = ~bplacef2; ~rdo1b = ~si1b.value;});
4710                 if(~si1b.value == "s2", {~rslot1b = ~bplaces2; ~rdo1b = ~si1b.value;});
4711                 if(~si1b.value == "o3", {~rslot1b = ~bplaceo3; ~rdo1b = ~si1b.value;});
4712                 if(~si1b.value == "f3", {~rslot1b = ~bplacef3; ~rdo1b = ~si1b.value;});
4713                 if(~si1b.value == "s3", {~rslot1b = ~bplaces3; ~rdo1b = ~si1b.value;});
4714                 if(~si1b.value == "o4", {~rslot1b = ~bplaceo4; ~rdo1b = ~si1b.value;});
4715                 if(~si1b.value == "f4", {~rslot1b = ~bplacef4; ~rdo1b = ~si1b.value;});
4716                 if(~si1b.value == "s4", {~rslot1b = ~bplaces4; ~rdo1b = ~si1b.value;});
4717                 if(~si1b.value == "o5", {~rslot1b = ~bplaceo5; ~rdo1b = ~si1b.value;});
4718                 if(~si1b.value == "f5", {~rslot1b = ~bplacef5; ~rdo1b = ~si1b.value;});
4719                 if(~si1b.value == "s5", {~rslot1b = ~bplaces5; ~rdo1b = ~si1b.value;});
4720                 if(~si1b.value == "o6", {~rslot1b = ~bplaceo6; ~rdo1b = ~si1b.value;});
4721                 if(~si1b.value == "f6", {~rslot1b = ~bplacef6; ~rdo1b = ~si1b.value;});
4722                 if(~si1b.value == "s6", {~rslot1b = ~bplaces6; ~rdo1b = ~si1b.value;});
4723                 if(~si1b.value == "o7", {~rslot1b = ~bplaceo7; ~rdo1b = ~si1b.value;});
4724                 if(~si1b.value == "f7", {~rslot1b = ~bplacef7; ~rdo1b = ~si1b.value;});
4725                 if(~si1b.value == "s7", {~rslot1b = ~bplaces7; ~rdo1b = ~si1b.value;});
4726                 if(~si1b.value == "o8", {~rslot1b = ~bplaceo8; ~rdo1b = ~si1b.value;});
4727                 if(~si1b.value == "f8", {~rslot1b = ~bplacef8; ~rdo1b = ~si1b.value;});
4728                 if(~si1b.value == "s8", {~rslot1b = ~bplaces8; ~rdo1b = ~si1b.value;});
4729         };
4730         ~si2set = {
4731                 if(~si2.value == "o1", {~rslot2 = ~bplaceo1; ~rdo2 = ~si2.value;});
4732                 if(~si2.value == "f1", {~rslot2 = ~bplacef1; ~rdo2 = ~si2.value;});
4733                 if(~si2.value == "s1", {~rslot2 = ~bplaces1; ~rdo2 = ~si2.value;});
4734                 if(~si2.value == "o2", {~rslot2 = ~bplaceo2; ~rdo2 = ~si2.value;});
4735                 if(~si2.value == "f2", {~rslot2 = ~bplacef2; ~rdo2 = ~si2.value;});
4736                 if(~si2.value == "s2", {~rslot2 = ~bplaces2; ~rdo2 = ~si2.value;});
4737                 if(~si2.value == "o3", {~rslot2 = ~bplaceo3; ~rdo2 = ~si2.value;});
4738                 if(~si2.value == "f3", {~rslot2 = ~bplacef3; ~rdo2 = ~si2.value;});
4739                 if(~si2.value == "s3", {~rslot2 = ~bplaces3; ~rdo2 = ~si2.value;});
4740                 if(~si2.value == "o4", {~rslot2 = ~bplaceo4; ~rdo2 = ~si2.value;});
4741                 if(~si2.value == "f4", {~rslot2 = ~bplacef4; ~rdo2 = ~si2.value;});
4742                 if(~si2.value == "s4", {~rslot2 = ~bplaces4; ~rdo2 = ~si2.value;});
4743                 if(~si2.value == "o5", {~rslot2 = ~bplaceo5; ~rdo2 = ~si2.value;});
4744                 if(~si2.value == "f5", {~rslot2 = ~bplacef5; ~rdo2 = ~si2.value;});
4745                 if(~si2.value == "s5", {~rslot2 = ~bplaces5; ~rdo2 = ~si2.value;});
4746                 if(~si2.value == "o6", {~rslot2 = ~bplaceo6; ~rdo2 = ~si2.value;});
4747                 if(~si2.value == "f6", {~rslot2 = ~bplacef6; ~rdo2 = ~si2.value;});
4748                 if(~si2.value == "s6", {~rslot2 = ~bplaces6; ~rdo2 = ~si2.value;});
4749                 if(~si2.value == "o7", {~rslot2 = ~bplaceo7; ~rdo2 = ~si2.value;});
4750                 if(~si2.value == "f7", {~rslot2 = ~bplacef7; ~rdo2 = ~si2.value;});
4751                 if(~si2.value == "s7", {~rslot2 = ~bplaces7; ~rdo2 = ~si2.value;});
4752                 if(~si2.value == "o8", {~rslot2 = ~bplaceo8; ~rdo2 = ~si2.value;});
4753                 if(~si2.value == "f8", {~rslot2 = ~bplacef8; ~rdo2 = ~si2.value;});
4754                 if(~si2.value == "s8", {~rslot2 = ~bplaces8; ~rdo2 = ~si2.value;});
4755         };
4756         ~si3set = {
4757                 if(~si3.value == "o1", {~rslot3 = ~bplaceo1; ~rdo3 = ~si3.value;});
4758                 if(~si3.value == "f1", {~rslot3 = ~bplacef1; ~rdo3 = ~si3.value;});
4759                 if(~si3.value == "s1", {~rslot3 = ~bplaces1; ~rdo3 = ~si3.value;});
4760                 if(~si3.value == "o2", {~rslot3 = ~bplaceo2; ~rdo3 = ~si3.value;});
4761                 if(~si3.value == "f2", {~rslot3 = ~bplacef2; ~rdo3 = ~si3.value;});
4762                 if(~si3.value == "s2", {~rslot3 = ~bplaces2; ~rdo3 = ~si3.value;});
4763                 if(~si3.value == "o3", {~rslot3 = ~bplaceo3; ~rdo3 = ~si3.value;});
4764                 if(~si3.value == "f3", {~rslot3 = ~bplacef3; ~rdo3 = ~si3.value;});
4765                 if(~si3.value == "s3", {~rslot3 = ~bplaces3; ~rdo3 = ~si3.value;});
4766                 if(~si3.value == "o4", {~rslot3 = ~bplaceo4; ~rdo3 = ~si3.value;});
4767                 if(~si3.value == "f4", {~rslot3 = ~bplacef4; ~rdo3 = ~si3.value;});
4768                 if(~si3.value == "s4", {~rslot3 = ~bplaces4; ~rdo3 = ~si3.value;});
4769                 if(~si3.value == "o5", {~rslot3 = ~bplaceo5; ~rdo3 = ~si3.value;});
4770                 if(~si3.value == "f5", {~rslot3 = ~bplacef5; ~rdo3 = ~si3.value;});
4771                 if(~si3.value == "s5", {~rslot3 = ~bplaces5; ~rdo3 = ~si3.value;});
4772                 if(~si3.value == "o6", {~rslot3 = ~bplaceo6; ~rdo3 = ~si3.value;});
4773                 if(~si3.value == "f6", {~rslot3 = ~bplacef6; ~rdo3 = ~si3.value;});
4774                 if(~si3.value == "s6", {~rslot3 = ~bplaces6; ~rdo3 = ~si3.value;});
4775                 if(~si3.value == "o7", {~rslot3 = ~bplaceo7; ~rdo3 = ~si3.value;});
4776                 if(~si3.value == "f7", {~rslot3 = ~bplacef7; ~rdo3 = ~si3.value;});
4777                 if(~si3.value == "s7", {~rslot3 = ~bplaces7; ~rdo3 = ~si3.value;});
4778                 if(~si3.value == "o8", {~rslot3 = ~bplaceo8; ~rdo3 = ~si3.value;});
4779                 if(~si3.value == "f8", {~rslot3 = ~bplacef8; ~rdo3 = ~si3.value;});
4780                 if(~si3.value == "s8", {~rslot3 = ~bplaces8; ~rdo3 = ~si3.value;});
4781         };
4782         ~si4set = {
4783                 if(~si4.value == "o1", {~rslot4 = ~bplaceo1; ~rdo4 = ~si4.value;});
4784                 if(~si4.value == "f1", {~rslot4 = ~bplacef1; ~rdo4 = ~si4.value;});
4785                 if(~si4.value == "s1", {~rslot4 = ~bplaces1; ~rdo4 = ~si4.value;});
4786                 if(~si4.value == "o2", {~rslot4 = ~bplaceo2; ~rdo4 = ~si4.value;});
4787                 if(~si4.value == "f2", {~rslot4 = ~bplacef2; ~rdo4 = ~si4.value;});
4788                 if(~si4.value == "s2", {~rslot4 = ~bplaces2; ~rdo4 = ~si4.value;});
4789                 if(~si4.value == "o3", {~rslot4 = ~bplaceo3; ~rdo4 = ~si4.value;});
4790                 if(~si4.value == "f3", {~rslot4 = ~bplacef3; ~rdo4 = ~si4.value;});
4791                 if(~si4.value == "s3", {~rslot4 = ~bplaces3; ~rdo4 = ~si4.value;});
4792                 if(~si4.value == "o4", {~rslot4 = ~bplaceo4; ~rdo4 = ~si4.value;});
4793                 if(~si4.value == "f4", {~rslot4 = ~bplacef4; ~rdo4 = ~si4.value;});
4794                 if(~si4.value == "s4", {~rslot4 = ~bplaces4; ~rdo4 = ~si4.value;});
4795                 if(~si4.value == "o5", {~rslot4 = ~bplaceo5; ~rdo4 = ~si4.value;});
4796                 if(~si4.value == "f5", {~rslot4 = ~bplacef5; ~rdo4 = ~si4.value;});
4797                 if(~si4.value == "s5", {~rslot4 = ~bplaces5; ~rdo4 = ~si4.value;});
4798                 if(~si4.value == "o6", {~rslot4 = ~bplaceo6; ~rdo4 = ~si4.value;});
4799                 if(~si4.value == "f6", {~rslot4 = ~bplacef6; ~rdo4 = ~si4.value;});
4800                 if(~si4.value == "s6", {~rslot4 = ~bplaces6; ~rdo4 = ~si4.value;});
4801                 if(~si4.value == "o7", {~rslot4 = ~bplaceo7; ~rdo4 = ~si4.value;});
4802                 if(~si4.value == "f7", {~rslot4 = ~bplacef7; ~rdo4 = ~si4.value;});
4803                 if(~si4.value == "s7", {~rslot4 = ~bplaces7; ~rdo4 = ~si4.value;});
4804                 if(~si4.value == "o8", {~rslot4 = ~bplaceo8; ~rdo4 = ~si4.value;});
4805                 if(~si4.value == "f8", {~rslot4 = ~bplacef8; ~rdo4 = ~si4.value;});
4806                 if(~si4.value == "s8", {~rslot4 = ~bplaces8; ~rdo4 = ~si4.value;});
4807         };
4808         ~si5set = {
4809                 if(~si5.value == "o1", {~rslot5 = ~bplaceo1; ~rdo5 = ~si5.value;});
4810                 if(~si5.value == "f1", {~rslot5 = ~bplacef1; ~rdo5 = ~si5.value;});
4811                 if(~si5.value == "s1", {~rslot5 = ~bplaces1; ~rdo5 = ~si5.value;});
4812                 if(~si5.value == "o2", {~rslot5 = ~bplaceo2; ~rdo5 = ~si5.value;});
4813                 if(~si5.value == "f2", {~rslot5 = ~bplacef2; ~rdo5 = ~si5.value;});
4814                 if(~si5.value == "s2", {~rslot5 = ~bplaces2; ~rdo5 = ~si5.value;});
4815                 if(~si5.value == "o3", {~rslot5 = ~bplaceo3; ~rdo5 = ~si5.value;});
4816                 if(~si5.value == "f3", {~rslot5 = ~bplacef3; ~rdo5 = ~si5.value;});
4817                 if(~si5.value == "s3", {~rslot5 = ~bplaces3; ~rdo5 = ~si5.value;});
4818                 if(~si5.value == "o4", {~rslot5 = ~bplaceo4; ~rdo5 = ~si5.value;});
4819                 if(~si5.value == "f4", {~rslot5 = ~bplacef4; ~rdo5 = ~si5.value;});
4820                 if(~si5.value == "s4", {~rslot5 = ~bplaces4; ~rdo5 = ~si5.value;});
4821                 if(~si5.value == "o5", {~rslot5 = ~bplaceo5; ~rdo5 = ~si5.value;});
4822                 if(~si5.value == "f5", {~rslot5 = ~bplacef5; ~rdo5 = ~si5.value;});
4823                 if(~si5.value == "s5", {~rslot5 = ~bplaces5; ~rdo5 = ~si5.value;});
4824                 if(~si5.value == "o6", {~rslot5 = ~bplaceo6; ~rdo5 = ~si5.value;});
4825                 if(~si5.value == "f6", {~rslot5 = ~bplacef6; ~rdo5 = ~si5.value;});
4826                 if(~si5.value == "s6", {~rslot5 = ~bplaces6; ~rdo5 = ~si5.value;});
4827                 if(~si5.value == "o7", {~rslot5 = ~bplaceo7; ~rdo5 = ~si5.value;});
4828                 if(~si5.value == "f7", {~rslot5 = ~bplacef7; ~rdo5 = ~si5.value;});
4829                 if(~si5.value == "s7", {~rslot5 = ~bplaces7; ~rdo5 = ~si5.value;});
4830                 if(~si5.value == "o8", {~rslot5 = ~bplaceo8; ~rdo5 = ~si5.value;});
4831                 if(~si5.value == "f8", {~rslot5 = ~bplacef8; ~rdo5 = ~si5.value;});
4832                 if(~si5.value == "s8", {~rslot5 = ~bplaces8; ~rdo5 = ~si5.value;});
4833         };
4834         ~si6set = {
4835                 if(~si6.value == "o1", {~rslot6 = ~bplaceo1; ~rdo6 = ~si6.value;});
4836                 if(~si6.value == "f1", {~rslot6 = ~bplacef1; ~rdo6 = ~si6.value;});
4837                 if(~si6.value == "s1", {~rslot6 = ~bplaces1; ~rdo6 = ~si6.value;});
4838                 if(~si6.value == "o2", {~rslot6 = ~bplaceo2; ~rdo6 = ~si6.value;});
4839                 if(~si6.value == "f2", {~rslot6 = ~bplacef2; ~rdo6 = ~si6.value;});
4840                 if(~si6.value == "s2", {~rslot6 = ~bplaces2; ~rdo6 = ~si6.value;});
4841                 if(~si6.value == "o3", {~rslot6 = ~bplaceo3; ~rdo6 = ~si6.value;});
4842                 if(~si6.value == "f3", {~rslot6 = ~bplacef3; ~rdo6 = ~si6.value;});
4843                 if(~si6.value == "s3", {~rslot6 = ~bplaces3; ~rdo6 = ~si6.value;});
4844                 if(~si6.value == "o4", {~rslot6 = ~bplaceo4; ~rdo6 = ~si6.value;});
4845                 if(~si6.value == "f4", {~rslot6 = ~bplacef4; ~rdo6 = ~si6.value;});
4846                 if(~si6.value == "s4", {~rslot6 = ~bplaces4; ~rdo6 = ~si6.value;});
4847                 if(~si6.value == "o5", {~rslot6 = ~bplaceo5; ~rdo6 = ~si6.value;});
4848                 if(~si6.value == "f5", {~rslot6 = ~bplacef5; ~rdo6 = ~si6.value;});
4849                 if(~si6.value == "s5", {~rslot6 = ~bplaces5; ~rdo6 = ~si6.value;});
4850                 if(~si6.value == "o6", {~rslot6 = ~bplaceo6; ~rdo6 = ~si6.value;});
4851                 if(~si6.value == "f6", {~rslot6 = ~bplacef6; ~rdo6 = ~si6.value;});
4852                 if(~si6.value == "s6", {~rslot6 = ~bplaces6; ~rdo6 = ~si6.value;});
4853                 if(~si6.value == "o7", {~rslot6 = ~bplaceo7; ~rdo6 = ~si6.value;});
4854                 if(~si6.value == "f7", {~rslot6 = ~bplacef7; ~rdo6 = ~si6.value;});
4855                 if(~si6.value == "s7", {~rslot6 = ~bplaces7; ~rdo6 = ~si6.value;});
4856                 if(~si6.value == "o8", {~rslot6 = ~bplaceo8; ~rdo6 = ~si6.value;});
4857                 if(~si6.value == "f8", {~rslot6 = ~bplacef8; ~rdo6 = ~si6.value;});
4858                 if(~si6.value == "s8", {~rslot6 = ~bplaces8; ~rdo6 = ~si6.value;});
4859         };
4860         ~si7set = {
4861                 if(~si7.value == "o1", {~rslot7 = ~bplaceo1; ~rdo7 = ~si7.value;});
4862                 if(~si7.value == "f1", {~rslot7 = ~bplacef1; ~rdo7 = ~si7.value;});
4863                 if(~si7.value == "s1", {~rslot7 = ~bplaces1; ~rdo7 = ~si7.value;});
4864                 if(~si7.value == "o2", {~rslot7 = ~bplaceo2; ~rdo7 = ~si7.value;});
4865                 if(~si7.value == "f2", {~rslot7 = ~bplacef2; ~rdo7 = ~si7.value;});
4866                 if(~si7.value == "s2", {~rslot7 = ~bplaces2; ~rdo7 = ~si7.value;});
4867                 if(~si7.value == "o3", {~rslot7 = ~bplaceo3; ~rdo7 = ~si7.value;});
4868                 if(~si7.value == "f3", {~rslot7 = ~bplacef3; ~rdo7 = ~si7.value;});
4869                 if(~si7.value == "s3", {~rslot7 = ~bplaces3; ~rdo7 = ~si7.value;});
4870                 if(~si7.value == "o4", {~rslot7 = ~bplaceo4; ~rdo7 = ~si7.value;});
4871                 if(~si7.value == "f4", {~rslot7 = ~bplacef4; ~rdo7 = ~si7.value;});
4872                 if(~si7.value == "s4", {~rslot7 = ~bplaces4; ~rdo7 = ~si7.value;});
4873                 if(~si7.value == "o5", {~rslot7 = ~bplaceo5; ~rdo7 = ~si7.value;});
4874                 if(~si7.value == "f5", {~rslot7 = ~bplacef5; ~rdo7 = ~si7.value;});
4875                 if(~si7.value == "s5", {~rslot7 = ~bplaces5; ~rdo7 = ~si7.value;});
4876                 if(~si7.value == "o6", {~rslot7 = ~bplaceo6; ~rdo7 = ~si7.value;});
4877                 if(~si7.value == "f6", {~rslot7 = ~bplacef6; ~rdo7 = ~si7.value;});
4878                 if(~si7.value == "s6", {~rslot7 = ~bplaces6; ~rdo7 = ~si7.value;});
4879                 if(~si7.value == "o7", {~rslot7 = ~bplaceo7; ~rdo7 = ~si7.value;});
4880                 if(~si7.value == "f7", {~rslot7 = ~bplacef7; ~rdo7 = ~si7.value;});
4881                 if(~si7.value == "s7", {~rslot7 = ~bplaces7; ~rdo7 = ~si7.value;});
4882                 if(~si7.value == "o8", {~rslot7 = ~bplaceo8; ~rdo7 = ~si7.value;});
4883                 if(~si7.value == "f8", {~rslot7 = ~bplacef8; ~rdo7 = ~si7.value;});
4884                 if(~si7.value == "s8", {~rslot7 = ~bplaces8; ~rdo7 = ~si7.value;});
4885         };
4886         ~si8set = {
4887                 if(~si8.value == "o1", {~rslot8 = ~bplaceo1; ~rdo8 = ~si8.value;});
4888                 if(~si8.value == "f1", {~rslot8 = ~bplacef1; ~rdo8 = ~si8.value;});
4889                 if(~si8.value == "s1", {~rslot8 = ~bplaces1; ~rdo8 = ~si8.value;});
4890                 if(~si8.value == "o2", {~rslot8 = ~bplaceo2; ~rdo8 = ~si8.value;});
4891                 if(~si8.value == "f2", {~rslot8 = ~bplacef2; ~rdo8 = ~si8.value;});
4892                 if(~si8.value == "s2", {~rslot8 = ~bplaces2; ~rdo8 = ~si8.value;});
4893                 if(~si8.value == "o3", {~rslot8 = ~bplaceo3; ~rdo8 = ~si8.value;});
4894                 if(~si8.value == "f3", {~rslot8 = ~bplacef3; ~rdo8 = ~si8.value;});
4895                 if(~si8.value == "s3", {~rslot8 = ~bplaces3; ~rdo8 = ~si8.value;});
4896                 if(~si8.value == "o4", {~rslot8 = ~bplaceo4; ~rdo8 = ~si8.value;});
4897                 if(~si8.value == "f4", {~rslot8 = ~bplacef4; ~rdo8 = ~si8.value;});
4898                 if(~si8.value == "s4", {~rslot8 = ~bplaces4; ~rdo8 = ~si8.value;});
4899                 if(~si8.value == "o5", {~rslot8 = ~bplaceo5; ~rdo8 = ~si8.value;});
4900                 if(~si8.value == "f5", {~rslot8 = ~bplacef5; ~rdo8 = ~si8.value;});
4901                 if(~si8.value == "s5", {~rslot8 = ~bplaces5; ~rdo8 = ~si8.value;});
4902                 if(~si8.value == "o6", {~rslot8 = ~bplaceo6; ~rdo8 = ~si8.value;});
4903                 if(~si8.value == "f6", {~rslot8 = ~bplacef6; ~rdo8 = ~si8.value;});
4904                 if(~si8.value == "s6", {~rslot8 = ~bplaces6; ~rdo8 = ~si8.value;});
4905                 if(~si8.value == "o7", {~rslot8 = ~bplaceo7; ~rdo8 = ~si8.value;});
4906                 if(~si8.value == "f7", {~rslot8 = ~bplacef7; ~rdo8 = ~si8.value;});
4907                 if(~si8.value == "s7", {~rslot8 = ~bplaces7; ~rdo8 = ~si8.value;});
4908                 if(~si8.value == "o8", {~rslot8 = ~bplaceo8; ~rdo8 = ~si8.value;});
4909                 if(~si8.value == "f8", {~rslot8 = ~bplacef8; ~rdo8 = ~si8.value;});
4910                 if(~si8.value == "s8", {~rslot8 = ~bplaces8; ~rdo8 = ~si8.value;});
4911         };
4912
4913
4914         //routine function button
4915
4916         ~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;
4917
4918                 if(button.value == 1, {
4919                         ({
4920                                 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;
4921                                 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;
4922                                 ~rview = View(w, Rect(Window.screenBounds.width-(340+46),Window.screenBounds.height-(340+46/1.6180339887499)-110,340+46,340+46/1.6180339887499)).front;
4923                                 /*w.view.decorator=FlowLayout(w.view.bounds);
4924                                 w.view.decorator.gap=2@2;*/
4925
4926                                 top = 0;
4927
4928                                 i1 = StaticText(~rview, Rect(leftdo , top=top, width, height)).background_(Color.black).string_("rslot1").stringColor_(Color.white);
4929                                 i2 = StaticText(~rview, Rect(leftdo , top=top+height, width, height)).background_(Color.black).string_("rslot2").stringColor_(Color.white);
4930                                 i3 = StaticText(~rview, Rect(leftdo , top=top+height, width, height)).background_(Color.black).string_("rslot3").stringColor_(Color.white);
4931                                 i4 = StaticText(~rview, Rect(leftdo , top=top+height, width, height)).background_(Color.black).string_("rslot4").stringColor_(Color.white);
4932                                 i5 = StaticText(~rview, Rect(leftdo , top=top+height, width, height)).background_(Color.black).string_("rslot5").stringColor_(Color.white);
4933                                 i6 = StaticText(~rview, Rect(leftdo , top=top+height, width, height)).background_(Color.black).string_("rslot6").stringColor_(Color.white);
4934                                 i7 = StaticText(~rview, Rect(leftdo , top=top+height, width, height)).background_(Color.black).string_("rslot7").stringColor_(Color.white);
4935                                 i8 = StaticText(~rview, Rect(leftdo , top=top+height, width, height)).background_(Color.black).string_("rslot8").stringColor_(Color.white);
4936
4937                                 top = 0;
4938
4939                                 ~si1a=TextField(~rview, Rect(leftdobox , top=top, widthbox/2, heightbox)).background_(Color.black).stringColor_(Color.white).value_(~rdo1a);
4940                                 ~si1b=TextField(~rview, Rect(leftdobox+(widthbox/2) , top=top, widthbox/2, heightbox)).background_(Color.black).stringColor_(Color.white).value_(~rdo1b);
4941                                 ~si2=TextField(~rview, Rect(leftdobox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).stringColor_(Color.white).value_(~rdo2);
4942                                 ~si3=TextField(~rview, Rect(leftdobox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).stringColor_(Color.white).value_(~rdo3);
4943                                 ~si4=TextField(~rview, Rect(leftdobox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).stringColor_(Color.white).value_(~rdo4);
4944                                 ~si5=TextField(~rview, Rect(leftdobox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).stringColor_(Color.white).value_(~rdo5);
4945                                 ~si6=TextField(~rview, Rect(leftdobox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).stringColor_(Color.white).value_(~rdo6);
4946                                 ~si7=TextField(~rview, Rect(leftdobox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).stringColor_(Color.white).value_(~rdo7);
4947                                 ~si8=TextField(~rview, Rect(leftdobox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).stringColor_(Color.white).value_(~rdo8);
4948
4949                                 top = 0;
4950
4951                                 t1 = StaticText(~rview, Rect(lefttime , top=top, width, height)).background_(Color.black).string_("rtime1").stringColor_(Color.white);
4952                                 t2 = StaticText(~rview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("rtime2").stringColor_(Color.white);
4953                                 t3 = StaticText(~rview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("rtime3").stringColor_(Color.white);
4954                                 t4 = StaticText(~rview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("rtime4").stringColor_(Color.white);
4955                                 t5 = StaticText(~rview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("rtime5").stringColor_(Color.white);
4956                                 t6 = StaticText(~rview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("rtime6").stringColor_(Color.white);
4957                                 t7 = StaticText(~rview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("rtime7").stringColor_(Color.white);
4958                                 t8 = StaticText(~rview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("rtime8").stringColor_(Color.white);
4959                                 tall = StaticText(~rview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("all time").stringColor_(Color.white);
4960
4961
4962                                 top = 0;
4963
4964                                 st1=NumberBox(~rview, Rect(lefttimebox , top=top, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~rtime1);
4965                                 st2=NumberBox(~rview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~rtime2);
4966                                 st3=NumberBox(~rview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~rtime3);
4967                                 st4=NumberBox(~rview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~rtime4);
4968                                 st5=NumberBox(~rview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~rtime5);
4969                                 st6=NumberBox(~rview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~rtime6);
4970                                 st7=NumberBox(~rview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~rtime7);
4971                                 st8=NumberBox(~rview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~rtime8);
4972                                 stall=NumberBox(~rview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~rtimeall);
4973
4974
4975                                 ~si1a.action_({~si1aset.value});
4976                                 ~si1b.action_({~si1bset.value});
4977                                 ~si2.action_({~si2set.value});
4978                                 ~si3.action_({~si3set.value});
4979                                 ~si4.action_({~si4set.value});
4980                                 ~si5.action_({~si5set.value});
4981                                 ~si6.action_({~si6set.value});
4982                                 ~si7.action_({~si7set.value});
4983                                 ~si8.action_({~si8set.value});
4984
4985                                 stall.action_({arg val;
4986                                         ~rtimeall = val.value;
4987                                         ~rtime1 = val.value;
4988                                         ~rtime2 = val.value;
4989                                         ~rtime3 = val.value;
4990                                         ~rtime4 = val.value;
4991                                         ~rtime5 = val.value;
4992                                         ~rtime6 = val.value;
4993                                         ~rtime7 = val.value;
4994                                         ~rtime8 = val.value;
4995                                         ~rview.close; ~rviewbutton.valueAction_(1);
4996                                 });
4997                                 st1.action_({arg val; ~rtime1 = val.value;});
4998                                 st2.action_({arg val; ~rtime2 = val.value;});
4999                                 st3.action_({arg val; ~rtime3 = val.value;});
5000                                 st4.action_({arg val; ~rtime4 = val.value;});
5001                                 st5.action_({arg val; ~rtime5 = val.value;});
5002                                 st6.action_({arg val; ~rtime6 = val.value;});
5003                                 st7.action_({arg val; ~rtime7 = val.value;});
5004                                 st8.action_({arg val; ~rtime8 = val.value;});
5005
5006                                 ~rview.background_(Color.black);
5007
5008                                 ~metronomeincr = 1;
5009
5010                                 ~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;
5011
5012                                         if(button.value == 1, {
5013
5014                                                 ~metronome = Task({
5015                                                         inf.do({
5016                                                                 AppClock.sched(0, {~metronomebutton.value = 1;});
5017                                                                 ~metronomeincr.wait;
5018                                                                 AppClock.sched(0, {~metronomebutton.value = 0;});
5019                                                                 ~metronomeincr.wait;
5020                                                         });
5021                                                 });
5022
5023                                                 ~loop = Task({
5024                                                         1.do({
5025                                                                 {~rslot1a.valueAction_(0)}.defer;
5026                                                                 ~rtime1.wait;
5027                                                                 {~rslot2.valueAction_(0)}.defer;
5028                                                                 ~rtime2.wait;
5029                                                                 {~rslot3.valueAction_(0)}.defer;
5030                                                                 ~rtime3.wait;
5031                                                                 {~rslot4.valueAction_(0)}.defer;
5032                                                                 ~rtime4.wait;
5033                                                                 {~rslot5.valueAction_(0)}.defer;
5034                                                                 ~rtime5.wait;
5035                                                                 {~rslot6.valueAction_(0)}.defer;
5036                                                                 ~rtime6.wait;
5037                                                                 {~rslot7.valueAction_(0)}.defer;
5038                                                                 ~rtime7.wait;
5039                                                                 {~rslot8.valueAction_(0)}.defer;
5040                                                                 ~rtime8.wait;
5041                                                         });
5042                                                         inf.do({
5043                                                                 {~rslot1b.valueAction_(0)}.defer;
5044                                                                 ~rtime1.wait;
5045                                                                 {~rslot2.valueAction_(0)}.defer;
5046                                                                 ~rtime2.wait;
5047                                                                 {~rslot3.valueAction_(0)}.defer;
5048                                                                 ~rtime3.wait;
5049                                                                 {~rslot4.valueAction_(0)}.defer;
5050                                                                 ~rtime4.wait;
5051                                                                 {~rslot5.valueAction_(0)}.defer;
5052                                                                 ~rtime5.wait;
5053                                                                 {~rslot6.valueAction_(0)}.defer;
5054                                                                 ~rtime6.wait;
5055                                                                 {~rslot7.valueAction_(0)}.defer;
5056                                                                 ~rtime7.wait;
5057                                                                 {~rslot8.valueAction_(0)}.defer;
5058                                                                 ~rtime8.wait;
5059                                                         });
5060                                                 }); SystemClock(~metronome.start); SystemClock(~loop.start); ~numsynths.stop;}, {
5061
5062                                                         SystemClock(~metronome.stop); SystemClock(~loop.stop); SystemClock(~loop.reset); ~synthfree.value; ~pauseroutinebutton.value = 0; ~numsynths.stop; ~numsynthsfunc.value;});
5063                                 });
5064
5065                                 ~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;
5066
5067                                         if(button.value == 1, {SystemClock(~loop.pause); ~synthpause.value;}, {SystemClock(~loop.resume); ~synthflow.value;});
5068                                 });
5069
5070                                 ~closeroutinebutton = Button.new(~rview,Rect(220, top+40, 40, 40/~gm)).states_([["close",Color.white,Color.black]]).action_({arg button;
5071
5072                                         ~rview.close; ~rviewbutton.value = 0;
5073                                 });
5074
5075                                 ~metronomebutton = Button.new(~rview,Rect(120, top+40, 40, 40/~gm)).states_([["",Color.white,Color.red],["",Color.white,Color.blue]]).action_({arg button;});
5076
5077                         }.value);
5078
5079                         if(~loop.isPlaying == true, {~routinebutton.value = 1;});
5080                         ~rview.front;
5081                 }, {~rview.close});
5082         });
5083
5084
5085         //synth identifier function
5086
5087         ~synthmonitor = StaticText(w, Rect(Window.screenBounds.width-14,~bpt+49,18,18/1.6180339887499)).background_(Color.black).stringColor_(Color.white);
5088         ~synthmonitor.string = if(~currentsynth == nil, {"nil".asString});
5089
5090         ~synthmonitorfunc = {
5091                 ~synthmonitor.close;
5092                 ~synthmonitor = StaticText(w, Rect(Window.screenBounds.width-14,~bpt+49,18,18/1.6180339887499)).background_(Color.black).stringColor_(Color.white);
5093                 ~synthmonitor.string = ~currentsynth.asString;
5094                 ~synthmonitor.font = Font(size: 10);
5095         };
5096
5097         ~synthmonitorfunc.value;
5098
5099
5100         //cpu, # of ugens, and # of synths display
5101
5102         ~cpumonitor = StaticText(w, Rect(Window.screenBounds.width-500,~bpt-200,500,90/1.6180339887499)).background_(Color.black).stringColor_(Color.white);
5103         ~cpumonitor.close;
5104
5105         ~cpumonitorfunc =  {
5106                 ~cpumonitor.close;
5107                 ~cpumonitor = StaticText(w, Rect(20,~bpt-100,500,120/1.6180339887499)).background_(Color.black).stringColor_(Color.white);
5108                 ~cpumonitor.string = "cpu: "+s.avgCPU.asString+"%"++"\n" ++"ugens: "+s.numUGens.asString++"\n" ++"synths: "+s.numSynths.asString;
5109                 ~cpumonitor.font = Font(size: 14);
5110         };
5111
5112         ~cpumonitorroutine = Routine({
5113                 inf.do({
5114                         AppClock.sched(0, {
5115                                 ~cpumonitorfunc.value;
5116                         });
5117                         1.wait;
5118                 });
5119         });
5120
5121         ~cpumonitorbutton = Button.new(w,Rect(~bpl+((16*8)),~bpt+69+5,16,16/1.6180339887499)).states_([["cm",Color.white,Color.black],["cm",Color.white,Color.black]]).action_({arg button;
5122
5123                 if(button.value == 1, {
5124                         ~cpumonitorroutine.reset;
5125                         ~cpumonitorroutine.play;
5126                 }, {~cpumonitorroutine.stop; ~cpumonitor.close;});
5127
5128         });
5129
5130
5131         //information button
5132
5133         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;
5134
5135                 if(button.value == 1, {
5136                         ~hb = TextView(w, Rect(0,0, Window.screenBounds.width, Window.screenBounds.height-200)).background_(Color.black);
5137                         (~hb.string =
5138                                 "(scroll down to see more)"++"\n"++"\n"++"\n"++
5139                                 "ctrl/cmd-period: stop synth/free server"++"\n"++"\n"++"\n"++
5140                                 "GUI Buttons"++"\n"++"\n"++"\n"++
5141                                 "synth0/synth1: start/stop synth set"++"\n"++"\n"++
5142                                 "pause0/pause1: pause/unpause synth set"++"\n"++"\n"++
5143                                 "tsynth0/tsynth1: tsynth0 to allow timed synth set, then click on any o or f button to time a progression. click on the st button in the bottom right to stop the timer. tsynth1 to dis-allow timed synth set"++"\n"++"\n"++
5144                                 "copy: copy frequency/note info"++"\n"++"\n"++
5145                                 "kws: change number of kw(King Wen) sequences in a timewave half-cycle (or amplitude x2). press set to load"++"\n"++"\n"++
5146                                 "top-level hz frequency: set the base frequency. press set to load"++"\n"++"\n"++
5147                                 "psine1-psine3 (based on phi, with low-pass filter), hsine1-hsine3 (based on 19.47, with low-pass filter), psineuf1-psineuf3 (based on phi, without low-pass filter), hsineuf1-hsineuf3 (based on 19.47, without low-pass filter) - set synthdef type. press set to load"++"\n"++"\n"++
5148                                 "lower-level hz frequency: change the low-pass filter frequency limit. default is 2427.05. press set to load"++"\n"++"\n"++
5149                                 "s1-s8: set/save note positions"++"\n"++"\n"++
5150                                 "g1-g8: groups of saved note positions"++"\n"++"\n"++
5151                                 "uc-u8: undo changes to set note positions. press set to load"++"\n"++"\n"++
5152                                 "rc, /rc: start recording/stop recording"++"\n"++"\n"++
5153                                 "prc: pause recording"++"\n"++"\n"++
5154                                 "o1-o8: play set/saved note positions by opening a new synth set"++"\n"++"\n"++
5155                                 "f1-f8: flow transition to set/saved note positions"++"\n"++"\n"++
5156                                 "s1-s8: slide transition to set/saved note positions"++"\n"++"\n"++
5157                                 "m/u: mute/unmute all"++"\n"++"\n"++
5158                                 "1-12: mute or unmute individual synth"++"\n"++"\n"++
5159                                 "cm: cpu percentage/number of ugens/number of synths display"++"\n"++"\n"++
5160                                 "rw: random western scale"++"\n"++"\n"++
5161                                 "re: random eastern scale"++"\n"++"\n"++
5162                                 "r: routine/loop function - rslot for synth set, rtime for time between transitions"++"\n"++"\n"++
5163                                 "st: stop synth timer/show timer results"++"\n"++"\n"++
5164                                 "s: set slide time/increment"++"\n"++"\n"++
5165                                 "i: help"++"\n"++"\n"++
5166                                 "m: minimize window"++"\n"++"\n"++
5167                                 "c: close window"++"\n"++"\n"++"\n"++
5168                                 "Keyboard Functions (functionality will vary with device)"++"\n"++"\n"++"\n"++
5169                                 "s: start/stop synth set"++"\n"++"\n"++
5170                                 "space bar: pause/unpause synth set"++"\n"++"\n"++
5171                                 "ctrl-period/cmd-period: stop synth/free server"++"\n"++"\n"++
5172                                 "left/right arrow(or J and L): move down/up note"++"\n"++"\n"++
5173                                 "up/down arrow(or I and K): change synth for left/right arrow note function"++"\n"++"\n"++
5174                                 "#1-= on keyboard: choose synth for left/right arrow note function"++"\n"++"\n"++
5175                                 "r: routine/loop function - rslot for synth set, rtime for time between transitions"++"\n"++"\n"++
5176                                 "m: mute/unmute all"++"\n"++"\n"++
5177                                 "c: copy function"++"\n"++"\n"++
5178                                 "t: timed synth function"++"\n"++"\n"++
5179                                 "esc: minimize window"
5180                                 ;
5181                         );
5182                         ~hb.stringColor = Color.white;
5183                         },
5184                         {~hb.close;});
5185         });
5186
5187
5188         //random notes button 1
5189
5190         ~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;
5191
5192                 if((~l1a.isRunning == true) or: (~l1a1.isRunning == true), {
5193                         12.do(x = 0; {("f"++(x=x+1)).asSymbol.envirPut(~freqmap.at(rrand(36, 91));)});
5194                         ~synthflow.value;
5195                 });
5196         });
5197
5198
5199         //random notes button 2
5200
5201         ~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;
5202
5203                 if((~l1a.isRunning == true) or: (~l1a1.isRunning == true), {
5204                         12.do(x = 0; {("f"++(x=x+1)).asSymbol.envirPut((~freqmap.at(127)/8).rand;)});
5205                         ~synthflow.value;
5206                 });
5207         });
5208
5209
5210         //setgroup buttons, sg1-sg8
5211
5212         ~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;
5213
5214                 if(button.value == 1, {
5215                         #fp1,fp2,fp3,fp4,fp5,fp6,fp7,fp8,fp9,fp10,fp11,fp12=[~sg1a1,~sg1a2,~sg1a3,~sg1a4,~sg1a5,~sg1a6,~sg1a7,~sg1a8,~sg1a9,~sg1a10,~sg1a11,~sg1a12];
5216                         #fp1b,fp2b,fp3b,fp4b,fp5b,fp6b,fp7b,fp8b,fp9b,fp10b,fp11b,fp12b=[~sg1b1,~sg1b2,~sg1b3,~sg1b4,~sg1b5,~sg1b6,~sg1b7,~sg1b8,~sg1b9,~sg1b10,~sg1b11,~sg1b12];
5217                         #fp1c,fp2c,fp3c,fp4c,fp5c,fp6c,fp7c,fp8c,fp9c,fp10c,fp11c,fp12c=[~sg1c1,~sg1c2,~sg1c3,~sg1c4,~sg1c5,~sg1c6,~sg1c7,~sg1c8,~sg1c9,~sg1c10,~sg1c11,~sg1c12];
5218                         #fp1d,fp2d,fp3d,fp4d,fp5d,fp6d,fp7d,fp8d,fp9d,fp10d,fp11d,fp12d=[~sg1d1,~sg1d2,~sg1d3,~sg1d4,~sg1d5,~sg1d6,~sg1d7,~sg1d8,~sg1d9,~sg1d10,~sg1d11,~sg1d12];
5219                         #fp1e,fp2e,fp3e,fp4e,fp5e,fp6e,fp7e,fp8e,fp9e,fp10e,fp11e,fp12e=[~sg1e1,~sg1e2,~sg1e3,~sg1e4,~sg1e5,~sg1e6,~sg1e7,~sg1e8,~sg1e9,~sg1e10,~sg1e11,~sg1e12];
5220                         #fp1f,fp2f,fp3f,fp4f,fp5f,fp6f,fp7f,fp8f,fp9f,fp10f,fp11f,fp12f=[~sg1f1,~sg1f2,~sg1f3,~sg1f4,~sg1f5,~sg1f6,~sg1f7,~sg1f8,~sg1f9,~sg1f10,~sg1f11,~sg1f12];
5221                         #fp1g,fp2g,fp3g,fp4g,fp5g,fp6g,fp7g,fp8g,fp9g,fp10g,fp11g,fp12g=[~sg1g1,~sg1g2,~sg1g3,~sg1g4,~sg1g5,~sg1g6,~sg1g7,~sg1g8,~sg1g9,~sg1g10,~sg1g11,~sg1g12];
5222                         #fp1h,fp2h,fp3h,fp4h,fp5h,fp6h,fp7h,fp8h,fp9h,fp10h,fp11h,fp12h=[~sg1h1,~sg1h2,~sg1h3,~sg1h4,~sg1h5,~sg1h6,~sg1h7,~sg1h8,~sg1h9,~sg1h10,~sg1h11,~sg1h12];
5223
5224                         ~setgroup2.value = 0;
5225                         ~setgroup3.value = 0;
5226                         ~setgroup4.value = 0;
5227                         ~setgroup5.value = 0;
5228                         ~setgroup6.value = 0;
5229                         ~setgroup7.value = 0;
5230                         ~setgroup8.value = 0;
5231
5232                         ~setgroupval = 1;
5233                 });
5234         });
5235         ~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;
5236
5237                 if(button.value == 1, {
5238                         #fp1,fp2,fp3,fp4,fp5,fp6,fp7,fp8,fp9,fp10,fp11,fp12=[~sg2a1,~sg2a2,~sg2a3,~sg2a4,~sg2a5,~sg2a6,~sg2a7,~sg2a8,~sg2a9,~sg2a10,~sg2a11,~sg2a12];
5239                         #fp1b,fp2b,fp3b,fp4b,fp5b,fp6b,fp7b,fp8b,fp9b,fp10b,fp11b,fp12b=[~sg2b1,~sg2b2,~sg2b3,~sg2b4,~sg2b5,~sg2b6,~sg2b7,~sg2b8,~sg2b9,~sg2b10,~sg2b11,~sg2b12];
5240                         #fp1c,fp2c,fp3c,fp4c,fp5c,fp6c,fp7c,fp8c,fp9c,fp10c,fp11c,fp12c=[~sg2c1,~sg2c2,~sg2c3,~sg2c4,~sg2c5,~sg2c6,~sg2c7,~sg2c8,~sg2c9,~sg2c10,~sg2c11,~sg2c12];
5241                         #fp1d,fp2d,fp3d,fp4d,fp5d,fp6d,fp7d,fp8d,fp9d,fp10d,fp11d,fp12d=[~sg2d1,~sg2d2,~sg2d3,~sg2d4,~sg2d5,~sg2d6,~sg2d7,~sg2d8,~sg2d9,~sg2d10,~sg2d11,~sg2d12];
5242                         #fp1e,fp2e,fp3e,fp4e,fp5e,fp6e,fp7e,fp8e,fp9e,fp10e,fp11e,fp12e=[~sg2e1,~sg2e2,~sg2e3,~sg2e4,~sg2e5,~sg2e6,~sg2e7,~sg2e8,~sg2e9,~sg2e10,~sg2e11,~sg2e12];
5243                         #fp1f,fp2f,fp3f,fp4f,fp5f,fp6f,fp7f,fp8f,fp9f,fp10f,fp11f,fp12f=[~sg2f1,~sg2f2,~sg2f3,~sg2f4,~sg2f5,~sg2f6,~sg2f7,~sg2f8,~sg2f9,~sg2f10,~sg2f11,~sg2f12];
5244                         #fp1g,fp2g,fp3g,fp4g,fp5g,fp6g,fp7g,fp8g,fp9g,fp10g,fp11g,fp12g=[~sg2g1,~sg2g2,~sg2g3,~sg2g4,~sg2g5,~sg2g6,~sg2g7,~sg2g8,~sg2g9,~sg2g10,~sg2g11,~sg2g12];
5245                         #fp1h,fp2h,fp3h,fp4h,fp5h,fp6h,fp7h,fp8h,fp9h,fp10h,fp11h,fp12h=[~sg2h1,~sg2h2,~sg2h3,~sg2h4,~sg2h5,~sg2h6,~sg2h7,~sg2h8,~sg2h9,~sg2h10,~sg2h11,~sg2h12];
5246
5247                         ~setgroup1.value = 0;
5248                         ~setgroup3.value = 0;
5249                         ~setgroup4.value = 0;
5250                         ~setgroup5.value = 0;
5251                         ~setgroup6.value = 0;
5252                         ~setgroup7.value = 0;
5253                         ~setgroup8.value = 0;
5254
5255                         ~setgroupval = 2;
5256                 });
5257         });
5258         ~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;
5259
5260                 if(button.value == 1, {
5261                         #fp1,fp2,fp3,fp4,fp5,fp6,fp7,fp8,fp9,fp10,fp11,fp12=[~sg3a1,~sg3a2,~sg3a3,~sg3a4,~sg3a5,~sg3a6,~sg3a7,~sg3a8,~sg3a9,~sg3a10,~sg3a11,~sg3a12];
5262                         #fp1b,fp2b,fp3b,fp4b,fp5b,fp6b,fp7b,fp8b,fp9b,fp10b,fp11b,fp12b=[~sg3b1,~sg3b2,~sg3b3,~sg3b4,~sg3b5,~sg3b6,~sg3b7,~sg3b8,~sg3b9,~sg3b10,~sg3b11,~sg3b12];
5263                         #fp1c,fp2c,fp3c,fp4c,fp5c,fp6c,fp7c,fp8c,fp9c,fp10c,fp11c,fp12c=[~sg3c1,~sg3c2,~sg3c3,~sg3c4,~sg3c5,~sg3c6,~sg3c7,~sg3c8,~sg3c9,~sg3c10,~sg3c11,~sg3c12];
5264                         #fp1d,fp2d,fp3d,fp4d,fp5d,fp6d,fp7d,fp8d,fp9d,fp10d,fp11d,fp12d=[~sg3d1,~sg3d2,~sg3d3,~sg3d4,~sg3d5,~sg3d6,~sg3d7,~sg3d8,~sg3d9,~sg3d10,~sg3d11,~sg3d12];
5265                         #fp1e,fp2e,fp3e,fp4e,fp5e,fp6e,fp7e,fp8e,fp9e,fp10e,fp11e,fp12e=[~sg3e1,~sg3e2,~sg3e3,~sg3e4,~sg3e5,~sg3e6,~sg3e7,~sg3e8,~sg3e9,~sg3e10,~sg3e11,~sg3e12];
5266                         #fp1f,fp2f,fp3f,fp4f,fp5f,fp6f,fp7f,fp8f,fp9f,fp10f,fp11f,fp12f=[~sg3f1,~sg3f2,~sg3f3,~sg3f4,~sg3f5,~sg3f6,~sg3f7,~sg3f8,~sg3f9,~sg3f10,~sg3f11,~sg3f12];
5267                         #fp1g,fp2g,fp3g,fp4g,fp5g,fp6g,fp7g,fp8g,fp9g,fp10g,fp11g,fp12g=[~sg3g1,~sg3g2,~sg3g3,~sg3g4,~sg3g5,~sg3g6,~sg3g7,~sg3g8,~sg3g9,~sg3g10,~sg3g11,~sg3g12];
5268                         #fp1h,fp2h,fp3h,fp4h,fp5h,fp6h,fp7h,fp8h,fp9h,fp10h,fp11h,fp12h=[~sg3h1,~sg3h2,~sg3h3,~sg3h4,~sg3h5,~sg3h6,~sg3h7,~sg3h8,~sg3h9,~sg3h10,~sg3h11,~sg3h12];
5269
5270                         ~setgroup1.value = 0;
5271                         ~setgroup2.value = 0;
5272                         ~setgroup4.value = 0;
5273                         ~setgroup5.value = 0;
5274                         ~setgroup6.value = 0;
5275                         ~setgroup7.value = 0;
5276                         ~setgroup8.value = 0;
5277
5278                         ~setgroupval = 3;
5279                 });
5280         });
5281         ~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;
5282
5283                 if(button.value == 1, {
5284                         #fp1,fp2,fp3,fp4,fp5,fp6,fp7,fp8,fp9,fp10,fp11,fp12=[~sg4a1,~sg4a2,~sg4a3,~sg4a4,~sg4a5,~sg4a6,~sg4a7,~sg4a8,~sg4a9,~sg4a10,~sg4a11,~sg4a12];
5285                         #fp1b,fp2b,fp3b,fp4b,fp5b,fp6b,fp7b,fp8b,fp9b,fp10b,fp11b,fp12b=[~sg4b1,~sg4b2,~sg4b3,~sg4b4,~sg4b5,~sg4b6,~sg4b7,~sg4b8,~sg4b9,~sg4b10,~sg4b11,~sg4b12];
5286                         #fp1c,fp2c,fp3c,fp4c,fp5c,fp6c,fp7c,fp8c,fp9c,fp10c,fp11c,fp12c=[~sg4c1,~sg4c2,~sg4c3,~sg4c4,~sg4c5,~sg4c6,~sg4c7,~sg4c8,~sg4c9,~sg4c10,~sg4c11,~sg4c12];
5287                         #fp1d,fp2d,fp3d,fp4d,fp5d,fp6d,fp7d,fp8d,fp9d,fp10d,fp11d,fp12d=[~sg4d1,~sg4d2,~sg4d3,~sg4d4,~sg4d5,~sg4d6,~sg4d7,~sg4d8,~sg4d9,~sg4d10,~sg4d11,~sg4d12];
5288                         #fp1e,fp2e,fp3e,fp4e,fp5e,fp6e,fp7e,fp8e,fp9e,fp10e,fp11e,fp12e=[~sg4e1,~sg4e2,~sg4e3,~sg4e4,~sg4e5,~sg4e6,~sg4e7,~sg4e8,~sg4e9,~sg4e10,~sg4e11,~sg4e12];
5289                         #fp1f,fp2f,fp3f,fp4f,fp5f,fp6f,fp7f,fp8f,fp9f,fp10f,fp11f,fp12f=[~sg4f1,~sg4f2,~sg4f3,~sg4f4,~sg4f5,~sg4f6,~sg4f7,~sg4f8,~sg4f9,~sg4f10,~sg4f11,~sg4f12];
5290                         #fp1g,fp2g,fp3g,fp4g,fp5g,fp6g,fp7g,fp8g,fp9g,fp10g,fp11g,fp12g=[~sg4g1,~sg4g2,~sg4g3,~sg4g4,~sg4g5,~sg4g6,~sg4g7,~sg4g8,~sg4g9,~sg4g10,~sg4g11,~sg4g12];
5291                         #fp1h,fp2h,fp3h,fp4h,fp5h,fp6h,fp7h,fp8h,fp9h,fp10h,fp11h,fp12h=[~sg4h1,~sg4h2,~sg4h3,~sg4h4,~sg4h5,~sg4h6,~sg4h7,~sg4h8,~sg4h9,~sg4h10,~sg4h11,~sg4h12];
5292
5293                         ~setgroup1.value = 0;
5294                         ~setgroup2.value = 0;
5295                         ~setgroup3.value = 0;
5296                         ~setgroup5.value = 0;
5297                         ~setgroup6.value = 0;
5298                         ~setgroup7.value = 0;
5299                         ~setgroup8.value = 0;
5300
5301                         ~setgroupval = 4;
5302                 });
5303         });
5304         ~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;
5305
5306                 if(button.value == 1, {
5307                         #fp1,fp2,fp3,fp4,fp5,fp6,fp7,fp8,fp9,fp10,fp11,fp12=[~sg5a1,~sg5a2,~sg5a3,~sg5a4,~sg5a5,~sg5a6,~sg5a7,~sg5a8,~sg5a9,~sg5a10,~sg5a11,~sg5a12];
5308                         #fp1b,fp2b,fp3b,fp4b,fp5b,fp6b,fp7b,fp8b,fp9b,fp10b,fp11b,fp12b=[~sg5b1,~sg5b2,~sg5b3,~sg5b4,~sg5b5,~sg5b6,~sg5b7,~sg5b8,~sg5b9,~sg5b10,~sg5b11,~sg5b12];
5309                         #fp1c,fp2c,fp3c,fp4c,fp5c,fp6c,fp7c,fp8c,fp9c,fp10c,fp11c,fp12c=[~sg5c1,~sg5c2,~sg5c3,~sg5c4,~sg5c5,~sg5c6,~sg5c7,~sg5c8,~sg5c9,~sg5c10,~sg5c11,~sg5c12];
5310                         #fp1d,fp2d,fp3d,fp4d,fp5d,fp6d,fp7d,fp8d,fp9d,fp10d,fp11d,fp12d=[~sg5d1,~sg5d2,~sg5d3,~sg5d4,~sg5d5,~sg5d6,~sg5d7,~sg5d8,~sg5d9,~sg5d10,~sg5d11,~sg5d12];
5311                         #fp1e,fp2e,fp3e,fp4e,fp5e,fp6e,fp7e,fp8e,fp9e,fp10e,fp11e,fp12e=[~sg5e1,~sg5e2,~sg5e3,~sg5e4,~sg5e5,~sg5e6,~sg5e7,~sg5e8,~sg5e9,~sg5e10,~sg5e11,~sg5e12];
5312                         #fp1f,fp2f,fp3f,fp4f,fp5f,fp6f,fp7f,fp8f,fp9f,fp10f,fp11f,fp12f=[~sg5f1,~sg5f2,~sg5f3,~sg5f4,~sg5f5,~sg5f6,~sg5f7,~sg5f8,~sg5f9,~sg5f10,~sg5f11,~sg5f12];
5313                         #fp1g,fp2g,fp3g,fp4g,fp5g,fp6g,fp7g,fp8g,fp9g,fp10g,fp11g,fp12g=[~sg5g1,~sg5g2,~sg5g3,~sg5g4,~sg5g5,~sg5g6,~sg5g7,~sg5g8,~sg5g9,~sg5g10,~sg5g11,~sg5g12];
5314                         #fp1h,fp2h,fp3h,fp4h,fp5h,fp6h,fp7h,fp8h,fp9h,fp10h,fp11h,fp12h=[~sg5h1,~sg5h2,~sg5h3,~sg5h4,~sg5h5,~sg5h6,~sg5h7,~sg5h8,~sg5h9,~sg5h10,~sg5h11,~sg5h12];
5315
5316                         ~setgroup1.value = 0;
5317                         ~setgroup2.value = 0;
5318                         ~setgroup3.value = 0;
5319                         ~setgroup4.value = 0;
5320                         ~setgroup6.value = 0;
5321                         ~setgroup7.value = 0;
5322                         ~setgroup8.value = 0;
5323
5324                         ~setgroupval = 5;
5325                 });
5326         });
5327         ~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;
5328
5329                 if(button.value == 1, {
5330                         #fp1,fp2,fp3,fp4,fp5,fp6,fp7,fp8,fp9,fp10,fp11,fp12=[~sg6a1,~sg6a2,~sg6a3,~sg6a4,~sg6a5,~sg6a6,~sg6a7,~sg6a8,~sg6a9,~sg6a10,~sg6a11,~sg6a12];
5331                         #fp1b,fp2b,fp3b,fp4b,fp5b,fp6b,fp7b,fp8b,fp9b,fp10b,fp11b,fp12b=[~sg6b1,~sg6b2,~sg6b3,~sg6b4,~sg6b5,~sg6b6,~sg6b7,~sg6b8,~sg6b9,~sg6b10,~sg6b11,~sg6b12];
5332                         #fp1c,fp2c,fp3c,fp4c,fp5c,fp6c,fp7c,fp8c,fp9c,fp10c,fp11c,fp12c=[~sg6c1,~sg6c2,~sg6c3,~sg6c4,~sg6c5,~sg6c6,~sg6c7,~sg6c8,~sg6c9,~sg6c10,~sg6c11,~sg6c12];
5333                         #fp1d,fp2d,fp3d,fp4d,fp5d,fp6d,fp7d,fp8d,fp9d,fp10d,fp11d,fp12d=[~sg6d1,~sg6d2,~sg6d3,~sg6d4,~sg6d5,~sg6d6,~sg6d7,~sg6d8,~sg6d9,~sg6d10,~sg6d11,~sg6d12];
5334                         #fp1e,fp2e,fp3e,fp4e,fp5e,fp6e,fp7e,fp8e,fp9e,fp10e,fp11e,fp12e=[~sg6e1,~sg6e2,~sg6e3,~sg6e4,~sg6e5,~sg6e6,~sg6e7,~sg6e8,~sg6e9,~sg6e10,~sg6e11,~sg6e12];
5335                         #fp1f,fp2f,fp3f,fp4f,fp5f,fp6f,fp7f,fp8f,fp9f,fp10f,fp11f,fp12f=[~sg6f1,~sg6f2,~sg6f3,~sg6f4,~sg6f5,~sg6f6,~sg6f7,~sg6f8,~sg6f9,~sg6f10,~sg6f11,~sg6f12];
5336                         #fp1g,fp2g,fp3g,fp4g,fp5g,fp6g,fp7g,fp8g,fp9g,fp10g,fp11g,fp12g=[~sg6g1,~sg6g2,~sg6g3,~sg6g4,~sg6g5,~sg6g6,~sg6g7,~sg6g8,~sg6g9,~sg6g10,~sg6g11,~sg6g12];
5337                         #fp1h,fp2h,fp3h,fp4h,fp5h,fp6h,fp7h,fp8h,fp9h,fp10h,fp11h,fp12h=[~sg6h1,~sg6h2,~sg6h3,~sg6h4,~sg6h5,~sg6h6,~sg6h7,~sg6h8,~sg6h9,~sg6h10,~sg6h11,~sg6h12];
5338
5339                         ~setgroup1.value = 0;
5340                         ~setgroup2.value = 0;
5341                         ~setgroup3.value = 0;
5342                         ~setgroup4.value = 0;
5343                         ~setgroup5.value = 0;
5344                         ~setgroup7.value = 0;
5345                         ~setgroup8.value = 0;
5346
5347                         ~setgroupval = 6;
5348                 });
5349         });
5350         ~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;
5351
5352                 if(button.value == 1, {
5353                         #fp1,fp2,fp3,fp4,fp5,fp6,fp7,fp8,fp9,fp10,fp11,fp12=[~sg7a1,~sg7a2,~sg7a3,~sg7a4,~sg7a5,~sg7a6,~sg7a7,~sg7a8,~sg7a9,~sg7a10,~sg7a11,~sg7a12];
5354                         #fp1b,fp2b,fp3b,fp4b,fp5b,fp6b,fp7b,fp8b,fp9b,fp10b,fp11b,fp12b=[~sg7b1,~sg7b2,~sg7b3,~sg7b4,~sg7b5,~sg7b6,~sg7b7,~sg7b8,~sg7b9,~sg7b10,~sg7b11,~sg7b12];
5355                         #fp1c,fp2c,fp3c,fp4c,fp5c,fp6c,fp7c,fp8c,fp9c,fp10c,fp11c,fp12c=[~sg7c1,~sg7c2,~sg7c3,~sg7c4,~sg7c5,~sg7c6,~sg7c7,~sg7c8,~sg7c9,~sg7c10,~sg7c11,~sg7c12];
5356                         #fp1d,fp2d,fp3d,fp4d,fp5d,fp6d,fp7d,fp8d,fp9d,fp10d,fp11d,fp12d=[~sg7d1,~sg7d2,~sg7d3,~sg7d4,~sg7d5,~sg7d6,~sg7d7,~sg7d8,~sg7d9,~sg7d10,~sg7d11,~sg7d12];
5357                         #fp1e,fp2e,fp3e,fp4e,fp5e,fp6e,fp7e,fp8e,fp9e,fp10e,fp11e,fp12e=[~sg7e1,~sg7e2,~sg7e3,~sg7e4,~sg7e5,~sg7e6,~sg7e7,~sg7e8,~sg7e9,~sg7e10,~sg7e11,~sg7e12];
5358                         #fp1f,fp2f,fp3f,fp4f,fp5f,fp6f,fp7f,fp8f,fp9f,fp10f,fp11f,fp12f=[~sg7f1,~sg7f2,~sg7f3,~sg7f4,~sg7f5,~sg7f6,~sg7f7,~sg7f8,~sg7f9,~sg7f10,~sg7f11,~sg7f12];
5359                         #fp1g,fp2g,fp3g,fp4g,fp5g,fp6g,fp7g,fp8g,fp9g,fp10g,fp11g,fp12g=[~sg7g1,~sg7g2,~sg7g3,~sg7g4,~sg7g5,~sg7g6,~sg7g7,~sg7g8,~sg7g9,~sg7g10,~sg7g11,~sg7g12];
5360                         #fp1h,fp2h,fp3h,fp4h,fp5h,fp6h,fp7h,fp8h,fp9h,fp10h,fp11h,fp12h=[~sg7h1,~sg7h2,~sg7h3,~sg7h4,~sg7h5,~sg7h6,~sg7h7,~sg7h8,~sg7h9,~sg7h10,~sg7h11,~sg7h12];
5361
5362                         ~setgroup1.value = 0;
5363                         ~setgroup2.value = 0;
5364                         ~setgroup3.value = 0;
5365                         ~setgroup4.value = 0;
5366                         ~setgroup5.value = 0;
5367                         ~setgroup6.value = 0;
5368                         ~setgroup8.value = 0;
5369
5370                         ~setgroupval = 7;
5371                 });
5372         });
5373         ~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;
5374
5375                 if(button.value == 1, {
5376                         #fp1,fp2,fp3,fp4,fp5,fp6,fp7,fp8,fp9,fp10,fp11,fp12=[~sg8a1,~sg8a2,~sg8a3,~sg8a4,~sg8a5,~sg8a6,~sg8a7,~sg8a8,~sg8a9,~sg8a10,~sg8a11,~sg8a12];
5377                         #fp1b,fp2b,fp3b,fp4b,fp5b,fp6b,fp7b,fp8b,fp9b,fp10b,fp11b,fp12b=[~sg8b1,~sg8b2,~sg8b3,~sg8b4,~sg8b5,~sg8b6,~sg8b7,~sg8b8,~sg8b9,~sg8b10,~sg8b11,~sg8b12];
5378                         #fp1c,fp2c,fp3c,fp4c,fp5c,fp6c,fp7c,fp8c,fp9c,fp10c,fp11c,fp12c=[~sg8c1,~sg8c2,~sg8c3,~sg8c4,~sg8c5,~sg8c6,~sg8c7,~sg8c8,~sg8c9,~sg8c10,~sg8c11,~sg8c12];
5379                         #fp1d,fp2d,fp3d,fp4d,fp5d,fp6d,fp7d,fp8d,fp9d,fp10d,fp11d,fp12d=[~sg8d1,~sg8d2,~sg8d3,~sg8d4,~sg8d5,~sg8d6,~sg8d7,~sg8d8,~sg8d9,~sg8d10,~sg8d11,~sg8d12];
5380                         #fp1e,fp2e,fp3e,fp4e,fp5e,fp6e,fp7e,fp8e,fp9e,fp10e,fp11e,fp12e=[~sg8e1,~sg8e2,~sg8e3,~sg8e4,~sg8e5,~sg8e6,~sg8e7,~sg8e8,~sg8e9,~sg8e10,~sg8e11,~sg8e12];
5381                         #fp1f,fp2f,fp3f,fp4f,fp5f,fp6f,fp7f,fp8f,fp9f,fp10f,fp11f,fp12f=[~sg8f1,~sg8f2,~sg8f3,~sg8f4,~sg8f5,~sg8f6,~sg8f7,~sg8f8,~sg8f9,~sg8f10,~sg8f11,~sg8f12];
5382                         #fp1g,fp2g,fp3g,fp4g,fp5g,fp6g,fp7g,fp8g,fp9g,fp10g,fp11g,fp12g=[~sg8g1,~sg8g2,~sg8g3,~sg8g4,~sg8g5,~sg8g6,~sg8g7,~sg8g8,~sg8g9,~sg8g10,~sg8g11,~sg8g12];
5383                         #fp1h,fp2h,fp3h,fp4h,fp5h,fp6h,fp7h,fp8h,fp9h,fp10h,fp11h,fp12h=[~sg8h1,~sg8h2,~sg8h3,~sg8h4,~sg8h5,~sg8h6,~sg8h7,~sg8h8,~sg8h9,~sg8h10,~sg8h11,~sg8h12];
5384
5385                         ~setgroup1.value = 0;
5386                         ~setgroup2.value = 0;
5387                         ~setgroup3.value = 0;
5388                         ~setgroup4.value = 0;
5389                         ~setgroup5.value = 0;
5390                         ~setgroup6.value = 0;
5391                         ~setgroup7.value = 0;
5392
5393                         ~setgroupval = 8;
5394                 });
5395         });
5396
5397
5398         //if setgroup values are nil
5399
5400         if(~setgroupval == nil, {~setgroup1.value = 1;});
5401         if(~setgroupval == 1, {~setgroup1.value = 1;});
5402         if(~setgroupval == 2, {~setgroup2.value = 1;});
5403         if(~setgroupval == 3, {~setgroup3.value = 1;});
5404         if(~setgroupval == 4, {~setgroup4.value = 1;});
5405         if(~setgroupval == 5, {~setgroup5.value = 1;});
5406         if(~setgroupval == 6, {~setgroup6.value = 1;});
5407         if(~setgroupval == 7, {~setgroup7.value = 1;});
5408         if(~setgroupval == 8, {~setgroup8.value = 1;});
5409
5410
5411         //save chord notes buttons, s1-s8
5412
5413         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, {~r1=fp1;~r2=fp2;~r3=fp3;~r4=fp4;~r5=fp5;~r6=fp6;~r7=fp7;~r8=fp8;~r9=fp9;~r10=fp10;~r11=fp11;~r12=fp12; #fp1,fp2,fp3,fp4,fp5,fp6,fp7,fp8,fp9,fp10,fp11,fp12/*,fp13,fp14,fp15,fp16,fp17,fp18,fp19,fp20,fp21,fp22,fp23,fp24*/ = [ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ]; "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;
5414
5415                 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))});});
5416                 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))});});
5417                 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))});});
5418                 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))});});
5419                 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))});});
5420                 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))});});
5421                 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))});});
5422                 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))});});
5423
5424                 n1.states_([["s1",Color.green,Color.black]]);
5425                 n2.states_([["s2",Color.white,Color.black]]);
5426                 n3.states_([["s3",Color.white,Color.black]]);
5427                 n4.states_([["s4",Color.white,Color.black]]);
5428                 n5.states_([["s5",Color.white,Color.black]]);
5429                 n6.states_([["s6",Color.white,Color.black]]);
5430                 n7.states_([["s7",Color.white,Color.black]]);
5431                 n8.states_([["s8",Color.white,Color.black]]);
5432         });});
5433
5434         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, {~r1b=fp1b;~r2b=fp2b;~r3b=fp3b;~r4b=fp4b;~r5b=fp5b;~r6b=fp6b;~r7b=fp7b;~r8b=fp8b;~r9b=fp9b;~r10b=fp10b;~r11b=fp11b;~r12b=fp12b; #fp1b,fp2b,fp3b,fp4b,fp5b,fp6b,fp7b,fp8b,fp9b,fp10b,fp11b,fp12b/*,fp13b,fp14b,fp15b,fp16b,fp17b,fp18b,fp19b,fp20b,fp21b,fp22b,fp23b,fp24b*/ = [ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ]; "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;
5435
5436                 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))});});
5437                 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))});});
5438                 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))});});
5439                 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))});});
5440                 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))});});
5441                 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))});});
5442                 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))});});
5443                 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))});});
5444
5445                 n1.states_([["s1",Color.white,Color.black]]);
5446                 n2.states_([["s2",Color.green,Color.black]]);
5447                 n3.states_([["s3",Color.white,Color.black]]);
5448                 n4.states_([["s4",Color.white,Color.black]]);
5449                 n5.states_([["s5",Color.white,Color.black]]);
5450                 n6.states_([["s6",Color.white,Color.black]]);
5451                 n7.states_([["s7",Color.white,Color.black]]);
5452                 n8.states_([["s8",Color.white,Color.black]]);
5453         });});
5454         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, {~r1c=fp1c;~r2c=fp2c;~r3c=fp3c;~r4c=fp4c;~r5c=fp5c;~r6c=fp6c;~r7c=fp7c;~r8c=fp8c;~r9c=fp9c;~r10c=fp10c;~r11c=fp11c;~r12c=fp12c; #fp1c,fp2c,fp3c,fp4c,fp5c,fp6c,fp7c,fp8c,fp9c,fp10c,fp11c,fp12c/*,fp13c,fp14c,fp15c,fp16c,fp17c,fp18c,fp19c,fp20c,fp21c,fp22c,fp23c,fp24c*/ = [ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ]; "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;
5455
5456                 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))});});
5457                 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))});});
5458                 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))});});
5459                 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))});});
5460                 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))});});
5461                 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))});});
5462                 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))});});
5463                 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))});});
5464
5465                 n1.states_([["s1",Color.white,Color.black]]);
5466                 n2.states_([["s2",Color.white,Color.black]]);
5467                 n3.states_([["s3",Color.green,Color.black]]);
5468                 n4.states_([["s4",Color.white,Color.black]]);
5469                 n5.states_([["s5",Color.white,Color.black]]);
5470                 n6.states_([["s6",Color.white,Color.black]]);
5471                 n7.states_([["s7",Color.white,Color.black]]);
5472                 n8.states_([["s8",Color.white,Color.black]]);
5473         });});
5474         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, {~r1d=fp1d;~r2d=fp2d;~r3d=fp3d;~r4d=fp4d;~r5d=fp5d;~r6d=fp6d;~r7d=fp7d;~r8d=fp8d;~r9d=fp9d;~r10d=fp10d;~r11d=fp11d;~r12d=fp12d; #fp1d,fp2d,fp3d,fp4d,fp5d,fp6d,fp7d,fp8d,fp9d,fp10d,fp11d,fp12d/*,fp13d,fp14d,fp15d,fp16d,fp17d,fp18d,fp19d,fp20d,fp21d,fp22d,fp23d,fp24d*/ = [ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ]; "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;
5475
5476                 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))});});
5477                 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))});});
5478                 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))});});
5479                 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))});});
5480                 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))});});
5481                 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))});});
5482                 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))});});
5483                 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))});});
5484
5485                 n1.states_([["s1",Color.white,Color.black]]);
5486                 n2.states_([["s2",Color.white,Color.black]]);
5487                 n3.states_([["s3",Color.white,Color.black]]);
5488                 n4.states_([["s4",Color.green,Color.black]]);
5489                 n5.states_([["s5",Color.white,Color.black]]);
5490                 n6.states_([["s6",Color.white,Color.black]]);
5491                 n7.states_([["s7",Color.white,Color.black]]);
5492                 n8.states_([["s8",Color.white,Color.black]]);
5493         });});
5494         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, {~r1e=fp1e;~r2e=fp2e;~r3e=fp3e;~r4e=fp4e;~r5e=fp5e;~r6e=fp6e;~r7e=fp7e;~r8e=fp8e;~r9e=fp9e;~r10e=fp10e;~r11e=fp11e;~r12e=fp12e; #fp1e,fp2e,fp3e,fp4e,fp5e,fp6e,fp7e,fp8e,fp9e,fp10e,fp11e,fp12e/*,fp13e,fp14e,fp15e,fp16e,fp17e,fp18e,fp19e,fp20e,fp21e,fp22e,fp23e,fp24e*/ = [ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ]; "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;
5495
5496                 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))});});
5497                 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))});});
5498                 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))});});
5499                 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))});});
5500                 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))});});
5501                 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))});});
5502                 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))});});
5503                 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))});});
5504
5505                 n1.states_([["s1",Color.white,Color.black]]);
5506                 n2.states_([["s2",Color.white,Color.black]]);
5507                 n3.states_([["s3",Color.white,Color.black]]);
5508                 n4.states_([["s4",Color.white,Color.black]]);
5509                 n5.states_([["s5",Color.green,Color.black]]);
5510                 n6.states_([["s6",Color.white,Color.black]]);
5511                 n7.states_([["s7",Color.white,Color.black]]);
5512                 n8.states_([["s8",Color.white,Color.black]]);
5513         });});
5514         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, {~r1f=fp1f;~r2f=fp2f;~r3f=fp3f;~r4f=fp4f;~r5f=fp5f;~r6f=fp6f;~r7f=fp7f;~r8f=fp8f;~r9f=fp9f;~r10f=fp10f;~r11f=fp11f;~r12f=fp12f; #fp1f,fp2f,fp3f,fp4f,fp5f,fp6f,fp7f,fp8f,fp9f,fp10f,fp11f,fp12f/*,fp13f,fp14f,fp15f,fp16f,fp17f,fp18f,fp19f,fp20f,fp21f,fp22f,fp23f,fp24f*/ = [ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ]; "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;
5515
5516                 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))});});
5517                 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))});});
5518                 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))});});
5519                 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))});});
5520                 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))});});
5521                 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))});});
5522                 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))});});
5523                 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))});});
5524
5525                 n1.states_([["s1",Color.white,Color.black]]);
5526                 n2.states_([["s2",Color.white,Color.black]]);
5527                 n3.states_([["s3",Color.white,Color.black]]);
5528                 n4.states_([["s4",Color.white,Color.black]]);
5529                 n5.states_([["s5",Color.white,Color.black]]);
5530                 n6.states_([["s6",Color.green,Color.black]]);
5531                 n7.states_([["s7",Color.white,Color.black]]);
5532                 n8.states_([["s8",Color.white,Color.black]]);
5533         });});
5534         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, {~r1g=fp1g;~r2g=fp2g;~r3g=fp3g;~r4g=fp4g;~r5g=fp5g;~r6g=fp6g;~r7g=fp7g;~r8g=fp8g;~r9g=fp9g;~r10g=fp10g;~r11g=fp11g;~r12g=fp12g; #fp1g,fp2g,fp3g,fp4g,fp5g,fp6g,fp7g,fp8g,fp9g,fp10g,fp11g,fp12g/*,fp13g,fp14g,fp15g,fp16g,fp17g,fp18g,fp19g,fp20g,fp21g,fp22g,fp23g,fp24g*/ = [ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ]; "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;
5535
5536                 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))});});
5537                 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))});});
5538                 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))});});
5539                 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))});});
5540                 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))});});
5541                 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))});});
5542                 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))});});
5543                 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))});});
5544
5545                 n1.states_([["s1",Color.white,Color.black]]);
5546                 n2.states_([["s2",Color.white,Color.black]]);
5547                 n3.states_([["s3",Color.white,Color.black]]);
5548                 n4.states_([["s4",Color.white,Color.black]]);
5549                 n5.states_([["s5",Color.white,Color.black]]);
5550                 n6.states_([["s6",Color.white,Color.black]]);
5551                 n7.states_([["s7",Color.green,Color.black]]);
5552                 n8.states_([["s8",Color.white,Color.black]]);
5553         });});
5554         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, {~r1h=fp1h;~r2h=fp2h;~r3h=fp3h;~r4h=fp4h;~r5h=fp5h;~r6h=fp6h;~r7h=fp7h;~r8h=fp8h;~r9h=fp9h;~r10h=fp10h;~r11h=fp11h;~r12h=fp12h; #fp1h,fp2h,fp3h,fp4h,fp5h,fp6h,fp7h,fp8h,fp9h,fp10h,fp11h,fp12h/*,fp13h,fp14h,fp15h,fp16h,fp17h,fp18h,fp19h,fp20h,fp21h,fp22h,fp23h,fp24h*/ = [ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ]; "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;
5555
5556                 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))});});
5557                 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))});});
5558                 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))});});
5559                 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))});});
5560                 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))});});
5561                 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))});});
5562                 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))});});
5563                 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))});});
5564
5565                 n1.states_([["s1",Color.white,Color.black]]);
5566                 n2.states_([["s2",Color.white,Color.black]]);
5567                 n3.states_([["s3",Color.white,Color.black]]);
5568                 n4.states_([["s4",Color.white,Color.black]]);
5569                 n5.states_([["s5",Color.white,Color.black]]);
5570                 n6.states_([["s6",Color.white,Color.black]]);
5571                 n7.states_([["s7",Color.white,Color.black]]);
5572                 n8.states_([["s8",Color.green,Color.black]]);
5573         });});
5574
5575
5576         //undo saved chord pop-up menu
5577
5578         ~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;});
5579
5580
5581         //set button for undo pop-up menu
5582
5583         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;
5584                 case
5585                 {~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;}
5586                 {~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, {#fp1,fp2,fp3,fp4,fp5,fp6,fp7,fp8,fp9,fp10,fp11,fp12 = [~u1,~u2,~u3,~u4,~u5,~u6,~u7,~u8,~u9,~u10,~u11,~u12]},{#fp1,fp2,fp3,fp4,fp5,fp6,fp7,fp8,fp9,fp10,fp11,fp12 = [~r1,~r2,~r3,~r4,~r5,~r6,~r7,~r8,~r9,~r10,~r11,~r12]});~undo.value = 0;}
5587                 {~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], {#fp1b,fp2b,fp3b,fp4b,fp5b,fp6b,fp7b,fp8b,fp9b,fp10b,fp11b,fp12b = [~u1b,~u2b,~u3b,~u4b,~u5b,~u6b,~u7b,~u8b,~u9b,~u10b,~u11b,~u12b]},{#fp1b,fp2b,fp3b,fp4b,fp5b,fp6b,fp7b,fp8b,fp9b,fp10b,fp11b,fp12b = [~r1b,~r2b,~r3b,~r4b,~r5b,~r6b,~r7b,~r8b,~r9b,~r10b,~r11b,~r12b]});~undo.value = 0;}
5588                 {~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], {#fp1c,fp2c,fp3c,fp4c,fp5c,fp6c,fp7c,fp8c,fp9c,fp10c,fp11c,fp12c = [~u1c,~u2c,~u3c,~u4c,~u5c,~u6c,~u7c,~u8c,~u9c,~u10c,~u11c,~u12c]},{#fp1c,fp2c,fp3c,fp4c,fp5c,fp6c,fp7c,fp8c,fp9c,fp10c,fp11c,fp12c = [~r1c,~r2c,~r3c,~r4c,~r5c,~r6c,~r7c,~r8c,~r9c,~r10c,~r11c,~r12c]});~undo.value = 0;}
5589                 {~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], {#fp1d,fp2d,fp3d,fp4d,fp5d,fp6d,fp7d,fp8d,fp9d,fp10d,fp11d,fp12d = [~u1d,~u2d,~u3d,~u4d,~u5d,~u6d,~u7d,~u8d,~u9d,~u10d,~u11d,~u12d]},{#fp1d,fp2d,fp3d,fp4d,fp5d,fp6d,fp7d,fp8d,fp9d,fp10d,fp11d,fp12d = [~r1d,~r2d,~r3d,~r4d,~r5d,~r6d,~r7d,~r8d,~r9d,~r10d,~r11d,~r12d]});~undo.value = 0;}
5590                 {~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], {#fp1e,fp2e,fp3e,fp4e,fp5e,fp6e,fp7e,fp8e,fp9e,fp10e,fp11e,fp12e = [~u1e,~u2e,~u3e,~u4e,~u5e,~u6e,~u7e,~u8e,~u9e,~u10e,~u11e,~u12e]},{#fp1e,fp2e,fp3e,fp4e,fp5e,fp6e,fp7e,fp8e,fp9e,fp10e,fp11e,fp12e = [~r1e,~r2e,~r3e,~r4e,~r5e,~r6e,~r7e,~r8e,~r9e,~r10e,~r11e,~r12e]});~undo.value = 0;}
5591                 {~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], {#fp1f,fp2f,fp3f,fp4f,fp5f,fp6f,fp7f,fp8f,fp9f,fp10f,fp11f,fp12f = [~u1f,~u2f,~u3f,~u4f,~u5f,~u6f,~u7f,~u8f,~u9f,~u10f,~u11f,~u12f]},{#fp1f,fp2f,fp3f,fp4f,fp5f,fp6f,fp7f,fp8f,fp9f,fp10f,fp11f,fp12f = [~r1f,~r2f,~r3f,~r4f,~r5f,~r6f,~r7f,~r8f,~r9f,~r10f,~r11f,~r12f]});~undo.value = 0;}
5592                 {~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], {#fp1g,fp2g,fp3g,fp4g,fp5g,fp6g,fp7g,fp8g,fp9g,fp10g,fp11g,fp12g = [~u1g,~u2g,~u3g,~u4g,~u5g,~u6g,~u7g,~u8g,~u9g,~u10g,~u11g,~u12g]},{#fp1g,fp2g,fp3g,fp4g,fp5g,fp6g,fp7g,fp8g,fp9g,fp10g,fp11g,fp12g = [~r1g,~r2g,~r3g,~r4g,~r5g,~r6g,~r7g,~r8g,~r9g,~r10g,~r11g,~r12g]});~undo.value = 0;}
5593                 {~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], {#fp1h,fp2h,fp3h,fp4h,fp5h,fp6h,fp7h,fp8h,fp9h,fp10h,fp11h,fp12h = [~u1h,~u2h,~u3h,~u4h,~u5h,~u6h,~u7h,~u8h,~u9h,~u10h,~u11h,~u12h]},{#fp1h,fp2h,fp3h,fp4h,fp5h,fp6h,fp7h,fp8h,fp9h,fp10h,fp11h,fp12h = [~r1h,~r2h,~r3h,~r4h,~r5h,~r6h,~r7h,~r8h,~r9h,~r10h,~r11h,~r12h]});~undo.value = 0;};
5594         });
5595
5596
5597         //record/stop record button
5598
5599         ~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;
5600
5601                 if(button.value == 1, {~numsynths.stop; s.record; if(button.value == 0, {button.value = 1});},
5602                         {s.stopRecording; ~startrecord.value = 0; ~pauserecord.value = 0; ~numsynths.stop; ~numsynths.play;});
5603         });
5604
5605
5606         //pause record button
5607
5608         ~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});});
5609
5610
5611         //minimize GUI window button
5612
5613         ~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;});
5614
5615
5616         //close GUI window button
5617
5618         ~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;
5619
5620                 if(~closemessage != nil, {~closemessage.close}, {nil});
5621                 ~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;
5622                 ~closemessagestring = StaticText(~closemessage, Rect(0,0,340+46,340+46/1.6180339887499)).background_(Color.black);
5623                 ~closemessagestring.align = \center;
5624                 ~closemessagestring.string ="Close Timewave Synth?";
5625                 ~closemessagestring.stringColor = Color.white;
5626                 ~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, {w.close; Task({1.do({if(~l1a.isRunning == true or: ~l1a1.isRunning == true, {~synthfree.value;}, {nil}); 1.wait; s.freeAll;});}).play;});});
5627                 ~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;});});
5628                 ~closemessage.front;
5629
5630
5631         });
5632
5633
5634         w.front; w.fullScreen;
5635
5636         //Developed by Ken Brant (ken_brant@ymail.com)
5637
5638 }.value);
5639 );
5640 );
5641
5642
5643 //Interpreted King Wen Sequences
5644
5645 /*
5646
5647 (#a,b,c,d,e,f = /*[ 128.43436842029,128.43436842029,128.43436842029,128.43436842029,128.43436842029,128.43436842029  ]*/
5648 [ ~basefreq,~basefreq,~basefreq,~basefreq,~basefreq,~basefreq  ];
5649 ~a = a; ~b = b; ~c =c; ~d = d; ~e = e;~f=f;);
5650
5651 ~fth = 1.4142135623729;
5652 ~bi  = ~fth; (~bi  = "binary interval" - intverval of key change to hexgram's opposite in King Wen sequence)
5653
5654
5655 (First Setting)
5656
5657 /*1*/   #a,b,c,d,e,f=[ ~a,~b,~c,~d,~e,~f  ],
5658 /*2*/   [ a = a/~bi, b = b/~bi, c = c/~bi, d = d/~bi, e = e/~bi, f = f/~bi ],
5659 /*3*/   [ a = a,     b = b*~bi, c = c,     d = d,     e = e,     f = f*~bi ],
5660 /*4*/   [ a = a*~bi, b = b/~bi, c = c,     d = d,     e = e*~bi, f = f/~bi ],
5661 /*5*/   [ a = a/~bi, b = b*~bi, c = c,     d = d*~bi, e = e,     f = f*~bi ],
5662 /*6*/   [ a = a*~bi, b = b,     c = c*~bi, d = d/~bi, e = e,     f = f/~bi ],
5663 /*7*/   [ a = a/~bi, b = b/~bi, c = c/~bi, d = d,     e = e,     f = f     ],
5664 /*8*/   [ a = a,     b = b*~bi, c = c,     d = d,     e = e/~bi, f = f     ],
5665 /*9*/   [ a = a*~bi, b = b,     c = c,     d = d*~bi, e = e*~bi, f = f*~bi ],
5666 /*10*/  [ a = a,     b = b,     c = c*~bi, d = d/~bi, e = e,     f = f     ],
5667 /*11*/  [ a = a/~bi, b = b/~bi, c = c/~bi, d = d*~bi, e = e,     f = f     ],
5668 /*12*/  [ a = a*~bi, b = b*~bi, c = c*~bi, d = d/~bi, e = e/~bi, f = f/~bi ],
5669 /*13*/  [ a = a,     b = b,     c = c,     d = d*~bi, e = e,     f = f*~bi ],
5670 /*14*/  [ a = a,     b = b/~bi, c = c,     d = d,     e = e*~bi, f = f     ],
5671 /*15*/  [ a = a/~bi, b = b,     c = c/~bi, d = d,     e = e/~bi, f = f/~bi ],
5672 /*16*/  [ a = a,     b = b,     c = c*~bi, d = d/~bi, e = e,     f = f     ],
5673 /*17*/  [ a = a,     b = b*~bi, c = c,     d = d,     e = e,     f = f*~bi ],
5674 /*18*/  [ a = a*~bi, b = b/~bi, c = c/~bi, d = d*~bi, e = e*~bi, f = f/~bi ],
5675 /*19*/  [ a = a/~bi, b = b,     c = c,     d = d/~bi, e = e,     f = f*~bi ],
5676 /*20*/  [ a = a*~bi, b = b*~bi, c = c,     d = d,     e = e/~bi, f = f/~bi ],
5677 /*21*/  [ a = a,     b = b/~bi, c = c*~bi, d = d,     e = e,     f = f*~bi ],
5678 /*22*/  [ a = a,     b = b,     c = c/~bi, d = d*~bi, e = e,     f = f     ],
5679 /*23*/  [ a = a,     b = b,     c = c,     d = d/~bi, e = e,     f = f/~bi ],
5680 /*24*/  [ a = a/~bi, b = b,     c = c,     d = d,     e = e,     f = f*~bi ],
5681 /*25*/  [ a = a*~bi, b = b*~bi, c = c*~bi, d = d,     e = e,     f = f     ],
5682 /*26*/  [ a = a,     b = b/~bi, c = c/~bi, d = d*~bi, e = e*~bi, f = f     ],
5683 /*27*/  [ a = a,     b = b,     c = c,     d = d/~bi, e = e/~bi, f = f     ],
5684 /*28*/  [ a = a/~bi, b = b*~bi, c = c*~bi, d = d*~bi, e = e*~bi, f = f/~bi ],
5685 /*29*/  [ a = a,     b = b,     c = c/~bi, d = d/~bi, e = e,     f = f     ],
5686 /*30*/  [ a = a*~bi, b = b/~bi, c = c*~bi, d = d*~bi, e = e/~bi, f = f*~bi ],
5687 /*31*/  [ a = a/~bi, b = b*~bi, c = c,     d = d,     e = e,     f = f/~bi ],
5688 /*32*/  [ a = a,     b = b/~bi, c = c,     d = d,     e = e*~bi, f = f     ],
5689 /*33*/  [ a = a*~bi, b = b*~bi, c = c,     d = d,     e = e/~bi, f = f     ],
5690 /*34*/  [ a = a/~bi, b = b/~bi, c = c,     d = d,     e = e*~bi, f = f*~bi ],
5691 /*35*/  [ a = a*~bi, b = b,     c = c,     d = d/~bi, e = e/~bi, f = f/~bi ],
5692 /*36*/  [ a = a/~bi, b = b,     c = c/~bi, d = d*~bi, e = e,     f = f*~bi ],
5693 /*37*/  [ a = a*~bi, b = b*~bi, c = c,     d = d,     e = e,     f = f     ],
5694 /*38*/  [ a = a,     b = b/~bi, c = c*~bi, d = d/~bi, e = e*~bi, f = f     ],
5695 /*39*/  [ a = a/~bi, b = b*~bi, c = c/~bi, d = d*~bi, e = e/~bi, f = f/~bi ],
5696 /*40*/  [ a = a,     b = b/~bi, c = c*~bi, d = d/~bi, e = e*~bi, f = f     ],
5697 /*41*/  [ a = a*~bi, b = b,     c = c/~bi, d = d,     e = e,     f = f*~bi ],
5698 /*42*/  [ a = a,     b = b*~bi, c = c,     d = d,     e = e/~bi, f = f     ],
5699 /*43*/  [ a = a/~bi, b = b,     c = c*~bi, d = d*~bi, e = e*~bi, f = f     ],
5700 /*44*/  [ a = a*~bi, b = b,     c = c,     d = d,     e = e,     f = f/~bi ],
5701 /*45*/  [ a = a/~bi, b = b,     c = c,     d = d/~bi, e = e/~bi, f = f     ],
5702 /*46*/  [ a = a,     b = b/~bi, c = c/~bi, d = d*~bi, e = e*~bi, f = f     ],
5703 /*47*/  [ a = a,     b = b*~bi, c = c*~bi, d = d/~bi, e = e,     f = f     ],
5704 /*48*/  [ a = a,     b = b,     c = c/~bi, d = d*~bi, e = e,     f = f     ],
5705 /*49*/  [ a = a,     b = b,     c = c*~bi, d = d,     e = e/~bi, f = f*~bi ],
5706 /*50*/  [ a = a*~bi, b = b/~bi, c = c,     d = d,     e = e*~bi, f = f/~bi ],
5707 /*51*/  [ a = a/~bi, b = b,     c = c,     d = d/~bi, e = e/~bi, f = f*~bi ],
5708 /*52*/  [ a = a*~bi, b = b,     c = c/~bi, d = d*~bi, e = e,     f = f/~bi ],
5709 /*53*/  [ a = a,     b = b*~bi, c = c,     d = d,     e = e,     f = f     ],
5710 /*54*/  [ a = a/~bi, b = b/~bi, c = c*~bi, d = d/~bi, e = e*~bi, f = f*~bi ],
5711 /*55*/  [ a = a,     b = b,     c = c,     d = d*~bi, e = e/~bi, f = f     ],
5712 /*56*/  [ a = a*~bi, b = b,     c = c,     d = d,     e = e,     f = f/~bi ],
5713 /*57*/  [ a = a,     b = b*~bi, c = c/~bi, d = d,     e = e*~bi, f = f     ],
5714 /*58*/  [ a = a/~bi, b = b,     c = c*~bi, d = d/~bi, e = e,     f = f*~bi ],
5715 /*59*/  [ a = a*~bi, b = b,     c = c/~bi, d = d,     e = e,     f = f/~bi ],
5716 /*60*/  [ a = a/~bi, b = b,     c = c,     d = d,     e = e,     f = f*~bi ],
5717 /*61*/  [ a = a*~bi, b = b,     c = c,     d = d,     e = e,     f = f     ],
5718 /*62*/  [ a = a/~bi, b = b/~bi, c = c*~bi, d = d*~bi, e = e/~bi, f = f/~bi ],
5719 /*63*/  [ a = a,     b = b*~bi, c = c/~bi, d = d,     e = e,     f = f*~bi ],
5720 /*64*/  [ a = a*~bi, b = b/~bi, c = c*~bi, d = d/~bi, e = e*~bi, f = f/~bi ]
5721
5722 /*1*/   [ a = a*~n1, b = b*~n1*~bi, c = c*~n1, d = d*~n1*~bi, e = e*~n1, f = f*~n1*~bi ],...
5723
5724
5725 (Second Setting)
5726
5727 /*1*/   #a,b,c,d,e,f=[ ~a,~b,~c,~d,~e,~f  ],
5728 /*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 ],
5729 /*3*/   [ a = a,         b = b*~bi,     c = c,         d = d,         e = e,         f = f*~bi     ],
5730 /*4*/   [ a = a*~bi,     b = b/~bi,     c = c,         d = d,         e = e*~bi,     f = f/~bi     ],
5731 /*5*/   [ a = a/~bi,     b = b*~bi,     c = c,         d = d*~bi,     e = e,         f = f*~bi     ],
5732 /*6*/   [ a = a*~bi,     b = b,         c = c*~bi,     d = d/~bi,     e = e,         f = f/~bi     ],
5733 /*7*/   [ a = a/~bi,     b = b/~bi,     c = c/~bi,     d = d,         e = e,         f = f         ],
5734 /*8*/   [ a = a,         b = b*~bi,     c = c,         d = d,         e = e/~bi,     f = f         ],
5735 /*9*/   [ a = a*~bi,     b = b,         c = c,         d = d*~bi,     e = e*~bi,     f = f*~bi     ],
5736 /*10*/  [ a = a,         b = b,         c = c*~bi,     d = d/~bi,     e = e,         f = f         ],
5737 /*11*/  [ a = a/~bi,     b = b/~bi,     c = c/~bi,     d = d*~bi,     e = e,         f = f         ],
5738 /*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 ],
5739 /*13*/  [ a = a,         b = b,         c = c,         d = d*~bi,     e = e,         f = f*~bi     ],
5740 /*14*/  [ a = a,         b = b/~bi,     c = c,         d = d,         e = e*~bi,     f = f         ],
5741 /*15*/  [ a = a/~bi,     b = b,         c = c/~bi,     d = d,         e = e/~bi,     f = f/~bi     ],
5742 /*16*/  [ a = a,         b = b,         c = c*~bi,     d = d/~bi,     e = e,         f = f         ],
5743 /*17*/  [ a = a,         b = b*~bi,     c = c,         d = d,         e = e,         f = f*~bi     ],
5744 /*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 ],
5745 /*19*/  [ a = a/~bi,     b = b,         c = c,         d = d/~bi,     e = e,         f = f*~bi     ],
5746 /*20*/  [ a = a*~bi,     b = b*~bi,     c = c,         d = d,         e = e/~bi,     f = f/~bi     ],
5747 /*21*/  [ a = a,         b = b/~bi,     c = c*~bi,     d = d,         e = e,         f = f*~bi     ],
5748 /*22*/  [ a = a,         b = b,         c = c/~bi,     d = d*~bi,     e = e,         f = f         ],
5749 /*23*/  [ a = a,         b = b,         c = c,         d = d/~bi,     e = e,         f = f/~bi     ],
5750 /*24*/  [ a = a/~bi,     b = b,         c = c,         d = d,         e = e,         f = f*~bi     ],
5751 /*25*/  [ a = a*~bi,     b = b*~bi,     c = c*~bi,     d = d,         e = e,         f = f         ],
5752 /*26*/  [ a = a,         b = b/~bi,     c = c/~bi,     d = d*~bi,     e = e*~bi,     f = f         ],
5753 /*27*/  [ a = a,         b = b,         c = c,         d = d/~bi,     e = e/~bi,     f = f         ],
5754 /*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 ],
5755 /*29*/  [ a = a,         b = b,         c = c/~bi,     d = d/~bi,     e = e,         f = f         ],
5756 /*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 ],
5757 /*31*/  [ a = a/~bi,     b = b*~bi,     c = c,         d = d,         e = e,         f = f/~bi     ],
5758 /*32*/  [ a = a,         b = b/~bi,     c = c,         d = d,         e = e*~bi,     f = f         ],
5759 /*33*/  [ a = a*~bi,     b = b*~bi,     c = c,         d = d,         e = e/~bi,     f = f         ],
5760 /*34*/  [ a = a/~bi,     b = b/~bi,     c = c,         d = d,         e = e*~bi,     f = f*~bi     ],
5761 /*35*/  [ a = a*~bi,     b = b,         c = c,         d = d/~bi,     e = e/~bi,     f = f/~bi     ],
5762 /*36*/  [ a = a/~bi,     b = b,         c = c/~bi,     d = d*~bi,     e = e,         f = f*~bi     ],
5763 /*37*/  [ a = a*~bi,     b = b*~bi,     c = c,         d = d,         e = e,         f = f         ],
5764 /*38*/  [ a = a,         b = b/~bi,     c = c*~bi,     d = d/~bi,     e = e*~bi,     f = f         ],
5765 /*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 ],
5766 /*40*/  [ a = a,         b = b/~bi,     c = c*~bi,     d = d/~bi,     e = e*~bi,     f = f         ],
5767 /*41*/  [ a = a*~bi,     b = b,         c = c/~bi,     d = d,         e = e,         f = f*~bi     ],
5768 /*42*/  [ a = a,         b = b*~bi,     c = c,         d = d,         e = e/~bi,     f = f         ],
5769 /*43*/  [ a = a/~bi,     b = b,         c = c*~bi,     d = d*~bi,     e = e*~bi,     f = f         ],
5770 /*44*/  [ a = a*~bi,     b = b,         c = c,         d = d,         e = e,         f = f/~bi     ],
5771 /*45*/  [ a = a/~bi,     b = b,         c = c,         d = d/~bi,     e = e/~bi,     f = f         ],
5772 /*46*/  [ a = a,         b = b/~bi,     c = c/~bi,     d = d*~bi,     e = e*~bi,     f = f         ],
5773 /*47*/  [ a = a,         b = b*~bi,     c = c*~bi,     d = d/~bi,     e = e,         f = f         ],
5774 /*48*/  [ a = a,         b = b,         c = c/~bi,     d = d*~bi,     e = e,         f = f         ],
5775 /*49*/  [ a = a,         b = b,         c = c*~bi,     d = d,         e = e/~bi,     f = f*~bi     ],
5776 /*50*/  [ a = a*~bi,     b = b/~bi,     c = c,         d = d,         e = e*~bi,     f = f/~bi     ],
5777 /*51*/  [ a = a/~bi,     b = b,         c = c,         d = d/~bi,     e = e/~bi,     f = f*~bi     ],
5778 /*52*/  [ a = a*~bi,     b = b,         c = c/~bi,     d = d*~bi,     e = e,         f = f/~bi     ],
5779 /*53*/  [ a = a,         b = b*~bi,     c = c,         d = d,         e = e,         f = f         ],
5780 /*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 ],
5781 /*55*/  [ a = a,         b = b,         c = c,         d = d*~bi,     e = e/~bi,     f = f         ],
5782 /*56*/  [ a = a*~bi,     b = b,         c = c,         d = d,         e = e,         f = f/~bi     ],
5783 /*57*/  [ a = a,         b = b*~bi,     c = c/~bi,     d = d,         e = e*~bi,     f = f         ],
5784 /*58*/  [ a = a/~bi,     b = b,         c = c*~bi,     d = d/~bi,     e = e,         f = f*~bi     ],
5785 /*59*/  [ a = a*~bi,     b = b,         c = c/~bi,     d = d,         e = e,         f = f/~bi     ],
5786 /*60*/  [ a = a/~bi,     b = b,         c = c,         d = d,         e = e,         f = f*~bi     ],
5787 /*61*/  [ a = a*~bi,     b = b,         c = c,         d = d,         e = e,         f = f         ],
5788 /*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 ],
5789 /*63*/  [ a = a,         b = b*~bi,     c = c/~bi,     d = d,         e = e,         f = f*~bi     ],
5790 /*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 ]
5791
5792 /*1*/   [ a = a,         b = b*~bi,     c = c,         d = d*~bi,     e = e,         f = f*~bi     ],...
5793
5794
5795 (Third Setting)
5796
5797 /*1*/   #a,b,c,d,e,f=[ ~a,~b,~c,~d,~e,~f  ],
5798 /*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 ],
5799 /*3*/   [ a = a*~n1,     b = b*~n1*~bi, c = c*~n1,     d = d*~n1,     e = e*~n1,     f = f*~n1*~bi ],
5800 /*4*/   [ a = a*~n1*~bi, b = b*~n1/~bi, c = c*~n1,     d = d*~n1,     e = e*~n1*~bi, f = f*~n1/~bi ],
5801 /*5*/   [ a = a*~n1/~bi, b = b*~n1*~bi, c = c*~n1,     d = d*~n1*~bi, e = e*~n1,     f = f*~n1*~bi ],
5802 /*6*/   [ a = a*~n1*~bi, b = b*~n1,     c = c*~n1*~bi, d = d*~n1/~bi, e = e*~n1,     f = f*~n1/~bi ],
5803 /*7*/   [ a = a*~n1/~bi, b = b*~n1/~bi, c = c*~n1/~bi, d = d*~n1,     e = e*~n1,     f = f*~n1     ],
5804 /*8*/   [ a = a*~n1,     b = b*~n1*~bi, c = c*~n1,     d = d*~n1,     e = e*~n1/~bi, f = f*~n1     ],
5805 /*9*/   [ a = a*~n1*~bi, b = b*~n1,     c = c*~n1,     d = d*~n1*~bi, e = e*~n1*~bi, f = f*~n1*~bi ],
5806 /*10*/  [ a = a*~n1,     b = b*~n1,     c = c*~n1*~bi, d = d*~n1/~bi, e = e*~n1,     f = f*~n1     ],
5807 /*11*/  [ a = a*~n1/~bi, b = b*~n1/~bi, c = c*~n1/~bi, d = d*~n1*~bi, e = e*~n1,     f = f*~n1     ],
5808 /*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 ],
5809 /*13*/  [ a = a*~n1,     b = b*~n1,     c = c*~n1,     d = d*~n1*~bi, e = e*~n1,     f = f*~n1*~bi ],
5810 /*14*/  [ a = a*~n1,     b = b*~n1/~bi, c = c*~n1,     d = d*~n1,     e = e*~n1*~bi, f = f*~n1     ],
5811 /*15*/  [ a = a*~n1/~bi, b = b*~n1,     c = c*~n1/~bi, d = d*~n1,     e = e*~n1/~bi, f = f*~n1/~bi ],
5812 /*16*/  [ a = a*~n1,     b = b*~n1,     c = c*~n1*~bi, d = d*~n1/~bi, e = e*~n1,     f = f*~n1     ],
5813 /*17*/  [ a = a*~n1,     b = b*~n1*~bi, c = c*~n1,     d = d*~n1,     e = e*~n1,     f = f*~n1*~bi ],
5814 /*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 ],
5815 /*19*/  [ a = a*~n1/~bi, b = b*~n1,     c = c*~n1,     d = d*~n1/~bi, e = e*~n1,     f = f*~n1*~bi ],
5816 /*20*/  [ a = a*~n1*~bi, b = b*~n1*~bi, c = c*~n1,     d = d*~n1,     e = e*~n1/~bi, f = f*~n1/~bi ],
5817 /*21*/  [ a = a*~n1,     b = b*~n1/~bi, c = c*~n1*~bi, d = d*~n1,     e = e*~n1,     f = f*~n1*~bi ],
5818 /*22*/  [ a = a*~n1,     b = b*~n1,     c = c*~n1/~bi, d = d*~n1*~bi, e = e*~n1,     f = f*~n1     ],
5819 /*23*/  [ a = a*~n1,     b = b*~n1,     c = c*~n1,     d = d*~n1/~bi, e = e*~n1,     f = f*~n1/~bi ],
5820 /*24*/  [ a = a*~n1/~bi, b = b*~n1,     c = c*~n1,     d = d*~n1,     e = e*~n1,     f = f*~n1*~bi ],
5821 /*25*/  [ a = a*~n1*~bi, b = b*~n1*~bi, c = c*~n1*~bi, d = d*~n1,     e = e*~n1,     f = f*~n1     ],
5822 /*26*/  [ a = a*~n1,     b = b*~n1/~bi, c = c*~n1/~bi, d = d*~n1*~bi, e = e*~n1*~bi, f = f*~n1     ],
5823 /*27*/  [ a = a*~n1,     b = b*~n1,     c = c*~n1,     d = d*~n1/~bi, e = e*~n1/~bi, f = f*~n1     ],
5824 /*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 ],
5825 /*29*/  [ a = a*~n1,     b = b*~n1,     c = c*~n1/~bi, d = d*~n1/~bi, e = e*~n1,     f = f*~n1     ],
5826 /*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 ],
5827 /*31*/  [ a = a*~n1/~bi, b = b*~n1*~bi, c = c*~n1,     d = d*~n1,     e = e*~n1,     f = f*~n1/~bi ],
5828 /*32*/  [ a = a*~n1,     b = b*~n1/~bi, c = c*~n1,     d = d*~n1,     e = e*~n1*~bi, f = f*~n1     ],
5829 /*33*/  [ a = a*~n1*~bi, b = b*~n1*~bi, c = c*~n1,     d = d*~n1,     e = e*~n1/~bi, f = f*~n1     ],
5830 /*34*/  [ a = a*~n1/~bi, b = b*~n1/~bi, c = c*~n1,     d = d*~n1,     e = e*~n1*~bi, f = f*~n1*~bi ],
5831 /*35*/  [ a = a*~n1*~bi, b = b*~n1,     c = c*~n1,     d = d*~n1/~bi, e = e*~n1/~bi, f = f*~n1/~bi ],
5832 /*36*/  [ a = a*~n1/~bi, b = b*~n1,     c = c*~n1/~bi, d = d*~n1*~bi, e = e*~n1,     f = f*~n1*~bi ],
5833 /*37*/  [ a = a*~n1*~bi, b = b*~n1*~bi, c = c*~n1,     d = d*~n1,     e = e*~n1,     f = f*~n1     ],
5834 /*38*/  [ a = a*~n1,     b = b*~n1/~bi, c = c*~n1*~bi, d = d*~n1/~bi, e = e*~n1*~bi, f = f*~n1     ],
5835 /*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 ],
5836 /*40*/  [ a = a*~n1,     b = b*~n1/~bi, c = c*~n1*~bi, d = d*~n1/~bi, e = e*~n1*~bi, f = f*~n1     ],
5837 /*41*/  [ a = a*~n1*~bi, b = b*~n1,     c = c*~n1/~bi, d = d*~n1,     e = e*~n1,     f = f*~n1*~bi ],
5838 /*42*/  [ a = a*~n1,     b = b*~n1*~bi, c = c*~n1,     d = d*~n1,     e = e*~n1/~bi, f = f*~n1     ],
5839 /*43*/  [ a = a*~n1/~bi, b = b*~n1,     c = c*~n1*~bi, d = d*~n1*~bi, e = e*~n1*~bi, f = f*~n1     ],
5840 /*44*/  [ a = a*~n1*~bi, b = b*~n1,     c = c*~n1,     d = d*~n1,     e = e*~n1,     f = f*~n1/~bi ],
5841 /*45*/  [ a = a*~n1/~bi, b = b*~n1,     c = c*~n1,     d = d*~n1/~bi, e = e*~n1/~bi, f = f*~n1     ],
5842 /*46*/  [ a = a*~n1,     b = b*~n1/~bi, c = c*~n1/~bi, d = d*~n1*~bi, e = e*~n1*~bi, f = f*~n1     ],
5843 /*47*/  [ a = a*~n1,     b = b*~n1*~bi, c = c*~n1*~bi, d = d*~n1/~bi, e = e*~n1,     f = f*~n1     ],
5844 /*48*/  [ a = a*~n1,     b = b*~n1,     c = c*~n1/~bi, d = d*~n1*~bi, e = e*~n1,     f = f*~n1     ],
5845 /*49*/  [ a = a*~n1,     b = b*~n1,     c = c*~n1*~bi, d = d*~n1,     e = e*~n1/~bi, f = f*~n1*~bi ],
5846 /*50*/  [ a = a*~n1*~bi, b = b*~n1/~bi, c = c*~n1,     d = d*~n1,     e = e*~n1*~bi, f = f*~n1/~bi ],
5847 /*51*/  [ a = a*~n1/~bi, b = b*~n1,     c = c*~n1,     d = d*~n1/~bi, e = e*~n1/~bi, f = f*~n1*~bi ],
5848 /*52*/  [ a = a*~n1*~bi, b = b*~n1,     c = c*~n1/~bi, d = d*~n1*~bi, e = e*~n1,     f = f*~n1/~bi ],
5849 /*53*/  [ a = a*~n1,     b = b*~n1*~bi, c = c*~n1,     d = d*~n1,     e = e*~n1,     f = f*~n1     ],
5850 /*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 ],
5851 /*55*/  [ a = a*~n1,     b = b*~n1,     c = c*~n1,     d = d*~n1*~bi, e = e*~n1/~bi, f = f*~n1     ],
5852 /*56*/  [ a = a*~n1*~bi, b = b*~n1,     c = c*~n1,     d = d*~n1,     e = e*~n1,     f = f*~n1/~bi ],
5853 /*57*/  [ a = a*~n1,     b = b*~n1*~bi, c = c*~n1/~bi, d = d*~n1,     e = e*~n1*~bi, f = f*~n1     ],
5854 /*58*/  [ a = a*~n1/~bi, b = b*~n1,     c = c*~n1*~bi, d = d*~n1/~bi, e = e*~n1,     f = f*~n1*~bi ],
5855 /*59*/  [ a = a*~n1*~bi, b = b*~n1,     c = c*~n1/~bi, d = d*~n1,     e = e*~n1,     f = f*~n1/~bi ],
5856 /*60*/  [ a = a*~n1/~bi, b = b*~n1,     c = c*~n1,     d = d*~n1,     e = e*~n1,     f = f*~n1*~bi ],
5857 /*61*/  [ a = a*~n1*~bi, b = b*~n1,     c = c*~n1,     d = d*~n1,     e = e*~n1,     f = f*~n1     ],
5858 /*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 ],
5859 /*63*/  [ a = a*~n1,     b = b*~n1*~bi, c = c*~n1/~bi, d = d*~n1,     e = e*~n1,     f = f*~n1*~bi ],
5860 /*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 ]
5861
5862 /*1*/   [ a = a*~n1,     b = b*~n1*~bi, c = c*~n1,     d = d*~n1*~bi, e = e*~n1,     f = f*~n1*~bi ],...
5863
5864 */