OSDN Git Service

Added files via upload
[timewavesynth/Timewave_Synthesizer.git] / timewavesynthu7osx.scd
1 (
2 //To run the synth, simply 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 - which is recommended.
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 //This synth is compatible with the Korg NanoKontrol 2
12
13 //(thisProcess.platform.recompile); //Reboot the interpreter before each
14 //server boot by hightlighting "(thisProcess.platform.recompile);" and pressing "ctrl - enter" or "cmd - return”
15
16 ~server_type = 0; // "0" to boot from local server. "1" to boot from the Supernova server.
17
18 ~start_timer = 0;
19 case
20 {~server_type == 0}{
21         if(Server.default.serverRunning == false, {~start_timer = 0;
22                 ({//Boot Supercollider
23                         var mem, blocksize;
24                         w = Window("", Rect(Window.screenBounds.width/2-(340/2),Window.screenBounds.height/2-(340/1.6180339887499/2),340,340/1.6180339887499)).front;
25                         a = StaticText(w, Rect(10, 10, 70, 20));
26                         a.string = "loading...";
27                         Server.quitAll;
28                         Server.default = Server.local;
29                         MIDIIn.connectAll;
30                         AppClock.sched(~start_timer+4,{
31                                 ~icl6 = Server.default;
32                                 mem = 2097152/4;
33                                 blocksize = 64;
34                                 ~icl61 = Server( "server2", NetAddr("127.0.0.1",  57111 ));
35                                 ~icl62 = Server( "server3", NetAddr("127.0.0.1",  57112 ));
36                                 ~icl63 = Server( "server4", NetAddr("127.0.0.1",  57113 ));
37                                 ~icl6.options.memSize = mem;
38                                 ~icl61.options.memSize = mem;
39                                 ~icl62.options.memSize = mem;
40                                 ~icl63.options.memSize = mem;
41                                 ~icl6.options.blockSize = blocksize;
42                                 ~icl61.options.blockSize = blocksize;
43                                 ~icl62.options.blockSize = blocksize;
44                                 ~icl63.options.blockSize = blocksize;
45                                 ~icl6.options_( s.options ).boot;
46                                 ~icl61.options_( s.options ).boot;
47                                 ~icl62.options_( s.options ).boot;
48                                 ~icl63.options_( s.options ).boot;
49                 });}.value);
50         },{~start_timer = (-6)});
51 }
52 {~server_type == 1}{
53         if(Server.default.serverRunning == false, {~start_timer = 0;
54                 (//Boot Supernova
55                         w = Window("", Rect(Window.screenBounds.width/2-(340/2),Window.screenBounds.height/2-(340/1.6180339887499/2),340,340/1.6180339887499)).front;
56                         a = StaticText(w, Rect(10, 10, 70, 20));
57                         a.string = "loading...";
58                         Server.quitAll;
59                         s.boot;
60                         AppClock.sched(7,{
61                                 s.quit;
62                         });
63                         AppClock.sched(11,{
64                                 MIDIIn.connectAll;
65                         });
66                         AppClock.sched(16,{
67                                 Server.supernova;
68                                 s.options.blockSize = 64;
69                                 s.options.memSize = 2097152/4;
70                                 s.boot;
71                         });
72                 );
73         },{~start_timer = (-22)});
74 };
75
76 AppClock.sched((case
77         {~server_type == 0}{~start_timer+8}
78         {~server_type == 1}{~start_timer+24}
79         {(~server_type != 0) or: (~server_type != 1)}{0};), {if((~server_type == 0) or: (~server_type == 1), {w.close;});
80
81                 ({
82                         var point, w, view, view2,
83                         vol = 0.02,mute1,mute2,mute3,mute4,mute5,mute6,mute7,muteall,unmuteall,
84                         g1,g2,g6,g8,g33,g48,g64,g72,g88,gm,ngm1,ngm2,ngm6,set1,set2,menu1,menu2,
85                         ts,sts,str,spaceb,b1,b2,b3,b4,button,button1,info,
86                         n1,n2,n3,n4,n5,n6,n7,n8,keycodeb,
87                         f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12,
88                         fp1,fp2,fp3,fp4,fp5,fp6,fp7,fp8,fp9,fp10,fp11,fp12,
89                         fp1b,fp2b,fp3b,fp4b,fp5b,fp6b,fp7b,fp8b,fp9b,fp10b,fp11b,fp12b,
90                         fp1c,fp2c,fp3c,fp4c,fp5c,fp6c,fp7c,fp8c,fp9c,fp10c,fp11c,fp12c,
91                         fp1d,fp2d,fp3d,fp4d,fp5d,fp6d,fp7d,fp8d,fp9d,fp10d,fp11d,fp12d,
92                         fp1e,fp2e,fp3e,fp4e,fp5e,fp6e,fp7e,fp8e,fp9e,fp10e,fp11e,fp12e,
93                         fp1f,fp2f,fp3f,fp4f,fp5f,fp6f,fp7f,fp8f,fp9f,fp10f,fp11f,fp12f,
94                         fp1g,fp2g,fp3g,fp4g,fp5g,fp6g,fp7g,fp8g,fp9g,fp10g,fp11g,fp12g,
95                         fp1h,fp2h,fp3h,fp4h,fp5h,fp6h,fp7h,fp8h,fp9h,fp10h,fp11h,fp12h;
96
97
98
99
100
101
102
103
104                         //VARIABLES YOU MAY WISH TO CHANGE
105
106
107                         // A tuning frequency in hz
108
109                         ~tuning_frequency = 432; //default 432 hz
110
111                         ~freqmap = (
112                                 i = ~tuning_frequency
113                                 / (2 ** (69 / 12)); a = (-1); b = (-1);
114                                 Array.fill(128, {i * (2 ** (((a=a+1) / 12).trunc)) * ( (2 ** (12.reciprocal)) ** ((b=b+1)  % 12));
115                         }));/*~freqmap = (i = 8.0271480262684/*-0.0000000000024*/; ~stepratio = 1.0594630943593; Array.fill(128, { i = i*~stepratio;}));*/
116
117
118                         //base frequency for synth inst
119
120                         ~base_frequency = 128.43436842029; //default 128.43436842029 hz
121
122
123                         //volume
124
125                         ~vol = 0.006; //default 0.006
126                         ~vol1 = ~vol;
127                         ~vol2 = ~vol;
128                         ~vol3 = ~vol;
129                         ~vol4 = ~vol;
130                         ~vol5 = ~vol;
131                         ~vol6 = ~vol;
132                         ~vol7 = ~vol;
133                         ~vol8 = ~vol;
134                         ~vol9 = ~vol;
135                         ~vol10 = ~vol;
136                         ~vol11 = ~vol;
137                         ~vol12 = ~vol;
138
139
140                         //key codes for keyboard functions - either unicode or keycode. to find key codes, see below
141
142                         ~rightarrow_keycode = 124;
143                         ~leftarrow_keycode = 123;
144                         ~uparrow_keycode = 126;
145                         ~downarrow_keycode = 125;
146                         ~enter_unicode = 13;
147                         ~s_unicode = 115;
148                         ~m_unicode = 109;
149                         ~r_unicode = 114;
150                         ~u_unicode = 117;
151                         ~t_unicode = 116;
152                         ~c_unicode = 99;
153                         ~i_unicode = 105;
154                         ~k_unicode = 107;
155                         ~j_unicode = 106;
156                         ~l_unicode = 108;
157                         ~spacebar_unicode = 32;
158                         ~one_unicode = 49;
159                         ~two_unicode = 50;
160                         ~three_unicode = 51;
161                         ~four_unicode = 52;
162                         ~five_unicode = 53;
163                         ~six_unicode = 54;
164                         ~seven_unicode = 55;
165                         ~escape_unicode = 27;
166
167
168                         //To find key codes in post window... Hightlight the function and its parenthesis in red below,
169                         //and press "ctrl - enter" or cmd - return" - then a small window called "test" will pop up...
170                         //Press the "type" button inside of the window, then press anywhere on the keyboard to find
171                         //the key codes in the right-hand side post window. Layout: [unicode, keycode, modifiers]. It is either a unicode
172                         //or a keycode. Do not delete the /* and */ characters, or else the
173                         //program will not run.
174
175                         /*
176
177                         (
178                         var win = Window(\test, Rect(10, 100, 100, 50)),
179                         btn = Button(win, Rect(5, 5, 90, 40)).states_([["type"]]);
180                         btn.keyDownAction =
181                         { arg view, char, modifiers, unicode, keycode;
182                         ["unicode:"+unicode, "keycode:"+keycode, "modifiers:"+modifiers].postln;
183                         };
184                         win.front;
185                         )
186
187                         */
188
189
190                         //gui set frequency ranges - currently set at the lowest and highest notes on a 128 key range using 432 hz A tuning
191                         //you can change the tuning near top
192                         //to insert custom ranges, replace "~freqmap.at()" with a hz frequency
193
194                         ~outmin1 = ~freqmap.at(0);       // 8.0271480262684 hz                       //base frequency of upper set
195                         ~outmax1 = ~freqmap.at(127);     // 12315.783879572 hz                       //high frequency of upper set
196                         ~outmin2 = ~freqmap.at(0)*8;     // (8.0271480262684)*8 hz                   //base frequency of lower set
197                         ~outmax2 = ~freqmap.at(127)/8;   // (12315.783879572)/8 hz;                  //high frequency of lower set
198
199                         ~outmina = ~outmin2;
200                         ~outmaxa = ~outmax2;
201                         ~outminb = ~outmin1;
202                         ~outmaxb = ~outmax1;
203
204                         //increase or decrease magnitude of second and third harmonics
205
206                         ~icd3 = 3; //3
207                         ~icd6 = 6; //6
208
209
210                         ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
211
212                         #f1,f2,f3,f4,f5,f6,f7/*,f8,f9,f10,f11,f12*//*,f13,f14,f15,f16,f17,f18,f19,f20,f21,f22,f23,f24*/ =
213                         /*[432/1.6180339887499/1.6180339887499/1.6180339887499, 432/1.6180339887499, 432*1.6180339887499, 432, 432*1.6180339887499*1.6180339887499 , 432/1.6180339887499/1.6180339887499,432*1.6180339887499*1.6180339887499*1.6180339887499 ]*/
214                         [432,432,432,432,432,432,432];
215
216                         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]), {7.do(x = 0; {("f"++(x=x+1)).asSymbol.envirPut([f1,f2,f3,f4,f5,f6,f7].at(x-1))});});
217
218                         #fp1,fp2,fp3,fp4,fp5,fp6,fp7,fp8,fp9,fp10,fp11,fp12 = [~u1,~u2,~u3,~u4,~u5,~u6,~u7,~u8,~u9,~u10,~u11,~u12];
219                         #fp1b,fp2b,fp3b,fp4b,fp5b,fp6b,fp7b,fp8b,fp9b,fp10b,fp11b,fp12b = [~u1b,~u2b,~u3b,~u4b,~u5b,~u6b,~u7b,~u8b,~u9b,~u10b,~u11b,~u12b];
220                         #fp1c,fp2c,fp3c,fp4c,fp5c,fp6c,fp7c,fp8c,fp9c,fp10c,fp11c,fp12c = [~u1c,~u2c,~u3c,~u4c,~u5c,~u6c,~u7c,~u8c,~u9c,~u10c,~u11c,~u12c];
221                         #fp1d,fp2d,fp3d,fp4d,fp5d,fp6d,fp7d,fp8d,fp9d,fp10d,fp11d,fp12d = [~u1d,~u2d,~u3d,~u4d,~u5d,~u6d,~u7d,~u8d,~u9d,~u10d,~u11d,~u12d];
222                         #fp1e,fp2e,fp3e,fp4e,fp5e,fp6e,fp7e,fp8e,fp9e,fp10e,fp11e,fp12e = [~u1e,~u2e,~u3e,~u4e,~u5e,~u6e,~u7e,~u8e,~u9e,~u10e,~u11e,~u12e];
223                         #fp1f,fp2f,fp3f,fp4f,fp5f,fp6f,fp7f,fp8f,fp9f,fp10f,fp11f,fp12f = [~u1f,~u2f,~u3f,~u4f,~u5f,~u6f,~u7f,~u8f,~u9f,~u10f,~u11f,~u12f];
224                         #fp1g,fp2g,fp3g,fp4g,fp5g,fp6g,fp7g,fp8g,fp9g,fp10g,fp11g,fp12g = [~u1g,~u2g,~u3g,~u4g,~u5g,~u6g,~u7g,~u8g,~u9g,~u10g,~u11g,~u12g];
225                         #fp1h,fp2h,fp3h,fp4h,fp5h,fp6h,fp7h,fp8h,fp9h,fp10h,fp11h,fp12h = [~u1h,~u2h,~u3h,~u4h,~u5h,~u6h,~u7h,~u8h,~u9h,~u10h,~u11h,~u12h];
226
227                         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 ];});
228                         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 ];});
229                         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 ];});
230                         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 ];});
231                         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 ];});
232                         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 ];});
233                         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 ];});
234                         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 ];});
235
236                         /*      #fp1,fp2,fp3,fp4,fp5,fp6,fp7,fp8,fp9,fp10,fp11,fp12 = [];
237                         #fp1b,fp2b,fp3b,fp4b,fp5b,fp6b,fp7b,fp8b,fp9b,fp10b,fp11b,fp12b = [];
238                         #fp1c,fp2c,fp3c,fp4c,fp5c,fp6c,fp7c,fp8c,fp9c,fp10c,fp11c,fp12c = [];
239                         #fp1d,fp2d,fp3d,fp4d,fp5d,fp6d,fp7d,fp8d,fp9d,fp10d,fp11d,fp12d = [];
240                         #fp1e,fp2e,fp3e,fp4e,fp5e,fp6e,fp7e,fp8e,fp9e,fp10e,fp11e,fp12e = [];
241                         #fp1f,fp2f,fp3f,fp4f,fp5f,fp6f,fp7f,fp8f,fp9f,fp10f,fp11f,fp12f = [];
242                         #fp1g,fp2g,fp3g,fp4g,fp5g,fp6g,fp7g,fp8g,fp9g,fp10g,fp11g,fp12g = [];
243                         #fp1h,fp2h,fp3h,fp4h,fp5h,fp6h,fp7h,fp8h,fp9h,fp10h,fp11h,fp12h = [];
244
245                         [];*/
246
247                         ~gsine = {
248                                 SynthDef(\gsineicls, {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,
249                                         a, b, c, d, e, f, pan=0, fc = 1;
250                                         var s1,s2,s3,s4,s5,s6, out, env1, dseq,dseq1,n1,n2,n3,n4,n5,n6,n7,n8,n9;
251                                         #n1,n2,n3,n4,n5,n6,n7,n8,n9=[~nval,~nval,~nval,~nval,~nval,~nval,~nval,~nval,~nval];
252                                         dseq = Dseq([/*1*/      #a,b,c,d,e,f=[ ~a,~b,~c,~d,~e,~f  ],/*2*/       [ a = a/~fth*n1, b = b/~fth*n1, c = c/~fth*n1, d = d/~fth*n1, e = e/~fth*n1, f = f/~fth*n1 ],/*3*/      [ a = a,         b = b*~fth,    c = c,         d = d,         e = e,         f = f*~fth  ],/*4*/        [ a = a*~fth,    b = b/~fth,    c = c,         d = d,         e = e*~fth,    f = f/~fth  ],/*5*/        [ a = a/~fth,    b = b*~fth,    c = c,         d = d*~fth,    e = e,         f = f*~fth ],/*6*/ [ a = a*~fth,    b = b,         c = c*~fth,    d = d/~fth,    e = e,         f = f/~fth  ],/*7*/        [ a = a/~fth,    b = b/~fth,    c = c/~fth,    d = d,         e = e,         f = f ],/*8*/      [ a = a,         b = b*~fth,    c = c,         d = d,         e = e/~fth,    f = f ],/*9*/      [ a = a*~fth,    b = b,         c = c,         d = d*~fth,    e = e*~fth,    f = f*~fth ],/*10*/        [ a = a,         b = b,         c = c*~fth,    d = d/~fth,    e = e,         f = f ],/*11*/     [ a = a/~fth,    b = b/~fth,    c = c/~fth,    d = d*~fth,    e = e,         f = f ],/*12*/     [ a = a*~fth*n2, b = b*~fth*n2, c = c*~fth*n2, d = d/~fth*n2, e = e/~fth*n2, f = f/~fth*n2 ],/*13*/     [ a = a,         b = b,         c = c,         d = d*~fth,    e = e,         f = f*~fth ],/*14*/        [ a = a,         b = b/~fth,    c = c,         d = d,         e = e*~fth,    f = f],/*15*/      [ a = a/~fth,    b = b,         c = c/~fth,    d = d,         e = e/~fth,    f = f/~fth ],/*16*/        [ a = a,         b = b,         c = c*~fth,    d = d/~fth,    e = e,         f = f ],/*17*/     [ a = a,         b = b*~fth,    c = c,         d = d,         e = e,         f = f*~fth],/*18*/ [ a = a*~fth*n3, b = b/~fth*n3, c = c/~fth*n3, d = d*~fth*n3, e = e*~fth*n3, f = f/~fth*n3 ],/*19*/     [ a = a/~fth,    b = b,         c = c,         d = d/~fth,    e = e,         f = f*~fth ],/*20*/        [ a = a*~fth,    b = b*~fth,    c = c,         d = d,         e = e/~fth,    f = f/~fth ],/*21*/        [ a = a,         b = b/~fth,    c = c*~fth,    d = d,         e = e,         f = f*~fth ],/*22*/        [ a = a,         b = b,         c = c/~fth,    d = d*~fth,    e = e,         f = f ],/*23*/     [ a = a,         b = b,         c = c,         d = d/~fth,    e = e,         f = f/~fth ],/*24*/        [ a = a/~fth,    b = b,         c = c,         d = d,         e = e,         f = f*~fth ],/*25*/        [ a = a*~fth,    b = b*~fth,    c = c*~fth,    d = d,         e = e,         f = f ],/*26*/     [ a = a,         b = b/~fth,    c = c/~fth,    d = d*~fth,    e = e*~fth,    f = f ],/*27*/     [ a = a,         b = b,         c = c,         d = d/~fth,    e = e/~fth,    f = f ],/*28*/     [ a = a/~fth*n4, b = b*~fth*n4, c = c*~fth*n4, d = d*~fth*n4, e = e*~fth*n4, f = f/~fth*n4 ],/*29*/     [ a = a,         b = b,         c = c/~fth,    d = d/~fth,    e = e,         f = f ],/*30*/     [ a = a*~fth*n5, b = b/~fth*n5, c = c*~fth*n5, d = d*~fth*n5, e = e/~fth*n5, f = f*~fth*n5 ],/*31*/     [ a = a/~fth,    b = b*~fth,    c = c,         d = d,         e = e,         f = f/~fth ],/*32*/        [ a = a,         b = b/~fth,    c = c,         d = d,         e = e*~fth,    f = f ],/*33*/     [ a = a*~fth,    b = b*~fth,    c = c,         d = d,         e = e/~fth,    f = f ],/*34*/     [ a = a/~fth,    b = b/~fth,    c = c,         d = d,         e = e*~fth,    f = f*~fth ],/*35*/        [ a = a*~fth,    b = b,         c = c,         d = d/~fth,    e = e/~fth,    f = f/~fth ],/*36*/        [ a = a/~fth,    b = b,         c = c/~fth,    d = d*~fth,    e = e,         f = f*~fth ],/*37*/        [ a = a*~fth,    b = b*~fth,    c = c,         d = d,         e = e,         f = f ],/*38*/     [ a = a,         b = b/~fth,    c = c*~fth,    d = d/~fth,    e = e*~fth,    f = f ],/*39*/     [ a = a/~fth*n6, b = b*~fth*n6, c = c/~fth*n6, d = d*~fth*n6, e = e/~fth*n6, f = f/~fth*n6 ],/*40*/     [ a = a,         b = b/~fth,    c = c*~fth,    d = d/~fth,    e = e*~fth,    f = f ],/*41*/     [ a = a*~fth,    b = b,         c = c/~fth,    d = d,         e = e,         f = f*~fth ],/*42*/        [ a = a,         b = b*~fth,    c = c,         d = d,         e = e/~fth,    f = f ],/*43*/     [ a = a/~fth,    b = b,         c = c*~fth,    d = d*~fth,    e = e*~fth,    f = f ],/*44*/     [ a = a*~fth,    b = b,         c = c,         d = d,         e = e,         f = f/~fth ],/*45*/        [ a = a/~fth,    b = b,         c = c,         d = d/~fth,    e = e/~fth,    f = f ],/*46*/     [ a = a,         b = b/~fth,    c = c/~fth,    d = d*~fth,    e = e*~fth,    f = f ],/*47*/     [ a = a,         b = b*~fth,    c = c*~fth,    d = d/~fth,    e = e,         f = f ],/*48*/     [ a = a,         b = b,         c = c/~fth,    d = d*~fth,    e = e,         f = f ],/*49*/     [ a = a,         b = b,         c = c*~fth,    d = d,         e = e/~fth,    f = f*~fth ],/*50*/        [ a = a*~fth,    b = b/~fth,    c = c,         d = d,         e = e*~fth,    f = f/~fth ],/*51*/        [ a = a/~fth,    b = b,         c = c,         d = d/~fth,    e = e/~fth,    f = f*~fth ],/*52*/        [ a = a*~fth,    b = b,         c = c/~fth,    d = d*~fth,    e = e,         f = f/~fth ],/*53*/        [ a = a,         b = b*~fth,    c = c,         d = d,         e = e,         f = f ],/*54*/     [ a = a/~fth*n7, b = b/~fth*n7, c = c*~fth*n7, d = d/~fth*n7, e = e*~fth*n7, f = f*~fth*n7 ],/*55*/     [ a = a,         b = b,         c = c,         d = d*~fth,    e = e/~fth,    f = f ],/*56*/     [ a = a*~fth,    b = b,         c = c,         d = d,         e = e,         f = f/~fth ],/*57*/        [ a = a,         b = b*~fth,    c = c/~fth,    d = d,         e = e*~fth,    f = f ],/*58*/     [ a = a/~fth,    b = b,         c = c*~fth,    d = d/~fth,    e = e,         f = f*~fth ],/*59*/        [ a = a*~fth,    b = b,         c = c/~fth,    d = d,         e = e,         f = f/~fth ],/*60*/        [ a = a/~fth,    b = b,         c = c,         d = d,         e = e,         f = f*~fth ],/*61*/        [ a = a*~fth,    b = b,         c = c,         d = d,         e = e,         f = f ],/*62*/     [ a = a/~fth*n8, b = b/~fth*n8, c = c*~fth*n8, d = d*~fth*n8, e = e/~fth*n8, f = f/~fth*n8 ],/*63*/     [ a = a,         b = b*~fth,    c = c/~fth,    d = d,         e = e,         f = f*~fth ],/*64*/        [ a = a*~fth*n9, b = b/~fth*n9, c = c*~fth*n9, d = d/~fth*n9, e = e*~fth*n9, f = f/~fth*n9 ]]
253                                                 ++Array.fill((~gsinenum -1), {[/*1*/    [ a = a,         b = b*~fth,    c = c,         d = d*~fth,    e = e,         f = f*~fth ],/*2*/ [ a = a/~fth*n1, b = b/~fth*n1, c = c/~fth*n1, d = d/~fth*n1, e = e/~fth*n1, f = f/~fth*n1 ],/*3*/      [ a = a,         b = b*~fth,    c = c,         d = d,         e = e,         f = f*~fth  ],/*4*/        [ a = a*~fth,    b = b/~fth,    c = c,         d = d,         e = e*~fth,    f = f/~fth  ],/*5*/        [ a = a/~fth,    b = b*~fth,    c = c,         d = d*~fth,    e = e,         f = f*~fth ],/*6*/ [ a = a*~fth,    b = b,         c = c*~fth,    d = d/~fth,    e = e,         f = f/~fth  ],/*7*/        [ a = a/~fth,    b = b/~fth,    c = c/~fth,    d = d,         e = e,         f = f ],/*8*/      [ a = a,         b = b*~fth,    c = c,         d = d,         e = e/~fth,    f = f ],/*9*/      [ a = a*~fth,    b = b,         c = c,         d = d*~fth,    e = e*~fth,    f = f*~fth ],/*10*/        [ a = a,         b = b,         c = c*~fth,    d = d/~fth,    e = e,         f = f ],/*11*/     [ a = a/~fth,    b = b/~fth,    c = c/~fth,    d = d*~fth,    e = e,         f = f ],/*12*/     [ a = a*~fth*n2, b = b*~fth*n2, c = c*~fth*n2, d = d/~fth*n2, e = e/~fth*n2, f = f/~fth*n2 ],/*13*/     [ a = a,         b = b,         c = c,         d = d*~fth,    e = e,         f = f*~fth ],/*14*/        [ a = a,         b = b/~fth,    c = c,         d = d,         e = e*~fth,    f = f],/*15*/      [ a = a/~fth,    b = b,         c = c/~fth,    d = d,         e = e/~fth,    f = f/~fth ],/*16*/        [ a = a,         b = b,         c = c*~fth,    d = d/~fth,    e = e,         f = f ],/*17*/     [ a = a,         b = b*~fth,    c = c,         d = d,         e = e,         f = f*~fth],/*18*/ [ a = a*~fth*n3, b = b/~fth*n3, c = c/~fth*n3, d = d*~fth*n3, e = e*~fth*n3, f = f/~fth*n3 ],/*19*/     [ a = a/~fth,    b = b,         c = c,         d = d/~fth,    e = e,         f = f*~fth ],/*20*/        [ a = a*~fth,    b = b*~fth,    c = c,         d = d,         e = e/~fth,    f = f/~fth ],/*21*/        [ a = a,         b = b/~fth,    c = c*~fth,    d = d,         e = e,         f = f*~fth ],/*22*/        [ a = a,         b = b,         c = c/~fth,    d = d*~fth,    e = e,         f = f ],/*23*/     [ a = a,         b = b,         c = c,         d = d/~fth,    e = e,         f = f/~fth ],/*24*/        [ a = a/~fth,    b = b,         c = c,         d = d,         e = e,         f = f*~fth ],/*25*/        [ a = a*~fth,    b = b*~fth,    c = c*~fth,    d = d,         e = e,         f = f ],/*26*/     [ a = a,         b = b/~fth,    c = c/~fth,    d = d*~fth,    e = e*~fth,    f = f ],/*27*/     [ a = a,         b = b,         c = c,         d = d/~fth,    e = e/~fth,    f = f ],/*28*/     [ a = a/~fth*n4, b = b*~fth*n4, c = c*~fth*n4, d = d*~fth*n4, e = e*~fth*n4, f = f/~fth*n4 ],/*29*/     [ a = a,         b = b,         c = c/~fth,    d = d/~fth,    e = e,         f = f ],/*30*/     [ a = a*~fth*n5, b = b/~fth*n5, c = c*~fth*n5, d = d*~fth*n5, e = e/~fth*n5, f = f*~fth*n5 ],/*31*/     [ a = a/~fth,    b = b*~fth,    c = c,         d = d,         e = e,         f = f/~fth ],/*32*/        [ a = a,         b = b/~fth,    c = c,         d = d,         e = e*~fth,    f = f ],/*33*/     [ a = a*~fth,    b = b*~fth,    c = c,         d = d,         e = e/~fth,    f = f ],/*34*/     [ a = a/~fth,    b = b/~fth,    c = c,         d = d,         e = e*~fth,    f = f*~fth ],/*35*/        [ a = a*~fth,    b = b,         c = c,         d = d/~fth,    e = e/~fth,    f = f/~fth ],/*36*/        [ a = a/~fth,    b = b,         c = c/~fth,    d = d*~fth,    e = e,         f = f*~fth ],/*37*/        [ a = a*~fth,    b = b*~fth,    c = c,         d = d,         e = e,         f = f ],/*38*/     [ a = a,         b = b/~fth,    c = c*~fth,    d = d/~fth,    e = e*~fth,    f = f ],/*39*/     [ a = a/~fth*n6, b = b*~fth*n6, c = c/~fth*n6, d = d*~fth*n6, e = e/~fth*n6, f = f/~fth*n6 ],/*40*/     [ a = a,         b = b/~fth,    c = c*~fth,    d = d/~fth,    e = e*~fth,    f = f ],/*41*/     [ a = a*~fth,    b = b,         c = c/~fth,    d = d,         e = e,         f = f*~fth ],/*42*/        [ a = a,         b = b*~fth,    c = c,         d = d,         e = e/~fth,    f = f ],/*43*/     [ a = a/~fth,    b = b,         c = c*~fth,    d = d*~fth,    e = e*~fth,    f = f ],/*44*/     [ a = a*~fth,    b = b,         c = c,         d = d,         e = e,         f = f/~fth ],/*45*/        [ a = a/~fth,    b = b,         c = c,         d = d/~fth,    e = e/~fth,    f = f ],/*46*/     [ a = a,         b = b/~fth,    c = c/~fth,    d = d*~fth,    e = e*~fth,    f = f ],/*47*/     [ a = a,         b = b*~fth,    c = c*~fth,    d = d/~fth,    e = e,         f = f ],/*48*/     [ a = a,         b = b,         c = c/~fth,    d = d*~fth,    e = e,         f = f ],/*49*/     [ a = a,         b = b,         c = c*~fth,    d = d,         e = e/~fth,    f = f*~fth ],/*50*/        [ a = a*~fth,    b = b/~fth,    c = c,         d = d,         e = e*~fth,    f = f/~fth ],/*51*/        [ a = a/~fth,    b = b,         c = c,         d = d/~fth,    e = e/~fth,    f = f*~fth ],/*52*/        [ a = a*~fth,    b = b,         c = c/~fth,    d = d*~fth,    e = e,         f = f/~fth ],/*53*/        [ a = a,         b = b*~fth,    c = c,         d = d,         e = e,         f = f ],/*54*/     [ a = a/~fth*n7, b = b/~fth*n7, c = c*~fth*n7, d = d/~fth*n7, e = e*~fth*n7, f = f*~fth*n7 ],/*55*/     [ a = a,         b = b,         c = c,         d = d*~fth,    e = e/~fth,    f = f ],/*56*/     [ a = a*~fth,    b = b,         c = c,         d = d,         e = e,         f = f/~fth ],/*57*/        [ a = a,         b = b*~fth,    c = c/~fth,    d = d,         e = e*~fth,    f = f ],/*58*/     [ a = a/~fth,    b = b,         c = c*~fth,    d = d/~fth,    e = e,         f = f*~fth ],/*59*/        [ a = a*~fth,    b = b,         c = c/~fth,    d = d,         e = e,         f = f/~fth ],/*60*/        [ a = a/~fth,    b = b,         c = c,         d = d,         e = e,         f = f*~fth ],/*61*/        [ a = a*~fth,    b = b,         c = c,         d = d,         e = e,         f = f ],/*62*/     [ a = a/~fth*n8, b = b/~fth*n8, c = c*~fth*n8, d = d*~fth*n8, e = e/~fth*n8, f = f/~fth*n8 ],/*63*/     [ a = a,         b = b*~fth,    c = c/~fth,    d = d,         e = e,         f = f*~fth ],/*64*/        [ a = a*~fth*n9, b = b/~fth*n9, c = c*~fth*n9, d = d/~fth*n9, e = e*~fth*n9, f = f/~fth*n9 ]]
254                                         }).flatten, inf);
255                                         dseq1 = Dseq([[/*1*/    #a,b,c,d,e,f=[ ~a,~b,~c,~d,~e,~f  ],/*2*/       [ a = a/~fth*n1, b = b/~fth*n1, c = c/~fth*n1, d = d/~fth*n1, e = e/~fth*n1, f = f/~fth*n1 ],/*3*/      [ a = a,         b = b*~fth,    c = c,         d = d,         e = e,         f = f*~fth  ],/*4*/        [ a = a*~fth,    b = b/~fth,    c = c,         d = d,         e = e*~fth,    f = f/~fth  ],/*5*/        [ a = a/~fth,    b = b*~fth,    c = c,         d = d*~fth,    e = e,         f = f*~fth ],/*6*/ [ a = a*~fth,    b = b,         c = c*~fth,    d = d/~fth,    e = e,         f = f/~fth  ],/*7*/        [ a = a/~fth,    b = b/~fth,    c = c/~fth,    d = d,         e = e,         f = f ],/*8*/      [ a = a,         b = b*~fth,    c = c,         d = d,         e = e/~fth,    f = f ],/*9*/      [ a = a*~fth,    b = b,         c = c,         d = d*~fth,    e = e*~fth,    f = f*~fth ],/*10*/        [ a = a,         b = b,         c = c*~fth,    d = d/~fth,    e = e,         f = f ],/*11*/     [ a = a/~fth,    b = b/~fth,    c = c/~fth,    d = d*~fth,    e = e,         f = f ],/*12*/     [ a = a*~fth*n2, b = b*~fth*n2, c = c*~fth*n2, d = d/~fth*n2, e = e/~fth*n2, f = f/~fth*n2 ],/*13*/     [ a = a,         b = b,         c = c,         d = d*~fth,    e = e,         f = f*~fth ],/*14*/        [ a = a,         b = b/~fth,    c = c,         d = d,         e = e*~fth,    f = f],/*15*/      [ a = a/~fth,    b = b,         c = c/~fth,    d = d,         e = e/~fth,    f = f/~fth ],/*16*/        [ a = a,         b = b,         c = c*~fth,    d = d/~fth,    e = e,         f = f ],/*17*/     [ a = a,         b = b*~fth,    c = c,         d = d,         e = e,         f = f*~fth],/*18*/ [ a = a*~fth*n3, b = b/~fth*n3, c = c/~fth*n3, d = d*~fth*n3, e = e*~fth*n3, f = f/~fth*n3 ],/*19*/     [ a = a/~fth,    b = b,         c = c,         d = d/~fth,    e = e,         f = f*~fth ],/*20*/        [ a = a*~fth,    b = b*~fth,    c = c,         d = d,         e = e/~fth,    f = f/~fth ],/*21*/        [ a = a,         b = b/~fth,    c = c*~fth,    d = d,         e = e,         f = f*~fth ],/*22*/        [ a = a,         b = b,         c = c/~fth,    d = d*~fth,    e = e,         f = f ],/*23*/     [ a = a,         b = b,         c = c,         d = d/~fth,    e = e,         f = f/~fth ],/*24*/        [ a = a/~fth,    b = b,         c = c,         d = d,         e = e,         f = f*~fth ],/*25*/        [ a = a*~fth,    b = b*~fth,    c = c*~fth,    d = d,         e = e,         f = f ],/*26*/     [ a = a,         b = b/~fth,    c = c/~fth,    d = d*~fth,    e = e*~fth,    f = f ],/*27*/     [ a = a,         b = b,         c = c,         d = d/~fth,    e = e/~fth,    f = f ],/*28*/     [ a = a/~fth*n4, b = b*~fth*n4, c = c*~fth*n4, d = d*~fth*n4, e = e*~fth*n4, f = f/~fth*n4 ],/*29*/     [ a = a,         b = b,         c = c/~fth,    d = d/~fth,    e = e,         f = f ],/*30*/     [ a = a*~fth*n5, b = b/~fth*n5, c = c*~fth*n5, d = d*~fth*n5, e = e/~fth*n5, f = f*~fth*n5 ],/*31*/     [ a = a/~fth,    b = b*~fth,    c = c,         d = d,         e = e,         f = f/~fth ],/*32*/        [ a = a,         b = b/~fth,    c = c,         d = d,         e = e*~fth,    f = f ],/*33*/     [ a = a*~fth,    b = b*~fth,    c = c,         d = d,         e = e/~fth,    f = f ],/*34*/     [ a = a/~fth,    b = b/~fth,    c = c,         d = d,         e = e*~fth,    f = f*~fth ],/*35*/        [ a = a*~fth,    b = b,         c = c,         d = d/~fth,    e = e/~fth,    f = f/~fth ],/*36*/        [ a = a/~fth,    b = b,         c = c/~fth,    d = d*~fth,    e = e,         f = f*~fth ],/*37*/        [ a = a*~fth,    b = b*~fth,    c = c,         d = d,         e = e,         f = f ],/*38*/     [ a = a,         b = b/~fth,    c = c*~fth,    d = d/~fth,    e = e*~fth,    f = f ],/*39*/     [ a = a/~fth*n6, b = b*~fth*n6, c = c/~fth*n6, d = d*~fth*n6, e = e/~fth*n6, f = f/~fth*n6 ],/*40*/     [ a = a,         b = b/~fth,    c = c*~fth,    d = d/~fth,    e = e*~fth,    f = f ],/*41*/     [ a = a*~fth,    b = b,         c = c/~fth,    d = d,         e = e,         f = f*~fth ],/*42*/        [ a = a,         b = b*~fth,    c = c,         d = d,         e = e/~fth,    f = f ],/*43*/     [ a = a/~fth,    b = b,         c = c*~fth,    d = d*~fth,    e = e*~fth,    f = f ],/*44*/     [ a = a*~fth,    b = b,         c = c,         d = d,         e = e,         f = f/~fth ],/*45*/        [ a = a/~fth,    b = b,         c = c,         d = d/~fth,    e = e/~fth,    f = f ],/*46*/     [ a = a,         b = b/~fth,    c = c/~fth,    d = d*~fth,    e = e*~fth,    f = f ],/*47*/     [ a = a,         b = b*~fth,    c = c*~fth,    d = d/~fth,    e = e,         f = f ],/*48*/     [ a = a,         b = b,         c = c/~fth,    d = d*~fth,    e = e,         f = f ],/*49*/     [ a = a,         b = b,         c = c*~fth,    d = d,         e = e/~fth,    f = f*~fth ],/*50*/        [ a = a*~fth,    b = b/~fth,    c = c,         d = d,         e = e*~fth,    f = f/~fth ],/*51*/        [ a = a/~fth,    b = b,         c = c,         d = d/~fth,    e = e/~fth,    f = f*~fth ],/*52*/        [ a = a*~fth,    b = b,         c = c/~fth,    d = d*~fth,    e = e,         f = f/~fth ],/*53*/        [ a = a,         b = b*~fth,    c = c,         d = d,         e = e,         f = f ],/*54*/     [ a = a/~fth*n7, b = b/~fth*n7, c = c*~fth*n7, d = d/~fth*n7, e = e*~fth*n7, f = f*~fth*n7 ],/*55*/     [ a = a,         b = b,         c = c,         d = d*~fth,    e = e/~fth,    f = f ],/*56*/     [ a = a*~fth,    b = b,         c = c,         d = d,         e = e,         f = f/~fth ],/*57*/        [ a = a,         b = b*~fth,    c = c/~fth,    d = d,         e = e*~fth,    f = f ],/*58*/     [ a = a/~fth,    b = b,         c = c*~fth,    d = d/~fth,    e = e,         f = f*~fth ],/*59*/        [ a = a*~fth,    b = b,         c = c/~fth,    d = d,         e = e,         f = f/~fth ],/*60*/        [ a = a/~fth,    b = b,         c = c,         d = d,         e = e,         f = f*~fth ],/*61*/        [ a = a*~fth,    b = b,         c = c,         d = d,         e = e,         f = f ],/*62*/     [ a = a/~fth*n8, b = b/~fth*n8, c = c*~fth*n8, d = d*~fth*n8, e = e/~fth*n8, f = f/~fth*n8 ],/*63*/     [ a = a,         b = b*~fth,    c = c/~fth,    d = d,         e = e,         f = f*~fth ],/*64*/        [ a = a*~fth*n9, b = b/~fth*n9, c = c*~fth*n9, d = d/~fth*n9, e = e*~fth*n9, f = f/~fth*n9 ]]
256                                                 ++Array.fill((~gsinenum -1), {[/*1*/    [ a = a,         b = b*~fth,    c = c,         d = d*~fth,    e = e,         f = f*~fth ],/*2*/ [ a = a/~fth*n1, b = b/~fth*n1, c = c/~fth*n1, d = d/~fth*n1, e = e/~fth*n1, f = f/~fth*n1 ],/*3*/      [ a = a,         b = b*~fth,    c = c,         d = d,         e = e,         f = f*~fth  ],/*4*/        [ a = a*~fth,    b = b/~fth,    c = c,         d = d,         e = e*~fth,    f = f/~fth  ],/*5*/        [ a = a/~fth,    b = b*~fth,    c = c,         d = d*~fth,    e = e,         f = f*~fth ],/*6*/ [ a = a*~fth,    b = b,         c = c*~fth,    d = d/~fth,    e = e,         f = f/~fth  ],/*7*/        [ a = a/~fth,    b = b/~fth,    c = c/~fth,    d = d,         e = e,         f = f ],/*8*/      [ a = a,         b = b*~fth,    c = c,         d = d,         e = e/~fth,    f = f ],/*9*/      [ a = a*~fth,    b = b,         c = c,         d = d*~fth,    e = e*~fth,    f = f*~fth ],/*10*/        [ a = a,         b = b,         c = c*~fth,    d = d/~fth,    e = e,         f = f ],/*11*/     [ a = a/~fth,    b = b/~fth,    c = c/~fth,    d = d*~fth,    e = e,         f = f ],/*12*/     [ a = a*~fth*n2, b = b*~fth*n2, c = c*~fth*n2, d = d/~fth*n2, e = e/~fth*n2, f = f/~fth*n2 ],/*13*/     [ a = a,         b = b,         c = c,         d = d*~fth,    e = e,         f = f*~fth ],/*14*/        [ a = a,         b = b/~fth,    c = c,         d = d,         e = e*~fth,    f = f],/*15*/      [ a = a/~fth,    b = b,         c = c/~fth,    d = d,         e = e/~fth,    f = f/~fth ],/*16*/        [ a = a,         b = b,         c = c*~fth,    d = d/~fth,    e = e,         f = f ],/*17*/     [ a = a,         b = b*~fth,    c = c,         d = d,         e = e,         f = f*~fth],/*18*/ [ a = a*~fth*n3, b = b/~fth*n3, c = c/~fth*n3, d = d*~fth*n3, e = e*~fth*n3, f = f/~fth*n3 ],/*19*/     [ a = a/~fth,    b = b,         c = c,         d = d/~fth,    e = e,         f = f*~fth ],/*20*/        [ a = a*~fth,    b = b*~fth,    c = c,         d = d,         e = e/~fth,    f = f/~fth ],/*21*/        [ a = a,         b = b/~fth,    c = c*~fth,    d = d,         e = e,         f = f*~fth ],/*22*/        [ a = a,         b = b,         c = c/~fth,    d = d*~fth,    e = e,         f = f ],/*23*/     [ a = a,         b = b,         c = c,         d = d/~fth,    e = e,         f = f/~fth ],/*24*/        [ a = a/~fth,    b = b,         c = c,         d = d,         e = e,         f = f*~fth ],/*25*/        [ a = a*~fth,    b = b*~fth,    c = c*~fth,    d = d,         e = e,         f = f ],/*26*/     [ a = a,         b = b/~fth,    c = c/~fth,    d = d*~fth,    e = e*~fth,    f = f ],/*27*/     [ a = a,         b = b,         c = c,         d = d/~fth,    e = e/~fth,    f = f ],/*28*/     [ a = a/~fth*n4, b = b*~fth*n4, c = c*~fth*n4, d = d*~fth*n4, e = e*~fth*n4, f = f/~fth*n4 ],/*29*/     [ a = a,         b = b,         c = c/~fth,    d = d/~fth,    e = e,         f = f ],/*30*/     [ a = a*~fth*n5, b = b/~fth*n5, c = c*~fth*n5, d = d*~fth*n5, e = e/~fth*n5, f = f*~fth*n5 ],/*31*/     [ a = a/~fth,    b = b*~fth,    c = c,         d = d,         e = e,         f = f/~fth ],/*32*/        [ a = a,         b = b/~fth,    c = c,         d = d,         e = e*~fth,    f = f ],/*33*/     [ a = a*~fth,    b = b*~fth,    c = c,         d = d,         e = e/~fth,    f = f ],/*34*/     [ a = a/~fth,    b = b/~fth,    c = c,         d = d,         e = e*~fth,    f = f*~fth ],/*35*/        [ a = a*~fth,    b = b,         c = c,         d = d/~fth,    e = e/~fth,    f = f/~fth ],/*36*/        [ a = a/~fth,    b = b,         c = c/~fth,    d = d*~fth,    e = e,         f = f*~fth ],/*37*/        [ a = a*~fth,    b = b*~fth,    c = c,         d = d,         e = e,         f = f ],/*38*/     [ a = a,         b = b/~fth,    c = c*~fth,    d = d/~fth,    e = e*~fth,    f = f ],/*39*/     [ a = a/~fth*n6, b = b*~fth*n6, c = c/~fth*n6, d = d*~fth*n6, e = e/~fth*n6, f = f/~fth*n6 ],/*40*/     [ a = a,         b = b/~fth,    c = c*~fth,    d = d/~fth,    e = e*~fth,    f = f ],/*41*/     [ a = a*~fth,    b = b,         c = c/~fth,    d = d,         e = e,         f = f*~fth ],/*42*/        [ a = a,         b = b*~fth,    c = c,         d = d,         e = e/~fth,    f = f ],/*43*/     [ a = a/~fth,    b = b,         c = c*~fth,    d = d*~fth,    e = e*~fth,    f = f ],/*44*/     [ a = a*~fth,    b = b,         c = c,         d = d,         e = e,         f = f/~fth ],/*45*/        [ a = a/~fth,    b = b,         c = c,         d = d/~fth,    e = e/~fth,    f = f ],/*46*/     [ a = a,         b = b/~fth,    c = c/~fth,    d = d*~fth,    e = e*~fth,    f = f ],/*47*/     [ a = a,         b = b*~fth,    c = c*~fth,    d = d/~fth,    e = e,         f = f ],/*48*/     [ a = a,         b = b,         c = c/~fth,    d = d*~fth,    e = e,         f = f ],/*49*/     [ a = a,         b = b,         c = c*~fth,    d = d,         e = e/~fth,    f = f*~fth ],/*50*/        [ a = a*~fth,    b = b/~fth,    c = c,         d = d,         e = e*~fth,    f = f/~fth ],/*51*/        [ a = a/~fth,    b = b,         c = c,         d = d/~fth,    e = e/~fth,    f = f*~fth ],/*52*/        [ a = a*~fth,    b = b,         c = c/~fth,    d = d*~fth,    e = e,         f = f/~fth ],/*53*/        [ a = a,         b = b*~fth,    c = c,         d = d,         e = e,         f = f ],/*54*/     [ a = a/~fth*n7, b = b/~fth*n7, c = c*~fth*n7, d = d/~fth*n7, e = e*~fth*n7, f = f*~fth*n7 ],/*55*/     [ a = a,         b = b,         c = c,         d = d*~fth,    e = e/~fth,    f = f ],/*56*/     [ a = a*~fth,    b = b,         c = c,         d = d,         e = e,         f = f/~fth ],/*57*/        [ a = a,         b = b*~fth,    c = c/~fth,    d = d,         e = e*~fth,    f = f ],/*58*/     [ a = a/~fth,    b = b,         c = c*~fth,    d = d/~fth,    e = e,         f = f*~fth ],/*59*/        [ a = a*~fth,    b = b,         c = c/~fth,    d = d,         e = e,         f = f/~fth ],/*60*/        [ a = a/~fth,    b = b,         c = c,         d = d,         e = e,         f = f*~fth ],/*61*/        [ a = a*~fth,    b = b,         c = c,         d = d,         e = e,         f = f ],/*62*/     [ a = a/~fth*n8, b = b/~fth*n8, c = c*~fth*n8, d = d*~fth*n8, e = e/~fth*n8, f = f/~fth*n8 ],/*63*/     [ a = a,         b = b*~fth,    c = c/~fth,    d = d,         e = e,         f = f*~fth ],/*64*/        [ a = a*~fth*n9, b = b/~fth*n9, c = c*~fth*n9, d = d/~fth*n9, e = e*~fth*n9, f = f/~fth*n9 ]]
257                                         }).flatten].flatten.reverse, inf);
258                                         /*env1 = EnvGen.kr(Env([0, 1, 1, 0], [0, dur, 0]), levelScale: amp, doneAction: 2);*/
259                                         s1 = GrainSin.ar(1, Impulse.ar(dur+tune), 1/(dur+tune),Demand.ar(Impulse.ar(dur+tune), 0, dseq)*fc);
260                                         s2 = GrainSin.ar(1, Impulse.ar(dur+tune), 1/(dur+tune),Demand.ar(Impulse.ar(dur+tune), 0, dseq1)*fc);
261                                         s3 = GrainSin.ar(1, Impulse.ar(dur+tune/3), 1/(dur+tune/3),Demand.ar(Impulse.ar(dur+tune/3), 0, dseq)*fc);
262                                         s4 = GrainSin.ar(1, Impulse.ar(dur+tune/3), 1/(dur+tune/3),Demand.ar(Impulse.ar(dur+tune/3), 0, dseq1)*fc);
263                                         s5 = GrainSin.ar(1, Impulse.ar(dur+tune/6), 1/(dur+tune/6),Demand.ar(Impulse.ar(dur+tune/6), 0, dseq)*fc);
264                                         s6 = GrainSin.ar(1, Impulse.ar(dur+tune/6), 1/(dur+tune/6),Demand.ar(Impulse.ar(dur+tune/6), 0, dseq1)*fc);
265                                         s1 = [s1,s2,s3,s4,s5,s6];
266                                         OffsetOut.ar(0, s1.dup*vol);
267                                 }, [\ir]).add;
268                         };
269
270
271                         if((~gsinenum == nil) and: (~synthdef != "gsineicls"), {
272                                 (
273                                         if(~basefreq == nil, {~basefreq = ~base_frequency});
274                                         ~fmult = 16;
275                                         (#a,b,c,d,e,f = /*[ 432/1.6180339887499, 432*1.6180339887499, 432, 432*1.6180339887499*1.6180339887499 , 528, 432/1.6180339887499/1.6180339887499  ]*/
276                                                 [ ~basefreq,~basefreq,~basefreq,~basefreq,~basefreq,~basefreq  ];
277                                                 ~a = a; ~b = b; ~c =c; ~d = d; ~e = e;~f=f;);
278
279                                         ~fth = 1.4142135623729;
280                                         ~gm = 1.6180339887499;
281                                         ~stepratio = 1.0594630943593;
282                                         ~nval = 1.0355417528;
283                                         ~n9s = 1.86;
284                                         ~n9 = 1.080059789899;
285                                         ~n18 = 1.0392592260319;
286                                         ~n27 = 1.0260044847071;
287                                         ~n36 = 1.0194406437022;
288                                         ~n45 = 1.0155225125043;
289                                         ~n54 = 1.012918794725;
290                                         ~n63 = 1.0110630844869;
291                                         ~n72 = 1.0096735332285;
292                                         ~ngm1 = 1.0549232131786;
293                                         ~ngm2 = 1.0270945492887;
294                                         ~ngm6 = 1.0089511542031;
295                                         ~nval = ~ngm6;
296
297                                         ~synthdef = "gsineicls"; ~gsinenum = 33; ~gsine.value;
298                                 );
299                         });
300
301
302
303                         //gui
304                         w = Window("ic gui", Rect(0,0,Window.screenBounds.width,Window.screenBounds.height), border:true);
305
306
307
308                         view = UserView(w, Window.screenBounds);
309                         view.clearOnRefresh = false;
310                         view.background = Color.black;
311
312                         /*~b1 = Window.screenBounds.width/(12*4) /*25.462962962963*/; ~btu = 31; ~btd = 340; ~bw = 0.5; ~bh = 70; ~bcolor = Color.grey;
313                         CompositeView(w, Rect(~b1, ~btu, ~bw, ~bh)).background = ~bcolor;
314                         CompositeView(w, Rect(~b1, ~btd, ~bw, ~bh)).background = ~bcolor;
315                         54.do({CompositeView(w, Rect(~b1 = ~b1+(Window.screenBounds.width/(12*4)), ~btu, ~bw, ~bh)).background = ~bcolor;});
316                         ~b1 = Window.screenBounds.width/(12*4);
317                         54.do({CompositeView(w, Rect(~b1 = ~b1+(Window.screenBounds.width/(12*4)), ~btd, ~bw, ~bh)).background = ~bcolor;});*/
318
319                         ~nh = 2;
320                         ~nw = ~nh*1.6180339887499;
321
322                         ~tgrid = 30;
323                         ~bgrid = Window.screenBounds.height-(Window.screenBounds.height/1.6180339887499)+30;
324
325                         ~dc1 = ~tgrid-5; ~dc2 = ~bgrid-5; ~dca = 10;
326
327                         8.do(x=~tgrid-10; {CompositeView(w, Rect(1, x=x+10, Window.screenBounds.width, 0.5)).background = Color.new255(51, 51, 51)});
328                         8.do(x=~bgrid-10; {CompositeView(w, Rect(1, x=x+10, Window.screenBounds.width, 0.5)).background = Color.new255(51, 51, 51)});
329
330                         ~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;);
331                         ~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;);
332                         ~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;);
333                         ~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;);
334                         ~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;);
335                         ~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;);
336                         ~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;);
337                         /*~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;);
338                         ~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;);
339                         ~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;);
340                         ~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;);
341                         ~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;);
342                         ~z13 = (CompositeView(w, Rect((if(~f37 == nil, {f13.value},{~f37.value}).explin(~outmin1,~outmax1,0,Window.screenBounds.width)), ~dc1=~dc1+10, ~nw, 2)).background = Color.white;);
343                         */      /*~z14 = (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;);
344                         ~z15 = (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;);
345                         ~z16 = (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;);
346                         ~z17 = (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;);
347                         ~z18 = (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;);
348                         ~z19 = (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;);
349                         ~z20 = (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;);
350                         ~z21 = (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;);
351                         ~z22 = (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;);
352                         ~z23 = (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;);
353                         ~z24 = (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;);
354                         */              ~zmid = (CompositeView(w, Rect(x, 280, ~nw, 2)).background = Color.clear;);
355                         ~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;);
356                         ~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;);
357                         ~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;);
358                         ~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;);
359                         ~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;);
360                         ~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;);
361                         ~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;);
362                         /*~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;);
363                         ~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;);
364                         ~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;);
365                         ~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;);
366                         ~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;);
367                         ~z37 = (CompositeView(w, Rect((if(~f37 == nil, {f13.value},{~f37.value}).explin(~outmin2,~outmax2,0,Window.screenBounds.width)), ~dc2=~dc2+10, ~nw, 2)).background = Color.white;);
368                         */      /*~z38 = (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;);
369                         ~z39 = (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;);
370                         ~z40 = (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;);
371                         ~z41 = (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;);
372                         ~z42 = (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;);
373                         ~z43 = (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;);
374                         ~z44 = (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;);
375                         ~z45 = (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;);
376                         ~z46 = (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;);
377                         ~z47 = (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;);
378                         ~z48 = (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;);
379                         */
380
381                         ~dc1 = ~tgrid-5; ~dc2 = ~bgrid-5; ~dca = 10;
382
383                         ~synthopen = {
384                                 case
385                                 {((~la.isRunning == false) and: (~la1.isRunning == false)) or: ~la1.isRunning == true}{
386                                         (1.do({var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,fs,rs,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,f13,f14,f15,f16,f17,f18,f19,f20,f21,f22,f23,f24,fs1,fs2,fs3,fs4,fs5,fs6,fd1,fd2,fd3,fd4,fd5,fd6,tune=0;
387                                                 #vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8,vol9,vol10,vol11,vol12 = [~vol1,~vol2,~vol3,~vol4,~vol5,~vol6,~vol7,~vol8,~vol9,~vol10,~vol11,~vol12];
388                                                 #f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12 = [ 0,0,0,0,0,0,0,0,0,0,0,0 ];
389                                                 ~la1.set(\dur, f1, \a, a, \b, b, \c, c, \d, d, \e, e, \f, f,    \vol, vol1, \tune, tune);  ~lb1.set(\dur, f2, \a, a, \b, b, \c, c, \d, d, \e, e, \f, f, \vol, vol2, \tune, tune);
390                                                 ~lc1.set(\dur, f3, \a, a, \b, b, \c, c, \d, d, \e, e, \f, f,      \vol, vol3, \tune, tune);  ~ld1.set(\dur, f4, \a, a, \b, b, \c, c, \d, d, \e, e, \f, f, \vol, vol4, \tune, tune);
391                                                 ~le1.set(\dur, f5, \a, a, \b, b, \c, c, \d, d, \e, e, \f, f,      \vol, vol4, \tune, tune);  ~lf1.set(\dur, f6, \a, a, \b, b, \c, c, \d, d, \e, e, \f, f, \vol, vol6, \tune, tune);
392                                                 ~lg1.set(\dur, f7, \a, a, \b, b, \c, c, \d, d, \e, e, \f, f,    \vol, vol7, \tune, tune);               }););
393
394                                         (~icl6=ParGroup.new;~icl61=ParGroup.new;~icl62=ParGroup.new;~icl63=ParGroup.new;
395                                                 1.do({var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,fs,rs,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,f13,f14,f15,f16,f17,f18,f19,f20,f21,f22,f23,f24,fs1,fs2,fs3,fs4,fs5,fs6,fd1,fd2,fd3,fd4,fd5,fd6,tune=0;
396                                                         #vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8,vol9,vol10,vol11,vol12 = [~vol1,~vol2,~vol3,~vol4,~vol5,~vol6,~vol7,~vol8,~vol9,~vol10,~vol11,~vol12];
397                                                         s1 = \gsineicls;
398                                                         ~la = Synth(s1, [\dur, ~f1, \a, a, \b, b, \c, c, \d, d, \e, e, \f, f,   \vol, vol1, \tune, tune],~icl6).register;    ~lb = Synth(s1, [\dur, ~f2, \a, a, \b, b, \c, c, \d, d, \e, e, \f, f,   \vol, vol2, \tune, tune],~icl6);
399                                                         ~lc = Synth(s1, [\dur, ~f3, \a, a, \b, b, \c, c, \d, d, \e, e, \f, f, \vol, vol3, \tune, tune], ~icl61);   ~ld = Synth(s1, [\dur, ~f4, \a, a, \b, b, \c, c, \d, d, \e, e, \f, f, \vol, vol4, \tune, tune],~icl61);
400                                                         ~le = Synth(s1, [\dur, ~f5, \a, a, \b, b, \c, c, \d, d, \e, e, \f, f, \vol, vol5, \tune, tune], ~icl62);   ~lf = Synth(s1, [\dur, ~f6, \a, a, \b, b, \c, c, \d, d, \e, e, \f, f, \vol, vol6, \tune, tune],~icl62);
401                                                         ~lg = Synth(s1, [\dur, ~f7, \a, a, \b, b, \c, c, \d, d, \e, e, \f, f,   \vol, vol7, \tune, tune],~icl63);
402                                                 });
403                                         );
404                                         AppClock.sched(0.161803398875,{
405                                                 ([~la1,~lb1,~lc1,~ld1,~le1,~lf1,~lg1].do(_.free)); ~slideroutine.stop;
406                                         });
407                                 }
408                                 {~la.isRunning == true}{
409                                         (1.do({var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,fs,rs,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,f13,f14,f15,f16,f17,f18,f19,f20,f21,f22,f23,f24,fs1,fs2,fs3,fs4,fs5,fs6,fd1,fd2,fd3,fd4,fd5,fd6,tune=0;
410                                                 #vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8,vol9,vol10,vol11,vol12 = [~vol1,~vol2,~vol3,~vol4,~vol5,~vol6,~vol7,~vol8,~vol9,~vol10,~vol11,~vol12];
411                                                 #f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12 = [ 0,0,0,0,0,0,0,0,0,0,0,0 ];
412                                                 ~la.set(\dur, f1, \a, a, \b, b, \c, c, \d, d, \e, e, \f, f,    \vol, vol1, \tune, tune);  ~lb.set(\dur, f2, \a, a, \b, b, \c, c, \d, d, \e, e, \f, f, \vol, vol2, \tune, tune);
413                                                 ~lc.set(\dur, f3, \a, a, \b, b, \c, c, \d, d, \e, e, \f, f,      \vol, vol3, \tune, tune);  ~ld.set(\dur, f4, \a, a, \b, b, \c, c, \d, d, \e, e, \f, f, \vol, vol4, \tune, tune);
414                                                 ~le.set(\dur, f5, \a, a, \b, b, \c, c, \d, d, \e, e, \f, f,      \vol, vol4, \tune, tune);  ~lf.set(\dur, f6, \a, a, \b, b, \c, c, \d, d, \e, e, \f, f, \vol, vol6, \tune, tune);
415                                                 ~lg.set(\dur, f7, \a, a, \b, b, \c, c, \d, d, \e, e, \f, f,    \vol, vol7, \tune, tune);                }););
416
417                                         (~icl6=ParGroup.new;~icl61=ParGroup.new;~icl62=ParGroup.new;~icl63=ParGroup.new;
418                                                 1.do({var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,fs,rs,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,f13,f14,f15,f16,f17,f18,f19,f20,f21,f22,f23,f24,fs1,fs2,fs3,fs4,fs5,fs6,fd1,fd2,fd3,fd4,fd5,fd6,tune=0;
419                                                         #vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8,vol9,vol10,vol11,vol12 = [~vol1,~vol2,~vol3,~vol4,~vol5,~vol6,~vol7,~vol8,~vol9,~vol10,~vol11,~vol12];
420                                                         s1 = \gsineicls;
421                                                         ~la1 = Synth(s1, [\dur, ~f1, \a, a, \b, b, \c, c, \d, d, \e, e, \f, f,   \vol, vol1, \tune, tune],~icl6).register;    ~lb1 = Synth(s1, [\dur, ~f2, \a, a, \b, b, \c, c, \d, d, \e, e, \f, f,   \vol, vol2, \tune, tune],~icl6);
422                                                         ~lc1 = Synth(s1, [\dur, ~f3, \a, a, \b, b, \c, c, \d, d, \e, e, \f, f, \vol, vol3, \tune, tune], ~icl61);   ~ld1 = Synth(s1, [\dur, ~f4, \a, a, \b, b, \c, c, \d, d, \e, e, \f, f, \vol, vol4, \tune, tune],~icl61);
423                                                         ~le1 = Synth(s1, [\dur, ~f5, \a, a, \b, b, \c, c, \d, d, \e, e, \f, f, \vol, vol5, \tune, tune], ~icl62);   ~lf1 = Synth(s1, [\dur, ~f6, \a, a, \b, b, \c, c, \d, d, \e, e, \f, f, \vol, vol6, \tune, tune],~icl62);
424                                                         ~lg1 = Synth(s1, [\dur, ~f7, \a, a, \b, b, \c, c, \d, d, \e, e, \f, f,   \vol, vol7, \tune, tune],~icl63);
425                                                 });
426                                         );
427                                         AppClock.sched(0.161803398875,{
428                                                 ([~la,~lb,~lc,~ld,~le,~lf,~lg].do(_.free)); ~slideroutine.stop;
429                                         });
430                                 };
431
432                                 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;);});
433                                 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;);});
434                                 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;);});
435                                 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;);});
436                                 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;);});
437                                 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;);});
438                                 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;);});
439                                 /*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;);});
440                                 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;);});
441                                 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;);});
442                                 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;);});
443                                 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;);});
444                                 *//*if((f13 > ~outmaxa) or: (f13 < ~outmina), {~z37.close;~z13.close;~z37 = (CompositeView(w, Rect((f13.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+130, ~nw, 2)).background = Color.white;);}, {~z13.close;~z37.close;~z13 = (CompositeView(w, Rect((f13.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+130, ~nw, 2)).background = Color.white;);});
445                                 if((f14 > ~outmaxa) or: (f14 < ~outmina), {~z38.close;~z14.close;~z38 = (CompositeView(w, Rect((f14.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+140, ~nw, 2)).background = Color.white;);}, {~z14.close;~z38.close;~z14 = (CompositeView(w, Rect((f14.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+140, ~nw, 2)).background = Color.white;);});
446                                 if((f15 > ~outmaxa) or: (f15 < ~outmina), {~z39.close;~z15.close;~z39 = (CompositeView(w, Rect((f15.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+150, ~nw, 2)).background = Color.white;);}, {~z15.close;~z39.close;~z15 = (CompositeView(w, Rect((f15.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+150, ~nw, 2)).background = Color.white;);});
447                                 if((f16 > ~outmaxa) or: (f16 < ~outmina), {~z40.close;~z16.close;~z40 = (CompositeView(w, Rect((f16.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+160, ~nw, 2)).background = Color.white;);}, {~z16.close;~z40.close;~z16 = (CompositeView(w, Rect((f16.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+160, ~nw, 2)).background = Color.white;);});
448                                 if((f17 > ~outmaxa) or: (f17 < ~outmina), {~z41.close;~z17.close;~z41 = (CompositeView(w, Rect((f17.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+170, ~nw, 2)).background = Color.white;);}, {~z17.close;~z41.close;~z17 = (CompositeView(w, Rect((f17.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+170, ~nw, 2)).background = Color.white;);});
449                                 if((f18 > ~outmaxa) or: (f18 < ~outmina), {~z42.close;~z18.close;~z42 = (CompositeView(w, Rect((f18.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+180, ~nw, 2)).background = Color.white;);}, {~z18.close;~z42.close;~z18 = (CompositeView(w, Rect((f18.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+180, ~nw, 2)).background = Color.white;);});
450                                 if((f19 > ~outmaxa) or: (f19 < ~outmina), {~z43.close;~z19.close;~z43 = (CompositeView(w, Rect((f19.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+190, ~nw, 2)).background = Color.white;);}, {~z19.close;~z43.close;~z19 = (CompositeView(w, Rect((f19.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+190, ~nw, 2)).background = Color.white;);});
451                                 */      /*if((f20 > ~outmaxa) or: (f20 < ~outmina), {~z44.close;~z20.close;~z44 = (CompositeView(w, Rect((f20.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+200, ~nw, 2)).background = Color.white;);}, {~z20.close;~z44.close;~z20 = (CompositeView(w, Rect((f20.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+200, ~nw, 2)).background = Color.white;);});
452                                 if((f21 > ~outmaxa) or: (f21 < ~outmina), {~z45.close;~z21.close;~z45 = (CompositeView(w, Rect((f21.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+210, ~nw, 2)).background = Color.white;);}, {~z21.close;~z45.close;~z21 = (CompositeView(w, Rect((f21.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+210, ~nw, 2)).background = Color.white;);});
453                                 if((f22 > ~outmaxa) or: (f22 < ~outmina), {~z46.close;~z22.close;~z46 = (CompositeView(w, Rect((f22.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+220, ~nw, 2)).background = Color.white;);}, {~z22.close;~z46.close;~z22 = (CompositeView(w, Rect((f22.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+220, ~nw, 2)).background = Color.white;);});
454                                 if((f23 > ~outmaxa) or: (f23 < ~outmina), {~z47.close;~z23.close;~z47 = (CompositeView(w, Rect((f23.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+230, ~nw, 2)).background = Color.white;);}, {~z23.close;~z47.close;~z23 = (CompositeView(w, Rect((f23.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+230, ~nw, 2)).background = Color.white;);});
455                                 if((f24 > ~outmaxa) or: (f24 < ~outmina), {~z48.close;~z24.close;~z48 = (CompositeView(w, Rect((f24.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+240, ~nw, 2)).background = Color.white;);}, {~z24.close;~z48.close;~z24 = (CompositeView(w, Rect((f24.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+240, ~nw, 2)).background = Color.white;);});
456                                 */
457                                 b3.value = 1;
458                         };
459
460                         ~synthflow = {
461                                 case
462                                 {~la1.isRunning == true}{
463                                         (1.do({var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,fs,rs,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,f13,f14,f15,f16,f17,f18,f19,f20,f21,f22,f23,f24,fs1,fs2,fs3,fs4,fs5,fs6,fd1,fd2,fd3,fd4,fd5,fd6,tune=0;
464                                                 #vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8,vol9,vol10,vol11,vol12 = [~vol1,~vol2,~vol3,~vol4,~vol5,~vol6,~vol7,~vol8,~vol9,~vol10,~vol11,~vol12];
465                                                 ~la1.set(\dur, ~f1, \a, a, \b, b, \c, c, \d, d, \e, e, \f, f,    \vol, vol1, \tune, tune);  ~lb1.set(\dur, ~f2, \a, a, \b, b, \c, c, \d, d, \e, e, \f, f, \vol, vol2, \tune, tune);
466                                                 ~lc1.set(\dur, ~f3, \a, a, \b, b, \c, c, \d, d, \e, e, \f, f,      \vol, vol3, \tune, tune);  ~ld1.set(\dur, ~f4, \a, a, \b, b, \c, c, \d, d, \e, e, \f, f, \vol, vol4, \tune, tune);
467                                                 ~le1.set(\dur, ~f5, \a, a, \b, b, \c, c, \d, d, \e, e, \f, f,      \vol, vol5, \tune, tune);  ~lf1.set(\dur, ~f6, \a, a, \b, b, \c, c, \d, d, \e, e, \f, f, \vol, vol6, \tune, tune);
468                                                 ~lg1.set(\dur, ~f7, \a, a, \b, b, \c, c, \d, d, \e, e, \f, f,    \vol, vol7, \tune, tune);      }););
469                                 }
470                                 {~la.isRunning == true} {
471                                         (1.do({var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,fs,rs,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,f13,f14,f15,f16,f17,f18,f19,f20,f21,f22,f23,f24,fs1,fs2,fs3,fs4,fs5,fs6,fd1,fd2,fd3,fd4,fd5,fd6,tune=0;
472                                                 #vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8,vol9,vol10,vol11,vol12 = [~vol1,~vol2,~vol3,~vol4,~vol5,~vol6,~vol7,~vol8,~vol9,~vol10,~vol11,~vol12];
473                                                 ~la.set(\dur, ~f1, \a, a, \b, b, \c, c, \d, d, \e, e, \f, f,    \vol, vol1, \tune, tune);  ~lb.set(\dur, ~f2, \a, a, \b, b, \c, c, \d, d, \e, e, \f, f, \vol, vol2, \tune, tune);
474                                                 ~lc.set(\dur, ~f3, \a, a, \b, b, \c, c, \d, d, \e, e, \f, f,      \vol, vol3, \tune, tune);  ~ld.set(\dur, ~f4, \a, a, \b, b, \c, c, \d, d, \e, e, \f, f, \vol, vol4, \tune, tune);
475                                                 ~le.set(\dur, ~f5, \a, a, \b, b, \c, c, \d, d, \e, e, \f, f,      \vol, vol5, \tune, tune);  ~lf.set(\dur, ~f6, \a, a, \b, b, \c, c, \d, d, \e, e, \f, f, \vol, vol6, \tune, tune);
476                                                 ~lg.set(\dur, ~f7, \a, a, \b, b, \c, c, \d, d, \e, e, \f, f,    \vol, vol7, \tune, tune);
477                                         }););
478                                 };
479
480                                 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;);});
481                                 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;);});
482                                 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;);});
483                                 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;);});
484                                 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;);});
485                                 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;);});
486                                 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;);});
487                                 /*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;);});
488                                 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;);});
489                                 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;);});
490                                 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;);});
491                                 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;);});
492                                 *//*if((f13 > ~outmaxa) or: (f13 < ~outmina), {~z37.close;~z13.close;~z37 = (CompositeView(w, Rect((f13.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+130, ~nw, 2)).background = Color.white;);}, {~z13.close;~z37.close;~z13 = (CompositeView(w, Rect((f13.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+130, ~nw, 2)).background = Color.white;);});
493                                 if((f14 > ~outmaxa) or: (f14 < ~outmina), {~z38.close;~z14.close;~z38 = (CompositeView(w, Rect((f14.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+140, ~nw, 2)).background = Color.white;);}, {~z14.close;~z38.close;~z14 = (CompositeView(w, Rect((f14.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+140, ~nw, 2)).background = Color.white;);});
494                                 if((f15 > ~outmaxa) or: (f15 < ~outmina), {~z39.close;~z15.close;~z39 = (CompositeView(w, Rect((f15.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+150, ~nw, 2)).background = Color.white;);}, {~z15.close;~z39.close;~z15 = (CompositeView(w, Rect((f15.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+150, ~nw, 2)).background = Color.white;);});
495                                 if((f16 > ~outmaxa) or: (f16 < ~outmina), {~z40.close;~z16.close;~z40 = (CompositeView(w, Rect((f16.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+160, ~nw, 2)).background = Color.white;);}, {~z16.close;~z40.close;~z16 = (CompositeView(w, Rect((f16.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+160, ~nw, 2)).background = Color.white;);});
496                                 if((f17 > ~outmaxa) or: (f17 < ~outmina), {~z41.close;~z17.close;~z41 = (CompositeView(w, Rect((f17.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+170, ~nw, 2)).background = Color.white;);}, {~z17.close;~z41.close;~z17 = (CompositeView(w, Rect((f17.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+170, ~nw, 2)).background = Color.white;);});
497                                 if((f18 > ~outmaxa) or: (f18 < ~outmina), {~z42.close;~z18.close;~z42 = (CompositeView(w, Rect((f18.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+180, ~nw, 2)).background = Color.white;);}, {~z18.close;~z42.close;~z18 = (CompositeView(w, Rect((f18.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+180, ~nw, 2)).background = Color.white;);});
498                                 if((f19 > ~outmaxa) or: (f19 < ~outmina), {~z43.close;~z19.close;~z43 = (CompositeView(w, Rect((f19.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+190, ~nw, 2)).background = Color.white;);}, {~z19.close;~z43.close;~z19 = (CompositeView(w, Rect((f19.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+190, ~nw, 2)).background = Color.white;);});
499                                 */      /*if((f20 > ~outmaxa) or: (f20 < ~outmina), {~z44.close;~z20.close;~z44 = (CompositeView(w, Rect((f20.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+200, ~nw, 2)).background = Color.white;);}, {~z20.close;~z44.close;~z20 = (CompositeView(w, Rect((f20.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+200, ~nw, 2)).background = Color.white;);});
500                                 if((f21 > ~outmaxa) or: (f21 < ~outmina), {~z45.close;~z21.close;~z45 = (CompositeView(w, Rect((f21.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+210, ~nw, 2)).background = Color.white;);}, {~z21.close;~z45.close;~z21 = (CompositeView(w, Rect((f21.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+210, ~nw, 2)).background = Color.white;);});
501                                 if((f22 > ~outmaxa) or: (f22 < ~outmina), {~z46.close;~z22.close;~z46 = (CompositeView(w, Rect((f22.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+220, ~nw, 2)).background = Color.white;);}, {~z22.close;~z46.close;~z22 = (CompositeView(w, Rect((f22.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+220, ~nw, 2)).background = Color.white;);});
502                                 if((f23 > ~outmaxa) or: (f23 < ~outmina), {~z47.close;~z23.close;~z47 = (CompositeView(w, Rect((f23.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+230, ~nw, 2)).background = Color.white;);}, {~z23.close;~z47.close;~z23 = (CompositeView(w, Rect((f23.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+230, ~nw, 2)).background = Color.white;);});
503                                 if((f24 > ~outmaxa) or: (f24 < ~outmina), {~z48.close;~z24.close;~z48 = (CompositeView(w, Rect((f24.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+240, ~nw, 2)).background = Color.white;);}, {~z24.close;~z48.close;~z24 = (CompositeView(w, Rect((f24.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+240, ~nw, 2)).background = Color.white;);});
504                                 */
505                         };
506
507                         ~synthslide = {
508                                 case
509                                 {~la1.isRunning == true}{(//fprog
510                                         ~slideroutine = Routine({1.do({var a,b,c,d,e,f,fs,rs,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,f13,f14,f15,f16,f17,f18,f19,f20,f21,f22,f23,f24,fs1,fs2,fs3,fs4,fs5,fs6,fd1,fd2,fd3,fd4,fd5,fd6,tune=0;
511                                                 #vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8,vol9,vol10,vol11,vol12 = [~vol1,~vol2,~vol3,~vol4,~vol5,~vol6,~vol7,~vol8,~vol9,~vol10,~vol11,~vol12];
512                                                 ~slidedo.do({~slidecount=~slidecount-1;
513                                                         (
514                                                                 [ ~f1=~f1+g,~f2=~f2+h,~f3=~f3+i,~f4=~f4+j,~f5=~f5+k,~f6=~f6+l,~f7=~f7+m ];
515                                                                 ~la1.set(\dur, ~f1, \a, a, \b, b, \c, c, \d, d, \e, e, \f, f,    \vol, vol1, \tune, tune);  ~lb1.set(\dur, ~f2, \a, a, \b, b, \c, c, \d, d, \e, e, \f, f, \vol, vol2, \tune, tune);
516                                                                 ~lc1.set(\dur, ~f3, \a, a, \b, b, \c, c, \d, d, \e, e, \f, f,      \vol, vol3, \tune, tune);  ~ld1.set(\dur, ~f4, \a, a, \b, b, \c, c, \d, d, \e, e, \f, f, \vol, vol4, \tune, tune);
517                                                                 ~le1.set(\dur, ~f5, \a, a, \b, b, \c, c, \d, d, \e, e, \f, f,      \vol, vol5, \tune, tune);  ~lf1.set(\dur, ~f6, \a, a, \b, b, \c, c, \d, d, \e, e, \f, f, \vol, vol6, \tune, tune);
518                                                                 ~lg1.set(\dur, ~f7, \a, a, \b, b, \c, c, \d, d, \e, e, \f, f,    \vol, vol7, \tune, tune);
519                                                         );
520
521                                                         {if(~slidecount==0,{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;);});
522                                                                 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;);});
523                                                                 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;);});
524                                                                 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;);});
525                                                                 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;);});
526                                                                 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;);});
527                                                                 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;);});
528                                                                 /*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;);});
529                                                                 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;);});
530                                                                 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;);});
531                                                                 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;);});
532                                                                 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;);});
533                                                                 *//*if((f13 > ~outmaxa) or: (f13 < ~outmina), {~z37.close;~z13.close;~z37 = (CompositeView(w, Rect((f13.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+130, ~nw, 2)).background = Color.white;);}, {~z13.close;~z37.close;~z13 = (CompositeView(w, Rect((f13.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+130, ~nw, 2)).background = Color.white;);});
534                                                                 if((f14 > ~outmaxa) or: (f14 < ~outmina), {~z38.close;~z14.close;~z38 = (CompositeView(w, Rect((f14.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+140, ~nw, 2)).background = Color.white;);}, {~z14.close;~z38.close;~z14 = (CompositeView(w, Rect((f14.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+140, ~nw, 2)).background = Color.white;);});
535                                                                 if((f15 > ~outmaxa) or: (f15 < ~outmina), {~z39.close;~z15.close;~z39 = (CompositeView(w, Rect((f15.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+150, ~nw, 2)).background = Color.white;);}, {~z15.close;~z39.close;~z15 = (CompositeView(w, Rect((f15.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+150, ~nw, 2)).background = Color.white;);});
536                                                                 if((f16 > ~outmaxa) or: (f16 < ~outmina), {~z40.close;~z16.close;~z40 = (CompositeView(w, Rect((f16.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+160, ~nw, 2)).background = Color.white;);}, {~z16.close;~z40.close;~z16 = (CompositeView(w, Rect((f16.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+160, ~nw, 2)).background = Color.white;);});
537                                                                 if((f17 > ~outmaxa) or: (f17 < ~outmina), {~z41.close;~z17.close;~z41 = (CompositeView(w, Rect((f17.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+170, ~nw, 2)).background = Color.white;);}, {~z17.close;~z41.close;~z17 = (CompositeView(w, Rect((f17.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+170, ~nw, 2)).background = Color.white;);});
538                                                                 if((f18 > ~outmaxa) or: (f18 < ~outmina), {~z42.close;~z18.close;~z42 = (CompositeView(w, Rect((f18.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+180, ~nw, 2)).background = Color.white;);}, {~z18.close;~z42.close;~z18 = (CompositeView(w, Rect((f18.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+180, ~nw, 2)).background = Color.white;);});
539                                                                 if((f19 > ~outmaxa) or: (f19 < ~outmina), {~z43.close;~z19.close;~z43 = (CompositeView(w, Rect((f19.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+190, ~nw, 2)).background = Color.white;);}, {~z19.close;~z43.close;~z19 = (CompositeView(w, Rect((f19.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+190, ~nw, 2)).background = Color.white;);});
540                                                                 */      /*if((f20 > ~outmaxa) or: (f20 < ~outmina), {~z44.close;~z20.close;~z44 = (CompositeView(w, Rect((f20.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+200, ~nw, 2)).background = Color.white;);}, {~z20.close;~z44.close;~z20 = (CompositeView(w, Rect((f20.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+200, ~nw, 2)).background = Color.white;);});
541                                                                 if((f21 > ~outmaxa) or: (f21 < ~outmina), {~z45.close;~z21.close;~z45 = (CompositeView(w, Rect((f21.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+210, ~nw, 2)).background = Color.white;);}, {~z21.close;~z45.close;~z21 = (CompositeView(w, Rect((f21.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+210, ~nw, 2)).background = Color.white;);});
542                                                                 if((f22 > ~outmaxa) or: (f22 < ~outmina), {~z46.close;~z22.close;~z46 = (CompositeView(w, Rect((f22.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+220, ~nw, 2)).background = Color.white;);}, {~z22.close;~z46.close;~z22 = (CompositeView(w, Rect((f22.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+220, ~nw, 2)).background = Color.white;);});
543                                                                 if((f23 > ~outmaxa) or: (f23 < ~outmina), {~z47.close;~z23.close;~z47 = (CompositeView(w, Rect((f23.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+230, ~nw, 2)).background = Color.white;);}, {~z23.close;~z47.close;~z23 = (CompositeView(w, Rect((f23.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+230, ~nw, 2)).background = Color.white;);});
544                                                                 if((f24 > ~outmaxa) or: (f24 < ~outmina), {~z48.close;~z24.close;~z48 = (CompositeView(w, Rect((f24.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+240, ~nw, 2)).background = Color.white;);}, {~z24.close;~z48.close;~z24 = (CompositeView(w, Rect((f24.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+240, ~nw, 2)).background = Color.white;);});
545                                                         */});}.defer;
546
547                                                         (~slidetime/~slidedo).wait;});});}).play;);}
548                                 {~la.isRunning == true} {(//fprog
549                                         ~slideroutine = Routine({1.do({var a,b,c,d,e,f,fs,rs,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,f13,f14,f15,f16,f17,f18,f19,f20,f21,f22,f23,f24,fs1,fs2,fs3,fs4,fs5,fs6,fd1,fd2,fd3,fd4,fd5,fd6,tune=0;
550                                                 #vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8,vol9,vol10,vol11,vol12 = [~vol1,~vol2,~vol3,~vol4,~vol5,~vol6,~vol7,~vol8,~vol9,~vol10,~vol11,~vol12];
551                                                 ~slidedo.do({~slidecount=~slidecount-1;
552                                                         (
553                                                                 [ ~f1=~f1+g,~f2=~f2+h,~f3=~f3+i,~f4=~f4+j,~f5=~f5+k,~f6=~f6+l,~f7=~f7+m ];
554                                                                 ~la1.set(\dur, ~f1, \a, a, \b, b, \c, c, \d, d, \e, e, \f, f,    \vol, vol1, \tune, tune);  ~lb.set(\dur, ~f2, \a, a, \b, b, \c, c, \d, d, \e, e, \f, f, \vol, vol2, \tune, tune);
555                                                                 ~lc.set(\dur, ~f3, \a, a, \b, b, \c, c, \d, d, \e, e, \f, f,      \vol, vol3, \tune, tune);  ~ld.set(\dur, ~f4, \a, a, \b, b, \c, c, \d, d, \e, e, \f, f, \vol, vol4, \tune, tune);
556                                                                 ~le.set(\dur, ~f5, \a, a, \b, b, \c, c, \d, d, \e, e, \f, f,      \vol, vol5, \tune, tune);  ~lf.set(\dur, ~f6, \a, a, \b, b, \c, c, \d, d, \e, e, \f, f, \vol, vol6, \tune, tune);
557                                                                 ~lg.set(\dur, ~f7, \a, a, \b, b, \c, c, \d, d, \e, e, \f, f,    \vol, vol7, \tune, tune);
558
559                                                         );
560
561                                                         {if(~slidecount==0,{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;);});
562                                                                 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;);});
563                                                                 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;);});
564                                                                 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;);});
565                                                                 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;);});
566                                                                 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;);});
567                                                                 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;);});
568                                                                 /*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;);});
569                                                                 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;);});
570                                                                 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;);});
571                                                                 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;);});
572                                                                 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;);});
573                                                                 *//*if((f13 > ~outmaxa) or: (f13 < ~outmina), {~z37.close;~z13.close;~z37 = (CompositeView(w, Rect((f13.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+130, ~nw, 2)).background = Color.white;);}, {~z13.close;~z37.close;~z13 = (CompositeView(w, Rect((f13.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+130, ~nw, 2)).background = Color.white;);});
574                                                                 if((f14 > ~outmaxa) or: (f14 < ~outmina), {~z38.close;~z14.close;~z38 = (CompositeView(w, Rect((f14.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+140, ~nw, 2)).background = Color.white;);}, {~z14.close;~z38.close;~z14 = (CompositeView(w, Rect((f14.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+140, ~nw, 2)).background = Color.white;);});
575                                                                 if((f15 > ~outmaxa) or: (f15 < ~outmina), {~z39.close;~z15.close;~z39 = (CompositeView(w, Rect((f15.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+150, ~nw, 2)).background = Color.white;);}, {~z15.close;~z39.close;~z15 = (CompositeView(w, Rect((f15.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+150, ~nw, 2)).background = Color.white;);});
576                                                                 if((f16 > ~outmaxa) or: (f16 < ~outmina), {~z40.close;~z16.close;~z40 = (CompositeView(w, Rect((f16.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+160, ~nw, 2)).background = Color.white;);}, {~z16.close;~z40.close;~z16 = (CompositeView(w, Rect((f16.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+160, ~nw, 2)).background = Color.white;);});
577                                                                 if((f17 > ~outmaxa) or: (f17 < ~outmina), {~z41.close;~z17.close;~z41 = (CompositeView(w, Rect((f17.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+170, ~nw, 2)).background = Color.white;);}, {~z17.close;~z41.close;~z17 = (CompositeView(w, Rect((f17.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+170, ~nw, 2)).background = Color.white;);});
578                                                                 if((f18 > ~outmaxa) or: (f18 < ~outmina), {~z42.close;~z18.close;~z42 = (CompositeView(w, Rect((f18.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+180, ~nw, 2)).background = Color.white;);}, {~z18.close;~z42.close;~z18 = (CompositeView(w, Rect((f18.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+180, ~nw, 2)).background = Color.white;);});
579                                                                 if((f19 > ~outmaxa) or: (f19 < ~outmina), {~z43.close;~z19.close;~z43 = (CompositeView(w, Rect((f19.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+190, ~nw, 2)).background = Color.white;);}, {~z19.close;~z43.close;~z19 = (CompositeView(w, Rect((f19.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+190, ~nw, 2)).background = Color.white;);});
580                                                                 */      /*if((f20 > ~outmaxa) or: (f20 < ~outmina), {~z44.close;~z20.close;~z44 = (CompositeView(w, Rect((f20.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+200, ~nw, 2)).background = Color.white;);}, {~z20.close;~z44.close;~z20 = (CompositeView(w, Rect((f20.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+200, ~nw, 2)).background = Color.white;);});
581                                                                 if((f21 > ~outmaxa) or: (f21 < ~outmina), {~z45.close;~z21.close;~z45 = (CompositeView(w, Rect((f21.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+210, ~nw, 2)).background = Color.white;);}, {~z21.close;~z45.close;~z21 = (CompositeView(w, Rect((f21.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+210, ~nw, 2)).background = Color.white;);});
582                                                                 if((f22 > ~outmaxa) or: (f22 < ~outmina), {~z46.close;~z22.close;~z46 = (CompositeView(w, Rect((f22.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+220, ~nw, 2)).background = Color.white;);}, {~z22.close;~z46.close;~z22 = (CompositeView(w, Rect((f22.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+220, ~nw, 2)).background = Color.white;);});
583                                                                 if((f23 > ~outmaxa) or: (f23 < ~outmina), {~z47.close;~z23.close;~z47 = (CompositeView(w, Rect((f23.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+230, ~nw, 2)).background = Color.white;);}, {~z23.close;~z47.close;~z23 = (CompositeView(w, Rect((f23.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+230, ~nw, 2)).background = Color.white;);});
584                                                                 if((f24 > ~outmaxa) or: (f24 < ~outmina), {~z48.close;~z24.close;~z48 = (CompositeView(w, Rect((f24.explin(~outminb,~outmaxb,0,Window.screenBounds.width)), ~dc1+240, ~nw, 2)).background = Color.white;);}, {~z24.close;~z48.close;~z24 = (CompositeView(w, Rect((f24.explin(~outmina,~outmaxa,0,Window.screenBounds.width)), ~dc2+240, ~nw, 2)).background = Color.white;);});
585                                                         */});}.defer;
586
587                                                         (~slidetime/~slidedo).wait;});});}).play;);};
588                         };
589
590                         ~synthpause = {(
591                                 case
592                                 {~la1.isRunning == true}{
593                                         (1.do({var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,fs,rs,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,f13,f14,f15,f16,f17,f18,f19,f20,f21,f22,f23,f24,fs1,fs2,fs3,fs4,fs5,fs6,fd1,fd2,fd3,fd4,fd5,fd6,tune=0;
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                                                 #f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12/*,f13,f14,f15,f16,f17,f18,f19,f20,f21,f22,f23,f24*/ = [0,0,0,0,0,0,0,0,0,0,0,0];
596                                                 ~la1.set(\dur, f1, \a, a, \b, b, \c, c, \d, d, \e, e, \f, f,    \vol, vol1, \tune, tune);  ~lb1.set(\dur, f2, \a, a, \b, b, \c, c, \d, d, \e, e, \f, f, \vol, vol2, \tune, tune);
597                                                 ~lc1.set(\dur, f3, \a, a, \b, b, \c, c, \d, d, \e, e, \f, f,      \vol, vol3, \tune, tune);  ~ld1.set(\dur, f4, \a, a, \b, b, \c, c, \d, d, \e, e, \f, f, \vol, vol4, \tune, tune);
598                                                 ~le1.set(\dur, f5, \a, a, \b, b, \c, c, \d, d, \e, e, \f, f,      \vol, vol5, \tune, tune);  ~lf1.set(\dur, f6, \a, a, \b, b, \c, c, \d, d, \e, e, \f, f, \vol, vol6, \tune, tune);
599                                                 ~lg1.set(\dur, f7, \a, a, \b, b, \c, c, \d, d, \e, e, \f, f,    \vol, vol7, \tune, tune);       }););
600                                 }
601                                 {~la.isRunning == true} {
602                                         (1.do({var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,fs,rs,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,f13,f14,f15,f16,f17,f18,f19,f20,f21,f22,f23,f24,fs1,fs2,fs3,fs4,fs5,fs6,fd1,fd2,fd3,fd4,fd5,fd6,tune=0;
603                                                 #vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8,vol9,vol10,vol11,vol12 = [~vol1,~vol2,~vol3,~vol4,~vol5,~vol6,~vol7,~vol8,~vol9,~vol10,~vol11,~vol12];
604                                                 #f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12/*,f13,f14,f15,f16,f17,f18,f19,f20,f21,f22,f23,f24*/ = [0,0,0,0,0,0,0,0,0,0,0,0];
605                                                 ~la.set(\dur, f1, \a, a, \b, b, \c, c, \d, d, \e, e, \f, f,    \vol, vol1, \tune, tune);  ~lb.set(\dur, f2, \a, a, \b, b, \c, c, \d, d, \e, e, \f, f, \vol, vol2, \tune, tune);
606                                                 ~lc.set(\dur, f3, \a, a, \b, b, \c, c, \d, d, \e, e, \f, f,      \vol, vol3, \tune, tune);  ~ld.set(\dur, f4, \a, a, \b, b, \c, c, \d, d, \e, e, \f, f, \vol, vol4, \tune, tune);
607                                                 ~le.set(\dur, f5, \a, a, \b, b, \c, c, \d, d, \e, e, \f, f,      \vol, vol5, \tune, tune);  ~lf.set(\dur, f6, \a, a, \b, b, \c, c, \d, d, \e, e, \f, f, \vol, vol6, \tune, tune);
608                                                 ~lg.set(\dur, f7, \a, a, \b, b, \c, c, \d, d, \e, e, \f, f,    \vol, vol7, \tune, tune);
609                                         }););
610                                 };
611                                 );
612                         };
613
614                         ~synthfree = {
615                                 (
616                                         case
617                                         {((~la.isRunning == false) and: (~la1.isRunning == false)) or: ~la1.isRunning == true}{
618                                                 (1.do({var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,fs,rs,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,f13,f14,f15,f16,f17,f18,f19,f20,f21,f22,f23,f24,fs1,fs2,fs3,fs4,fs5,fs6,fd1,fd2,fd3,fd4,fd5,fd6,tune=0;
619                                                         #vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8,vol9,vol10,vol11,vol12 = [~vol1,~vol2,~vol3,~vol4,~vol5,~vol6,~vol7,~vol8,~vol9,~vol10,~vol11,~vol12];
620                                                         #f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12 = [ 0,0,0,0,0,0,0,0,0,0,0,0 ];
621                                                         ~la1.set(\dur, f1, \a, a, \b, b, \c, c, \d, d, \e, e, \f, f,    \vol, vol1, \tune, tune);  ~lb1.set(\dur, f2, \a, a, \b, b, \c, c, \d, d, \e, e, \f, f, \vol, vol2, \tune, tune);
622                                                         ~lc1.set(\dur, f3, \a, a, \b, b, \c, c, \d, d, \e, e, \f, f,      \vol, vol3, \tune, tune);  ~ld1.set(\dur, f4, \a, a, \b, b, \c, c, \d, d, \e, e, \f, f, \vol, vol4, \tune, tune);
623                                                         ~le1.set(\dur, f5, \a, a, \b, b, \c, c, \d, d, \e, e, \f, f,      \vol, vol5, \tune, tune);  ~lf1.set(\dur, f6, \a, a, \b, b, \c, c, \d, d, \e, e, \f, f, \vol, vol6, \tune, tune);
624                                                         ~lg1.set(\dur, f7, \a, a, \b, b, \c, c, \d, d, \e, e, \f, f,    \vol, vol7, \tune, tune);       }););
625                                                 AppClock.sched(0.161803398875,{
626                                                         ([~la1,~lb1,~lc1,~ld1,~le1,~lf1,~lg1].do(_.free)); ~slideroutine.stop;
627                                                 });
628                                         }
629                                         {~la.isRunning == true}{
630                                                 (1.do({var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,fs,rs,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,f13,f14,f15,f16,f17,f18,f19,f20,f21,f22,f23,f24,fs1,fs2,fs3,fs4,fs5,fs6,fd1,fd2,fd3,fd4,fd5,fd6,tune=0;
631                                                         #vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8,vol9,vol10,vol11,vol12 = [~vol1,~vol2,~vol3,~vol4,~vol5,~vol6,~vol7,~vol8,~vol9,~vol10,~vol11,~vol12];
632                                                         #f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12 = [ 0,0,0,0,0,0,0,0,0,0,0,0 ];
633                                                         ~la.set(\dur, f1, \a, a, \b, b, \c, c, \d, d, \e, e, \f, f,    \vol, vol1, \tune, tune);  ~lb.set(\dur, f2, \a, a, \b, b, \c, c, \d, d, \e, e, \f, f, \vol, vol2, \tune, tune);
634                                                         ~lc.set(\dur, f3, \a, a, \b, b, \c, c, \d, d, \e, e, \f, f,      \vol, vol3, \tune, tune);  ~ld.set(\dur, f4, \a, a, \b, b, \c, c, \d, d, \e, e, \f, f, \vol, vol4, \tune, tune);
635                                                         ~le.set(\dur, f5, \a, a, \b, b, \c, c, \d, d, \e, e, \f, f,      \vol, vol5, \tune, tune);  ~lf.set(\dur, f6, \a, a, \b, b, \c, c, \d, d, \e, e, \f, f, \vol, vol6, \tune, tune);
636                                                         ~lg.set(\dur, f7, \a, a, \b, b, \c, c, \d, d, \e, e, \f, f,    \vol, vol7, \tune, tune);        }););
637                                                 AppClock.sched(0.161803398875,{
638                                                         ([~la,~lb,~lc,~ld,~le,~lf,~lg].do(_.free)); ~slideroutine.stop;
639                                                 });
640                                         };
641                                 );
642                         };
643
644                         case
645                         {~slot1 == nil}{""}
646                         {~slot2 == nil}{""}
647                         {~slot3 == nil}{""}
648                         {~slot4 == nil}{""}
649                         {~slot5 == nil}{""}
650                         {~slot6 == nil}{""}
651                         {~slot7 == nil}{""}
652                         {~slot8 == nil}{""};
653
654                         ~timevals = {(~tst = TextView(w, Rect(~tspl,~tspt, ~tspw, ~tsph)).background_(Color.black);
655                                 (~tst.string =
656                                         "o1:_"++~time1o.value.asString++"_f1:_"++~time1f.value.asString++"_s1:_"++~time1s.value.asString++"\n" ++
657                                         "o2:_"++~time2o.value.asString++"_f2:_"++~time2f.value.asString++"_s2:_"++~time2s.value.asString++"\n" ++
658                                         "o3:_"++~time3o.value.asString++"_f3:_"++~time3f.value.asString++"_s3:_"++~time3s.value.asString++"\n" ++
659                                         "o4:_"++~time4o.value.asString++"_f4:_"++~time4f.value.asString++"_s4:_"++~time4s.value.asString++"\n" ++
660                                         "o5:_"++~time5o.value.asString++"_f5:_"++~time5f.value.asString++"_s5:_"++~time5s.value.asString++"\n" ++
661                                         "o6:_"++~time6o.value.asString++"_f6:_"++~time6f.value.asString++"_s6:_"++~time6s.value.asString++"\n" ++
662                                         "o7:_"++~time7o.value.asString++"_f7:_"++~time7f.value.asString++"_s7:_"++~time7s.value.asString++"\n" ++
663                                         "o8:_"++~time8o.value.asString++"_f8:_"++~time8f.value.asString++"_s8:_"++~time8s.value.asString++"\n" ++"\n" ++
664                                         if(~slot8 != ~slot, {
665                                                 (~slot1 = ~slot2).asString++"\n" ++
666                                                 (~slot2 = ~slot3).asString++"\n" ++
667                                                 (~slot3 = ~slot4).asString++"\n" ++
668                                                 (~slot4 = ~slot5).asString++"\n" ++
669                                                 (~slot5 = ~slot6).asString++"\n" ++
670                                                 (~slot6 = ~slot7).asString++"\n" ++
671                                                 (~slot7 = ~slot8).asString++"\n" ++
672                                                 (~slot8 = ~slot).asString;
673                                                 },{
674                                                         (~slot1).asString++"\n" ++
675                                                         (~slot2).asString++"\n" ++
676                                                         (~slot3).asString++"\n" ++
677                                                         (~slot4).asString++"\n" ++
678                                                         (~slot5).asString++"\n" ++
679                                                         (~slot6).asString++"\n" ++
680                                                         (~slot7).asString++"\n" ++
681                                                         (~slot8).asString;
682                                         });
683
684                                 );
685                                 ~tst.stringColor = Color.white;
686                         )};
687
688                         ~numsynthsfunc = {
689                                 if((~numsynths != nil) or: (~numsynths.isPlaying == true), {~numsynths.stop;});
690                                 ~numsynths = Routine({inf.do({if((s.numSynths > 7) and: (3.wait; s.numSynths > 7) and: (6.wait; s.numSynths > 7), {
691
692                                         AppClock.sched(0, {
693                                                 if(~numsynthmessage != nil, {~numsynthmessage.close;});
694                                                 ~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;
695                                                 ~numsynthmessagestring = StaticText(~numsynthmessage, Rect(0,0,340+46,340+46/1.6180339887499)).background_(Color.black);
696                                                 ~numsynthmessagestring.align = \topLeft;
697                                                 ~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.";
698                                                 ~numsynthmessagestring.stringColor = Color.white;
699                                                 ~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;});});
700                                                 ~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;});});
701                                                 ~numsynthmessage.front;
702                                         });
703                                 }); 1.wait;});}).play;
704                         };
705
706                         ~numsynthsfunc.value;
707
708                         view.mouseDownAction = {
709                                 |v, x, y, mod, butNum|
710                                 point = [x,y];
711                                 if(butNum == 0, { v.refresh;
712
713                                         ~tgrid = 30;
714                                         ~bgrid = Window.screenBounds.height-(Window.screenBounds.height/1.6180339887499)+30;
715
716                                         case
717                                         {y<~tgrid} {nil}
718                                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z1.close;~z1 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
719                                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z2.close;~z2 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
720                                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z3.close;~z3 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
721                                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z4.close;~z4 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
722                                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z5.close;~z5 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
723                                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z6.close;~z6 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
724                                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {~z7.close;~z7 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
725                                         {y>~tgrid and: y<~bgrid} {nil}
726                                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z1.close;~z1 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
727                                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z2.close;~z2 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
728                                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z3.close;~z3 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
729                                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z4.close;~z4 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
730                                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z5.close;~z5 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
731                                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z6.close;~z6 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
732                                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z7.close;~z7 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
733                                 }, {});
734
735                                 ~tgrid = 30;
736                                 ~bgrid = Window.screenBounds.height-(Window.screenBounds.height/1.6180339887499)+30;
737
738                                 case
739                                 {~la.isRunning == true}{
740                                         case
741                                         {y<~tgrid} {nil}
742                                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
743                                                 ~la.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value);~f1=q.value; ~undof1=~f1;}
744                                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
745                                                 ~lb.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value);~f2=q.value; ~undof2=~f2;}
746                                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
747                                                 ~lc.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value);~f3=q.value; ~undof3=~f3;}
748                                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
749                                                 ~ld.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value);~f4=q.value; ~undof4=~f4;}
750                                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
751                                                 ~le.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value);~f5=q.value; ~undof5=~f5;}
752                                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
753                                                 ~lf.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value);~f6=q.value; ~undof6=~f6;}
754                                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
755                                                 ~lg.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value);~f7=q.value; ~undof7=~f7;}
756                                         {y>~tgrid and: y<~bgrid} {nil}
757                                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
758                                                 ~la.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value);~f1=q.value; ~undof1=~f1;}
759                                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
760                                                 ~lb.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value);~f2=q.value; ~undof2=~f2;}
761                                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
762                                                 ~lc.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value);~f3=q.value; ~undof3=~f3;}
763                                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
764                                                 ~ld.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value);~f4=q.value; ~undof4=~f4;}
765                                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
766                                                 ~le.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value);~f5=q.value; ~undof5=~f5;}
767                                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
768                                                 ~lf.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value);~f6=q.value; ~undof6=~f6;}
769                                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
770                                                 ~lg.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value);~f7=q.value; ~undof7=~f7;}
771
772                                 }
773                                 {~la1.isRunning == true}{
774                                         case
775                                         {y<~tgrid} {nil}
776                                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
777                                                 ~la1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value);~f1=q.value; ~undof1=~f1;}
778                                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
779                                                 ~lb1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value);~f2=q.value; ~undof2=~f2;}
780                                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
781                                                 ~lc1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value);~f3=q.value; ~undof3=~f3;}
782                                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
783                                                 ~ld1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value);~f4=q.value; ~undof4=~f4;}
784                                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
785                                                 ~le1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value);~f5=q.value; ~undof5=~f5;}
786                                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
787                                                 ~lf1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value);~f6=q.value; ~undof6=~f6;}
788                                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
789                                                 ~lg1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value);~f7=q.value; ~undof7=~f7;}
790                                         {y>~tgrid and: y<~bgrid} {nil}
791                                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
792                                                 ~la1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value);~f1=q.value; ~undof1=~f1;}
793                                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
794                                                 ~lb1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value);~f2=q.value; ~undof2=~f2;}
795                                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
796                                                 ~lc1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value);~f3=q.value; ~undof3=~f3;}
797                                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
798                                                 ~ld1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value);~f4=q.value; ~undof4=~f4;}
799                                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
800                                                 ~le1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value);~f5=q.value; ~undof5=~f5;}
801                                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
802                                                 ~lf1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value);~f6=q.value; ~undof6=~f6;}
803                                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
804                                                 ~lg1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value);~f7=q.value; ~undof7=~f7;}
805                                 };
806                         };
807
808                         //draw lines with Pen and create Synths according to mouse movement
809                         view.mouseMoveAction = {
810                                 |v, x, y|
811
812                                 ~nh = 2;
813                                 ~nw = ~nh*1.6180339887499;
814
815                                 ~tgrid = 30;
816                                 ~bgrid = Window.screenBounds.height-(Window.screenBounds.height/1.6180339887499)+30;
817
818                                 case
819                                 {y<~tgrid} {nil}
820                                 {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z1.close;~z25.close;~z1 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
821                                 {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z2.close;~z26.close;~z2 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
822                                 {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z3.close;~z27.close;~z3 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
823                                 {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z4.close;~z28.close;~z4 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
824                                 {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z5.close;~z29.close;~z5 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
825                                 {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z6.close;~z30.close;~z6 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
826                                 {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {~z7.close;~z31.close;~z7 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
827                                 {y>~tgrid and: y<~bgrid} {nil}
828                                 {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z1.close;~z25.close;~z1 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
829                                 {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z2.close;~z26.close;~z2 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
830                                 {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z3.close;~z27.close;~z3 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
831                                 {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z4.close;~z28.close;~z4 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
832                                 {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z5.close;~z29.close;~z5 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
833                                 {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z6.close;~z30.close;~z6 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
834                                 {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z7.close;~z31.close;~z7 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)};
835                                 w.refresh;
836
837                                 ~tgrid = 30;
838                                 ~bgrid = Window.screenBounds.height-(Window.screenBounds.height/1.6180339887499)+30;
839
840                                 case
841                                 {~la.isRunning == true}{
842                                         case
843                                         {y<~tgrid} {nil}
844                                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
845                                                 ~la.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value);~f1=q.value; ~undof1=~f1;}
846                                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
847                                                 ~lb.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value);~f2=q.value; ~undof2=~f2;}
848                                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
849                                                 ~lc.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value);~f3=q.value; ~undof3=~f3;}
850                                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
851                                                 ~ld.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value);~f4=q.value; ~undof4=~f4;}
852                                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
853                                                 ~le.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value);~f5=q.value; ~undof5=~f5;}
854                                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
855                                                 ~lf.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value);~f6=q.value; ~undof6=~f6;}
856                                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
857                                                 ~lg.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value);~f7=q.value; ~undof7=~f7;}
858                                         {y>~tgrid and: y<~bgrid} {nil}
859                                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
860                                                 ~la.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value);~f1=q.value; ~undof1=~f1;}
861                                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
862                                                 ~lb.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value);~f2=q.value; ~undof2=~f2;}
863                                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
864                                                 ~lc.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value);~f3=q.value; ~undof3=~f3;}
865                                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
866                                                 ~ld.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value);~f4=q.value; ~undof4=~f4;}
867                                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
868                                                 ~le.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value);~f5=q.value; ~undof5=~f5;}
869                                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
870                                                 ~lf.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value);~f6=q.value; ~undof6=~f6;}
871                                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
872                                                 ~lg.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value);~f7=q.value; ~undof7=~f7;}
873
874                                 }
875                                 {~la1.isRunning == true}{
876                                         case
877                                         {y<~tgrid} {nil}
878                                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
879                                                 ~la1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value);~f1=q.value; ~undof1=~f1;}
880                                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
881                                                 ~lb1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value);~f2=q.value; ~undof2=~f2;}
882                                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
883                                                 ~lc1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value);~f3=q.value; ~undof3=~f3;}
884                                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
885                                                 ~ld1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value);~f4=q.value; ~undof4=~f4;}
886                                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
887                                                 ~le1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value);~f5=q.value; ~undof5=~f5;}
888                                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
889                                                 ~lf1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value);~f6=q.value; ~undof6=~f6;}
890                                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
891                                                 ~lg1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value);~f7=q.value; ~undof7=~f7;}
892                                         {y>~tgrid and: y<~bgrid} {nil}
893                                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
894                                                 ~la1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value);~f1=q.value; ~undof1=~f1;}
895                                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
896                                                 ~lb1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value);~f2=q.value; ~undof2=~f2;}
897                                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
898                                                 ~lc1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value);~f3=q.value; ~undof3=~f3;}
899                                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
900                                                 ~ld1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value);~f4=q.value; ~undof4=~f4;}
901                                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
902                                                 ~le1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value);~f5=q.value; ~undof5=~f5;}
903                                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
904                                                 ~lf1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value);~f6=q.value; ~undof6=~f6;}
905                                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
906                                                 ~lg1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value);~f7=q.value; ~undof7=~f7;}
907                                 };
908                         };
909
910                         ~tgrid = 30;
911                         ~bgrid = Window.screenBounds.height-(Window.screenBounds.height/1.6180339887499)+30;
912                         ~dc1 = ~tgrid-5; ~dc2 = ~bgrid-5; ~dca = 10;
913
914                         ~bpl = Window.screenBounds.width-340;
915                         ~bpt = Window.screenBounds.height-88;
916                         ~bph = 40;
917                         ~bpw = 40/1.6180339887499;
918
919                         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;
920                                 if(button.value == 1, {
921
922                                         ~tsc = TextView(w, Rect(0,0, 1600*2, 354)).background_(Color.black);
923                                         (~tsc.string =
924                                                 "saved: "++"\n"++
925                                                 "1: "++"\n"++"[~f1="++fp1.asString++",~f2="++fp2.asString++",~f3="++fp3.asString++",~f4="++fp4.asString++",~f5="++fp5.asString++",~f6="++fp6.asString++",~f7="++fp7.asString++"]"++"\n"++
926                                                 "2: "++"\n"++"[~f1="++fp1b.asString++",~f2="++fp2b.asString++",~f3="++fp3b.asString++",~f4="++fp4b.asString++",~f5="++fp5b.asString++",~f6="++fp6b.asString++",~f7="++fp7b.asString++"]"++"\n"++
927                                                 "3: "++"\n"++"[~f1="++fp1c.asString++",~f2="++fp2c.asString++",~f3="++fp3c.asString++",~f4="++fp4c.asString++",~f5="++fp5c.asString++",~f6="++fp6c.asString++",~f7="++fp7c.asString++"]"++"\n"++
928                                                 "4: "++"\n"++"[~f1="++fp1d.asString++",~f2="++fp2d.asString++",~f3="++fp3d.asString++",~f4="++fp4d.asString++",~f5="++fp5d.asString++",~f6="++fp6d.asString++",~f7="++fp7d.asString++"]"++"\n"++
929                                                 "5: "++"\n"++"[~f1="++fp1e.asString++",~f2="++fp2e.asString++",~f3="++fp3e.asString++",~f4="++fp4e.asString++",~f5="++fp5e.asString++",~f6="++fp6e.asString++",~f7="++fp7e.asString++"]"++"\n"++
930                                                 "6: "++"\n"++"[~f1="++fp1f.asString++",~f2="++fp2f.asString++",~f3="++fp3f.asString++",~f4="++fp4f.asString++",~f5="++fp5f.asString++",~f6="++fp6f.asString++",~f7="++fp7f.asString++"]"++"\n"++
931                                                 "7: "++"\n"++"[~f1="++fp1g.asString++",~f2="++fp2g.asString++",~f3="++fp3g.asString++",~f4="++fp4g.asString++",~f5="++fp5g.asString++",~f6="++fp6g.asString++",~f7="++fp7g.asString++"]"++"\n"++
932                                                 "8: "++"\n"++"[~f1="++fp1h.asString++",~f2="++fp2h.asString++",~f3="++fp3h.asString++",~f4="++fp4h.asString++",~f5="++fp5h.asString++",~f6="++fp6h.asString++",~f7="++fp7h.asString++"]"++"\n"++"\n"++
933
934                                                 "current: "++"\n"++
935                                                 "[~f1="++~f1.asString++",~f2="++~f2.asString++",~f3="++~f3.asString++",~f4="++~f4.asString++",~f5="++~f5.asString++",~f6="++~f6.asString++",~f7="++~f7.asString++"]"
936
937                                         );
938                                         ~tsc.stringColor = Color.white;
939                                         (str= [ ~f1,~f2,~f3,~f4,~f5,~f6,~f7/*,~f8,~f9,~f10,~f11,~f12*/ ];("echo"+str+"| xclip -selection clipboard").unixCmd;);
940                                         [ ~f1,~f2,~f3,~f4,~f5,~f6,~f7/*,~f8,~f9,~f10,~f11,~f12*/ ].postln;},
941                                         {~tsc.close;});
942                         });
943                         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;
944                                 if(~timer.isPlaying == true, {
945                                         if(~tst.value == nil, {~timer.stop; ~systemclock.stop; ~systemclock.clear;},{~tst.close;
946                                                 ~timevals.value;
947                                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear;});
948                                 });
949                         });
950                         ~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, {
951                                 if(~tst != nil, {~tst.close});
952                                 ~timevals.value;
953                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear;},{if(~tst.value == nil, {~timer.stop; ~systemclock.stop; ~systemclock.clear;},{~timer.stop; ~systemclock.stop; ~systemclock.clear; ~tst.close;})})});
954                         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_({
955                                 arg synthbutton; if(synthbutton.value == 1, {
956                                         ~la = Synth(\gsineicls, [\dur, 432],~icl6).register;~la1 = Synth(\gsineicls, [\dur, 432],~icl6).register;[~la, ~la1].do(_.free);~la = Synth(\gsineicls, [\dur, 432],~icl6).register;~la1 = Synth(\gsineicls, [\dur, 432],~icl6).register;[~la, ~la1].do(_.free);
957                                         ~synthopen.value;
958                                         ~numsynths.stop; ~numsynthsfunc.value;
959                                         ~midifunc.value;
960                                         },
961                                         {~synthfree.value; b4.value = 0;})
962                         });
963                         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_({
964                                 arg synthbutton; if(synthbutton.value == 1, {~synthpause.value; ~timer.stop;},
965                                         {~synthflow.value; if(~time == 0, {~timer.stop;}, {~timer = Routine({inf.do({~time = ~time+0.01; ~time.postln; 0.01.wait;});}); SystemClock.play(~timer);})})
966                         });
967
968
969
970                         ~bph = 26;
971                         ~bpw = 26/1.6180339887499;
972                         ~bpl = Window.screenBounds.width-(~bph*8)-20;
973                         ~bpt = Window.screenBounds.height-88;
974
975                         ~bp01l = ~bpl;
976                         ~bp02l = ~bpl+~bph;
977                         ~bp03l = ~bpl+~bph+~bph;
978                         ~bp04l = ~bpl+~bph+~bph+~bph;
979                         ~bp05l = ~bpl+~bph+~bph+~bph+~bph;
980                         ~bp06l = ~bpl+~bph+~bph+~bph+~bph+~bph;
981                         ~bp07l = ~bpl+~bph+~bph+~bph+~bph+~bph+~bph;
982                         ~bp08l = ~bpl+~bph+~bph+~bph+~bph+~bph+~bph+~bph;
983                         ~bpf1l = ~bpl;
984                         ~bpf2l = ~bpl+~bph;
985                         ~bpf3l = ~bpl+~bph+~bph;
986                         ~bpf4l = ~bpl+~bph+~bph+~bph;
987                         ~bpf5l = ~bpl+~bph+~bph+~bph+~bph;
988                         ~bpf6l = ~bpl+~bph+~bph+~bph+~bph+~bph;
989                         ~bpf7l = ~bpl+~bph+~bph+~bph+~bph+~bph+~bph;
990                         ~bpf8l = ~bpl+~bph+~bph+~bph+~bph+~bph+~bph+~bph;
991                         /*~bp01l = ~bpl;
992                         ~bp02l = ~bpl;
993                         ~bp03l = ~bpl+~bph;
994                         ~bp04l = ~bpl+~bph;
995                         ~bp05l = ~bpl+~bph+~bph;
996                         ~bp06l = ~bpl+~bph+~bph;
997                         ~bp07l = ~bpl+~bph+~bph+~bph;
998                         ~bp08l = ~bpl+~bph+~bph+~bph;
999                         ~bpf1l = ~bpl+~bph+~bph+~bph+~bph;
1000                         ~bpf2l = ~bpl+~bph+~bph+~bph+~bph;
1001                         ~bpf3l = ~bpl+~bph+~bph+~bph+~bph+~bph;
1002                         ~bpf4l = ~bpl+~bph+~bph+~bph+~bph+~bph;
1003                         ~bpf5l = ~bpl+~bph+~bph+~bph+~bph+~bph+~bph;
1004                         ~bpf6l = ~bpl+~bph+~bph+~bph+~bph+~bph+~bph;
1005                         ~bpf7l = ~bpl+~bph+~bph+~bph+~bph+~bph+~bph+~bph;
1006                         ~bpf8l = ~bpl+~bph+~bph+~bph+~bph+~bph+~bph+~bph;*/
1007
1008                         ~bp01t = ~bpt;
1009                         ~bp02t = ~bpt;
1010                         ~bp03t = ~bpt;
1011                         ~bp04t = ~bpt;
1012                         ~bp05t = ~bpt;
1013                         ~bp06t = ~bpt;
1014                         ~bp07t = ~bpt;
1015                         ~bp08t = ~bpt;
1016                         ~bpf1t = ~bpt+~bpw;
1017                         ~bpf2t = ~bpt+~bpw;
1018                         ~bpf3t = ~bpt+~bpw;
1019                         ~bpf4t = ~bpt+~bpw;
1020                         ~bpf5t = ~bpt+~bpw;
1021                         ~bpf6t = ~bpt+~bpw;
1022                         ~bpf7t = ~bpt+~bpw;
1023                         ~bpf8t = ~bpt+~bpw;
1024                         /*~bp01t = ~bpt;
1025                         ~bp02t = ~bpt+~bpw;
1026                         ~bp03t = ~bpt;
1027                         ~bp04t = ~bpt+~bpw;
1028                         ~bp05t = ~bpt;
1029                         ~bp06t = ~bpt+~bpw;
1030                         ~bp07t = ~bpt;
1031                         ~bp08t = ~bpt+~bpw;
1032                         ~bpf1t = ~bpt;
1033                         ~bpf2t = ~bpt+~bpw;
1034                         ~bpf3t = ~bpt;
1035                         ~bpf4t = ~bpt+~bpw;
1036                         ~bpf5t = ~bpt;
1037                         ~bpf6t = ~bpt+~bpw;
1038                         ~bpf7t = ~bpt;
1039                         ~bpf8t = ~bpt+~bpw;*/
1040
1041                         ~bp01h = ~bph;
1042                         ~bp02h = ~bph;
1043                         ~bp03h = ~bph;
1044                         ~bp04h = ~bph;
1045                         ~bp05h = ~bph;
1046                         ~bp06h = ~bph;
1047                         ~bp07h = ~bph;
1048                         ~bp08h = ~bph;
1049                         ~bpf1h = ~bph;
1050                         ~bpf2h = ~bph;
1051                         ~bpf3h = ~bph;
1052                         ~bpf4h = ~bph;
1053                         ~bpf5h = ~bph;
1054                         ~bpf6h = ~bph;
1055                         ~bpf7h = ~bph;
1056                         ~bpf8h = ~bph;
1057
1058                         ~bp01w = ~bpw;
1059                         ~bp02w = ~bpw;
1060                         ~bp03w = ~bpw;
1061                         ~bp04w = ~bpw;
1062                         ~bp05w = ~bpw;
1063                         ~bp06w = ~bpw;
1064                         ~bp07w = ~bpw;
1065                         ~bp08w = ~bpw;
1066                         ~bpf1w = ~bpw;
1067                         ~bpf2w = ~bpw;
1068                         ~bpf3w = ~bpw;
1069                         ~bpf4w = ~bpw;
1070                         ~bpf5w = ~bpw;
1071                         ~bpf6w = ~bpw;
1072                         ~bpf7w = ~bpw;
1073                         ~bpf8w = ~bpw;
1074
1075                         ~tspw=280+210;
1076                         ~tsph=280+210/~gm;
1077                         ~tspl=Window.screenBounds.width-~tspw;
1078                         ~tspt=~bpt-310;
1079
1080                         ~bplaceo1 = Button.new(w,Rect(~bp01l,~bp01t,~bp01h,~bp01w)).states_([["o1",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
1081
1082                                 if(~ts.value == 1,
1083                                         {if(~tst == nil, {nil}, {~tst.close;});
1084                                                 ~timevals.value;
1085                                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time1o = 0;
1086                                                 ~timer = Routine({inf.do({
1087                                                         ~time1o =
1088                                                         ~time1o+0.01; ~slot = "o1_"+~time1o.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
1089                                         {nil});
1090
1091                                 [~f1=fp1,~f2=fp2,~f3=fp3,~f4=fp4,~f5=fp5,~f6=fp6,~f7=fp7];
1092
1093                                 ~synthopen.value;
1094                                 ~currentsynth = "o1"; ~synthmonitorfunc.value;
1095                         });
1096
1097                         ~bplaceo2 = Button.new(w,Rect(~bp02l,~bp02t,~bp02h,~bp02w)).states_([["o2",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
1098
1099                                 if(~ts.value == 1,
1100                                         {if(~tst == nil, {nil}, {~tst.close;});
1101                                                 ~timevals.value;
1102                                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time2o = 0;
1103                                                 ~timer = Routine({inf.do({
1104                                                         ~time2o =
1105                                                         ~time2o+0.01; ~slot = "o2_"+~time2o.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
1106                                         {nil});
1107
1108                                 [~f1=fp1b,~f2=fp2b,~f3=fp3b,~f4=fp4b,~f5=fp5b,~f6=fp6b,~f7=fp7b];
1109
1110                                 ~synthopen.value;
1111                                 ~currentsynth = "o2"; ~synthmonitorfunc.value;
1112                         });
1113                         ~bplaceo3 = Button.new(w,Rect(~bp03l,~bp03t,~bp03h,~bp03w)).states_([["o3",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
1114
1115                                 if(~ts.value == 1,
1116                                         {if(~tst == nil, {nil}, {~tst.close;});
1117                                                 ~timevals.value;
1118                                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time3o = 0;
1119                                                 ~timer = Routine({inf.do({
1120                                                         ~time3o =
1121                                                         ~time3o+0.01; ~slot = "o3_"+~time3o.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
1122                                         {nil});
1123
1124                                 [~f1=fp1c,~f2=fp2c,~f3=fp3c,~f4=fp4c,~f5=fp5c,~f6=fp6c,~f7=fp7c];
1125
1126                                 ~synthopen.value;
1127                                 ~currentsynth = "o3"; ~synthmonitorfunc.value;
1128                         });
1129                         ~bplaceo4 = Button.new(w,Rect(~bp04l,~bp04t,~bp04h,~bp04w)).states_([["o4",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
1130
1131                                 if(~ts.value == 1,
1132                                         {if(~tst == nil, {nil}, {~tst.close;});
1133                                                 ~timevals.value;
1134                                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time4o = 0;
1135                                                 ~timer = Routine({inf.do({
1136                                                         ~time4o =
1137                                                         ~time4o+0.01; ~slot = "o4_"+~time4o.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
1138                                         {nil});
1139
1140                                 [~f1=fp1d,~f2=fp2d,~f3=fp3d,~f4=fp4d,~f5=fp5d,~f6=fp6d,~f7=fp7d];
1141
1142                                 ~synthopen.value;
1143                                 ~currentsynth = "o4"; ~synthmonitorfunc.value;
1144                         });
1145
1146                         ~bplaceo5 = Button.new(w,Rect(~bp05l,~bp05t,~bp05h,~bp05w)).states_([["o5",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
1147
1148                                 if(~ts.value == 1,
1149                                         {if(~tst == nil, {nil}, {~tst.close;});
1150                                                 ~timevals.value;
1151                                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time5o = 0;
1152                                                 ~timer = Routine({inf.do({
1153                                                         ~time5o =
1154                                                         ~time5o+0.01; ~slot = "o5_"+~time5o.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
1155                                         {nil});
1156
1157                                 [~f1=fp1e,~f2=fp2e,~f3=fp3e,~f4=fp4e,~f5=fp5e,~f6=fp6e,~f7=fp7e];
1158
1159                                 ~synthopen.value;
1160                                 ~currentsynth = "o5"; ~synthmonitorfunc.value;
1161                         });
1162                         ~bplaceo6 = Button.new(w,Rect(~bp06l,~bp06t,~bp06h,~bp06w)).states_([["o6",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
1163
1164                                 if(~ts.value == 1,
1165                                         {if(~tst == nil, {nil}, {~tst.close;});
1166                                                 ~timevals.value;
1167                                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time6o = 0;
1168                                                 ~timer = Routine({inf.do({
1169                                                         ~time6o =
1170                                                         ~time6o+0.01; ~slot = "o6_"+~time6o.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
1171                                         {nil});
1172
1173                                 [~f1=fp1f,~f2=fp2f,~f3=fp3f,~f4=fp4f,~f5=fp5f,~f6=fp6f,~f7=fp7f];
1174
1175                                 ~synthopen.value;
1176                                 ~currentsynth = "o6"; ~synthmonitorfunc.value;
1177                         });
1178                         ~bplaceo7 = Button.new(w,Rect(~bp07l,~bp07t,~bp07h,~bp07w)).states_([["o7",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
1179
1180                                 if(~ts.value == 1,
1181                                         {if(~tst == nil, {nil}, {~tst.close;});
1182                                                 ~timevals.value;
1183                                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time7o = 0;
1184                                                 ~timer = Routine({inf.do({
1185                                                         ~time7o =
1186                                                         ~time7o+0.01; ~slot = "o7_"+~time7o.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
1187                                         {nil});
1188
1189                                 [~f1=fp1g,~f2=fp2g,~f3=fp3g,~f4=fp4g,~f5=fp5g,~f6=fp6g,~f7=fp7g];
1190
1191                                 ~synthopen.value;
1192                                 ~currentsynth = "o7"; ~synthmonitorfunc.value;
1193                         });
1194                         ~bplaceo8 = Button.new(w,Rect(~bp08l,~bp08t,~bp08h,~bp08w)).states_([["o8",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
1195
1196                                 if(~ts.value == 1,
1197                                         {if(~tst == nil, {nil}, {~tst.close;});
1198                                                 ~timevals.value;
1199                                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time8o = 0;
1200                                                 ~timer = Routine({inf.do({
1201                                                         ~time8o =
1202                                                         ~time8o+0.01; ~slot = "o8_"+~time8o.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
1203                                         {nil});
1204
1205                                 [~f1=fp1h,~f2=fp2h,~f3=fp3h,~f4=fp4h,~f5=fp5h,~f6=fp6h,~f7=fp7h];
1206
1207                                 ~synthopen.value;
1208                                 ~currentsynth = "o8"; ~synthmonitorfunc.value;
1209                         });
1210                         ~bplacef1 = Button.new(w,Rect(~bpf1l,~bpf1t,~bpf1h,~bpf1w)).states_([["f1",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
1211
1212                                 if(~ts.value == 1,
1213                                         {if(~tst == nil, {nil}, {~tst.close;});
1214                                                 ~timevals.value;
1215                                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time1f = 0;
1216                                                 ~timer = Routine({inf.do({
1217                                                         ~time1f =
1218                                                         ~time1f+0.01; ~slot = "f1_"+~time1f.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
1219                                         {nil});
1220
1221                                 [~f1=fp1,~f2=fp2,~f3=fp3,~f4=fp4,~f5=fp5,~f6=fp6,~f7=fp7];
1222
1223                                 ~synthflow.value;
1224                                 ~currentsynth = "f1"; ~synthmonitorfunc.value;
1225                         });
1226                         ~bplacef2 = Button.new(w,Rect(~bpf2l,~bpf2t,~bpf2h,~bpf2w)).states_([["f2",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
1227
1228                                 if(~ts.value == 1,
1229                                         {if(~tst == nil, {nil}, {~tst.close;});
1230                                                 ~timevals.value;
1231                                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time2f = 0;
1232                                                 ~timer = Routine({inf.do({
1233                                                         ~time2f =
1234                                                         ~time2f+0.01; ~slot = "f2_"+~time2f.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
1235                                         {nil});
1236
1237                                 [~f1=fp1b,~f2=fp2b,~f3=fp3b,~f4=fp4b,~f5=fp5b,~f6=fp6b,~f7=fp7b];
1238
1239                                 ~synthflow.value;
1240                                 ~currentsynth = "f2"; ~synthmonitorfunc.value;
1241                         });
1242
1243                         ~bplacef3 = Button.new(w,Rect(~bpf3l,~bpf3t,~bpf3h,~bpf3w)).states_([["f3",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
1244
1245                                 if(~ts.value == 1,
1246                                         {if(~tst == nil, {nil}, {~tst.close;});
1247                                                 ~timevals.value;
1248                                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time3f = 0;
1249                                                 ~timer = Routine({inf.do({
1250                                                         ~time3f =
1251                                                         ~time3f+0.01; ~slot = "f3_"+~time3f.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
1252                                         {nil});
1253
1254                                 [~f1=fp1c,~f2=fp2c,~f3=fp3c,~f4=fp4c,~f5=fp5c,~f6=fp6c,~f7=fp7c];
1255
1256                                 ~synthflow.value;
1257                                 ~currentsynth = "f3"; ~synthmonitorfunc.value;
1258                         });
1259                         ~bplacef4 = Button.new(w,Rect(~bpf4l,~bpf4t,~bpf4h,~bpf4w)).states_([["f4",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
1260
1261                                 if(~ts.value == 1,
1262                                         {if(~tst == nil, {nil}, {~tst.close;});
1263                                                 ~timevals.value;
1264                                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time4f = 0;
1265                                                 ~timer = Routine({inf.do({
1266                                                         ~time4f =
1267                                                         ~time4f+0.01; ~slot = "f4_"+~time4f.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
1268                                         {nil});
1269
1270                                 [~f1=fp1d,~f2=fp2d,~f3=fp3d,~f4=fp4d,~f5=fp5d,~f6=fp6d,~f7=fp7d];
1271
1272                                 ~synthflow.value;
1273                                 ~currentsynth = "f4"; ~synthmonitorfunc.value;
1274                         });
1275
1276                         ~bplacef5 = Button.new(w,Rect(~bpf5l,~bpf5t,~bpf5h,~bpf5w)).states_([["f5",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
1277
1278                                 if(~ts.value == 1,
1279                                         {if(~tst == nil, {nil}, {~tst.close;});
1280                                                 ~timevals.value;
1281                                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time5f = 0;
1282                                                 ~timer = Routine({inf.do({
1283                                                         ~time5f =
1284                                                         ~time5f+0.01; ~slot = "f5_"+~time5f.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
1285                                         {nil});
1286
1287                                 [~f1=fp1e,~f2=fp2e,~f3=fp3e,~f4=fp4e,~f5=fp5e,~f6=fp6e,~f7=fp7e];
1288
1289                                 ~synthflow.value;
1290                                 ~currentsynth = "f5"; ~synthmonitorfunc.value;
1291                         });
1292
1293                         ~bplacef6 = Button.new(w,Rect(~bpf6l,~bpf6t,~bpf6h,~bpf6w)).states_([["f6",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
1294
1295                                 if(~ts.value == 1,
1296                                         {if(~tst == nil, {nil}, {~tst.close;});
1297                                                 ~timevals.value;
1298                                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time6f = 0;
1299                                                 ~timer = Routine({inf.do({
1300                                                         ~time6f =
1301                                                         ~time6f+0.01; ~slot = "f6_"+~time6f.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
1302                                         {nil});
1303
1304                                 [~f1=fp1f,~f2=fp2f,~f3=fp3f,~f4=fp4f,~f5=fp5f,~f6=fp6f,~f7=fp7f];
1305
1306                                 ~synthflow.value;
1307                                 ~currentsynth = "f6"; ~synthmonitorfunc.value;
1308                         });
1309
1310
1311                         ~bplacef7 = Button.new(w,Rect(~bpf7l,~bpf7t,~bpf7h,~bpf7w)).states_([["f7",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
1312
1313                                 if(~ts.value == 1,
1314                                         {if(~tst == nil, {nil}, {~tst.close;});
1315                                                 ~timevals.value;
1316                                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time7f = 0;
1317                                                 ~timer = Routine({inf.do({
1318                                                         ~time7f =
1319                                                         ~time7f+0.01; ~slot = "f7_"+~time7f.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
1320                                         {nil});
1321
1322                                 [~f1=fp1g,~f2=fp2g,~f3=fp3g,~f4=fp4g,~f5=fp5g,~f6=fp6g,~f7=fp7g];
1323
1324                                 ~synthflow.value;
1325                                 ~currentsynth = "f7"; ~synthmonitorfunc.value;
1326                         });
1327                         ~bplacef8 = Button.new(w,Rect(~bpf8l,~bpf8t,~bpf8h,~bpf8w)).states_([["f8",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
1328
1329                                 if(~ts.value == 1,
1330                                         {if(~tst == nil, {nil}, {~tst.close;});
1331                                                 ~timevals.value;
1332                                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time8f = 0;
1333                                                 ~timer = Routine({inf.do({
1334                                                         ~time8f =
1335                                                         ~time8f+0.01; ~slot = "f8_"+~time8f.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
1336                                         {nil});
1337
1338                                 [~f1=fp1h,~f2=fp2h,~f3=fp3h,~f4=fp4h,~f5=fp5h,~f6=fp6h,~f7=fp7h];
1339
1340                                 ~synthflow.value;
1341                                 ~currentsynth = "f8"; ~synthmonitorfunc.value;
1342                         });
1343                         ~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;
1344
1345                                 if(~ts.value == 1,
1346                                         {if(~tst == nil, {nil}, {~tst.close;});
1347                                                 ~timevals.value;
1348                                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time1s = 0;
1349                                                 ~timer = Routine({inf.do({
1350                                                         ~time1s =
1351                                                         ~time1s+0.01; ~slot = "s1_"+~time1s.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
1352                                         {nil});
1353
1354                                 if(~slidetime1 == nil, {~slidetime1 = 4}); if(~slidedo1 == nil, {~slidedo1 = 2000;}); ~slidecount = ~slidedo1;
1355                                 #g,h,i,j,k,l,m,n,o,p,q,r = (([ ~f1,~f2,~f3,~f4,~f5,~f6,~f7 ]-
1356                                         [ fp1,fp2,fp3,fp4,fp5,fp6,fp7 ])*(-1)/~slidedo1);
1357
1358                                 ~slidetime =~slidetime1; ~slidedo = ~slidedo1;
1359
1360                                 ~slideroutine.stop;
1361
1362                                 ~synthslide.value;
1363                                 ~currentsynth = "s1"; ~synthmonitorfunc.value;
1364
1365                         });
1366                         ~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;
1367
1368                                 if(~ts.value == 1,
1369                                         {if(~tst == nil, {nil}, {~tst.close;});
1370                                                 ~timevals.value;
1371                                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time2s = 0;
1372                                                 ~timer = Routine({inf.do({
1373                                                         ~time2s =
1374                                                         ~time2s+0.01; ~slot = "s2_"+~time2s.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
1375                                         {nil});
1376
1377
1378                                 if(~slidetime2 == nil, {~slidetime2 = 4}); if(~slidedo2 == nil, {~slidedo2 = 2000;}); ~slidecount = ~slidedo2;
1379                                 #g,h,i,j,k,l,m,n,o,p,q,r = (([ ~f1,~f2,~f3,~f4,~f5,~f6,~f7 ]-
1380                                         [ fp1b,fp2b,fp3b,fp4b,fp5b,fp6b,fp7b ])*(-1)/~slidedo2);
1381
1382                                 ~slidetime = ~slidetime2; ~slidedo = ~slidedo2;
1383
1384                                 ~slideroutine.stop;
1385
1386                                 ~synthslide.value;
1387                                 ~currentsynth = "s2"; ~synthmonitorfunc.value;
1388
1389                         });
1390                         ~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;
1391
1392                                 if(~ts.value == 1,
1393                                         {if(~tst == nil, {nil}, {~tst.close;});
1394                                                 ~timevals.value;
1395                                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time3s = 0;
1396                                                 ~timer = Routine({inf.do({
1397                                                         ~time3s =
1398                                                         ~time3s+0.01; ~slot = "s3_"+~time3s.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
1399                                         {nil});
1400
1401
1402                                 if(~slidetime3 == nil, {~slidetime3 = 4}); if(~slidedo3 == nil, {~slidedo3 = 2000;}); ~slidecount = ~slidedo3;
1403                                 #g,h,i,j,k,l,m,n,o,p,q,r = (([ ~f1,~f2,~f3,~f4,~f5,~f6,~f7 ]-
1404                                         [ fp1c,fp2c,fp3c,fp4c,fp5c,fp6c,fp7c ])*(-1)/~slidedo3);
1405
1406                                 ~slidetime = ~slidetime3; ~slidedo = ~slidedo3;
1407
1408                                 ~slideroutine.stop;
1409
1410                                 ~synthslide.value;
1411                                 ~currentsynth = "s3"; ~synthmonitorfunc.value;
1412
1413                         });
1414                         ~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;
1415
1416                                 if(~ts.value == 1,
1417                                         {if(~tst == nil, {nil}, {~tst.close;});
1418                                                 ~timevals.value;
1419                                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time4s = 0;
1420                                                 ~timer = Routine({inf.do({
1421                                                         ~time4s =
1422                                                         ~time4s+0.01; ~slot = "s4_"+~time4s.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
1423                                         {nil});
1424
1425
1426                                 if(~slidetime4 == nil, {~slidetime4 = 4}); if(~slidedo4 == nil, {~slidedo4 = 2000;}); ~slidecount = ~slidedo4;
1427                                 #g,h,i,j,k,l,m,n,o,p,q,r = (([ ~f1,~f2,~f3,~f4,~f5,~f6,~f7 ]-
1428                                         [ fp1d,fp2d,fp3d,fp4d,fp5d,fp6d,fp7d ])*(-1)/~slidedo4);
1429
1430                                 ~slidetime = ~slidetime4; ~slidedo = ~slidedo4;
1431
1432                                 ~slideroutine.stop;
1433
1434                                 ~synthslide.value;
1435                                 ~currentsynth = "s4"; ~synthmonitorfunc.value;
1436
1437                         });
1438                         ~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;
1439
1440                                 if(~ts.value == 1,
1441                                         {if(~tst == nil, {nil}, {~tst.close;});
1442                                                 ~timevals.value;
1443                                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time5s = 0;
1444                                                 ~timer = Routine({inf.do({
1445                                                         ~time5s =
1446                                                         ~time5s+0.01; ~slot = "s5_"+~time5s.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
1447                                         {nil});
1448
1449
1450                                 if(~slidetime5 == nil, {~slidetime5 = 4}); if(~slidedo5 == nil, {~slidedo5 = 2000;}); ~slidecount = ~slidedo5;
1451                                 #g,h,i,j,k,l,m,n,o,p,q,r = (([ ~f1,~f2,~f3,~f4,~f5,~f6,~f7 ]-
1452                                         [ fp1e,fp2e,fp3e,fp4e,fp5e,fp6e,fp7e ])*(-1)/~slidedo5);
1453
1454                                 ~slidetime = ~slidetime5; ~slidedo = ~slidedo5;
1455
1456                                 ~slideroutine.stop;
1457
1458                                 ~synthslide.value;
1459                                 ~currentsynth = "s5"; ~synthmonitorfunc.value;
1460
1461                         });
1462                         ~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;
1463
1464                                 if(~ts.value == 1,
1465                                         {if(~tst == nil, {nil}, {~tst.close;});
1466                                                 ~timevals.value;
1467                                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time6s = 0;
1468                                                 ~timer = Routine({inf.do({
1469                                                         ~time6s =
1470                                                         ~time6s+0.01; ~slot = "s6_"+~time6s.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
1471                                         {nil});
1472
1473
1474                                 if(~slidetime6 == nil, {~slidetime6 = 4}); if(~slidedo6 == nil, {~slidedo6 = 2000;}); ~slidecount = ~slidedo6;
1475                                 #g,h,i,j,k,l,m,n,o,p,q,r = (([ ~f1,~f2,~f3,~f4,~f5,~f6,~f7 ]-
1476                                         [ fp1f,fp2f,fp3f,fp4f,fp5f,fp6f,fp7f ])*(-1)/~slidedo6);
1477
1478                                 ~slidetime = ~slidetime6; ~slidedo = ~slidedo6;
1479                                 ~slideroutine.stop;
1480
1481                                 ~synthslide.value;
1482                                 ~currentsynth = "s6"; ~synthmonitorfunc.value;
1483
1484                         });
1485                         ~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;
1486
1487                                 if(~ts.value == 1,
1488                                         {if(~tst == nil, {nil}, {~tst.close;});
1489                                                 ~timevals.value;
1490                                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time7s = 0;
1491                                                 ~timer = Routine({inf.do({
1492                                                         ~time7s =
1493                                                         ~time7s+0.01; ~slot = "s7_"+~time7s.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
1494                                         {nil});
1495
1496
1497                                 if(~slidetime7 == nil, {~slidetime7 = 4}); if(~slidedo7 == nil, {~slidedo7 = 2000;}); ~slidecount = ~slidedo7;
1498                                 #g,h,i,j,k,l,m,n,o,p,q,r = (([ ~f1,~f2,~f3,~f4,~f5,~f6,~f7 ]-
1499                                         [ fp1g,fp2g,fp3g,fp4g,fp5g,fp6g,fp7g ])*(-1)/~slidedo7);
1500
1501                                 ~slidetime = ~slidetime7; ~slidedo = ~slidedo7;
1502                                 ~slideroutine.stop;
1503
1504                                 ~synthslide.value;
1505                                 ~currentsynth = "s7"; ~synthmonitorfunc.value;
1506
1507                         });
1508                         ~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;
1509
1510                                 if(~ts.value == 1,
1511                                         {if(~tst == nil, {nil}, {~tst.close;});
1512                                                 ~timevals.value;
1513                                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time8s = 0;
1514                                                 ~timer = Routine({inf.do({
1515                                                         ~time8s =
1516                                                         ~time8s+0.01; ~slot = "s8_"+~time8s.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
1517                                         {nil});
1518
1519
1520                                 if(~slidetime8 == nil, {~slidetime8 = 4}); if(~slidedo8 == nil, {~slidedo8 = 2000;}); ~slidecount = ~slidedo8;
1521                                 #g,h,i,j,k,l,m,n,o,p,q,r = (([ ~f1,~f2,~f3,~f4,~f5,~f6,~f7 ]-
1522                                         [ fp1h,fp2h,fp3h,fp4h,fp5h,fp6h,fp7h])*(-1)/~slidedo8);
1523
1524                                 ~slidetime = ~slidetime8; ~slidedo = ~slidedo8;
1525
1526                                 ~slideroutine.stop;
1527
1528                                 ~synthslide.value;
1529                                 ~currentsynth = "s8"; ~synthmonitorfunc.value;
1530                         });
1531
1532                         if(~slidetimeall == nil, {~slidetimeall = 1});
1533                         if(~slidetime1 == nil, {~slidetime1 = 1});
1534                         if(~slidetime2 == nil, {~slidetime2 = 1});
1535                         if(~slidetime3 == nil, {~slidetime3 = 1});
1536                         if(~slidetime4 == nil, {~slidetime4 = 1});
1537                         if(~slidetime5 == nil, {~slidetime5 = 1});
1538                         if(~slidetime6 == nil, {~slidetime6 = 1});
1539                         if(~slidetime7 == nil, {~slidetime7 = 1});
1540                         if(~slidetime8 == nil, {~slidetime8 = 1});
1541
1542                         if(~slidedoall == nil, {~slidedoall = 432});
1543                         if(~slidedo1 == nil, {~slidedo1 = 432});
1544                         if(~slidedo2 == nil, {~slidedo2 = 432});
1545                         if(~slidedo3 == nil, {~slidedo3 = 432});
1546                         if(~slidedo4 == nil, {~slidedo4 = 432});
1547                         if(~slidedo5 == nil, {~slidedo5 = 432});
1548                         if(~slidedo6 == nil, {~slidedo6 = 432});
1549                         if(~slidedo7 == nil, {~slidedo7 = 432});
1550                         if(~slidedo8 == nil, {~slidedo8 = 432});
1551
1552
1553                         ~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;
1554
1555                                 if(button.value == 1, {
1556                                         ({
1557                                                 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;
1558                                                 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;
1559                                                 ~slideview = View(w, Rect(Window.screenBounds.width-(340+46),Window.screenBounds.height-(340+46/1.6180339887499)-110,340+46,340+46/1.6180339887499)).front;
1560                                                 /*w.view.decorator=FlowLayout(w.view.bounds);
1561                                                 w.view.decorator.gap=2@2;*/
1562
1563                                                 tall = StaticText(~slideview, Rect(lefttime , top=top, width, height)).background_(Color.black).string_("all time").stringColor_(Color.white);
1564                                                 t1 = StaticText(~slideview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("s1 time").stringColor_(Color.white);
1565                                                 t2 = StaticText(~slideview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("s2 time").stringColor_(Color.white);
1566                                                 t3 = StaticText(~slideview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("s3 time").stringColor_(Color.white);
1567                                                 t4 = StaticText(~slideview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("s4 time").stringColor_(Color.white);
1568                                                 t5 = StaticText(~slideview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("s5 time").stringColor_(Color.white);
1569                                                 t6 = StaticText(~slideview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("s6 time").stringColor_(Color.white);
1570                                                 t7 = StaticText(~slideview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("s7 time").stringColor_(Color.white);
1571                                                 t8 = StaticText(~slideview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("s8 time").stringColor_(Color.white);
1572
1573                                                 top = 0;
1574
1575                                                 stall=NumberBox(~slideview, Rect(lefttimebox , top=top, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~slidetimeall);
1576                                                 st1=NumberBox(~slideview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~slidetime1);
1577                                                 st2=NumberBox(~slideview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~slidetime2);
1578                                                 st3=NumberBox(~slideview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~slidetime3);
1579                                                 st4=NumberBox(~slideview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~slidetime4);
1580                                                 st5=NumberBox(~slideview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~slidetime5);
1581                                                 st6=NumberBox(~slideview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~slidetime6);
1582                                                 st7=NumberBox(~slideview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~slidetime7);
1583                                                 st8=NumberBox(~slideview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~slidetime8);
1584
1585                                                 top = 0;
1586
1587                                                 iall = StaticText(~slideview, Rect(leftdo , top=top, width, height)).background_(Color.black).string_("all incr").stringColor_(Color.white);
1588                                                 i1 = StaticText(~slideview, Rect(leftdo , top=top+height, width, height)).background_(Color.black).string_("s1 incr").stringColor_(Color.white);
1589                                                 i2 = StaticText(~slideview, Rect(leftdo , top=top+height, width, height)).background_(Color.black).string_("s2 incr").stringColor_(Color.white);
1590                                                 i3 = StaticText(~slideview, Rect(leftdo , top=top+height, width, height)).background_(Color.black).string_("s3 incr").stringColor_(Color.white);
1591                                                 i4 = StaticText(~slideview, Rect(leftdo , top=top+height, width, height)).background_(Color.black).string_("s4 incr").stringColor_(Color.white);
1592                                                 i5 = StaticText(~slideview, Rect(leftdo , top=top+height, width, height)).background_(Color.black).string_("s5 incr").stringColor_(Color.white);
1593                                                 i6 = StaticText(~slideview, Rect(leftdo , top=top+height, width, height)).background_(Color.black).string_("s6 incr").stringColor_(Color.white);
1594                                                 i7 = StaticText(~slideview, Rect(leftdo , top=top+height, width, height)).background_(Color.black).string_("s7 incr").stringColor_(Color.white);
1595                                                 i8 = StaticText(~slideview, Rect(leftdo , top=top+height, width, height)).background_(Color.black).string_("s8 incr").stringColor_(Color.white);
1596
1597                                                 top = 0;
1598
1599                                                 siall=NumberBox(~slideview, Rect(leftdobox , top=top, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~slidedoall);
1600                                                 si1=NumberBox(~slideview, Rect(leftdobox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~slidedo1);
1601                                                 ~si2=NumberBox(~slideview, Rect(leftdobox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~slidedo2);
1602                                                 ~si3=NumberBox(~slideview, Rect(leftdobox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~slidedo3);
1603                                                 ~si4=NumberBox(~slideview, Rect(leftdobox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~slidedo4);
1604                                                 ~si5=NumberBox(~slideview, Rect(leftdobox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~slidedo5);
1605                                                 ~si6=NumberBox(~slideview, Rect(leftdobox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~slidedo6);
1606                                                 ~si7=NumberBox(~slideview, Rect(leftdobox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~slidedo7);
1607                                                 ~si8=NumberBox(~slideview, Rect(leftdobox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~slidedo8);
1608
1609                                                 stall.action_({arg val;
1610                                                         ~slidetimeall = val.value;
1611                                                         ~slidetime1 = val.value;
1612                                                         ~slidetime2 = val.value;
1613                                                         ~slidetime3 = val.value;
1614                                                         ~slidetime4 = val.value;
1615                                                         ~slidetime5 = val.value;
1616                                                         ~slidetime6 = val.value;
1617                                                         ~slidetime7 = val.value;
1618                                                         ~slidetime8 = val.value;
1619                                                         ~slideview.close; ~slidevals.valueAction_(1);
1620                                                 });
1621                                                 st1.action_({arg val; ~slidetime1 = val.value;});
1622                                                 st2.action_({arg val; ~slidetime2 = val.value;});
1623                                                 st3.action_({arg val; ~slidetime3 = val.value;});
1624                                                 st4.action_({arg val; ~slidetime4 = val.value;});
1625                                                 st5.action_({arg val; ~slidetime5 = val.value;});
1626                                                 st6.action_({arg val; ~slidetime6 = val.value;});
1627                                                 st7.action_({arg val; ~slidetime7 = val.value;});
1628                                                 st8.action_({arg val; ~slidetime8 = val.value;});
1629
1630                                                 siall.action_({arg val;
1631                                                         ~slidedoall = val.value;
1632                                                         ~slidedo1 = val.value;
1633                                                         ~slidedo2 = val.value;
1634                                                         ~slidedo3 = val.value;
1635                                                         ~slidedo4 = val.value;
1636                                                         ~slidedo5 = val.value;
1637                                                         ~slidedo6 = val.value;
1638                                                         ~slidedo7 = val.value;
1639                                                         ~slidedo8 = val.value;
1640                                                         ~slideview.close; ~slidevals.valueAction_(1);
1641                                                 });
1642                                                 si1.action_({arg val; ~slidedo1 = val.value;});
1643                                                 ~si2.action_({arg val; ~slidedo2 = val.value;});
1644                                                 ~si3.action_({arg val; ~slidedo3 = val.value;});
1645                                                 ~si4.action_({arg val; ~slidedo4 = val.value;});
1646                                                 ~si5.action_({arg val; ~slidedo5 = val.value;});
1647                                                 ~si6.action_({arg val; ~slidedo6 = val.value;});
1648                                                 ~si7.action_({arg val; ~slidedo7 = val.value;});
1649                                                 ~si8.action_({arg val; ~slidedo8 = val.value;});
1650
1651                                                 ~slideview.background_(Color.black);
1652
1653                                                 ~closeslidebutton = Button.new(~slideview,Rect(220, top+40, 40, 40/~gm)).states_([["close",Color.white,Color.black]]).action_({arg button;
1654
1655                                                         ~slideview.close; ~slidevals.value = 0;
1656                                                 });
1657
1658                                         }.value);
1659
1660                                         ~slideview.front;
1661                                 }, {~slideview.close});
1662                         });
1663
1664                         mute1 = Button.new(w,Rect(~bpl+(16*1),~bpt+69+5,16,16/1.6180339887499)).states_([["1",Color.white,Color.black],["",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
1665                                 case
1666                                 {~la1.isRunning == true}{
1667                                         if(button.value == 0, {
1668                                                 (~vol1 = ~vol;
1669                                                         1.do({
1670                                                                 ~la1.set(\vol, ~vol1);
1671                                                 }););
1672                                                 }, {(~vol1 = 0;
1673                                                         1.do({
1674                                                                 ~la1.set(\vol, ~vol1);
1675                                                         }););
1676                                         });
1677                                 }
1678                                 {~la.isRunning == true}{
1679                                         if(button.value == 0, {
1680                                                 (~vol1 = ~vol;
1681                                                         1.do({
1682                                                                 ~la.set(\vol, ~vol1);
1683                                                 }););
1684                                                 }, {(~vol1 = 0;
1685                                                         1.do({
1686                                                                 ~la.set(\vol, ~vol1);
1687                                                         }););
1688                                         });
1689                                 };
1690                         });
1691
1692                         mute2 = Button.new(w,Rect(~bpl+(16*2),~bpt+69+5,16,16/1.6180339887499)).states_([["2",Color.white,Color.black],["",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
1693                                 case
1694                                 {~la1.isRunning == true}{
1695                                         if(button.value == 0, {
1696                                                 (~vol2 = ~vol;
1697                                                         1.do({
1698                                                                 ~lb1.set(\vol, ~vol2);
1699                                                 }););
1700                                                 }, {(~vol2 = 0;
1701                                                         1.do({
1702                                                                 ~lb1.set(\vol, ~vol2);
1703                                                         }););
1704                                         });
1705                                 }
1706                                 {~la.isRunning == true}{
1707                                         if(button.value == 0, {
1708                                                 (~vol2 = ~vol;
1709                                                         1.do({
1710                                                                 ~lb.set(\vol, ~vol2);
1711                                                 }););
1712                                                 }, {(~vol2 = 0;
1713                                                         1.do({
1714                                                                 ~lb.set(\vol, ~vol2);
1715                                                         }););
1716                                         });
1717                                 };
1718                         });
1719                         mute3 = Button.new(w,Rect(~bpl+(16*3),~bpt+69+5,16,16/1.6180339887499)).states_([["3",Color.white,Color.black],["",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
1720                                 case
1721                                 {~la1.isRunning == true}{
1722                                         if(button.value == 0, {
1723                                                 (~vol3 = ~vol;
1724                                                         1.do({
1725                                                                 ~lc1.set(\vol, ~vol3);
1726                                                 }););
1727                                                 }, {(~vol3 = 0;
1728                                                         1.do({
1729                                                                 ~lc1.set(\vol, ~vol3);
1730                                                         }););
1731                                         });
1732                                 }
1733                                 {~la.isRunning == true}{
1734                                         if(button.value == 0, {
1735                                                 (~vol3 = ~vol;
1736                                                         1.do({
1737                                                                 ~lc.set(\vol, ~vol3);
1738                                                 }););
1739                                                 }, {(~vol3 = 0;
1740                                                         1.do({
1741                                                                 ~lc.set(\vol, ~vol3);
1742                                                         }););
1743                                         });
1744                                 };
1745                         });
1746                         mute4 = Button.new(w,Rect(~bpl+(16*4),~bpt+69+5,16,16/1.6180339887499)).states_([["4",Color.white,Color.black],["",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
1747                                 case
1748                                 {~la1.isRunning == true}{
1749                                         if(button.value == 0, {
1750                                                 (~vol4 = ~vol;
1751                                                         1.do({
1752                                                                 ~ld1.set(\vol, ~vol4);
1753                                                 }););
1754                                                 }, {(~vol4 = 0;
1755                                                         1.do({
1756                                                                 ~ld1.set(\vol, ~vol4);
1757                                                         }););
1758                                         });
1759                                 }
1760                                 {~la.isRunning == true}{
1761                                         if(button.value == 0, {
1762                                                 (~vol4 = ~vol;
1763                                                         1.do({
1764                                                                 ~ld.set(\vol, ~vol4);
1765                                                 }););
1766                                                 }, {(~vol4 = 0;
1767                                                         1.do({
1768                                                                 ~ld.set(\vol, ~vol4);
1769                                                         }););
1770                                         });
1771                                 };
1772                         });
1773                         mute5 = Button.new(w,Rect(~bpl+(16*5),~bpt+69+5,16,16/1.6180339887499)).states_([["5",Color.white,Color.black],["",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
1774                                 case
1775                                 {~la1.isRunning == true}{
1776                                         if(button.value == 0, {
1777                                                 (~vol5 = ~vol;
1778                                                         1.do({
1779                                                                 ~le1.set(\vol, ~vol5);
1780                                                 }););
1781                                                 }, {(~vol5 = 0;
1782                                                         1.do({
1783                                                                 ~le1.set(\vol, ~vol5);
1784                                                         }););
1785                                         });
1786                                 }
1787                                 {~la.isRunning == true}{
1788                                         if(button.value == 0, {
1789                                                 (~vol5 = ~vol;
1790                                                         1.do({
1791                                                                 ~le.set(\vol, ~vol5);
1792                                                 }););
1793                                                 }, {(~vol5 = 0;
1794                                                         1.do({
1795                                                                 ~le.set(\vol, ~vol5);
1796                                                         }););
1797                                         });
1798                                 };
1799                         });
1800                         mute6 = Button.new(w,Rect(~bpl+(16*6),~bpt+69+5,16,16/1.6180339887499)).states_([["6",Color.white,Color.black],["",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
1801                                 case
1802                                 {~la1.isRunning == true}{
1803                                         if(button.value == 0, {
1804                                                 (~vol6 = ~vol;
1805                                                         1.do({
1806                                                                 ~lf1.set(\vol, ~vol6);
1807                                                 }););
1808                                                 }, {(~vol6 = 0;
1809                                                         1.do({
1810                                                                 ~lf1.set(\vol, ~vol6);
1811                                                         }););
1812                                         });
1813                                 }
1814                                 {~la.isRunning == true}{
1815                                         if(button.value == 0, {
1816                                                 (~vol6 = ~vol;
1817                                                         1.do({
1818                                                                 ~lf.set(\vol, ~vol6);
1819                                                 }););
1820                                                 }, {(~vol6 = 0;
1821                                                         1.do({
1822                                                                 ~lf.set(\vol, ~vol6);
1823                                                         }););
1824                                         });
1825                                 };
1826
1827                         });
1828                         mute7 = Button.new(w,Rect(~bpl+(16*7),~bpt+69+5,16,16/1.6180339887499)).states_([["7",Color.white,Color.black],["",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
1829                                 case
1830                                 {~la1.isRunning == true}{
1831                                         if(button.value == 0, {
1832                                                 (~vol7 = ~vol;
1833                                                         1.do({
1834                                                                 ~lg1.set(\vol, ~vol7);
1835                                                 }););
1836                                                 }, {(~vol7 = 0;
1837                                                         1.do({
1838                                                                 ~lg1.set(\vol, ~vol7);
1839                                                         }););
1840                                         });
1841                                 }
1842                                 {~la.isRunning == true}{
1843                                         if(button.value == 0, {
1844                                                 (~vol7 = ~vol;
1845                                                         1.do({
1846                                                                 ~lg.set(\vol, ~vol7);
1847                                                 }););
1848                                                 }, {(~vol7 = 0;
1849                                                         1.do({
1850                                                                 ~lg.set(\vol, ~vol7);
1851                                                         }););
1852                                         });
1853                                 };
1854                         });
1855
1856                         muteall = Button.new(w,Rect(~bpl+(0),~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;
1857
1858                                 if(button.value == 0, {
1859                                         mute1.value = 0;
1860                                         mute2.value = 0;
1861                                         mute3.value = 0;
1862                                         mute4.value = 0;
1863                                         mute5.value = 0;
1864                                         mute6.value = 0;
1865                                         mute7.value = 0;
1866                                         /*mute8.value = 0;
1867                                         mute9.value = 0;
1868                                         mute10.value = 0;
1869                                         mute11.value = 0;
1870                                         mute12.value = 0;*/
1871
1872                                         ~vol1 = ~vol;
1873                                         ~vol2 = ~vol;
1874                                         ~vol3 = ~vol;
1875                                         ~vol4 = ~vol;
1876                                         ~vol5 = ~vol;
1877                                         ~vol6 = ~vol;
1878                                         ~vol7 = ~vol;
1879                                         ~vol8 = ~vol;
1880                                         ~vol9 = ~vol;
1881                                         ~vol10 = ~vol;
1882                                         ~vol11 = ~vol;
1883                                         ~vol12 = ~vol;
1884                                         },
1885                                         {
1886                                                 mute1.value = 1;
1887                                                 mute2.value = 1;
1888                                                 mute3.value = 1;
1889                                                 mute4.value = 1;
1890                                                 mute5.value = 1;
1891                                                 mute6.value = 1;
1892                                                 mute7.value = 1;
1893                                                 /*mute8.value = 1;
1894                                                 mute9.value = 1;
1895                                                 mute10.value = 1;
1896                                                 mute11.value = 1;
1897                                                 mute12.value = 1;*/
1898
1899                                                 ~vol1 = 0;
1900                                                 ~vol2 = 0;
1901                                                 ~vol3 = 0;
1902                                                 ~vol4 = 0;
1903                                                 ~vol5 = 0;
1904                                                 ~vol6 = 0;
1905                                                 ~vol7 = 0;
1906                                                 ~vol8 = 0;
1907                                                 ~vol9 = 0;
1908                                                 ~vol10 = 0;
1909                                                 ~vol11 = 0;
1910                                                 ~vol12 = 0;
1911                                 });
1912                                 ~synthflow.value;
1913                         });
1914
1915                         ~menu1values = ["0.167 steps/kws","0.5 steps/kws","1 step/kws","9 steps/kws"];
1916                         case
1917                         {~menu1nval == nil}{~menu1start = ~menu1values.at(0)}
1918                         {~menu1nval == ~ngm6;}{~menu1start = ~menu1values.at(0)}
1919                         {~menu1nval == ~ngm2;}{~menu1start = ~menu1values.at(1)}
1920                         {~menu1nval == ~ngm1;}{~menu1start = ~menu1values.at(2)}
1921                         {~menu1nval == ~gm;}{~menu1start = ~menu1values.at(3)};
1922                         if(~menu1nvalstart.value == nil, {~menu1nvalstart = ~ngm6}, {~menu1nvalstart = ~menu1nval});
1923                         menu1=PopUpMenu(w,Rect(20+60*2+16+(60*2),Window.screenBounds.height-88+(30/1.6180339887499*0),60*2,60/1.6180339887499)).items_(~mvalue = (-1); [~menu1start.asString]++Array.fill(4, {~menu1values.at(~mvalue = ~mvalue+1);});).background_(Color.black).stringColor_(Color.white);
1924
1925                         ~menu2values = [ "1 kws/inst" , "2 kws/inst" , "6 kws/inst" , "8 kws/inst", "12 kws/inst", "24 kws/inst", "33 kws/inst", "36 kws/inst", "48 kws/inst", "64 kws/inst", "72 kws/inst", "88 kws/inst"];
1926                         case
1927                         {~gsinenum == nil}{~menu2start = ~menu2values.at(6)}
1928                         {~gsinenum == 1}{~menu2start = ~menu2values.at(0)}
1929                         {~gsinenum == 2}{~menu2start = ~menu2values.at(1)}
1930                         {~gsinenum == 6}{~menu2start = ~menu2values.at(2)}
1931                         {~gsinenum == 8}{~menu2start = ~menu2values.at(3)}
1932                         {~gsinenum == 12}{~menu2start = ~menu2values.at(4)}
1933                         {~gsinenum == 24}{~menu2start = ~menu2values.at(5)}
1934                         {~gsinenum == 33}{~menu2start = ~menu2values.at(6)}
1935                         {~gsinenum == 36}{~menu2start = ~menu2values.at(7)}
1936                         {~gsinenum == 48}{~menu2start = ~menu2values.at(8)}
1937                         {~gsinenum == 64}{~menu2start = ~menu2values.at(9)}
1938                         {~gsinenum == 72}{~menu2start = ~menu2values.at(10)}
1939                         {~gsinenum == 88}{~menu2start = ~menu2values.at(11)};
1940                         if(~menu2synthdefstart.value == nil, {~menu2synthdefstart = 33}, {~menu2synthdefstart = ~gsinenum});
1941                         menu2=PopUpMenu(w,Rect(20+60*2+16,Window.screenBounds.height-88+(30/1.6180339887499*0),60*2,60/1.6180339887499)).items_(~mvalue = (-1); [~menu2start.asString]++Array.fill(12, {~menu2values.at(~mvalue = ~mvalue+1);});).background_(Color.black).stringColor_(Color.white);
1942
1943                         set1=Button(w,Rect(20+60*2+16+180,Window.screenBounds.height-52+(16/1.6180339887499*0),60,60/1.6180339887499)).states_([["set",Color.white,Color.black]]).mouseDownAction_({
1944
1945                                 ~st = StaticText(w, Rect(20+60*2+16+250,Window.screenBounds.height-40, 62, 20)).background_(Color.black);
1946                                 ~st.stringColor = Color.white;
1947                                 ~st.string = "loading...";
1948                                 AppClock.sched(0.2,{
1949                                         ~st.close;
1950                                 });
1951
1952                                 AppClock.sched(0,{
1953
1954                                         if(~bfreq.value > 0, {~basefreq = ~freqmap.at(~bfreq.value - 1)}, {~basefreq = ~bfreqstart});
1955
1956                                         (#a,b,c,d,e,f = [ ~basefreq,~basefreq,~basefreq,~basefreq,~basefreq,~basefreq  ]; ~a = a; ~b = b; ~c =c; ~d = d; ~e = e;~f=f;);
1957
1958                                         case
1959                                         {menu1.value == 0}{~nval = ~menu1nvalstart; ~menu1nval = ~menu1nvalstart}
1960                                         {menu1.value == 1}{~nval = ~ngm6; ~menu1nval = ~ngm6;}
1961                                         {menu1.value == 2}{~nval = ~ngm2; ~menu1nval = ~ngm2;}
1962                                         {menu1.value == 3}{~nval = ~ngm1; ~menu1nval = ~ngm1;}
1963                                         {menu1.value == 4}{~nval = ~gm; ~menu1nval = ~gm;};
1964
1965                                         case
1966                                         {menu2.value == 0}{~gsinenum = ~menu2synthdefstart; ~gsine.value;}
1967                                         {menu2.value == 1}{~gsinenum = 1; ~gsine.value;}
1968                                         {menu2.value == 2}{~gsinenum = 2; ~gsine.value;}
1969                                         {menu2.value == 3}{~gsinenum = 6; ~gsine.value;}
1970                                         {menu2.value == 4}{~gsinenum = 8; ~gsine.value;}
1971                                         {menu2.value == 5}{~gsinenum = 12; ~gsine.value;}
1972                                         {menu2.value == 6}{~gsinenum = 24; ~gsine.value;}
1973                                         {menu2.value == 7}{~gsinenum = 33; ~gsine.value;}
1974                                         {menu2.value == 8}{~gsinenum = 36; ~gsine.value;}
1975                                         {menu2.value == 9}{~gsinenum = 48; ~gsine.value;}
1976                                         {menu2.value == 10}{~gsinenum = 64; ~gsine.value;}
1977                                         {menu2.value == 11}{~gsinenum = 72; ~gsine.value;}
1978                                         {menu2.value == 12}{~gsinenum = 88; ~gsine.value;};
1979                                 });
1980
1981                         })
1982                         .action_({
1983                         });
1984
1985                         ~midifunc = {
1986                                 ~snb = 0;
1987                                 /*~etemp = EqualTemperament(12, calibratefreq: 432, calibratenote: 69);*/
1988                                 MIDIFunc.cc({if(~snb == 0, {~snb = 1},{~snb = 0});}, ccNum: 60);
1989                                 MIDIdef.cc('l1', { |val|
1990                                         case
1991                                         {~la.isRunning == true}{
1992                                                 ~la.set(\dur, ~f1 = \dur.asSpec.map(val / 127));
1993                                         }{~la1.isRunning == true}{
1994                                                 ~la1.set(\dur, ~f1 = \dur.asSpec.map(val / 127));
1995                                         };
1996                                         ~tunefreq1 = ~f1; ~f1 = ~f1+~f1t;
1997                                         {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;);});
1998                                         }.defer;
1999                                         /*if(~snb == 1,
2000                                         {{~nb = NumberBox.new(w,Rect(20,0,60,60/~gm)).value_(~f1.value;).background_(Color.black).normalColor_(Color.white;);}.defer;},
2001                                         {if(~nb == nil, {nil},{~nb.close;~nb==nil;})});*/
2002                                 }, ccNum: [0]);
2003                                 MIDIdef.cc('l2', { |val|
2004                                         case
2005                                         {~la.isRunning == true}{
2006                                                 ~lb.set(\dur, ~f2 = \dur.asSpec.map(val / 127));
2007                                         }{~la1.isRunning == true}{
2008                                                 ~lb1.set(\dur, ~f2 = \dur.asSpec.map(val / 127));
2009                                         };
2010                                         ~tunefreq2 = ~f2; ~f2 = ~f2+~f2t;
2011                                         {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;);});
2012                                         }.defer;
2013                                 }, ccNum: [1]);
2014                                 MIDIdef.cc('l3', { |val|
2015                                         case
2016                                         {~la.isRunning == true}{
2017                                                 ~lc.set(\dur, ~f3 = \dur.asSpec.map(val / 127));
2018                                         }{~la1.isRunning == true}{
2019                                                 ~lc1.set(\dur, ~f3 = \dur.asSpec.map(val / 127));
2020                                         };
2021                                         ~tunefreq3 = ~f3; ~f3 = ~f3+~f3t;
2022                                         {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;);});
2023                                         }.defer;
2024                                 }, ccNum: 2);
2025                                 MIDIdef.cc('l4', { |val|
2026                                         case
2027                                         {~la.isRunning == true}{
2028                                                 ~ld.set(\dur, ~f4 = \dur.asSpec.map(val / 127));
2029                                         }{~la1.isRunning == true}{
2030                                                 ~ld1.set(\dur, ~f4 = \dur.asSpec.map(val / 127));
2031                                         };
2032                                         ~tunefreq4 = ~f4; ~f4 = ~f4+~f4t;
2033                                         {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;);});
2034                                         }.defer;
2035                                 }, ccNum: 3);
2036                                 MIDIdef.cc('l5', { |val|
2037                                         case
2038                                         {~la.isRunning == true}{
2039                                                 ~le.set(\dur, ~f5 = \dur.asSpec.map(val / 127));
2040                                         }{~la1.isRunning == true}{
2041                                                 ~le1.set(\dur, ~f5 = \dur.asSpec.map(val / 127));
2042                                         };
2043                                         ~tunefreq5 = ~f5; ~f5 = ~f5+~f5t;
2044                                         {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;);});
2045                                         }.defer;
2046                                 }, ccNum: 4);
2047                                 MIDIdef.cc('l6', { |val|
2048                                         case
2049                                         {~la.isRunning == true}{
2050                                                 ~lf.set(\dur, ~f6 = \dur.asSpec.map(val / 127));
2051                                         }{~la1.isRunning == true}{
2052                                                 ~lf1.set(\dur, ~f6 = \dur.asSpec.map(val / 127));
2053                                         };
2054                                         ~tunefreq6 = ~f6; ~f6 = ~f6+~f6t;
2055                                         {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;);});
2056                                         }.defer;
2057                                 }, ccNum: 5);
2058                                 MIDIdef.cc('l7', { |val|
2059                                         case
2060                                         {~la.isRunning == true}{
2061                                                 ~lg.set(\dur, ~f7 = \dur.asSpec.map(val / 127));
2062                                         }{~la1.isRunning == true}{
2063                                                 ~lg1.set(\dur, ~f7 = \dur.asSpec.map(val / 127));
2064                                         };
2065                                         ~tunefreq7 = ~f7; ~f7 = ~f7+~f7t;
2066                                         {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;);});
2067                                         }.defer;
2068                                 }, ccNum: 6);
2069
2070                                 if(~f1t == nil, {~f1t = 0});
2071                                 if(~f2t == nil, {~f2t = 0});
2072                                 if(~f3t == nil, {~f3t = 0});
2073                                 if(~f4t == nil, {~f4t = 0});
2074                                 if(~f5t == nil, {~f5t = 0});
2075                                 if(~f6t == nil, {~f6t = 0});
2076                                 if(~f7t == nil, {~f7t = 0});
2077
2078                                 MIDIFunc.cc({|val|
2079                                         ~f1 = ~f1-~f1t;
2080                                         Spec.add(\tune, ([0, ~tunefreq1*~stepratio-~tunefreq1, \lin]));
2081                                         case
2082                                         {~la.isRunning == true}{
2083                                                 ~la.set(\tune, ~f1t = \tune.asSpec.map(val / 127));
2084                                         }{~la1.isRunning == true}{
2085                                                 ~la1.set(\tune, ~f1t = \tune.asSpec.map(val / 127));
2086                                         };
2087                                         ~f1 = ~f1+~f1t;
2088                                         {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;);});
2089                                         }.defer;
2090                                 }, ccNum: 16);
2091                                 MIDIFunc.cc({|val|
2092                                         ~f2 = ~f2-~f2t;
2093                                         Spec.add(\tune, ([0, ~tunefreq2*~stepratio-~tunefreq2, \lin]));
2094                                         case
2095                                         {~la.isRunning == true}{
2096                                                 ~lb.set(\tune, ~f2t = \tune.asSpec.map(val / 127));
2097                                         }{~la1.isRunning == true}{
2098                                                 ~lb1.set(\tune, ~f2t = \tune.asSpec.map(val / 127));
2099                                         };
2100                                         ~f2 = ~f2+~f2t;
2101                                         {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;);});
2102                                         }.defer;
2103                                 }, ccNum: 17);
2104                                 MIDIFunc.cc({|val|
2105                                         ~f3 = ~f3-~f3t;
2106                                         Spec.add(\tune, ([0, ~tunefreq3*~stepratio-~tunefreq3, \lin]));
2107                                         case
2108                                         {~la.isRunning == true}{
2109                                                 ~lc.set(\tune, ~f3t = \tune.asSpec.map(val / 127));
2110                                         }{~la1.isRunning == true}{
2111                                                 ~lc1.set(\tune, ~f3t = \tune.asSpec.map(val / 127));
2112                                         };
2113                                         ~f3 = ~f3+~f3t;
2114                                         {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;);});
2115                                         }.defer;
2116                                 }, ccNum: 18);
2117                                 MIDIFunc.cc({|val|
2118                                         ~f4 = ~f4-~f4t;
2119                                         Spec.add(\tune, ([0, ~tunefreq4*~stepratio-~tunefreq4, \lin]));
2120                                         case
2121                                         {~la.isRunning == true}{
2122                                                 ~ld.set(\tune, ~f4t = \tune.asSpec.map(val / 127));
2123                                         }{~la1.isRunning == true}{
2124                                                 ~ld1.set(\tune, ~f4t = \tune.asSpec.map(val / 127));
2125                                         };
2126                                         ~f4 = ~f4+~f4t;
2127                                         {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;);});
2128                                         }.defer;
2129                                 }, ccNum: 19);
2130                                 MIDIFunc.cc({|val|
2131                                         ~f5 = ~f5-~f5t;
2132                                         Spec.add(\tune, ([0, ~tunefreq5*~stepratio-~tunefreq5, \lin]));
2133                                         case
2134                                         {~la.isRunning == true}{
2135                                                 ~le.set(\tune, ~f5t = \tune.asSpec.map(val / 127));
2136                                         }{~la1.isRunning == true}{
2137                                                 ~le1.set(\tune, ~f5t = \tune.asSpec.map(val / 127));
2138                                         };
2139                                         ~f5 = ~f5+~f5t;
2140                                         {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;);});
2141                                         }.defer;
2142                                 }, ccNum: 20);
2143                                 MIDIFunc.cc({|val|
2144                                         ~f6 = ~f6-~f6t;
2145                                         Spec.add(\tune, ([0, ~tunefreq6*~stepratio-~tunefreq6, \lin]));
2146                                         case
2147                                         {~la.isRunning == true}{
2148                                                 ~lf.set(\tune, ~f6t = \tune.asSpec.map(val / 127));
2149                                         }{~la1.isRunning == true}{
2150                                                 ~lf1.set(\tune, ~f6t = \tune.asSpec.map(val / 127));
2151                                         };
2152                                         ~f6 = ~f6+~f6t;
2153                                         {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;);});
2154                                         }.defer;
2155                                 }, ccNum: 21);
2156                                 MIDIFunc.cc({|val|
2157                                         ~f7 = ~f7-~f7t;
2158                                         Spec.add(\tune, ([0, ~tunefreq7*~stepratio-~tunefreq7, \lin]));
2159                                         case
2160                                         {~la.isRunning == true}{
2161                                                 ~lg.set(\tune, ~f7t = \tune.asSpec.map(val / 127));
2162                                         }{~la1.isRunning == true}{
2163                                                 ~lg1.set(\tune, ~f7t = \tune.asSpec.map(val / 127));
2164                                         };
2165                                         ~f7 = ~f7+~f7t;
2166                                         {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;);});
2167                                         }.defer;
2168                                 }, ccNum: 22);
2169
2170                                 MIDIFunc.cc({|val| {case{b3.value == 0}{b3.valueAction = 1};}.defer;}, ccNum: 41);
2171                                 MIDIFunc.cc({|val| {case{b3.value == 1}{b3.valueAction = 0};}.defer;}, ccNum: 42);
2172                                 MIDIFunc.cc({|val| {case{b4.value == 0}{b4.valueAction = 1};}.defer;}, ccNum: 43);
2173                                 MIDIFunc.cc({|val| {case{b4.value == 1}{b4.valueAction = 0};}.defer;}, ccNum: 44);
2174                                 /*MIDIFunc.cc({|val| {~bplaceo1.valueAction=0}.defer;}, ccNum: 32);
2175                                 MIDIFunc.cc({|val| {~bplaceo2.valueAction=0}.defer;}, ccNum: 33);
2176                                 MIDIFunc.cc({|val| {~bplaceo3.valueAction=0}.defer;}, ccNum: 34);
2177                                 MIDIFunc.cc({|val| {~bplaceo4.valueAction=0}.defer;}, ccNum: 35);
2178                                 MIDIFunc.cc({|val| {~bplaceo5.valueAction=0}.defer;}, ccNum: 36);
2179                                 MIDIFunc.cc({|val| {~bplaceo6.valueAction=0}.defer;}, ccNum: 37);
2180                                 MIDIFunc.cc({|val| {~bplaceo7.valueAction=0}.defer;}, ccNum: 38);
2181                                 MIDIFunc.cc({|val| {~bplaceo8.valueAction=0}.defer;}, ccNum: 39);
2182                                 MIDIFunc.cc({|val| {~bplacef1.valueAction=0}.defer;}, ccNum: 48);
2183                                 MIDIFunc.cc({|val| {~bplacef2.valueAction=0}.defer;}, ccNum: 49);
2184                                 MIDIFunc.cc({|val| {~bplacef3.valueAction=0}.defer;}, ccNum: 50);
2185                                 MIDIFunc.cc({|val| {~bplacef4.valueAction=0}.defer;}, ccNum: 51);
2186                                 MIDIFunc.cc({|val| {~bplacef5.valueAction=0}.defer;}, ccNum: 52);
2187                                 MIDIFunc.cc({|val| {~bplacef6.valueAction=0}.defer;}, ccNum: 53);
2188                                 MIDIFunc.cc({|val| {~bplacef7.valueAction=0}.defer;}, ccNum: 54);
2189                                 MIDIFunc.cc({|val| {~bplacef8.valueAction=0}.defer;}, ccNum: 55);
2190                                 MIDIFunc.cc({|val| {~bplaces1.valueAction=0}.defer;}, ccNum: 64);
2191                                 MIDIFunc.cc({|val| {~bplaces2.valueAction=0}.defer;}, ccNum: 65);
2192                                 MIDIFunc.cc({|val| {~bplaces3.valueAction=0}.defer;}, ccNum: 66);
2193                                 MIDIFunc.cc({|val| {~bplaces4.valueAction=0}.defer;}, ccNum: 67);
2194                                 MIDIFunc.cc({|val| {~bplaces5.valueAction=0}.defer;}, ccNum: 68);
2195                                 MIDIFunc.cc({|val| {~bplaces6.valueAction=0}.defer;}, ccNum: 69);
2196                                 MIDIFunc.cc({|val| {~bplaces7.valueAction=0}.defer;}, ccNum: 70);
2197                                 MIDIFunc.cc({|val| {~bplaces8.valueAction=0}.defer;}, ccNum: 71);
2198                                 */  MIDIFunc.cc({|val| {mute1.valueAction = 1;}.defer;}, ccNum: 48);
2199                                 MIDIFunc.cc({|val| {mute2.valueAction = 1;}.defer;}, ccNum: 49);
2200                                 MIDIFunc.cc({|val| {mute3.valueAction = 1;}.defer;}, ccNum: 50);
2201                                 MIDIFunc.cc({|val| {mute4.valueAction = 1;}.defer;}, ccNum: 51);
2202                                 MIDIFunc.cc({|val| {mute5.valueAction = 1;}.defer;}, ccNum: 52);
2203                                 MIDIFunc.cc({|val| {mute6.valueAction = 1;}.defer;}, ccNum: 53);
2204                                 MIDIFunc.cc({|val| {mute7.valueAction = 1;}.defer;}, ccNum: 54);
2205                                 MIDIFunc.cc({|val| {mute1.valueAction = 1;mute2.valueAction = 1;mute3.valueAction = 1;mute4.valueAction = 1;mute5.valueAction = 1;mute6.valueAction = 1;mute7.valueAction = 1;}.defer;}, ccNum: 55);
2206                                 MIDIFunc.cc({|val| {mute1.valueAction = 0;}.defer;}, ccNum: 32);
2207                                 MIDIFunc.cc({|val| {mute2.valueAction = 0;}.defer;}, ccNum: 33);
2208                                 MIDIFunc.cc({|val| {mute3.valueAction = 0;}.defer;}, ccNum: 34);
2209                                 MIDIFunc.cc({|val| {mute4.valueAction = 0;}.defer;}, ccNum: 35);
2210                                 MIDIFunc.cc({|val| {mute5.valueAction = 0;}.defer;}, ccNum: 36);
2211                                 MIDIFunc.cc({|val| {mute6.valueAction = 0;}.defer;}, ccNum: 37);
2212                                 MIDIFunc.cc({|val| {mute7.valueAction = 0;}.defer;}, ccNum: 38);
2213                                 MIDIFunc.cc({|val| {mute1.valueAction = 0;mute2.valueAction = 0;mute3.valueAction = 0;mute4.valueAction = 0;mute5.valueAction = 0;mute6.valueAction = 0;mute7.valueAction = 0;}.defer;}, ccNum: 39);
2214
2215                                 /*Spec.add(\dur, ~etemp.cps([0, 127, \exp]));*/
2216                                 Spec.add(\dur, ([~freqmap.at(0), ~freqmap.at(127), \exp]));
2217                                 /*Spec.add(\tune, ([0, 128, \lin]));*/
2218                         };
2219
2220                         ~midifunc.value;
2221
2222                         keycodeb = Button.new(w,Rect(Window.screenBounds.width-20-16,~bpt+160,16,16/1.6180339887499)).states_([
2223                                 ["1",Color.white,Color.black],
2224                                 ["2",Color.white,Color.black],
2225                                 ["3",Color.white,Color.black],
2226                                 ["4",Color.white,Color.black],
2227                                 ["5",Color.white,Color.black],
2228                                 ["6",Color.white,Color.black],
2229                                 ["7",Color.white,Color.black]]).action_({arg button;
2230
2231                                 case
2232                                 {button.value == 0}{
2233                                         ~z25.background = Color.green; ~z1.background = Color.green;
2234                                         ~z26.background = Color.white; ~z2.background = Color.white;
2235                                         ~z27.background = Color.white; ~z3.background = Color.white;
2236                                         ~z28.background = Color.white; ~z4.background = Color.white;
2237                                         ~z29.background = Color.white; ~z5.background = Color.white;
2238                                         ~z30.background = Color.white; ~z6.background = Color.white;
2239                                         ~z31.background = Color.white; ~z7.background = Color.white;
2240                                 }
2241                                 {button.value == 1}{
2242                                         ~z25.background = Color.white; ~z1.background = Color.white;
2243                                         ~z26.background = Color.green; ~z2.background = Color.green;
2244                                         ~z27.background = Color.white; ~z3.background = Color.white;
2245                                         ~z28.background = Color.white; ~z4.background = Color.white;
2246                                         ~z29.background = Color.white; ~z5.background = Color.white;
2247                                         ~z30.background = Color.white; ~z6.background = Color.white;
2248                                         ~z31.background = Color.white; ~z7.background = Color.white;
2249                                 }
2250                                 {button.value == 2}{
2251                                         ~z25.background = Color.white; ~z1.background = Color.white;
2252                                         ~z26.background = Color.white; ~z2.background = Color.white;
2253                                         ~z27.background = Color.green; ~z3.background = Color.green;
2254                                         ~z28.background = Color.white; ~z4.background = Color.white;
2255                                         ~z29.background = Color.white; ~z5.background = Color.white;
2256                                         ~z30.background = Color.white; ~z6.background = Color.white;
2257                                         ~z31.background = Color.white; ~z7.background = Color.white;
2258                                 }
2259                                 {button.value == 3}{
2260                                         ~z25.background = Color.white; ~z1.background = Color.white;
2261                                         ~z26.background = Color.white; ~z2.background = Color.white;
2262                                         ~z27.background = Color.white; ~z3.background = Color.white;
2263                                         ~z28.background = Color.green; ~z4.background = Color.green;
2264                                         ~z29.background = Color.white; ~z5.background = Color.white;
2265                                         ~z30.background = Color.white; ~z6.background = Color.white;
2266                                         ~z31.background = Color.white; ~z7.background = Color.white;
2267                                 }
2268                                 {button.value == 4}{
2269                                         ~z25.background = Color.white; ~z1.background = Color.white;
2270                                         ~z26.background = Color.white; ~z2.background = Color.white;
2271                                         ~z27.background = Color.white; ~z3.background = Color.white;
2272                                         ~z28.background = Color.white; ~z4.background = Color.white;
2273                                         ~z29.background = Color.green; ~z5.background = Color.green;
2274                                         ~z30.background = Color.white; ~z6.background = Color.white;
2275                                         ~z31.background = Color.white; ~z7.background = Color.white;
2276                                 }
2277                                 {button.value == 5}{
2278                                         ~z25.background = Color.white; ~z1.background = Color.white;
2279                                         ~z26.background = Color.white; ~z2.background = Color.white;
2280                                         ~z27.background = Color.white; ~z3.background = Color.white;
2281                                         ~z28.background = Color.white; ~z4.background = Color.white;
2282                                         ~z29.background = Color.white; ~z5.background = Color.white;
2283                                         ~z30.background = Color.green; ~z6.background = Color.green;
2284                                         ~z31.background = Color.white; ~z7.background = Color.white;
2285                                 }
2286                                 {button.value == 6}{
2287                                         ~z25.background = Color.white; ~z1.background = Color.white;
2288                                         ~z26.background = Color.white; ~z2.background = Color.white;
2289                                         ~z27.background = Color.white; ~z3.background = Color.white;
2290                                         ~z28.background = Color.white; ~z4.background = Color.white;
2291                                         ~z29.background = Color.white; ~z5.background = Color.white;
2292                                         ~z30.background = Color.white; ~z6.background = Color.white;
2293                                         ~z31.background = Color.green; ~z7.background = Color.green;
2294                                 }
2295
2296                         });
2297
2298                         w.view.keyDownAction = { arg view, char, modifiers, unicode, keycode;
2299                                 [char, modifiers, unicode, keycode];
2300
2301                                 if(unicode == ~c_unicode, {
2302                                         case
2303                                         {b.value == 0}{b.valueAction = 1}
2304                                         {b.value == 1}{b.valueAction = 0};
2305                                 });
2306                                 if(unicode == ~s_unicode, {
2307                                         case
2308                                         {b3.value == 0}{b3.valueAction = 1}
2309                                         {b3.value == 1}{b3.valueAction = 0};
2310                                 });
2311                                 if(unicode == ~spacebar_unicode, {
2312                                         case
2313                                         {b4.value == 0}{b4.valueAction = 1}
2314                                         {b4.value == 1}{b4.valueAction = 0};
2315                                 });
2316                                 if(unicode == ~t_unicode, {
2317                                         case
2318                                         {~ts.value == 0}{~ts.valueAction = 1}
2319                                         {~ts.value == 1}{~ts.valueAction = 0};
2320                                 });
2321                                 if(unicode == ~r_unicode, {
2322                                         case
2323                                         {~rviewbutton.value == 0}{~rviewbutton.valueAction = 1}
2324                                         {~rviewbutton.value == 1}{~rviewbutton.valueAction = 0};
2325                                 });
2326                                 if(unicode == ~u_unicode, {
2327                                         case
2328                                         {unmuteall.value == 0}{unmuteall.valueAction = 1}
2329                                         {unmuteall.value == 1}{unmuteall.valueAction = 0};
2330                                 });
2331                                 if(unicode == ~m_unicode, {
2332                                         case
2333                                         {muteall.value == 0}{muteall.valueAction = 1}
2334                                         {muteall.value == 1}{muteall.valueAction = 0};
2335                                 });
2336
2337                                 if(unicode == ~escape_unicode, {w.minimize;});
2338
2339                                 /*~bfreqv = ~freqmap.at(34);
2340                                 if((~bfreq.value == 1) and: ((keycode == ~leftarrow_keycode) or: (unicode == ~j_unicode)), {~bfreqtext.string = ~freqmap.at(~bfreqv = ~bfreqv-1).asString;}, {nil});
2341                                 if((~bfreq.value == 1) and: ((keycode == ~rightarrow_keycode) or: (unicode == ~l_unicode)), {~bfreqtext.string = ~freqmap.at(~bfreqv = ~bfreqv+1).asString;}, {nil});
2342                                 */
2343                                 case
2344                                 {unicode == ~one_unicode}{keycodeb.valueAction_(0)}
2345                                 {unicode == ~two_unicode}{keycodeb.valueAction_(1)}
2346                                 {unicode == ~three_unicode}{keycodeb.valueAction_(2)}
2347                                 {unicode == ~four_unicode}{keycodeb.valueAction_(3)}
2348                                 {unicode == ~five_unicode}{keycodeb.valueAction_(4)}
2349                                 {unicode == ~six_unicode}{keycodeb.valueAction_(5)}
2350                                 {unicode == ~seven_unicode}{keycodeb.valueAction_(6)}
2351                                 {(keycode == ~uparrow_keycode) or: (unicode == ~i_unicode)}{keycodeb.valueAction_(keycodeb.value-1)}
2352                                 {(keycode == ~downarrow_keycode) or: (unicode == ~k_unicode)}{keycodeb.valueAction_(keycodeb.value+1)};
2353
2354                                 if((~f1 >= ~freqmap.at(127)), {~freqmap.at(127)},
2355                                         {if((keycodeb.value == 0) and: ((keycode == ~rightarrow_keycode) or: (unicode == ~l_unicode)), {
2356                                                 ~freqmapval1 = ~f1.cpsmidi.round;
2357                                                 case
2358                                                 {~la.isRunning == true}{
2359                                                         ~la.set(\dur, ~f1 = ~freqmap.at(~freqmapval1 = ~freqmapval1.value+1));
2360                                                 }
2361                                                 {~la1.isRunning == true}{
2362                                                         ~la1.set(\dur, ~f1 = ~freqmap.at(~freqmapval1 = ~freqmapval1.value+1));
2363                                                 };
2364                                                 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;);});
2365                                                 ~z25.background = Color.green; ~z1.background = Color.green;
2366                                                 ~z26.background = Color.white; ~z2.background = Color.white;
2367                                                 ~z27.background = Color.white; ~z3.background = Color.white;
2368                                                 ~z28.background = Color.white; ~z4.background = Color.white;
2369                                                 ~z29.background = Color.white; ~z5.background = Color.white;
2370                                                 ~z30.background = Color.white; ~z6.background = Color.white;
2371                                                 ~z31.background = Color.white; ~z7.background = Color.white;
2372                                 });});
2373                                 if((~f1 <= ~freqmap.at(0)), {~freqmap.at(0)},
2374                                         {if((keycodeb.value == 0) and: ((keycode == ~leftarrow_keycode) or: (unicode == ~j_unicode)), {
2375                                                 ~freqmapval1 = ~f1.cpsmidi.round;
2376                                                 case
2377                                                 {~la.isRunning == true}{
2378                                                         ~la.set(\dur, ~f1 = ~freqmap.at(~freqmapval1 = ~freqmapval1.value-1));
2379                                                 }
2380                                                 {~la1.isRunning == true}{
2381                                                         ~la1.set(\dur, ~f1 = ~freqmap.at(~freqmapval1 = ~freqmapval1.value-1));
2382                                                 };
2383                                                 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;);});
2384                                                 /*if(~f1 <= ~outmin1 and: ~f1 <= ~outmin2 and: ~f1 >= ~outmax1 and: ~f1 >= ~outmax2, {~f1 = 0;*/
2385                                                 ~z25.background = Color.green; ~z1.background = Color.green;
2386                                                 ~z26.background = Color.white; ~z2.background = Color.white;
2387                                                 ~z27.background = Color.white; ~z3.background = Color.white;
2388                                                 ~z28.background = Color.white; ~z4.background = Color.white;
2389                                                 ~z29.background = Color.white; ~z5.background = Color.white;
2390                                                 ~z30.background = Color.white; ~z6.background = Color.white;
2391                                                 ~z31.background = Color.white; ~z7.background = Color.white;
2392                                 });});
2393
2394                                 if((~f2 >= ~freqmap.at(127)), {~freqmap.at(127)},
2395                                         {if((keycodeb.value == 1) and: ((keycode == ~rightarrow_keycode) or: (unicode == ~l_unicode)), {
2396                                                 ~freqmapval2 = ~f2.cpsmidi.round;
2397                                                 case
2398                                                 {~la.isRunning == true}{
2399                                                         ~lb.set(\dur, ~f2 = ~freqmap.at(~freqmapval2 = ~freqmapval2.value+1));
2400                                                 }
2401                                                 {~la1.isRunning == true}{
2402                                                         ~lb1.set(\dur, ~f2 = ~freqmap.at(~freqmapval2 = ~freqmapval2.value+1));
2403                                                 };
2404                                                 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;);});
2405                                                 ~z25.background = Color.white; ~z1.background = Color.white;
2406                                                 ~z26.background = Color.green; ~z2.background = Color.green;
2407                                                 ~z27.background = Color.white; ~z3.background = Color.white;
2408                                                 ~z28.background = Color.white; ~z4.background = Color.white;
2409                                                 ~z29.background = Color.white; ~z5.background = Color.white;
2410                                                 ~z30.background = Color.white; ~z6.background = Color.white;
2411                                                 ~z31.background = Color.white; ~z7.background = Color.white;
2412                                 });});
2413                                 if((~f2 <= ~freqmap.at(0)), {~freqmap.at(0)},
2414                                         {if((keycodeb.value == 1) and: ((keycode == ~leftarrow_keycode) or: (unicode == ~j_unicode)), {
2415                                                 ~freqmapval2 = ~f2.cpsmidi.round;
2416                                                 case
2417                                                 {~la.isRunning == true}{
2418                                                         ~lb.set(\dur, ~f2 = ~freqmap.at(~freqmapval2 = ~freqmapval2.value-1));
2419                                                 }
2420                                                 {~la1.isRunning == true}{
2421                                                         ~lb1.set(\dur, ~f2 = ~freqmap.at(~freqmapval2 = ~freqmapval2.value-1));
2422                                                 };
2423                                                 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;);});
2424                                                 /*if(~f1 <= ~outmin1 and: ~f1 <= ~outmin2 and: ~f1 >= ~outmax1 and: ~f1 >= ~outmax2, {~f1 = 0;*/
2425                                                 ~z25.background = Color.white; ~z1.background = Color.white;
2426                                                 ~z26.background = Color.green; ~z2.background = Color.green;
2427                                                 ~z27.background = Color.white; ~z3.background = Color.white;
2428                                                 ~z28.background = Color.white; ~z4.background = Color.white;
2429                                                 ~z29.background = Color.white; ~z5.background = Color.white;
2430                                                 ~z30.background = Color.white; ~z6.background = Color.white;
2431                                                 ~z31.background = Color.white; ~z7.background = Color.white;
2432                                 });});
2433
2434                                 if((~f3 >= ~freqmap.at(127)), {~freqmap.at(127)},
2435                                         {if((keycodeb.value == 2) and: ((keycode == ~rightarrow_keycode) or: (unicode == ~l_unicode)), {
2436                                                 ~freqmapval3 = ~f3.cpsmidi.round;
2437                                                 case
2438                                                 {~la.isRunning == true}{
2439                                                         ~lc.set(\dur, ~f3 = ~freqmap.at(~freqmapval3 = ~freqmapval3.value+1));
2440                                                 }
2441                                                 {~la1.isRunning == true}{
2442                                                         ~lc1.set(\dur, ~f3 = ~freqmap.at(~freqmapval3 = ~freqmapval3.value+1));
2443                                                 };
2444                                                 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;);});
2445                                                 ~z25.background = Color.white; ~z1.background = Color.white;
2446                                                 ~z26.background = Color.white; ~z2.background = Color.white;
2447                                                 ~z27.background = Color.green; ~z3.background = Color.green;
2448                                                 ~z28.background = Color.white; ~z4.background = Color.white;
2449                                                 ~z29.background = Color.white; ~z5.background = Color.white;
2450                                                 ~z30.background = Color.white; ~z6.background = Color.white;
2451                                                 ~z31.background = Color.white; ~z7.background = Color.white;
2452                                 });});
2453                                 if((~f3 <= ~freqmap.at(0)), {~freqmap.at(0)},
2454                                         {if((keycodeb.value == 2) and: ((keycode == ~leftarrow_keycode) or: (unicode == ~j_unicode)), {
2455                                                 ~freqmapval3 = ~f3.cpsmidi.round;
2456                                                 case
2457                                                 {~la.isRunning == true}{
2458                                                         ~lc.set(\dur, ~f3 = ~freqmap.at(~freqmapval3 = ~freqmapval3.value-1));
2459                                                 }
2460                                                 {~la1.isRunning == true}{
2461                                                         ~lc1.set(\dur, ~f3 = ~freqmap.at(~freqmapval3 = ~freqmapval3.value-1));
2462                                                 };
2463                                                 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;);});
2464                                                 /*if(~f1 <= ~outmin1 and: ~f1 <= ~outmin2 and: ~f1 >= ~outmax1 and: ~f1 >= ~outmax2, {~f1 = 0;*/
2465                                                 ~z25.background = Color.white; ~z1.background = Color.white;
2466                                                 ~z26.background = Color.white; ~z2.background = Color.white;
2467                                                 ~z27.background = Color.green; ~z3.background = Color.green;
2468                                                 ~z28.background = Color.white; ~z4.background = Color.white;
2469                                                 ~z29.background = Color.white; ~z5.background = Color.white;
2470                                                 ~z30.background = Color.white; ~z6.background = Color.white;
2471                                                 ~z31.background = Color.white; ~z7.background = Color.white;
2472                                 });});
2473
2474                                 if((~f4 >= ~freqmap.at(127)), {~freqmap.at(127)},
2475                                         {if((keycodeb.value == 3) and: ((keycode == ~rightarrow_keycode) or: (unicode == ~l_unicode)), {
2476                                                 ~freqmapval4 = ~f4.cpsmidi.round;
2477                                                 case
2478                                                 {~la.isRunning == true}{
2479                                                         ~ld.set(\dur, ~f4 = ~freqmap.at(~freqmapval4 = ~freqmapval4.value+1));
2480                                                 }
2481                                                 {~la1.isRunning == true}{
2482                                                         ~ld1.set(\dur, ~f4 = ~freqmap.at(~freqmapval4 = ~freqmapval4.value+1));
2483                                                 };
2484                                                 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;);});
2485                                                 ~z25.background = Color.white; ~z1.background = Color.white;
2486                                                 ~z26.background = Color.white; ~z2.background = Color.white;
2487                                                 ~z27.background = Color.white; ~z3.background = Color.white;
2488                                                 ~z28.background = Color.green; ~z4.background = Color.green;
2489                                                 ~z29.background = Color.white; ~z5.background = Color.white;
2490                                                 ~z30.background = Color.white; ~z6.background = Color.white;
2491                                                 ~z31.background = Color.white; ~z7.background = Color.white;
2492                                 });});
2493                                 if((~f4 <= ~freqmap.at(0)), {~freqmap.at(0)},
2494                                         {if((keycodeb.value == 3) and: ((keycode == ~leftarrow_keycode) or: (unicode == ~j_unicode)), {
2495                                                 ~freqmapval4 = ~f4.cpsmidi.round;
2496                                                 case
2497                                                 {~la.isRunning == true}{
2498                                                         ~ld.set(\dur, ~f4 = ~freqmap.at(~freqmapval4 = ~freqmapval4.value-1));
2499                                                 }
2500                                                 {~la1.isRunning == true}{
2501                                                         ~ld1.set(\dur, ~f4 = ~freqmap.at(~freqmapval4 = ~freqmapval4.value-1));
2502                                                 };
2503                                                 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;);});
2504                                                 /*if(~f1 <= ~outmin1 and: ~f1 <= ~outmin2 and: ~f1 >= ~outmax1 and: ~f1 >= ~outmax2, {~f1 = 0;*/
2505                                                 ~z25.background = Color.white; ~z1.background = Color.white;
2506                                                 ~z26.background = Color.white; ~z2.background = Color.white;
2507                                                 ~z27.background = Color.white; ~z3.background = Color.white;
2508                                                 ~z28.background = Color.green; ~z4.background = Color.green;
2509                                                 ~z29.background = Color.white; ~z5.background = Color.white;
2510                                                 ~z30.background = Color.white; ~z6.background = Color.white;
2511                                                 ~z31.background = Color.white; ~z7.background = Color.white;
2512                                 });});
2513
2514                                 if((~f5 >= ~freqmap.at(127)), {~freqmap.at(127)},
2515                                         {if((keycodeb.value == 4) and: ((keycode == ~rightarrow_keycode) or: (unicode == ~l_unicode)), {
2516                                                 ~freqmapval5 = ~f5.cpsmidi.round;
2517                                                 case
2518                                                 {~la.isRunning == true}{
2519                                                         ~le.set(\dur, ~f5 = ~freqmap.at(~freqmapval5 = ~freqmapval5.value+1));
2520                                                 }
2521                                                 {~la1.isRunning == true}{
2522                                                         ~le1.set(\dur, ~f5 = ~freqmap.at(~freqmapval5 = ~freqmapval5.value+1));
2523                                                 };
2524                                                 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;);});
2525                                                 ~z25.background = Color.white; ~z1.background = Color.white;
2526                                                 ~z26.background = Color.white; ~z2.background = Color.white;
2527                                                 ~z27.background = Color.white; ~z3.background = Color.white;
2528                                                 ~z28.background = Color.white; ~z4.background = Color.white;
2529                                                 ~z29.background = Color.green; ~z5.background = Color.green;
2530                                                 ~z30.background = Color.white; ~z6.background = Color.white;
2531                                                 ~z31.background = Color.white; ~z7.background = Color.white;
2532                                 });});
2533                                 if((~f5 <= ~freqmap.at(0)), {~freqmap.at(0)},
2534                                         {if((keycodeb.value == 4) and: ((keycode == ~leftarrow_keycode) or: (unicode == ~j_unicode)), {
2535                                                 ~freqmapval5 = ~f5.cpsmidi.round;
2536                                                 case
2537                                                 {~la.isRunning == true}{
2538                                                         ~le.set(\dur, ~f5 = ~freqmap.at(~freqmapval5 = ~freqmapval5.value-1));
2539                                                 }
2540                                                 {~la1.isRunning == true}{
2541                                                         ~le1.set(\dur, ~f5 = ~freqmap.at(~freqmapval5 = ~freqmapval5.value-1));
2542                                                 };
2543                                                 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;);});
2544                                                 /*if(~f1 <= ~outmin1 and: ~f1 <= ~outmin2 and: ~f1 >= ~outmax1 and: ~f1 >= ~outmax2, {~f1 = 0;*/
2545                                                 ~z25.background = Color.white; ~z1.background = Color.white;
2546                                                 ~z26.background = Color.white; ~z2.background = Color.white;
2547                                                 ~z27.background = Color.white; ~z3.background = Color.white;
2548                                                 ~z28.background = Color.white; ~z4.background = Color.white;
2549                                                 ~z29.background = Color.green; ~z5.background = Color.green;
2550                                                 ~z30.background = Color.white; ~z6.background = Color.white;
2551                                                 ~z31.background = Color.white; ~z7.background = Color.white;
2552                                 });});
2553
2554                                 if((~f6 >= ~freqmap.at(127)), {~freqmap.at(127)},
2555                                         {if((keycodeb.value == 5) and: ((keycode == ~rightarrow_keycode) or: (unicode == ~l_unicode)), {
2556                                                 ~freqmapval6 = ~f6.cpsmidi.round;
2557                                                 case
2558                                                 {~la.isRunning == true}{
2559                                                         ~lf.set(\dur, ~f6 = ~freqmap.at(~freqmapval6 = ~freqmapval6.value+1));
2560                                                 }
2561                                                 {~la1.isRunning == true}{
2562                                                         ~lf1.set(\dur, ~f6 = ~freqmap.at(~freqmapval6 = ~freqmapval6.value+1));
2563                                                 };
2564                                                 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;);});
2565                                                 ~z25.background = Color.white; ~z1.background = Color.white;
2566                                                 ~z26.background = Color.white; ~z2.background = Color.white;
2567                                                 ~z27.background = Color.white; ~z3.background = Color.white;
2568                                                 ~z28.background = Color.white; ~z4.background = Color.white;
2569                                                 ~z29.background = Color.white; ~z5.background = Color.white;
2570                                                 ~z30.background = Color.green; ~z6.background = Color.green;
2571                                                 ~z31.background = Color.white; ~z7.background = Color.white;
2572                                 });});
2573                                 if((~f6 <= ~freqmap.at(0)), {~freqmap.at(0)},
2574                                         {if((keycodeb.value == 5) and: ((keycode == ~leftarrow_keycode) or: (unicode == ~j_unicode)), {
2575                                                 ~freqmapval6 = ~f6.cpsmidi.round;
2576                                                 case
2577                                                 {~la.isRunning == true}{
2578                                                         ~lf.set(\dur, ~f6 = ~freqmap.at(~freqmapval6 = ~freqmapval6.value-1));
2579                                                 }
2580                                                 {~la1.isRunning == true}{
2581                                                         ~lf1.set(\dur, ~f6 = ~freqmap.at(~freqmapval6 = ~freqmapval6.value-1));
2582                                                 };
2583                                                 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;);});
2584                                                 /*if(~f1 <= ~outmin1 and: ~f1 <= ~outmin2 and: ~f1 >= ~outmax1 and: ~f1 >= ~outmax2, {~f1 = 0;*/
2585                                                 ~z25.background = Color.white; ~z1.background = Color.white;
2586                                                 ~z26.background = Color.white; ~z2.background = Color.white;
2587                                                 ~z27.background = Color.white; ~z3.background = Color.white;
2588                                                 ~z28.background = Color.white; ~z4.background = Color.white;
2589                                                 ~z29.background = Color.white; ~z5.background = Color.white;
2590                                                 ~z30.background = Color.green; ~z6.background = Color.green;
2591                                                 ~z31.background = Color.white; ~z7.background = Color.white;
2592                                 });});
2593
2594                                 if((~f7 >= ~freqmap.at(127)), {~freqmap.at(127)},
2595                                         {if((keycodeb.value == 6) and: ((keycode == ~rightarrow_keycode) or: (unicode == ~l_unicode)), {
2596                                                 ~freqmapval7 = ~f7.cpsmidi.round;
2597                                                 case
2598                                                 {~la.isRunning == true}{
2599                                                         ~lg.set(\dur, ~f7 = ~freqmap.at(~freqmapval7 = ~freqmapval7.value+1));
2600                                                 }
2601                                                 {~la1.isRunning == true}{
2602                                                         ~lg1.set(\dur, ~f7 = ~freqmap.at(~freqmapval7 = ~freqmapval7.value+1));
2603                                                 };
2604                                                 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;);});
2605                                                 ~z25.background = Color.white; ~z1.background = Color.white;
2606                                                 ~z26.background = Color.white; ~z2.background = Color.white;
2607                                                 ~z27.background = Color.white; ~z3.background = Color.white;
2608                                                 ~z28.background = Color.white; ~z4.background = Color.white;
2609                                                 ~z29.background = Color.white; ~z5.background = Color.white;
2610                                                 ~z30.background = Color.white; ~z6.background = Color.white;
2611                                                 ~z31.background = Color.green; ~z7.background = Color.green;
2612                                 });});
2613                                 if((~f7 <= ~freqmap.at(0)), {~freqmap.at(0)},
2614                                         {if((keycodeb.value == 6) and: ((keycode == ~leftarrow_keycode) or: (unicode == ~j_unicode)), {
2615                                                 ~freqmapval7 = ~f7.cpsmidi.round;
2616                                                 case
2617                                                 {~la.isRunning == true}{
2618                                                         ~lg.set(\dur, ~f7 = ~freqmap.at(~freqmapval7 = ~freqmapval7.value-1));
2619                                                 }
2620                                                 {~la1.isRunning == true}{
2621                                                         ~lg1.set(\dur, ~f7 = ~freqmap.at(~freqmapval7 = ~freqmapval7.value-1));
2622                                                 };
2623                                                 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;);});
2624                                                 /*if(~f1 <= ~outmin1 and: ~f1 <= ~outmin2 and: ~f1 >= ~outmax1 and: ~f1 >= ~outmax2, {~f1 = 0;*/
2625                                                 ~z25.background = Color.white; ~z1.background = Color.white;
2626                                                 ~z26.background = Color.white; ~z2.background = Color.white;
2627                                                 ~z27.background = Color.white; ~z3.background = Color.white;
2628                                                 ~z28.background = Color.white; ~z4.background = Color.white;
2629                                                 ~z29.background = Color.white; ~z5.background = Color.white;
2630                                                 ~z30.background = Color.white; ~z6.background = Color.white;
2631                                                 ~z31.background = Color.green; ~z7.background = Color.green;
2632                                 });});
2633
2634                         };
2635
2636                         if(~rslot1a == nil, {~rslot1a = ~bplaceo1;}); if(~rslot1b == nil, {~rslot1b = ~bplacef1;});
2637                         if(~rslot2 == nil, {~rslot2 = ~bplacef2;});
2638                         if(~rslot3 == nil, {~rslot3 = ~bplacef3;});
2639                         if(~rslot4 == nil, {~rslot4 = ~bplacef4;});
2640                         if(~rslot5 == nil, {~rslot5 = ~bplacef5;});
2641                         if(~rslot6 == nil, {~rslot6 = ~bplacef6;});
2642                         if(~rslot7 == nil, {~rslot7 = ~bplacef7;});
2643                         if(~rslot8 == nil, {~rslot8 = ~bplacef8;});
2644                         if(~rtimeall == nil, {~rtimeall = 8;});
2645                         if(~rtime1 == nil, {~rtime1 = 8;});
2646                         if(~rtime2 == nil, {~rtime2 = 8;});
2647                         if(~rtime3 == nil, {~rtime3 = 8;});
2648                         if(~rtime4 == nil, {~rtime4 = 8;});
2649                         if(~rtime5 == nil, {~rtime5 = 8;});
2650                         if(~rtime6 == nil, {~rtime6 = 8;});
2651                         if(~rtime7 == nil, {~rtime7 = 8;});
2652                         if(~rtime8 == nil, {~rtime8 = 8;});
2653                         if(~rdoall == nil, {~rdoall = 1;});
2654                         if(~rdo1a == nil, {~rdo1a = "o1";}); if(~rdo1b == nil, {~rdo1b = "f1";});
2655                         if(~rdo2 == nil, {~rdo2 = "f2";});
2656                         if(~rdo3 == nil, {~rdo3 = "f3";});
2657                         if(~rdo4 == nil, {~rdo4 = "f4";});
2658                         if(~rdo5 == nil, {~rdo5 = "f5";});
2659                         if(~rdo6 == nil, {~rdo6 = "f6";});
2660                         if(~rdo7 == nil, {~rdo7 = "f7";});
2661                         if(~rdo8 == nil, {~rdo8 = "f8";});
2662
2663                         ~si1aset = {
2664                                 if(~si1a.value == "o1", {~rslot1a = ~bplaceo1; ~rdo1a = ~si1a.value;});
2665                                 if(~si1a.value == "f1", {~rslot1a = ~bplacef1; ~rdo1a = ~si1a.value;});
2666                                 if(~si1a.value == "s1", {~rslot1a = ~bplaces1; ~rdo1a = ~si1a.value;});
2667                                 if(~si1a.value == "o2", {~rslot1a = ~bplaceo2; ~rdo1a = ~si1a.value;});
2668                                 if(~si1a.value == "f2", {~rslot1a = ~bplacef2; ~rdo1a = ~si1a.value;});
2669                                 if(~si1a.value == "s2", {~rslot1a = ~bplaces2; ~rdo1a = ~si1a.value;});
2670                                 if(~si1a.value == "o3", {~rslot1a = ~bplaceo3; ~rdo1a = ~si1a.value;});
2671                                 if(~si1a.value == "f3", {~rslot1a = ~bplacef3; ~rdo1a = ~si1a.value;});
2672                                 if(~si1a.value == "s3", {~rslot1a = ~bplaces3; ~rdo1a = ~si1a.value;});
2673                                 if(~si1a.value == "o4", {~rslot1a = ~bplaceo4; ~rdo1a = ~si1a.value;});
2674                                 if(~si1a.value == "f4", {~rslot1a = ~bplacef4; ~rdo1a = ~si1a.value;});
2675                                 if(~si1a.value == "s4", {~rslot1a = ~bplaces4; ~rdo1a = ~si1a.value;});
2676                                 if(~si1a.value == "o5", {~rslot1a = ~bplaceo5; ~rdo1a = ~si1a.value;});
2677                                 if(~si1a.value == "f5", {~rslot1a = ~bplacef5; ~rdo1a = ~si1a.value;});
2678                                 if(~si1a.value == "s5", {~rslot1a = ~bplaces5; ~rdo1a = ~si1a.value;});
2679                                 if(~si1a.value == "o6", {~rslot1a = ~bplaceo6; ~rdo1a = ~si1a.value;});
2680                                 if(~si1a.value == "f6", {~rslot1a = ~bplacef6; ~rdo1a = ~si1a.value;});
2681                                 if(~si1a.value == "s6", {~rslot1a = ~bplaces6; ~rdo1a = ~si1a.value;});
2682                                 if(~si1a.value == "o7", {~rslot1a = ~bplaceo7; ~rdo1a = ~si1a.value;});
2683                                 if(~si1a.value == "f7", {~rslot1a = ~bplacef7; ~rdo1a = ~si1a.value;});
2684                                 if(~si1a.value == "s7", {~rslot1a = ~bplaces7; ~rdo1a = ~si1a.value;});
2685                                 if(~si1a.value == "o8", {~rslot1a = ~bplaceo8; ~rdo1a = ~si1a.value;});
2686                                 if(~si1a.value == "f8", {~rslot1a = ~bplacef8; ~rdo1a = ~si1a.value;});
2687                                 if(~si1a.value == "s8", {~rslot1a = ~bplaces8; ~rdo1a = ~si1a.value;});
2688                         };
2689                         ~si1bset = {
2690                                 if(~si1b.value == "o1", {~rslot1b = ~bplaceo1; ~rdo1b = ~si1b.value;});
2691                                 if(~si1b.value == "f1", {~rslot1b = ~bplacef1; ~rdo1b = ~si1b.value;});
2692                                 if(~si1b.value == "s1", {~rslot1b = ~bplaces1; ~rdo1b = ~si1b.value;});
2693                                 if(~si1b.value == "o2", {~rslot1b = ~bplaceo2; ~rdo1b = ~si1b.value;});
2694                                 if(~si1b.value == "f2", {~rslot1b = ~bplacef2; ~rdo1b = ~si1b.value;});
2695                                 if(~si1b.value == "s2", {~rslot1b = ~bplaces2; ~rdo1b = ~si1b.value;});
2696                                 if(~si1b.value == "o3", {~rslot1b = ~bplaceo3; ~rdo1b = ~si1b.value;});
2697                                 if(~si1b.value == "f3", {~rslot1b = ~bplacef3; ~rdo1b = ~si1b.value;});
2698                                 if(~si1b.value == "s3", {~rslot1b = ~bplaces3; ~rdo1b = ~si1b.value;});
2699                                 if(~si1b.value == "o4", {~rslot1b = ~bplaceo4; ~rdo1b = ~si1b.value;});
2700                                 if(~si1b.value == "f4", {~rslot1b = ~bplacef4; ~rdo1b = ~si1b.value;});
2701                                 if(~si1b.value == "s4", {~rslot1b = ~bplaces4; ~rdo1b = ~si1b.value;});
2702                                 if(~si1b.value == "o5", {~rslot1b = ~bplaceo5; ~rdo1b = ~si1b.value;});
2703                                 if(~si1b.value == "f5", {~rslot1b = ~bplacef5; ~rdo1b = ~si1b.value;});
2704                                 if(~si1b.value == "s5", {~rslot1b = ~bplaces5; ~rdo1b = ~si1b.value;});
2705                                 if(~si1b.value == "o6", {~rslot1b = ~bplaceo6; ~rdo1b = ~si1b.value;});
2706                                 if(~si1b.value == "f6", {~rslot1b = ~bplacef6; ~rdo1b = ~si1b.value;});
2707                                 if(~si1b.value == "s6", {~rslot1b = ~bplaces6; ~rdo1b = ~si1b.value;});
2708                                 if(~si1b.value == "o7", {~rslot1b = ~bplaceo7; ~rdo1b = ~si1b.value;});
2709                                 if(~si1b.value == "f7", {~rslot1b = ~bplacef7; ~rdo1b = ~si1b.value;});
2710                                 if(~si1b.value == "s7", {~rslot1b = ~bplaces7; ~rdo1b = ~si1b.value;});
2711                                 if(~si1b.value == "o8", {~rslot1b = ~bplaceo8; ~rdo1b = ~si1b.value;});
2712                                 if(~si1b.value == "f8", {~rslot1b = ~bplacef8; ~rdo1b = ~si1b.value;});
2713                                 if(~si1b.value == "s8", {~rslot1b = ~bplaces8; ~rdo1b = ~si1b.value;});
2714                         };
2715                         ~si2set = {
2716                                 if(~si2.value == "o1", {~rslot2 = ~bplaceo1; ~rdo2 = ~si2.value;});
2717                                 if(~si2.value == "f1", {~rslot2 = ~bplacef1; ~rdo2 = ~si2.value;});
2718                                 if(~si2.value == "s1", {~rslot2 = ~bplaces1; ~rdo2 = ~si2.value;});
2719                                 if(~si2.value == "o2", {~rslot2 = ~bplaceo2; ~rdo2 = ~si2.value;});
2720                                 if(~si2.value == "f2", {~rslot2 = ~bplacef2; ~rdo2 = ~si2.value;});
2721                                 if(~si2.value == "s2", {~rslot2 = ~bplaces2; ~rdo2 = ~si2.value;});
2722                                 if(~si2.value == "o3", {~rslot2 = ~bplaceo3; ~rdo2 = ~si2.value;});
2723                                 if(~si2.value == "f3", {~rslot2 = ~bplacef3; ~rdo2 = ~si2.value;});
2724                                 if(~si2.value == "s3", {~rslot2 = ~bplaces3; ~rdo2 = ~si2.value;});
2725                                 if(~si2.value == "o4", {~rslot2 = ~bplaceo4; ~rdo2 = ~si2.value;});
2726                                 if(~si2.value == "f4", {~rslot2 = ~bplacef4; ~rdo2 = ~si2.value;});
2727                                 if(~si2.value == "s4", {~rslot2 = ~bplaces4; ~rdo2 = ~si2.value;});
2728                                 if(~si2.value == "o5", {~rslot2 = ~bplaceo5; ~rdo2 = ~si2.value;});
2729                                 if(~si2.value == "f5", {~rslot2 = ~bplacef5; ~rdo2 = ~si2.value;});
2730                                 if(~si2.value == "s5", {~rslot2 = ~bplaces5; ~rdo2 = ~si2.value;});
2731                                 if(~si2.value == "o6", {~rslot2 = ~bplaceo6; ~rdo2 = ~si2.value;});
2732                                 if(~si2.value == "f6", {~rslot2 = ~bplacef6; ~rdo2 = ~si2.value;});
2733                                 if(~si2.value == "s6", {~rslot2 = ~bplaces6; ~rdo2 = ~si2.value;});
2734                                 if(~si2.value == "o7", {~rslot2 = ~bplaceo7; ~rdo2 = ~si2.value;});
2735                                 if(~si2.value == "f7", {~rslot2 = ~bplacef7; ~rdo2 = ~si2.value;});
2736                                 if(~si2.value == "s7", {~rslot2 = ~bplaces7; ~rdo2 = ~si2.value;});
2737                                 if(~si2.value == "o8", {~rslot2 = ~bplaceo8; ~rdo2 = ~si2.value;});
2738                                 if(~si2.value == "f8", {~rslot2 = ~bplacef8; ~rdo2 = ~si2.value;});
2739                                 if(~si2.value == "s8", {~rslot2 = ~bplaces8; ~rdo2 = ~si2.value;});
2740                         };
2741                         ~si3set = {
2742                                 if(~si3.value == "o1", {~rslot3 = ~bplaceo1; ~rdo3 = ~si3.value;});
2743                                 if(~si3.value == "f1", {~rslot3 = ~bplacef1; ~rdo3 = ~si3.value;});
2744                                 if(~si3.value == "s1", {~rslot3 = ~bplaces1; ~rdo3 = ~si3.value;});
2745                                 if(~si3.value == "o2", {~rslot3 = ~bplaceo2; ~rdo3 = ~si3.value;});
2746                                 if(~si3.value == "f2", {~rslot3 = ~bplacef2; ~rdo3 = ~si3.value;});
2747                                 if(~si3.value == "s2", {~rslot3 = ~bplaces2; ~rdo3 = ~si3.value;});
2748                                 if(~si3.value == "o3", {~rslot3 = ~bplaceo3; ~rdo3 = ~si3.value;});
2749                                 if(~si3.value == "f3", {~rslot3 = ~bplacef3; ~rdo3 = ~si3.value;});
2750                                 if(~si3.value == "s3", {~rslot3 = ~bplaces3; ~rdo3 = ~si3.value;});
2751                                 if(~si3.value == "o4", {~rslot3 = ~bplaceo4; ~rdo3 = ~si3.value;});
2752                                 if(~si3.value == "f4", {~rslot3 = ~bplacef4; ~rdo3 = ~si3.value;});
2753                                 if(~si3.value == "s4", {~rslot3 = ~bplaces4; ~rdo3 = ~si3.value;});
2754                                 if(~si3.value == "o5", {~rslot3 = ~bplaceo5; ~rdo3 = ~si3.value;});
2755                                 if(~si3.value == "f5", {~rslot3 = ~bplacef5; ~rdo3 = ~si3.value;});
2756                                 if(~si3.value == "s5", {~rslot3 = ~bplaces5; ~rdo3 = ~si3.value;});
2757                                 if(~si3.value == "o6", {~rslot3 = ~bplaceo6; ~rdo3 = ~si3.value;});
2758                                 if(~si3.value == "f6", {~rslot3 = ~bplacef6; ~rdo3 = ~si3.value;});
2759                                 if(~si3.value == "s6", {~rslot3 = ~bplaces6; ~rdo3 = ~si3.value;});
2760                                 if(~si3.value == "o7", {~rslot3 = ~bplaceo7; ~rdo3 = ~si3.value;});
2761                                 if(~si3.value == "f7", {~rslot3 = ~bplacef7; ~rdo3 = ~si3.value;});
2762                                 if(~si3.value == "s7", {~rslot3 = ~bplaces7; ~rdo3 = ~si3.value;});
2763                                 if(~si3.value == "o8", {~rslot3 = ~bplaceo8; ~rdo3 = ~si3.value;});
2764                                 if(~si3.value == "f8", {~rslot3 = ~bplacef8; ~rdo3 = ~si3.value;});
2765                                 if(~si3.value == "s8", {~rslot3 = ~bplaces8; ~rdo3 = ~si3.value;});
2766                         };
2767                         ~si4set = {
2768                                 if(~si4.value == "o1", {~rslot4 = ~bplaceo1; ~rdo4 = ~si4.value;});
2769                                 if(~si4.value == "f1", {~rslot4 = ~bplacef1; ~rdo4 = ~si4.value;});
2770                                 if(~si4.value == "s1", {~rslot4 = ~bplaces1; ~rdo4 = ~si4.value;});
2771                                 if(~si4.value == "o2", {~rslot4 = ~bplaceo2; ~rdo4 = ~si4.value;});
2772                                 if(~si4.value == "f2", {~rslot4 = ~bplacef2; ~rdo4 = ~si4.value;});
2773                                 if(~si4.value == "s2", {~rslot4 = ~bplaces2; ~rdo4 = ~si4.value;});
2774                                 if(~si4.value == "o3", {~rslot4 = ~bplaceo3; ~rdo4 = ~si4.value;});
2775                                 if(~si4.value == "f3", {~rslot4 = ~bplacef3; ~rdo4 = ~si4.value;});
2776                                 if(~si4.value == "s3", {~rslot4 = ~bplaces3; ~rdo4 = ~si4.value;});
2777                                 if(~si4.value == "o4", {~rslot4 = ~bplaceo4; ~rdo4 = ~si4.value;});
2778                                 if(~si4.value == "f4", {~rslot4 = ~bplacef4; ~rdo4 = ~si4.value;});
2779                                 if(~si4.value == "s4", {~rslot4 = ~bplaces4; ~rdo4 = ~si4.value;});
2780                                 if(~si4.value == "o5", {~rslot4 = ~bplaceo5; ~rdo4 = ~si4.value;});
2781                                 if(~si4.value == "f5", {~rslot4 = ~bplacef5; ~rdo4 = ~si4.value;});
2782                                 if(~si4.value == "s5", {~rslot4 = ~bplaces5; ~rdo4 = ~si4.value;});
2783                                 if(~si4.value == "o6", {~rslot4 = ~bplaceo6; ~rdo4 = ~si4.value;});
2784                                 if(~si4.value == "f6", {~rslot4 = ~bplacef6; ~rdo4 = ~si4.value;});
2785                                 if(~si4.value == "s6", {~rslot4 = ~bplaces6; ~rdo4 = ~si4.value;});
2786                                 if(~si4.value == "o7", {~rslot4 = ~bplaceo7; ~rdo4 = ~si4.value;});
2787                                 if(~si4.value == "f7", {~rslot4 = ~bplacef7; ~rdo4 = ~si4.value;});
2788                                 if(~si4.value == "s7", {~rslot4 = ~bplaces7; ~rdo4 = ~si4.value;});
2789                                 if(~si4.value == "o8", {~rslot4 = ~bplaceo8; ~rdo4 = ~si4.value;});
2790                                 if(~si4.value == "f8", {~rslot4 = ~bplacef8; ~rdo4 = ~si4.value;});
2791                                 if(~si4.value == "s8", {~rslot4 = ~bplaces8; ~rdo4 = ~si4.value;});
2792                         };
2793                         ~si5set = {
2794                                 if(~si5.value == "o1", {~rslot5 = ~bplaceo1; ~rdo5 = ~si5.value;});
2795                                 if(~si5.value == "f1", {~rslot5 = ~bplacef1; ~rdo5 = ~si5.value;});
2796                                 if(~si5.value == "s1", {~rslot5 = ~bplaces1; ~rdo5 = ~si5.value;});
2797                                 if(~si5.value == "o2", {~rslot5 = ~bplaceo2; ~rdo5 = ~si5.value;});
2798                                 if(~si5.value == "f2", {~rslot5 = ~bplacef2; ~rdo5 = ~si5.value;});
2799                                 if(~si5.value == "s2", {~rslot5 = ~bplaces2; ~rdo5 = ~si5.value;});
2800                                 if(~si5.value == "o3", {~rslot5 = ~bplaceo3; ~rdo5 = ~si5.value;});
2801                                 if(~si5.value == "f3", {~rslot5 = ~bplacef3; ~rdo5 = ~si5.value;});
2802                                 if(~si5.value == "s3", {~rslot5 = ~bplaces3; ~rdo5 = ~si5.value;});
2803                                 if(~si5.value == "o4", {~rslot5 = ~bplaceo4; ~rdo5 = ~si5.value;});
2804                                 if(~si5.value == "f4", {~rslot5 = ~bplacef4; ~rdo5 = ~si5.value;});
2805                                 if(~si5.value == "s4", {~rslot5 = ~bplaces4; ~rdo5 = ~si5.value;});
2806                                 if(~si5.value == "o5", {~rslot5 = ~bplaceo5; ~rdo5 = ~si5.value;});
2807                                 if(~si5.value == "f5", {~rslot5 = ~bplacef5; ~rdo5 = ~si5.value;});
2808                                 if(~si5.value == "s5", {~rslot5 = ~bplaces5; ~rdo5 = ~si5.value;});
2809                                 if(~si5.value == "o6", {~rslot5 = ~bplaceo6; ~rdo5 = ~si5.value;});
2810                                 if(~si5.value == "f6", {~rslot5 = ~bplacef6; ~rdo5 = ~si5.value;});
2811                                 if(~si5.value == "s6", {~rslot5 = ~bplaces6; ~rdo5 = ~si5.value;});
2812                                 if(~si5.value == "o7", {~rslot5 = ~bplaceo7; ~rdo5 = ~si5.value;});
2813                                 if(~si5.value == "f7", {~rslot5 = ~bplacef7; ~rdo5 = ~si5.value;});
2814                                 if(~si5.value == "s7", {~rslot5 = ~bplaces7; ~rdo5 = ~si5.value;});
2815                                 if(~si5.value == "o8", {~rslot5 = ~bplaceo8; ~rdo5 = ~si5.value;});
2816                                 if(~si5.value == "f8", {~rslot5 = ~bplacef8; ~rdo5 = ~si5.value;});
2817                                 if(~si5.value == "s8", {~rslot5 = ~bplaces8; ~rdo5 = ~si5.value;});
2818                         };
2819                         ~si6set = {
2820                                 if(~si6.value == "o1", {~rslot6 = ~bplaceo1; ~rdo6 = ~si6.value;});
2821                                 if(~si6.value == "f1", {~rslot6 = ~bplacef1; ~rdo6 = ~si6.value;});
2822                                 if(~si6.value == "s1", {~rslot6 = ~bplaces1; ~rdo6 = ~si6.value;});
2823                                 if(~si6.value == "o2", {~rslot6 = ~bplaceo2; ~rdo6 = ~si6.value;});
2824                                 if(~si6.value == "f2", {~rslot6 = ~bplacef2; ~rdo6 = ~si6.value;});
2825                                 if(~si6.value == "s2", {~rslot6 = ~bplaces2; ~rdo6 = ~si6.value;});
2826                                 if(~si6.value == "o3", {~rslot6 = ~bplaceo3; ~rdo6 = ~si6.value;});
2827                                 if(~si6.value == "f3", {~rslot6 = ~bplacef3; ~rdo6 = ~si6.value;});
2828                                 if(~si6.value == "s3", {~rslot6 = ~bplaces3; ~rdo6 = ~si6.value;});
2829                                 if(~si6.value == "o4", {~rslot6 = ~bplaceo4; ~rdo6 = ~si6.value;});
2830                                 if(~si6.value == "f4", {~rslot6 = ~bplacef4; ~rdo6 = ~si6.value;});
2831                                 if(~si6.value == "s4", {~rslot6 = ~bplaces4; ~rdo6 = ~si6.value;});
2832                                 if(~si6.value == "o5", {~rslot6 = ~bplaceo5; ~rdo6 = ~si6.value;});
2833                                 if(~si6.value == "f5", {~rslot6 = ~bplacef5; ~rdo6 = ~si6.value;});
2834                                 if(~si6.value == "s5", {~rslot6 = ~bplaces5; ~rdo6 = ~si6.value;});
2835                                 if(~si6.value == "o6", {~rslot6 = ~bplaceo6; ~rdo6 = ~si6.value;});
2836                                 if(~si6.value == "f6", {~rslot6 = ~bplacef6; ~rdo6 = ~si6.value;});
2837                                 if(~si6.value == "s6", {~rslot6 = ~bplaces6; ~rdo6 = ~si6.value;});
2838                                 if(~si6.value == "o7", {~rslot6 = ~bplaceo7; ~rdo6 = ~si6.value;});
2839                                 if(~si6.value == "f7", {~rslot6 = ~bplacef7; ~rdo6 = ~si6.value;});
2840                                 if(~si6.value == "s7", {~rslot6 = ~bplaces7; ~rdo6 = ~si6.value;});
2841                                 if(~si6.value == "o8", {~rslot6 = ~bplaceo8; ~rdo6 = ~si6.value;});
2842                                 if(~si6.value == "f8", {~rslot6 = ~bplacef8; ~rdo6 = ~si6.value;});
2843                                 if(~si6.value == "s8", {~rslot6 = ~bplaces8; ~rdo6 = ~si6.value;});
2844                         };
2845                         ~si7set = {
2846                                 if(~si7.value == "o1", {~rslot7 = ~bplaceo1; ~rdo7 = ~si7.value;});
2847                                 if(~si7.value == "f1", {~rslot7 = ~bplacef1; ~rdo7 = ~si7.value;});
2848                                 if(~si7.value == "s1", {~rslot7 = ~bplaces1; ~rdo7 = ~si7.value;});
2849                                 if(~si7.value == "o2", {~rslot7 = ~bplaceo2; ~rdo7 = ~si7.value;});
2850                                 if(~si7.value == "f2", {~rslot7 = ~bplacef2; ~rdo7 = ~si7.value;});
2851                                 if(~si7.value == "s2", {~rslot7 = ~bplaces2; ~rdo7 = ~si7.value;});
2852                                 if(~si7.value == "o3", {~rslot7 = ~bplaceo3; ~rdo7 = ~si7.value;});
2853                                 if(~si7.value == "f3", {~rslot7 = ~bplacef3; ~rdo7 = ~si7.value;});
2854                                 if(~si7.value == "s3", {~rslot7 = ~bplaces3; ~rdo7 = ~si7.value;});
2855                                 if(~si7.value == "o4", {~rslot7 = ~bplaceo4; ~rdo7 = ~si7.value;});
2856                                 if(~si7.value == "f4", {~rslot7 = ~bplacef4; ~rdo7 = ~si7.value;});
2857                                 if(~si7.value == "s4", {~rslot7 = ~bplaces4; ~rdo7 = ~si7.value;});
2858                                 if(~si7.value == "o5", {~rslot7 = ~bplaceo5; ~rdo7 = ~si7.value;});
2859                                 if(~si7.value == "f5", {~rslot7 = ~bplacef5; ~rdo7 = ~si7.value;});
2860                                 if(~si7.value == "s5", {~rslot7 = ~bplaces5; ~rdo7 = ~si7.value;});
2861                                 if(~si7.value == "o6", {~rslot7 = ~bplaceo6; ~rdo7 = ~si7.value;});
2862                                 if(~si7.value == "f6", {~rslot7 = ~bplacef6; ~rdo7 = ~si7.value;});
2863                                 if(~si7.value == "s6", {~rslot7 = ~bplaces6; ~rdo7 = ~si7.value;});
2864                                 if(~si7.value == "o7", {~rslot7 = ~bplaceo7; ~rdo7 = ~si7.value;});
2865                                 if(~si7.value == "f7", {~rslot7 = ~bplacef7; ~rdo7 = ~si7.value;});
2866                                 if(~si7.value == "s7", {~rslot7 = ~bplaces7; ~rdo7 = ~si7.value;});
2867                                 if(~si7.value == "o8", {~rslot7 = ~bplaceo8; ~rdo7 = ~si7.value;});
2868                                 if(~si7.value == "f8", {~rslot7 = ~bplacef8; ~rdo7 = ~si7.value;});
2869                                 if(~si7.value == "s8", {~rslot7 = ~bplaces8; ~rdo7 = ~si7.value;});
2870                         };
2871                         ~si8set = {
2872                                 if(~si8.value == "o1", {~rslot8 = ~bplaceo1; ~rdo8 = ~si8.value;});
2873                                 if(~si8.value == "f1", {~rslot8 = ~bplacef1; ~rdo8 = ~si8.value;});
2874                                 if(~si8.value == "s1", {~rslot8 = ~bplaces1; ~rdo8 = ~si8.value;});
2875                                 if(~si8.value == "o2", {~rslot8 = ~bplaceo2; ~rdo8 = ~si8.value;});
2876                                 if(~si8.value == "f2", {~rslot8 = ~bplacef2; ~rdo8 = ~si8.value;});
2877                                 if(~si8.value == "s2", {~rslot8 = ~bplaces2; ~rdo8 = ~si8.value;});
2878                                 if(~si8.value == "o3", {~rslot8 = ~bplaceo3; ~rdo8 = ~si8.value;});
2879                                 if(~si8.value == "f3", {~rslot8 = ~bplacef3; ~rdo8 = ~si8.value;});
2880                                 if(~si8.value == "s3", {~rslot8 = ~bplaces3; ~rdo8 = ~si8.value;});
2881                                 if(~si8.value == "o4", {~rslot8 = ~bplaceo4; ~rdo8 = ~si8.value;});
2882                                 if(~si8.value == "f4", {~rslot8 = ~bplacef4; ~rdo8 = ~si8.value;});
2883                                 if(~si8.value == "s4", {~rslot8 = ~bplaces4; ~rdo8 = ~si8.value;});
2884                                 if(~si8.value == "o5", {~rslot8 = ~bplaceo5; ~rdo8 = ~si8.value;});
2885                                 if(~si8.value == "f5", {~rslot8 = ~bplacef5; ~rdo8 = ~si8.value;});
2886                                 if(~si8.value == "s5", {~rslot8 = ~bplaces5; ~rdo8 = ~si8.value;});
2887                                 if(~si8.value == "o6", {~rslot8 = ~bplaceo6; ~rdo8 = ~si8.value;});
2888                                 if(~si8.value == "f6", {~rslot8 = ~bplacef6; ~rdo8 = ~si8.value;});
2889                                 if(~si8.value == "s6", {~rslot8 = ~bplaces6; ~rdo8 = ~si8.value;});
2890                                 if(~si8.value == "o7", {~rslot8 = ~bplaceo7; ~rdo8 = ~si8.value;});
2891                                 if(~si8.value == "f7", {~rslot8 = ~bplacef7; ~rdo8 = ~si8.value;});
2892                                 if(~si8.value == "s7", {~rslot8 = ~bplaces7; ~rdo8 = ~si8.value;});
2893                                 if(~si8.value == "o8", {~rslot8 = ~bplaceo8; ~rdo8 = ~si8.value;});
2894                                 if(~si8.value == "f8", {~rslot8 = ~bplacef8; ~rdo8 = ~si8.value;});
2895                                 if(~si8.value == "s8", {~rslot8 = ~bplaces8; ~rdo8 = ~si8.value;});
2896                         };
2897
2898
2899                         /*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], {*/
2900
2901                         /*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 = [0,0,0,0,0,0,0,0,0,0,0,0];});
2902                         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 = [0,0,0,0,0,0,0,0,0,0,0,0];});
2903                         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 = [0,0,0,0,0,0,0,0,0,0,0,0];});
2904                         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 = [0,0,0,0,0,0,0,0,0,0,0,0];});
2905                         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 = [0,0,0,0,0,0,0,0,0,0,0,0];});
2906                         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 = [0,0,0,0,0,0,0,0,0,0,0,0];});
2907                         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 = [0,0,0,0,0,0,0,0,0,0,0,0];});
2908                         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 = [0,0,0,0,0,0,0,0,0,0,0,0];});
2909                         */
2910
2911                         ~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;
2912
2913                                 if(button.value == 1, {
2914                                         ({
2915                                                 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;
2916                                                 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;
2917                                                 ~rview = View(w, Rect(Window.screenBounds.width-(340+46),Window.screenBounds.height-(340+46/1.6180339887499)-110,340+46,340+46/1.6180339887499)).front;
2918                                                 /*w.view.decorator=FlowLayout(w.view.bounds);
2919                                                 w.view.decorator.gap=2@2;*/
2920
2921                                                 top = 0;
2922
2923                                                 i1 = StaticText(~rview, Rect(leftdo , top=top, width, height)).background_(Color.black).string_("rslot1").stringColor_(Color.white);
2924                                                 i2 = StaticText(~rview, Rect(leftdo , top=top+height, width, height)).background_(Color.black).string_("rslot2").stringColor_(Color.white);
2925                                                 i3 = StaticText(~rview, Rect(leftdo , top=top+height, width, height)).background_(Color.black).string_("rslot3").stringColor_(Color.white);
2926                                                 i4 = StaticText(~rview, Rect(leftdo , top=top+height, width, height)).background_(Color.black).string_("rslot4").stringColor_(Color.white);
2927                                                 i5 = StaticText(~rview, Rect(leftdo , top=top+height, width, height)).background_(Color.black).string_("rslot5").stringColor_(Color.white);
2928                                                 i6 = StaticText(~rview, Rect(leftdo , top=top+height, width, height)).background_(Color.black).string_("rslot6").stringColor_(Color.white);
2929                                                 i7 = StaticText(~rview, Rect(leftdo , top=top+height, width, height)).background_(Color.black).string_("rslot7").stringColor_(Color.white);
2930                                                 i8 = StaticText(~rview, Rect(leftdo , top=top+height, width, height)).background_(Color.black).string_("rslot8").stringColor_(Color.white);
2931
2932                                                 top = 0;
2933
2934                                                 ~si1a=TextField(~rview, Rect(leftdobox , top=top, widthbox/2, heightbox)).background_(Color.black).stringColor_(Color.white).value_(~rdo1a);
2935                                                 ~si1b=TextField(~rview, Rect(leftdobox+(widthbox/2) , top=top, widthbox/2, heightbox)).background_(Color.black).stringColor_(Color.white).value_(~rdo1b);
2936                                                 ~si2=TextField(~rview, Rect(leftdobox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).stringColor_(Color.white).value_(~rdo2);
2937                                                 ~si3=TextField(~rview, Rect(leftdobox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).stringColor_(Color.white).value_(~rdo3);
2938                                                 ~si4=TextField(~rview, Rect(leftdobox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).stringColor_(Color.white).value_(~rdo4);
2939                                                 ~si5=TextField(~rview, Rect(leftdobox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).stringColor_(Color.white).value_(~rdo5);
2940                                                 ~si6=TextField(~rview, Rect(leftdobox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).stringColor_(Color.white).value_(~rdo6);
2941                                                 ~si7=TextField(~rview, Rect(leftdobox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).stringColor_(Color.white).value_(~rdo7);
2942                                                 ~si8=TextField(~rview, Rect(leftdobox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).stringColor_(Color.white).value_(~rdo8);
2943
2944                                                 top = 0;
2945
2946                                                 t1 = StaticText(~rview, Rect(lefttime , top=top, width, height)).background_(Color.black).string_("rtime1").stringColor_(Color.white);
2947                                                 t2 = StaticText(~rview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("rtime2").stringColor_(Color.white);
2948                                                 t3 = StaticText(~rview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("rtime3").stringColor_(Color.white);
2949                                                 t4 = StaticText(~rview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("rtime4").stringColor_(Color.white);
2950                                                 t5 = StaticText(~rview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("rtime5").stringColor_(Color.white);
2951                                                 t6 = StaticText(~rview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("rtime6").stringColor_(Color.white);
2952                                                 t7 = StaticText(~rview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("rtime7").stringColor_(Color.white);
2953                                                 t8 = StaticText(~rview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("rtime8").stringColor_(Color.white);
2954                                                 tall = StaticText(~rview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("all time").stringColor_(Color.white);
2955
2956
2957                                                 top = 0;
2958
2959                                                 st1=NumberBox(~rview, Rect(lefttimebox , top=top, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~rtime1);
2960                                                 st2=NumberBox(~rview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~rtime2);
2961                                                 st3=NumberBox(~rview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~rtime3);
2962                                                 st4=NumberBox(~rview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~rtime4);
2963                                                 st5=NumberBox(~rview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~rtime5);
2964                                                 st6=NumberBox(~rview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~rtime6);
2965                                                 st7=NumberBox(~rview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~rtime7);
2966                                                 st8=NumberBox(~rview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~rtime8);
2967                                                 stall=NumberBox(~rview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~rtimeall);
2968
2969
2970                                                 ~si1a.action_({~si1aset.value});
2971                                                 ~si1b.action_({~si1bset.value});
2972                                                 ~si2.action_({~si2set.value});
2973                                                 ~si3.action_({~si3set.value});
2974                                                 ~si4.action_({~si4set.value});
2975                                                 ~si5.action_({~si5set.value});
2976                                                 ~si6.action_({~si6set.value});
2977                                                 ~si7.action_({~si7set.value});
2978                                                 ~si8.action_({~si8set.value});
2979
2980
2981                                                 stall.action_({arg val;
2982                                                         ~rtimeall = val.value;
2983                                                         ~rtime1 = val.value;
2984                                                         ~rtime2 = val.value;
2985                                                         ~rtime3 = val.value;
2986                                                         ~rtime4 = val.value;
2987                                                         ~rtime5 = val.value;
2988                                                         ~rtime6 = val.value;
2989                                                         ~rtime7 = val.value;
2990                                                         ~rtime8 = val.value;
2991                                                         ~rview.close; ~rviewbutton.valueAction_(1);
2992                                                 });
2993                                                 st1.action_({arg val; ~rtime1 = val.value;});
2994                                                 st2.action_({arg val; ~rtime2 = val.value;});
2995                                                 st3.action_({arg val; ~rtime3 = val.value;});
2996                                                 st4.action_({arg val; ~rtime4 = val.value;});
2997                                                 st5.action_({arg val; ~rtime5 = val.value;});
2998                                                 st6.action_({arg val; ~rtime6 = val.value;});
2999                                                 st7.action_({arg val; ~rtime7 = val.value;});
3000                                                 st8.action_({arg val; ~rtime8 = val.value;});
3001
3002                                                 ~rview.background_(Color.black);
3003
3004                                                 ~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;
3005
3006                                                         if(button.value == 1, {
3007
3008                                                                 ~loop = Task({
3009                                                                         1.do({
3010                                                                                 {~rslot1a.valueAction_(0)}.defer;
3011                                                                                 ~rtime1.wait;
3012                                                                                 {~rslot2.valueAction_(0)}.defer;
3013                                                                                 ~rtime2.wait;
3014                                                                                 {~rslot3.valueAction_(0)}.defer;
3015                                                                                 ~rtime3.wait;
3016                                                                                 {~rslot4.valueAction_(0)}.defer;
3017                                                                                 ~rtime4.wait;
3018                                                                                 {~rslot5.valueAction_(0)}.defer;
3019                                                                                 ~rtime5.wait;
3020                                                                                 {~rslot6.valueAction_(0)}.defer;
3021                                                                                 ~rtime6.wait;
3022                                                                                 {~rslot7.valueAction_(0)}.defer;
3023                                                                                 ~rtime7.wait;
3024                                                                                 {~rslot8.valueAction_(0)}.defer;
3025                                                                                 ~rtime8.wait;
3026                                                                         });
3027                                                                         inf.do({
3028                                                                                 {~rslot1b.valueAction_(0)}.defer;
3029                                                                                 ~rtime1.wait;
3030                                                                                 {~rslot2.valueAction_(0)}.defer;
3031                                                                                 ~rtime2.wait;
3032                                                                                 {~rslot3.valueAction_(0)}.defer;
3033                                                                                 ~rtime3.wait;
3034                                                                                 {~rslot4.valueAction_(0)}.defer;
3035                                                                                 ~rtime4.wait;
3036                                                                                 {~rslot5.valueAction_(0)}.defer;
3037                                                                                 ~rtime5.wait;
3038                                                                                 {~rslot6.valueAction_(0)}.defer;
3039                                                                                 ~rtime6.wait;
3040                                                                                 {~rslot7.valueAction_(0)}.defer;
3041                                                                                 ~rtime7.wait;
3042                                                                                 {~rslot8.valueAction_(0)}.defer;
3043                                                                                 ~rtime8.wait;
3044                                                                         });
3045                                                                 }); SystemClock(~loop.start); ~numsynths.stop;}, {
3046
3047                                                                         SystemClock(~loop.stop); SystemClock(~loop.reset); ~synthfree.value; ~pauseroutinebutton.value = 0; ~numsynths.stop; ~numsynthsfunc.value;});
3048                                                 });
3049
3050                                                 ~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;
3051
3052                                                         if(button.value == 1, {SystemClock(~loop.pause); ~synthpause.value;}, {SystemClock(~loop.resume); ~synthflow.value;});
3053                                                 });
3054
3055                                                 ~closeroutinebutton = Button.new(~rview,Rect(220, top+40, 40, 40/~gm)).states_([["close",Color.white,Color.black]]).action_({arg button;
3056
3057                                                         ~rview.close; ~rviewbutton.value = 0;
3058                                                 });
3059
3060                                         }.value);
3061
3062                                         if(~loop.isPlaying == true, {~routinebutton.value = 1;});
3063                                         ~rview.front;
3064                                 }, {~rview.close});
3065                         });
3066
3067                         ~synthmonitor = StaticText(w, Rect(Window.screenBounds.width-14,~bpt+49,18,18/1.6180339887499)).background_(Color.black).stringColor_(Color.white);
3068                         ~synthmonitor.string = if(~currentsynth == nil, {"nil".asString});
3069
3070                         ~synthmonitorfunc = {
3071                                 ~synthmonitor.close;
3072                                 ~synthmonitor = StaticText(w, Rect(Window.screenBounds.width-14,~bpt+49,18,18/1.6180339887499)).background_(Color.black).stringColor_(Color.white);
3073                                 ~synthmonitor.string = ~currentsynth.asString;
3074                                 ~synthmonitor.font = Font(size: 10);
3075                         };
3076
3077                         ~synthmonitorfunc.value;
3078
3079                         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;
3080
3081                                 if(button.value == 1, {
3082                                         ~hb = TextView(w, Rect(0,0, Window.screenBounds.width, Window.screenBounds.height-200)).background_(Color.black);
3083                                         (~hb.string =
3084                                                 "(scroll down to see more)"++"\n"++"\n"++"\n"++
3085                                                 "GUI Buttons"++"\n"++"\n"++"\n"++
3086                                                 "synth0/synth1: start/stop synth set"++"\n"++"\n"++
3087                                                 "pause0/pause1: pause/unpause synth set"++"\n"++"\n"++
3088                                                 "copy: copy frequency/note info"++"\n"++"\n"++
3089                                                 "kws/inst: change number of kw(King Wen) sequences per time wave instance. press set to load"++"\n"++"\n"++
3090                                                 "steps/kws: change number of interval steps which occur in each kw sequence. press set to load"++"\n"++"\n"++
3091                                                 "hz frequency: set the base frequency. press set to load"++"\n"++"\n"++
3092                                                 "s1-s8: set/save note positions"++"\n"++"\n"++
3093                                                 "uc-u8: undo changes to set note positions. press set to load"++"\n"++"\n"++
3094                                                 "o1-o8: play set/saved note positions by opening a new synth set"++"\n"++"\n"++
3095                                                 "f1-f8: flow transition to set/saved note positions"++"\n"++"\n"++
3096                                                 "s1-s8: slide transition to set/saved note positions"++"\n"++"\n"++
3097                                                 "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"++
3098                                                 "rc: start recording"++"\n"++"\n"++
3099                                                 "prc: pause recording"++"\n"++"\n"++
3100                                                 "/rc: stop recording"++"\n"++"\n"++
3101                                                 "m/u: mute/unmute all"++"\n"++"\n"++
3102                                                 "1-7: mute or unmute individual synth"++"\n"++"\n"++
3103                                                 "st: stop synth timer/show timer results"++"\n"++"\n"++
3104                                                 "r: routine/loop function - rslot for synth set, rtime for time between transitions"++"\n"++"\n"++
3105                                                 "s: set slide time/increment"++"\n"++"\n"++
3106                                                 "i: help"++"\n"++"\n"++
3107                                                 "m: minimize window"++"\n"++"\n"++
3108                                                 "c: close window"++"\n"++"\n"++"\n"++
3109                                                 "Keyboard Functions (functionality will vary with device)"++"\n"++"\n"++"\n"++
3110                                                 "s: start/stop synth set"++"\n"++"\n"++
3111                                                 "space bar: pause/unpause synth set"++"\n"++"\n"++
3112                                                 "ctrl-period/cmd-period: free server"++"\n"++"\n"++
3113                                                 "left/right arrow(or J and L): move down/up note"++"\n"++"\n"++
3114                                                 "up/down arrow(or I and K): change synth for left/right arrow note function"++"\n"++"\n"++
3115                                                 "#1-7 on keyboard: choose synth for left/right arrow note function"++"\n"++"\n"++
3116                                                 "r: routine/loop function - rslot for synth set, rtime for time between transitions"++"\n"++"\n"++
3117                                                 "m: mute/unmute all"++"\n"++"\n"++
3118                                                 "c: copy function"++"\n"++"\n"++
3119                                                 "t: timed synth function"++"\n"++"\n"++
3120                                                 "esc: minimize window"
3121                                                 ;
3122                                         );
3123                                         ~hb.stringColor = Color.white;
3124                                         },
3125                                         {~hb.close;});
3126                         });
3127
3128                         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],["1set",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button; if(button.value == 1, {~r1=fp1;~r2=fp2;~r3=fp3;~r4=fp4;~r5=fp5;~r6=fp6;~r7=fp7;~r8=fp8;~r9=fp9;~r10=fp10;~r11=fp11;~r12=fp12; #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;}, {nil});});
3129                         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],["2set",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button; if(button.value == 1, {~r1=fp1b;~r2=fp2b;~r3=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}, {nil});});
3130                         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],["3set",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button; if(button.value == 1, {~r1=fp1c;~r2=fp2c;~r3=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}, {nil});});
3131                         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],["4set",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button; if(button.value == 1, {~r1=fp1d;~r2=fp2d;~r3=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}, {nil});});
3132                         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],["5set",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button; if(button.value == 1, {~r1=fp1e;~r2=fp2e;~r3=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}, {nil});});
3133                         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],["6set",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button; if(button.value == 1, {~r1=fp1f;~r2=fp2f;~r3=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}, {nil});});
3134                         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],["7set",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button; if(button.value == 1, {~r1=fp1g;~r2=fp2g;~r3=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}, {nil});});
3135                         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],["8set",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button; if(button.value == 1, {~r1=fp1h;~r2=fp2h;~r3=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}, {nil});});
3136
3137
3138                         ~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;});
3139
3140                         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;
3141                                 case
3142                                 {~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;}
3143                                 {~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;}
3144                                 {~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;}
3145                                 {~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;}
3146                                 {~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;}
3147                                 {~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;}
3148                                 {~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;}
3149                                 {~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;}
3150                                 {~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;};
3151                         });
3152
3153                         /*{[~r1,~r2,~r3,~r4,~r5,~r6,~r7,~r9,~r10,~r11,~r12] = [fp1,fp2,fp3,fp4,fp5,fp6,fp7,fp8,fp9,fp10,fp11,fp12]}
3154                         {[~r1b,~r2b,~r3b,~r4b,~r5b,~r6b,~r7b,~r9b,~r10b,~r11b,~r12b] = [fp1b,fp2b,fp3b,fp4b,fp5b,fp6b,fp7b,fp8b,fp9b,fp10b,fp11b,fp12b]}
3155                         {[~r1c,~r2c,~r3c,~r4c,~r5c,~r6c,~r7c,~r9c,~r10c,~r11c,~r12c] = [fp1c,fp2c,fp3c,fp4c,fp5c,fp6c,fp7c,fp8c,fp9c,fp10c,fp11c,fp12c]}
3156                         {[~r1d,~r2d,~r3d,~r4d,~r5d,~r6d,~r7d,~r9d,~r10d,~r11d,~r12d] = [fp1d,fp2d,fp3d,fp4d,fp5d,fp6d,fp7d,fp8d,fp9d,fp10d,fp11d,fp12d]}
3157                         {[~r1e,~r2e,~r3e,~r4e,~r5e,~r6e,~r7e,~r9e,~r10e,~r11e,~r12e] = [fp1e,fp2e,fp3e,fp4e,fp5e,fp6e,fp7e,fp8e,fp9e,fp10e,fp11e,fp12e]}
3158                         {[~r1f,~r2f,~r3f,~r4f,~r5f,~r6f,~r7f,~r9f,~r10f,~r11f,~r12f] = [fp1f,fp2f,fp3f,fp4f,fp5f,fp6f,fp7f,fp8f,fp9f,fp10f,fp11f,fp12f]}
3159                         {[~r1g,~r2g,~r3g,~r4g,~r5g,~r6g,~r7g,~r9g,~r10g,~r11g,~r12g] = [fp1g,fp2g,fp3g,fp4g,fp5g,fp6g,fp7g,fp8g,fp9g,fp10g,fp11g,fp12g]}
3160                         {[~r1h,~r2h,~r3h,~r4h,~r5h,~r6h,~r7h,~r9h,~r10h,~r11h,~r12h] = [fp1h,fp2h,fp3h,fp4h,fp5h,fp6h,fp7h,fp8h,fp9h,fp10h,fp11h,fp12h]}*/
3161                         /*set = PopUpMenu(w, Rect(Window.screenBounds.width-20,~bpt+69+5-(20/1.6180339887499),20,20/1.6180339887499)).items_(["undo"]).background_(Color.black).stringColor_(Color.white).action({
3162                         case
3163                         {~r1,~r2,~r3,~r4,~r5,~r6,~r7,~r1,~r1,~r1,~r1,~r1,}{}
3164                         });
3165
3166                         set2 = Button(w,Rect(20+60*2+16+140,Window.screenBounds.height-88+(16/1.6180339887499*0),60,60/1.6180339887499)).states_([["set",Color.white,Color.black]]).mouseDownAction_({
3167                         */
3168
3169                         ~bfreqstart = ~basefreq;
3170                         ~bfreq = PopUpMenu(w, Rect(20+60*2+16,Window.screenBounds.height-52+(16/1.6180339887499*0),180,60/1.6180339887499)).items_(~bfreqv = (-1); [~basefreq.asString++" hz"]++Array.fill(128, {~freqmap.at(~bfreqv=~bfreqv+1).asString++" hz"})).background_(Color.black).stringColor_(Color.white).action_({arg button;});
3171
3172                         ~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; Server.default.record; ~numsynths.stop; if(button.value == 0, {button.value = 1});});
3173
3174                         ~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, {Server.default.pauseRecording;}, {Server.default.record});});
3175
3176                         ~stoprecord = Button.new(w,Rect(Window.screenBounds.width-(Window.screenBounds.width/3)+28+28+39,Window.screenBounds.height-52+19.777087639995,28,28/1.6180339887499)).states_([["/rc",Color.white,Color.black]]).action_({arg button; Server.default.stopRecording; ~startrecord.value = 0; ~pauserecord.value = 0; ~numsynths.stop; ~numsynths.play;});
3177
3178                         /*~free = Button.new(w,Rect(Window.screenBounds.width-20-20-20,~bpt+69+5,20,20/1.6180339887499)).states_([["fs",Color.white,Color.black]]).action_({arg button;
3179                         ~synthfree.value;
3180                         });*/
3181                         /*~freeserver = Button.new(w,Rect(Window.screenBounds.width-20-20-20,~bpt+75,20,20/1.6180339887499)).states_([["fs",Color.white,Color.black]]).action_({arg button;
3182                         ~synthfree.value; Server.freeAll;
3183                         });*/
3184                         ~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;});
3185
3186                         ~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; w.close; ~numsynths.stop;});
3187
3188
3189                         w.front; w.fullScreen;
3190
3191                         //Developed by Ken Brant
3192
3193                 }.value);
3194 });
3195 );
3196
3197 //Interpreted King Wen Sequence
3198
3199 /*
3200
3201 (#a,b,c,d,e,f = /*[ 128.43436842029,128.43436842029,128.43436842029,128.43436842029,128.43436842029,128.43436842029  ]*/
3202 [ ~basefreq,~basefreq,~basefreq,~basefreq,~basefreq,~basefreq  ];
3203 ~a = a; ~b = b; ~c =c; ~d = d; ~e = e;~f=f;);
3204
3205 ~fth = 1.4142135623729;
3206
3207 /*1*/   #a,b,c,d,e,f=[ ~a,~b,~c,~d,~e,~f  ],
3208 /*2*/   [ a = a/~fth*n1, b = b/~fth*n1, c = c/~fth*n1, d = d/~fth*n1, e = e/~fth*n1, f = f/~fth*n1 ],
3209 /*3*/   [ a = a,         b = b*~fth,    c = c,         d = d,         e = e,         f = f*~fth    ],
3210 /*4*/   [ a = a*~fth,    b = b/~fth,    c = c,         d = d,         e = e*~fth,    f = f/~fth    ],
3211 /*5*/   [ a = a/~fth,    b = b*~fth,    c = c,         d = d*~fth,    e = e,         f = f*~fth    ],
3212 /*6*/   [ a = a*~fth,    b = b,         c = c*~fth,    d = d/~fth,    e = e,         f = f/~fth    ],
3213 /*7*/   [ a = a/~fth,    b = b/~fth,    c = c/~fth,    d = d,         e = e,         f = f         ],
3214 /*8*/   [ a = a,         b = b*~fth,    c = c,         d = d,         e = e/~fth,    f = f         ],
3215 /*9*/   [ a = a*~fth,    b = b,         c = c,         d = d*~fth,    e = e*~fth,    f = f*~fth    ],
3216 /*10*/  [ a = a,         b = b,         c = c*~fth,    d = d/~fth,    e = e,         f = f         ],
3217 /*11*/  [ a = a/~fth,    b = b/~fth,    c = c/~fth,    d = d*~fth,    e = e,         f = f         ],
3218 /*12*/  [ a = a*~fth*n2, b = b*~fth*n2, c = c*~fth*n2, d = d/~fth*n2, e = e/~fth*n2, f = f/~fth*n2 ],
3219 /*13*/  [ a = a,         b = b,         c = c,         d = d*~fth,    e = e,         f = f*~fth    ],
3220 /*14*/  [ a = a,         b = b/~fth,    c = c,         d = d,         e = e*~fth,    f = f         ],
3221 /*15*/  [ a = a/~fth,    b = b,         c = c/~fth,    d = d,         e = e/~fth,    f = f/~fth    ],
3222 /*16*/  [ a = a,         b = b,         c = c*~fth,    d = d/~fth,    e = e,         f = f         ],
3223 /*17*/  [ a = a,         b = b*~fth,    c = c,         d = d,         e = e,         f = f*~fth    ],
3224 /*18*/  [ a = a*~fth*n3, b = b/~fth*n3, c = c/~fth*n3, d = d*~fth*n3, e = e*~fth*n3, f = f/~fth*n3 ],
3225 /*19*/  [ a = a/~fth,    b = b,         c = c,         d = d/~fth,    e = e,         f = f*~fth    ],
3226 /*20*/  [ a = a*~fth,    b = b*~fth,    c = c,         d = d,         e = e/~fth,    f = f/~fth    ],
3227 /*21*/  [ a = a,         b = b/~fth,    c = c*~fth,    d = d,         e = e,         f = f*~fth    ],
3228 /*22*/  [ a = a,         b = b,         c = c/~fth,    d = d*~fth,    e = e,         f = f         ],
3229 /*23*/  [ a = a,         b = b,         c = c,         d = d/~fth,    e = e,         f = f/~fth    ],
3230 /*24*/  [ a = a/~fth,    b = b,         c = c,         d = d,         e = e,         f = f*~fth    ],
3231 /*25*/  [ a = a*~fth,    b = b*~fth,    c = c*~fth,    d = d,         e = e,         f = f         ],
3232 /*26*/  [ a = a,         b = b/~fth,    c = c/~fth,    d = d*~fth,    e = e*~fth,    f = f         ],
3233 /*27*/  [ a = a,         b = b,         c = c,         d = d/~fth,    e = e/~fth,    f = f         ],
3234 /*28*/  [ a = a/~fth*n4, b = b*~fth*n4, c = c*~fth*n4, d = d*~fth*n4, e = e*~fth*n4, f = f/~fth*n4 ],
3235 /*29*/  [ a = a,         b = b,         c = c/~fth,    d = d/~fth,    e = e,         f = f         ],
3236 /*30*/  [ a = a*~fth*n5, b = b/~fth*n5, c = c*~fth*n5, d = d*~fth*n5, e = e/~fth*n5, f = f*~fth*n5 ],
3237 /*31*/  [ a = a/~fth,    b = b*~fth,    c = c,         d = d,         e = e,         f = f/~fth    ],
3238 /*32*/  [ a = a,         b = b/~fth,    c = c,         d = d,         e = e*~fth,    f = f         ],
3239 /*33*/  [ a = a*~fth,    b = b*~fth,    c = c,         d = d,         e = e/~fth,    f = f         ],
3240 /*34*/  [ a = a/~fth,    b = b/~fth,    c = c,         d = d,         e = e*~fth,    f = f*~fth    ],
3241 /*35*/  [ a = a*~fth,    b = b,         c = c,         d = d/~fth,    e = e/~fth,    f = f/~fth    ],
3242 /*36*/  [ a = a/~fth,    b = b,         c = c/~fth,    d = d*~fth,    e = e,         f = f*~fth    ],
3243 /*37*/  [ a = a*~fth,    b = b*~fth,    c = c,         d = d,         e = e,         f = f         ],
3244 /*38*/  [ a = a,         b = b/~fth,    c = c*~fth,    d = d/~fth,    e = e*~fth,    f = f         ],
3245 /*39*/  [ a = a/~fth*n6, b = b*~fth*n6, c = c/~fth*n6, d = d*~fth*n6, e = e/~fth*n6, f = f/~fth*n6 ],
3246 /*40*/  [ a = a,         b = b/~fth,    c = c*~fth,    d = d/~fth,    e = e*~fth,    f = f         ],
3247 /*41*/  [ a = a*~fth,    b = b,         c = c/~fth,    d = d,         e = e,         f = f*~fth    ],
3248 /*42*/  [ a = a,         b = b*~fth,    c = c,         d = d,         e = e/~fth,    f = f         ],
3249 /*43*/  [ a = a/~fth,    b = b,         c = c*~fth,    d = d*~fth,    e = e*~fth,    f = f         ],
3250 /*44*/  [ a = a*~fth,    b = b,         c = c,         d = d,         e = e,         f = f/~fth    ],
3251 /*45*/  [ a = a/~fth,    b = b,         c = c,         d = d/~fth,    e = e/~fth,    f = f         ],
3252 /*46*/  [ a = a,         b = b/~fth,    c = c/~fth,    d = d*~fth,    e = e*~fth,    f = f         ],
3253 /*47*/  [ a = a,         b = b*~fth,    c = c*~fth,    d = d/~fth,    e = e,         f = f         ],
3254 /*48*/  [ a = a,         b = b,         c = c/~fth,    d = d*~fth,    e = e,         f = f         ],
3255 /*49*/  [ a = a,         b = b,         c = c*~fth,    d = d,         e = e/~fth,    f = f*~fth    ],
3256 /*50*/  [ a = a*~fth,    b = b/~fth,    c = c,         d = d,         e = e*~fth,    f = f/~fth    ],
3257 /*51*/  [ a = a/~fth,    b = b,         c = c,         d = d/~fth,    e = e/~fth,    f = f*~fth    ],
3258 /*52*/  [ a = a*~fth,    b = b,         c = c/~fth,    d = d*~fth,    e = e,         f = f/~fth    ],
3259 /*53*/  [ a = a,         b = b*~fth,    c = c,         d = d,         e = e,         f = f         ],
3260 /*54*/  [ a = a/~fth*n7, b = b/~fth*n7, c = c*~fth*n7, d = d/~fth*n7, e = e*~fth*n7, f = f*~fth*n7 ],
3261 /*55*/  [ a = a,         b = b,         c = c,         d = d*~fth,    e = e/~fth,    f = f         ],
3262 /*56*/  [ a = a*~fth,    b = b,         c = c,         d = d,         e = e,         f = f/~fth    ],
3263 /*57*/  [ a = a,         b = b*~fth,    c = c/~fth,    d = d,         e = e*~fth,    f = f         ],
3264 /*58*/  [ a = a/~fth,    b = b,         c = c*~fth,    d = d/~fth,    e = e,         f = f*~fth    ],
3265 /*59*/  [ a = a*~fth,    b = b,         c = c/~fth,    d = d,         e = e,         f = f/~fth    ],
3266 /*60*/  [ a = a/~fth,    b = b,         c = c,         d = d,         e = e,         f = f*~fth    ],
3267 /*61*/  [ a = a*~fth,    b = b,         c = c,         d = d,         e = e,         f = f         ],
3268 /*62*/  [ a = a/~fth*n8, b = b/~fth*n8, c = c*~fth*n8, d = d*~fth*n8, e = e/~fth*n8, f = f/~fth*n8 ],
3269 /*63*/  [ a = a,         b = b*~fth,    c = c/~fth,    d = d,         e = e,         f = f*~fth    ],
3270 /*64*/  [ a = a*~fth*n9, b = b/~fth*n9, c = c*~fth*n9, d = d/~fth*n9, e = e*~fth*n9, f = f/~fth*n9 ],
3271
3272 /*1*/   [ a = a,         b = b*~fth,    c = c,         d = d*~fth,    e = e,         f = f*~fth    ],...
3273
3274 */
3275