OSDN Git Service

Add files via upload
[timewavesynth/Timewave_Synthesizer.git] / timewavesynth8osx.scd
1 (
2 //To run the synth, click anywhere within the parenthesis above and press "ctrl - enter" or "cmd - return".
3 //A guide to using the instrument is available by clicking on the "i" button in the bottom right corner of the GUI.
4 //Several lines down, where it says "//VARIABLES YOU MAY WISH TO CHANGE", are variables that you can change for various things,
5 //including key codes for keyboard functions.
6
7 //It is recommended to reboot the interpreter in the "Language" toolbar, or by hightlighting - (thisProcess.platform.recompile);
8 //and pressing "ctrl - enter" or "cmd - return", before each server boot. Rebooting the interpreter is not needed to
9 //evaluate the code below if the server is booted.
10
11 //You can program/make a song by using the "timewavesynth8script.scd" file
12
13 //This synth is compatible with the Korg NanoKontrol 2
14
15 s.options.memSize = 2097152/4;
16 MIDIIn.connectAll;
17
18 (
19 s.boot;
20 s.waitForBoot({
21         var point, w, view, view2,
22         vol = 0.02,mute1,mute2,mute3,mute4,mute5,mute6,mute7,mute8,muteall,unmuteall,
23         g1,g2,g6,g8,g33,g48,g64,g72,g88,gm,ngm1,ngm2,ngm6,set1,set2,menu1,menu2,
24         ts,sts,str,spaceb,b1,b2,b3,b4,button,button1,info,
25         n1,n2,n3,n4,n5,n6,n7,n8,keycodeb,
26         f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12,
27         fp1,fp2,fp3,fp4,fp5,fp6,fp7,fp8,fp9,fp10,fp11,fp12,
28         fp1b,fp2b,fp3b,fp4b,fp5b,fp6b,fp7b,fp8b,fp9b,fp10b,fp11b,fp12b,
29         fp1c,fp2c,fp3c,fp4c,fp5c,fp6c,fp7c,fp8c,fp9c,fp10c,fp11c,fp12c,
30         fp1d,fp2d,fp3d,fp4d,fp5d,fp6d,fp7d,fp8d,fp9d,fp10d,fp11d,fp12d,
31         fp1e,fp2e,fp3e,fp4e,fp5e,fp6e,fp7e,fp8e,fp9e,fp10e,fp11e,fp12e,
32         fp1f,fp2f,fp3f,fp4f,fp5f,fp6f,fp7f,fp8f,fp9f,fp10f,fp11f,fp12f,
33         fp1g,fp2g,fp3g,fp4g,fp5g,fp6g,fp7g,fp8g,fp9g,fp10g,fp11g,fp12g,
34         fp1h,fp2h,fp3h,fp4h,fp5h,fp6h,fp7h,fp8h,fp9h,fp10h,fp11h,fp12h;
35
36
37         //VARIABLES YOU MAY WISH TO CHANGE
38
39
40         //note A tuning frequency in hz
41
42         ~tuning_frequency = 432; //default 432 hz
43
44         ~freqmap = (
45                 i = ~tuning_frequency
46                 / (2 ** (69 / 12)); a = (-1); b = (-1);
47                 Array.fill(128, {i * (2 ** (((a=a+1) / 12).trunc)) * ( (2 ** (12.reciprocal)) ** ((b=b+1)  % 12));
48         }));/*~freqmap = (i = 8.0271480262684/*-0.0000000000024*/; ~stepratio = 1.0594630943593; Array.fill(128, { i = i*~stepratio;}));*/
49
50
51         //base frequency for synth inst
52
53         ~base_frequency = ~freqmap.at(48); //default 48
54         ~synthdefnum = 7; //default 7
55
56         //volume
57
58         ~vol = 0.005; //default 0.005
59         ~vol1 = ~vol;
60         ~vol2 = ~vol;
61         ~vol3 = ~vol;
62         ~vol4 = ~vol;
63         ~vol5 = ~vol;
64         ~vol6 = ~vol;
65         ~vol7 = ~vol;
66         ~vol8 = ~vol;
67         ~vol9 = ~vol;
68         ~vol10 = ~vol;
69         ~vol11 = ~vol;
70         ~vol12 = ~vol;
71
72
73         //Key codes for keyboard functions - either unicode or keycode. To find key codes, see below:
74
75         ~rightarrow_keycode = 124;
76         ~leftarrow_keycode = 123;
77         ~uparrow_keycode = 126;
78         ~downarrow_keycode = 125;
79         ~enter_unicode = 13;
80         ~s_unicode = 115;
81         ~m_unicode = 109;
82         ~r_unicode = 114;
83         ~u_unicode = 117;
84         ~t_unicode = 116;
85         ~c_unicode = 99;
86         ~i_unicode = 105;
87         ~k_unicode = 107;
88         ~j_unicode = 106;
89         ~l_unicode = 108;
90         ~spacebar_unicode = 32;
91         ~one_unicode = 49;
92         ~two_unicode = 50;
93         ~three_unicode = 51;
94         ~four_unicode = 52;
95         ~five_unicode = 53;
96         ~six_unicode = 54;
97         ~seven_unicode = 55;
98         ~eight_unicode = 56;
99         ~escape_unicode = 27;
100
101
102         //To find key codes in post window... Hightlight the function and its parenthesis in red below,
103         //and press "ctrl - enter" or cmd - return" - then a small window called "test" will pop up...
104         //Press the "type" button inside of the window, then press anywhere on the keyboard to find
105         //the key codes in the right-hand side post window. Layout: [unicode, keycode, modifiers]. It is either a unicode
106         //or a keycode. Do not delete the /* and */ characters, or else the
107         //program will not run.
108
109         /*
110
111         (
112         var win = Window(\test, Rect(10, 100, 100, 50)),
113         btn = Button(win, Rect(5, 5, 90, 40)).states_([["type"]]);
114         btn.keyDownAction =
115         { arg view, char, modifiers, unicode, keycode;
116         ["unicode:"+unicode, "keycode:"+keycode, "modifiers:"+modifiers].postln;
117         };
118         win.front;
119         )
120
121         */
122
123
124         //gui set frequency ranges - currently set at the lowest and highest notes on a 128 key range using 432 hz A tuning
125         //you can change the tuning near top
126         //to insert custom ranges, replace "~freqmap.at()" with a hz frequency
127
128         ~outmin1 = ~freqmap.at(0);       // 8.0271480262684 hz                       //base frequency of upper set
129         ~outmax1 = ~freqmap.at(127);     // 12315.783879572 hz                       //high frequency of upper set
130         ~outmin2 = ~freqmap.at(0)*8;     // (8.0271480262684)*8 hz                   //base frequency of lower set
131         ~outmax2 = ~freqmap.at(127)/8;   // (12315.783879572)/8 hz;                  //high frequency of lower set
132
133         ~outmina = ~outmin2;
134         ~outmaxa = ~outmax2;
135         ~outminb = ~outmin1;
136         ~outmaxb = ~outmax1;
137
138         //increase or decrease magnitude of second and third harmonics
139
140         ~icd3 = 3; //3
141         ~icd6 = 6; //6
142
143
144         ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
145
146
147         //starting notes
148
149         #f1,f2,f3,f4,f5,f6,f7,f8 =
150         [432,457.68805676322,484.90360486965,513.73747368118,544.28589355459,576.65081700145,610.94025894518,647.26865721073];
151
152         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]), {8.do(x = 0; {("f"++(x=x+1)).asSymbol.envirPut([f1,f2,f3,f4,f5,f6,f7,f8].at(x-1))});});
153
154         #fp1,fp2,fp3,fp4,fp5,fp6,fp7,fp8,fp9,fp10,fp11,fp12 = [~u1,~u2,~u3,~u4,~u5,~u6,~u7,~u8,~u9,~u10,~u11,~u12];
155         #fp1b,fp2b,fp3b,fp4b,fp5b,fp6b,fp7b,fp8b,fp9b,fp10b,fp11b,fp12b = [~u1b,~u2b,~u3b,~u4b,~u5b,~u6b,~u7b,~u8b,~u9b,~u10b,~u11b,~u12b];
156         #fp1c,fp2c,fp3c,fp4c,fp5c,fp6c,fp7c,fp8c,fp9c,fp10c,fp11c,fp12c = [~u1c,~u2c,~u3c,~u4c,~u5c,~u6c,~u7c,~u8c,~u9c,~u10c,~u11c,~u12c];
157         #fp1d,fp2d,fp3d,fp4d,fp5d,fp6d,fp7d,fp8d,fp9d,fp10d,fp11d,fp12d = [~u1d,~u2d,~u3d,~u4d,~u5d,~u6d,~u7d,~u8d,~u9d,~u10d,~u11d,~u12d];
158         #fp1e,fp2e,fp3e,fp4e,fp5e,fp6e,fp7e,fp8e,fp9e,fp10e,fp11e,fp12e = [~u1e,~u2e,~u3e,~u4e,~u5e,~u6e,~u7e,~u8e,~u9e,~u10e,~u11e,~u12e];
159         #fp1f,fp2f,fp3f,fp4f,fp5f,fp6f,fp7f,fp8f,fp9f,fp10f,fp11f,fp12f = [~u1f,~u2f,~u3f,~u4f,~u5f,~u6f,~u7f,~u8f,~u9f,~u10f,~u11f,~u12f];
160         #fp1g,fp2g,fp3g,fp4g,fp5g,fp6g,fp7g,fp8g,fp9g,fp10g,fp11g,fp12g = [~u1g,~u2g,~u3g,~u4g,~u5g,~u6g,~u7g,~u8g,~u9g,~u10g,~u11g,~u12g];
161         #fp1h,fp2h,fp3h,fp4h,fp5h,fp6h,fp7h,fp8h,fp9h,fp10h,fp11h,fp12h = [~u1h,~u2h,~u3h,~u4h,~u5h,~u6h,~u7h,~u8h,~u9h,~u10h,~u11h,~u12h];
162
163         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 ];});
164         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 ];});
165         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 ];});
166         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 ];});
167         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 ];});
168         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 ];});
169         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 ];});
170         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 ];});
171
172         if([~sg1a1,~sg1a2,~sg1a3,~sg1a4,~sg1a5,~sg1a6,~sg1a7,~sg1a8,~sg1a9,~sg1a10,~sg1a11,~sg1a12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg1a1=~f1,~sg1a2=~f2,~sg1a3=~f3,~sg1a4=~f4,~sg1a5=~f5,~sg1a6=~f6,~sg1a7=~f7,~sg1a8=~f8];});
173         if([~sg1b1,~sg1b2,~sg1b3,~sg1b4,~sg1b5,~sg1b6,~sg1b7,~sg1b8,~sg1b9,~sg1b10,~sg1b11,~sg1b12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg1b1=~f1,~sg1b2=~f2,~sg1b3=~f3,~sg1b4=~f4,~sg1b5=~f5,~sg1b6=~f6,~sg1b7=~f7,~sg1b8=~f8];});
174         if([~sg1c1,~sg1c2,~sg1c3,~sg1c4,~sg1c5,~sg1c6,~sg1c7,~sg1c8,~sg1c9,~sg1c10,~sg1c11,~sg1c12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg1c1=~f1,~sg1c2=~f2,~sg1c3=~f3,~sg1c4=~f4,~sg1c5=~f5,~sg1c6=~f6,~sg1c7=~f7,~sg1c8=~f8];});
175         if([~sg1d1,~sg1d2,~sg1d3,~sg1d4,~sg1d5,~sg1d6,~sg1d7,~sg1d8,~sg1d9,~sg1d10,~sg1d11,~sg1d12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg1d1=~f1,~sg1d2=~f2,~sg1d3=~f3,~sg1d4=~f4,~sg1d5=~f5,~sg1d6=~f6,~sg1d7=~f7,~sg1d8=~f8];});
176         if([~sg1e1,~sg1e2,~sg1e3,~sg1e4,~sg1e5,~sg1e6,~sg1e7,~sg1e8,~sg1e9,~sg1e10,~sg1e11,~sg1e12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg1e1=~f1,~sg1e2=~f2,~sg1e3=~f3,~sg1e4=~f4,~sg1e5=~f5,~sg1e6=~f6,~sg1e7=~f7,~sg1e8=~f8];});
177         if([~sg1f1,~sg1f2,~sg1f3,~sg1f4,~sg1f5,~sg1f6,~sg1f7,~sg1f8,~sg1f9,~sg1f10,~sg1f11,~sg1f12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg1f1=~f1,~sg1f2=~f2,~sg1f3=~f3,~sg1f4=~f4,~sg1f5=~f5,~sg1f6=~f6,~sg1f7=~f7,~sg1f8=~f8];});
178         if([~sg1g1,~sg1g2,~sg1g3,~sg1g4,~sg1g5,~sg1g6,~sg1g7,~sg1g8,~sg1g9,~sg1g10,~sg1g11,~sg1g12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg1g1=~f1,~sg1g2=~f2,~sg1g3=~f3,~sg1g4=~f4,~sg1g5=~f5,~sg1g6=~f6,~sg1g7=~f7,~sg1g8=~f8];});
179         if([~sg1h1,~sg1h2,~sg1h3,~sg1h4,~sg1h5,~sg1h6,~sg1h7,~sg1h8,~sg1h9,~sg1h10,~sg1h11,~sg1h12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg1h1=~f1,~sg1h2=~f2,~sg1h3=~f3,~sg1h4=~f4,~sg1h5=~f5,~sg1h6=~f6,~sg1h7=~f7,~sg1h8=~f8];});
180         if([~sg2a1,~sg2a2,~sg2a3,~sg2a4,~sg2a5,~sg2a6,~sg2a7,~sg2a8,~sg2a9,~sg2a10,~sg2a11,~sg2a12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg2a1=~f1,~sg2a2=~f2,~sg2a3=~f3,~sg2a4=~f4,~sg2a5=~f5,~sg2a6=~f6,~sg2a7=~f7,~sg2a8=~f8];});
181         if([~sg2b1,~sg2b2,~sg2b3,~sg2b4,~sg2b5,~sg2b6,~sg2b7,~sg2b8,~sg2b9,~sg2b10,~sg2b11,~sg2b12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg2b1=~f1,~sg2b2=~f2,~sg2b3=~f3,~sg2b4=~f4,~sg2b5=~f5,~sg2b6=~f6,~sg2b7=~f7,~sg2b8=~f8];});
182         if([~sg2c1,~sg2c2,~sg2c3,~sg2c4,~sg2c5,~sg2c6,~sg2c7,~sg2c8,~sg2c9,~sg2c10,~sg2c11,~sg2c12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg2c1=~f1,~sg2c2=~f2,~sg2c3=~f3,~sg2c4=~f4,~sg2c5=~f5,~sg2c6=~f6,~sg2c7=~f7,~sg2c8=~f8];});
183         if([~sg2d1,~sg2d2,~sg2d3,~sg2d4,~sg2d5,~sg2d6,~sg2d7,~sg2d8,~sg2d9,~sg2d10,~sg2d11,~sg2d12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg2d1=~f1,~sg2d2=~f2,~sg2d3=~f3,~sg2d4=~f4,~sg2d5=~f5,~sg2d6=~f6,~sg2d7=~f7,~sg2d8=~f8];});
184         if([~sg2e1,~sg2e2,~sg2e3,~sg2e4,~sg2e5,~sg2e6,~sg2e7,~sg2e8,~sg2e9,~sg2e10,~sg2e11,~sg2e12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg2e1=~f1,~sg2e2=~f2,~sg2e3=~f3,~sg2e4=~f4,~sg2e5=~f5,~sg2e6=~f6,~sg2e7=~f7,~sg2e8=~f8];});
185         if([~sg2f1,~sg2f2,~sg2f3,~sg2f4,~sg2f5,~sg2f6,~sg2f7,~sg2f8,~sg2f9,~sg2f10,~sg2f11,~sg2f12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg2f1=~f1,~sg2f2=~f2,~sg2f3=~f3,~sg2f4=~f4,~sg2f5=~f5,~sg2f6=~f6,~sg2f7=~f7,~sg2f8=~f8];});
186         if([~sg2g1,~sg2g2,~sg2g3,~sg2g4,~sg2g5,~sg2g6,~sg2g7,~sg2g8,~sg2g9,~sg2g10,~sg2g11,~sg2g12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg2g1=~f1,~sg2g2=~f2,~sg2g3=~f3,~sg2g4=~f4,~sg2g5=~f5,~sg2g6=~f6,~sg2g7=~f7,~sg2g8=~f8];});
187         if([~sg2h1,~sg2h2,~sg2h3,~sg2h4,~sg2h5,~sg2h6,~sg2h7,~sg2h8,~sg2h9,~sg2h10,~sg2h11,~sg2h12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg2h1=~f1,~sg2h2=~f2,~sg2h3=~f3,~sg2h4=~f4,~sg2h5=~f5,~sg2h6=~f6,~sg2h7=~f7,~sg2h8=~f8];});
188         if([~sg3a1,~sg3a2,~sg3a3,~sg3a4,~sg3a5,~sg3a6,~sg3a7,~sg3a8,~sg3a9,~sg3a10,~sg3a11,~sg3a12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg3a1=~f1,~sg3a2=~f2,~sg3a3=~f3,~sg3a4=~f4,~sg3a5=~f5,~sg3a6=~f6,~sg3a7=~f7,~sg3a8=~f8];});
189         if([~sg3b1,~sg3b2,~sg3b3,~sg3b4,~sg3b5,~sg3b6,~sg3b7,~sg3b8,~sg3b9,~sg3b10,~sg3b11,~sg3b12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg3b1=~f1,~sg3b2=~f2,~sg3b3=~f3,~sg3b4=~f4,~sg3b5=~f5,~sg3b6=~f6,~sg3b7=~f7,~sg3b8=~f8];});
190         if([~sg3c1,~sg3c2,~sg3c3,~sg3c4,~sg3c5,~sg3c6,~sg3c7,~sg3c8,~sg3c9,~sg3c10,~sg3c11,~sg3c12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg3c1=~f1,~sg3c2=~f2,~sg3c3=~f3,~sg3c4=~f4,~sg3c5=~f5,~sg3c6=~f6,~sg3c7=~f7,~sg3c8=~f8];});
191         if([~sg3d1,~sg3d2,~sg3d3,~sg3d4,~sg3d5,~sg3d6,~sg3d7,~sg3d8,~sg3d9,~sg3d10,~sg3d11,~sg3d12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg3d1=~f1,~sg3d2=~f2,~sg3d3=~f3,~sg3d4=~f4,~sg3d5=~f5,~sg3d6=~f6,~sg3d7=~f7,~sg3d8=~f8];});
192         if([~sg3e1,~sg3e2,~sg3e3,~sg3e4,~sg3e5,~sg3e6,~sg3e7,~sg3e8,~sg3e9,~sg3e10,~sg3e11,~sg3e12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg3e1=~f1,~sg3e2=~f2,~sg3e3=~f3,~sg3e4=~f4,~sg3e5=~f5,~sg3e6=~f6,~sg3e7=~f7,~sg3e8=~f8];});
193         if([~sg3f1,~sg3f2,~sg3f3,~sg3f4,~sg3f5,~sg3f6,~sg3f7,~sg3f8,~sg3f9,~sg3f10,~sg3f11,~sg3f12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg3f1=~f1,~sg3f2=~f2,~sg3f3=~f3,~sg3f4=~f4,~sg3f5=~f5,~sg3f6=~f6,~sg3f7=~f7,~sg3f8=~f8];});
194         if([~sg3g1,~sg3g2,~sg3g3,~sg3g4,~sg3g5,~sg3g6,~sg3g7,~sg3g8,~sg3g9,~sg3g10,~sg3g11,~sg3g12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg3g1=~f1,~sg3g2=~f2,~sg3g3=~f3,~sg3g4=~f4,~sg3g5=~f5,~sg3g6=~f6,~sg3g7=~f7,~sg3g8=~f8];});
195         if([~sg3h1,~sg3h2,~sg3h3,~sg3h4,~sg3h5,~sg3h6,~sg3h7,~sg3h8,~sg3h9,~sg3h10,~sg3h11,~sg3h12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg3h1=~f1,~sg3h2=~f2,~sg3h3=~f3,~sg3h4=~f4,~sg3h5=~f5,~sg3h6=~f6,~sg3h7=~f7,~sg3h8=~f8];});
196         if([~sg4a1,~sg4a2,~sg4a3,~sg4a4,~sg4a5,~sg4a6,~sg4a7,~sg4a8,~sg4a9,~sg4a10,~sg4a11,~sg4a12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg4a1=~f1,~sg4a2=~f2,~sg4a3=~f3,~sg4a4=~f4,~sg4a5=~f5,~sg4a6=~f6,~sg4a7=~f7,~sg4a8=~f8];});
197         if([~sg4b1,~sg4b2,~sg4b3,~sg4b4,~sg4b5,~sg4b6,~sg4b7,~sg4b8,~sg4b9,~sg4b10,~sg4b11,~sg4b12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg4b1=~f1,~sg4b2=~f2,~sg4b3=~f3,~sg4b4=~f4,~sg4b5=~f5,~sg4b6=~f6,~sg4b7=~f7,~sg4b8=~f8];});
198         if([~sg4c1,~sg4c2,~sg4c3,~sg4c4,~sg4c5,~sg4c6,~sg4c7,~sg4c8,~sg4c9,~sg4c10,~sg4c11,~sg4c12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg4c1=~f1,~sg4c2=~f2,~sg4c3=~f3,~sg4c4=~f4,~sg4c5=~f5,~sg4c6=~f6,~sg4c7=~f7,~sg4c8=~f8];});
199         if([~sg4d1,~sg4d2,~sg4d3,~sg4d4,~sg4d5,~sg4d6,~sg4d7,~sg4d8,~sg4d9,~sg4d10,~sg4d11,~sg4d12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg4d1=~f1,~sg4d2=~f2,~sg4d3=~f3,~sg4d4=~f4,~sg4d5=~f5,~sg4d6=~f6,~sg4d7=~f7,~sg4d8=~f8];});
200         if([~sg4e1,~sg4e2,~sg4e3,~sg4e4,~sg4e5,~sg4e6,~sg4e7,~sg4e8,~sg4e9,~sg4e10,~sg4e11,~sg4e12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg4e1=~f1,~sg4e2=~f2,~sg4e3=~f3,~sg4e4=~f4,~sg4e5=~f5,~sg4e6=~f6,~sg4e7=~f7,~sg4e8=~f8];});
201         if([~sg4f1,~sg4f2,~sg4f3,~sg4f4,~sg4f5,~sg4f6,~sg4f7,~sg4f8,~sg4f9,~sg4f10,~sg4f11,~sg4f12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg4f1=~f1,~sg4f2=~f2,~sg4f3=~f3,~sg4f4=~f4,~sg4f5=~f5,~sg4f6=~f6,~sg4f7=~f7,~sg4f8=~f8];});
202         if([~sg4g1,~sg4g2,~sg4g3,~sg4g4,~sg4g5,~sg4g6,~sg4g7,~sg4g8,~sg4g9,~sg4g10,~sg4g11,~sg4g12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg4g1=~f1,~sg4g2=~f2,~sg4g3=~f3,~sg4g4=~f4,~sg4g5=~f5,~sg4g6=~f6,~sg4g7=~f7,~sg4g8=~f8];});
203         if([~sg4h1,~sg4h2,~sg4h3,~sg4h4,~sg4h5,~sg4h6,~sg4h7,~sg4h8,~sg4h9,~sg4h10,~sg4h11,~sg4h12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg4h1=~f1,~sg4h2=~f2,~sg4h3=~f3,~sg4h4=~f4,~sg4h5=~f5,~sg4h6=~f6,~sg4h7=~f7,~sg4h8=~f8];});
204         if([~sg5a1,~sg5a2,~sg5a3,~sg5a4,~sg5a5,~sg5a6,~sg5a7,~sg5a8,~sg5a9,~sg5a10,~sg5a11,~sg5a12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg5a1=~f1,~sg5a2=~f2,~sg5a3=~f3,~sg5a4=~f4,~sg5a5=~f5,~sg5a6=~f6,~sg5a7=~f7,~sg5a8=~f8];});
205         if([~sg5b1,~sg5b2,~sg5b3,~sg5b4,~sg5b5,~sg5b6,~sg5b7,~sg5b8,~sg5b9,~sg5b10,~sg5b11,~sg5b12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg5b1=~f1,~sg5b2=~f2,~sg5b3=~f3,~sg5b4=~f4,~sg5b5=~f5,~sg5b6=~f6,~sg5b7=~f7,~sg5b8=~f8];});
206         if([~sg5c1,~sg5c2,~sg5c3,~sg5c4,~sg5c5,~sg5c6,~sg5c7,~sg5c8,~sg5c9,~sg5c10,~sg5c11,~sg5c12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg5c1=~f1,~sg5c2=~f2,~sg5c3=~f3,~sg5c4=~f4,~sg5c5=~f5,~sg5c6=~f6,~sg5c7=~f7,~sg5c8=~f8];});
207         if([~sg5d1,~sg5d2,~sg5d3,~sg5d4,~sg5d5,~sg5d6,~sg5d7,~sg5d8,~sg5d9,~sg5d10,~sg5d11,~sg5d12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg5d1=~f1,~sg5d2=~f2,~sg5d3=~f3,~sg5d4=~f4,~sg5d5=~f5,~sg5d6=~f6,~sg5d7=~f7,~sg5d8=~f8];});
208         if([~sg5e1,~sg5e2,~sg5e3,~sg5e4,~sg5e5,~sg5e6,~sg5e7,~sg5e8,~sg5e9,~sg5e10,~sg5e11,~sg5e12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg5e1=~f1,~sg5e2=~f2,~sg5e3=~f3,~sg5e4=~f4,~sg5e5=~f5,~sg5e6=~f6,~sg5e7=~f7,~sg5e8=~f8];});
209         if([~sg5f1,~sg5f2,~sg5f3,~sg5f4,~sg5f5,~sg5f6,~sg5f7,~sg5f8,~sg5f9,~sg5f10,~sg5f11,~sg5f12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg5f1=~f1,~sg5f2=~f2,~sg5f3=~f3,~sg5f4=~f4,~sg5f5=~f5,~sg5f6=~f6,~sg5f7=~f7,~sg5f8=~f8];});
210         if([~sg5g1,~sg5g2,~sg5g3,~sg5g4,~sg5g5,~sg5g6,~sg5g7,~sg5g8,~sg5g9,~sg5g10,~sg5g11,~sg5g12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg5g1=~f1,~sg5g2=~f2,~sg5g3=~f3,~sg5g4=~f4,~sg5g5=~f5,~sg5g6=~f6,~sg5g7=~f7,~sg5g8=~f8];});
211         if([~sg5h1,~sg5h2,~sg5h3,~sg5h4,~sg5h5,~sg5h6,~sg5h7,~sg5h8,~sg5h9,~sg5h10,~sg5h11,~sg5h12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg5h1=~f1,~sg5h2=~f2,~sg5h3=~f3,~sg5h4=~f4,~sg5h5=~f5,~sg5h6=~f6,~sg5h7=~f7,~sg5h8=~f8];});
212         if([~sg6a1,~sg6a2,~sg6a3,~sg6a4,~sg6a5,~sg6a6,~sg6a7,~sg6a8,~sg6a9,~sg6a10,~sg6a11,~sg6a12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg6a1=~f1,~sg6a2=~f2,~sg6a3=~f3,~sg6a4=~f4,~sg6a5=~f5,~sg6a6=~f6,~sg6a7=~f7,~sg6a8=~f8];});
213         if([~sg6b1,~sg6b2,~sg6b3,~sg6b4,~sg6b5,~sg6b6,~sg6b7,~sg6b8,~sg6b9,~sg6b10,~sg6b11,~sg6b12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg6b1=~f1,~sg6b2=~f2,~sg6b3=~f3,~sg6b4=~f4,~sg6b5=~f5,~sg6b6=~f6,~sg6b7=~f7,~sg6b8=~f8];});
214         if([~sg6c1,~sg6c2,~sg6c3,~sg6c4,~sg6c5,~sg6c6,~sg6c7,~sg6c8,~sg6c9,~sg6c10,~sg6c11,~sg6c12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg6c1=~f1,~sg6c2=~f2,~sg6c3=~f3,~sg6c4=~f4,~sg6c5=~f5,~sg6c6=~f6,~sg6c7=~f7,~sg6c8=~f8];});
215         if([~sg6d1,~sg6d2,~sg6d3,~sg6d4,~sg6d5,~sg6d6,~sg6d7,~sg6d8,~sg6d9,~sg6d10,~sg6d11,~sg6d12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg6d1=~f1,~sg6d2=~f2,~sg6d3=~f3,~sg6d4=~f4,~sg6d5=~f5,~sg6d6=~f6,~sg6d7=~f7,~sg6d8=~f8];});
216         if([~sg6e1,~sg6e2,~sg6e3,~sg6e4,~sg6e5,~sg6e6,~sg6e7,~sg6e8,~sg6e9,~sg6e10,~sg6e11,~sg6e12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg6e1=~f1,~sg6e2=~f2,~sg6e3=~f3,~sg6e4=~f4,~sg6e5=~f5,~sg6e6=~f6,~sg6e7=~f7,~sg6e8=~f8];});
217         if([~sg6f1,~sg6f2,~sg6f3,~sg6f4,~sg6f5,~sg6f6,~sg6f7,~sg6f8,~sg6f9,~sg6f10,~sg6f11,~sg6f12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg6f1=~f1,~sg6f2=~f2,~sg6f3=~f3,~sg6f4=~f4,~sg6f5=~f5,~sg6f6=~f6,~sg6f7=~f7,~sg6f8=~f8];});
218         if([~sg6g1,~sg6g2,~sg6g3,~sg6g4,~sg6g5,~sg6g6,~sg6g7,~sg6g8,~sg6g9,~sg6g10,~sg6g11,~sg6g12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg6g1=~f1,~sg6g2=~f2,~sg6g3=~f3,~sg6g4=~f4,~sg6g5=~f5,~sg6g6=~f6,~sg6g7=~f7,~sg6g8=~f8];});
219         if([~sg6h1,~sg6h2,~sg6h3,~sg6h4,~sg6h5,~sg6h6,~sg6h7,~sg6h8,~sg6h9,~sg6h10,~sg6h11,~sg6h12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg6h1=~f1,~sg6h2=~f2,~sg6h3=~f3,~sg6h4=~f4,~sg6h5=~f5,~sg6h6=~f6,~sg6h7=~f7,~sg6h8=~f8];});
220         if([~sg7a1,~sg7a2,~sg7a3,~sg7a4,~sg7a5,~sg7a6,~sg7a7,~sg7a8,~sg7a9,~sg7a10,~sg7a11,~sg7a12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg7a1=~f1,~sg7a2=~f2,~sg7a3=~f3,~sg7a4=~f4,~sg7a5=~f5,~sg7a6=~f6,~sg7a7=~f7,~sg7a8=~f8];});
221         if([~sg7b1,~sg7b2,~sg7b3,~sg7b4,~sg7b5,~sg7b6,~sg7b7,~sg7b8,~sg7b9,~sg7b10,~sg7b11,~sg7b12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg7b1=~f1,~sg7b2=~f2,~sg7b3=~f3,~sg7b4=~f4,~sg7b5=~f5,~sg7b6=~f6,~sg7b7=~f7,~sg7b8=~f8];});
222         if([~sg7c1,~sg7c2,~sg7c3,~sg7c4,~sg7c5,~sg7c6,~sg7c7,~sg7c8,~sg7c9,~sg7c10,~sg7c11,~sg7c12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg7c1=~f1,~sg7c2=~f2,~sg7c3=~f3,~sg7c4=~f4,~sg7c5=~f5,~sg7c6=~f6,~sg7c7=~f7,~sg7c8=~f8];});
223         if([~sg7d1,~sg7d2,~sg7d3,~sg7d4,~sg7d5,~sg7d6,~sg7d7,~sg7d8,~sg7d9,~sg7d10,~sg7d11,~sg7d12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg7d1=~f1,~sg7d2=~f2,~sg7d3=~f3,~sg7d4=~f4,~sg7d5=~f5,~sg7d6=~f6,~sg7d7=~f7,~sg7d8=~f8];});
224         if([~sg7e1,~sg7e2,~sg7e3,~sg7e4,~sg7e5,~sg7e6,~sg7e7,~sg7e8,~sg7e9,~sg7e10,~sg7e11,~sg7e12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg7e1=~f1,~sg7e2=~f2,~sg7e3=~f3,~sg7e4=~f4,~sg7e5=~f5,~sg7e6=~f6,~sg7e7=~f7,~sg7e8=~f8];});
225         if([~sg7f1,~sg7f2,~sg7f3,~sg7f4,~sg7f5,~sg7f6,~sg7f7,~sg7f8,~sg7f9,~sg7f10,~sg7f11,~sg7f12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg7f1=~f1,~sg7f2=~f2,~sg7f3=~f3,~sg7f4=~f4,~sg7f5=~f5,~sg7f6=~f6,~sg7f7=~f7,~sg7f8=~f8];});
226         if([~sg7g1,~sg7g2,~sg7g3,~sg7g4,~sg7g5,~sg7g6,~sg7g7,~sg7g8,~sg7g9,~sg7g10,~sg7g11,~sg7g12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg7g1=~f1,~sg7g2=~f2,~sg7g3=~f3,~sg7g4=~f4,~sg7g5=~f5,~sg7g6=~f6,~sg7g7=~f7,~sg7g8=~f8];});
227         if([~sg7h1,~sg7h2,~sg7h3,~sg7h4,~sg7h5,~sg7h6,~sg7h7,~sg7h8,~sg7h9,~sg7h10,~sg7h11,~sg7h12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg7h1=~f1,~sg7h2=~f2,~sg7h3=~f3,~sg7h4=~f4,~sg7h5=~f5,~sg7h6=~f6,~sg7h7=~f7,~sg7h8=~f8];});
228         if([~sg8a1,~sg8a2,~sg8a3,~sg8a4,~sg8a5,~sg8a6,~sg8a7,~sg8a8,~sg8a9,~sg8a10,~sg8a11,~sg8a12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg8a1=~f1,~sg8a2=~f2,~sg8a3=~f3,~sg8a4=~f4,~sg8a5=~f5,~sg8a6=~f6,~sg8a7=~f7,~sg8a8=~f8];});
229         if([~sg8b1,~sg8b2,~sg8b3,~sg8b4,~sg8b5,~sg8b6,~sg8b7,~sg8b8,~sg8b9,~sg8b10,~sg8b11,~sg8b12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg8b1=~f1,~sg8b2=~f2,~sg8b3=~f3,~sg8b4=~f4,~sg8b5=~f5,~sg8b6=~f6,~sg8b7=~f7,~sg8b8=~f8];});
230         if([~sg8c1,~sg8c2,~sg8c3,~sg8c4,~sg8c5,~sg8c6,~sg8c7,~sg8c8,~sg8c9,~sg8c10,~sg8c11,~sg8c12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg8c1=~f1,~sg8c2=~f2,~sg8c3=~f3,~sg8c4=~f4,~sg8c5=~f5,~sg8c6=~f6,~sg8c7=~f7,~sg8c8=~f8];});
231         if([~sg8d1,~sg8d2,~sg8d3,~sg8d4,~sg8d5,~sg8d6,~sg8d7,~sg8d8,~sg8d9,~sg8d10,~sg8d11,~sg8d12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg8d1=~f1,~sg8d2=~f2,~sg8d3=~f3,~sg8d4=~f4,~sg8d5=~f5,~sg8d6=~f6,~sg8d7=~f7,~sg8d8=~f8];});
232         if([~sg8e1,~sg8e2,~sg8e3,~sg8e4,~sg8e5,~sg8e6,~sg8e7,~sg8e8,~sg8e9,~sg8e10,~sg8e11,~sg8e12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg8e1=~f1,~sg8e2=~f2,~sg8e3=~f3,~sg8e4=~f4,~sg8e5=~f5,~sg8e6=~f6,~sg8e7=~f7,~sg8e8=~f8];});
233         if([~sg8f1,~sg8f2,~sg8f3,~sg8f4,~sg8f5,~sg8f6,~sg8f7,~sg8f8,~sg8f9,~sg8f10,~sg8f11,~sg8f12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg8f1=~f1,~sg8f2=~f2,~sg8f3=~f3,~sg8f4=~f4,~sg8f5=~f5,~sg8f6=~f6,~sg8f7=~f7,~sg8f8=~f8];});
234         if([~sg8g1,~sg8g2,~sg8g3,~sg8g4,~sg8g5,~sg8g6,~sg8g7,~sg8g8,~sg8g9,~sg8g10,~sg8g11,~sg8g12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg8g1=~f1,~sg8g2=~f2,~sg8g3=~f3,~sg8g4=~f4,~sg8g5=~f5,~sg8g6=~f6,~sg8g7=~f7,~sg8g8=~f8];});
235         if([~sg8h1,~sg8h2,~sg8h3,~sg8h4,~sg8h5,~sg8h6,~sg8h7,~sg8h8,~sg8h9,~sg8h10,~sg8h11,~sg8h12] == [nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil], {[~sg8h1=~f1,~sg8h2=~f2,~sg8h3=~f3,~sg8h4=~f4,~sg8h5=~f5,~sg8h6=~f6,~sg8h7=~f7,~sg8h8=~f8];});
236
237
238         //synthdefs
239
240         ~gsine1 = {
241                 SynthDef(\gsineicfld1, {arg graindur = 0.04, dur = 2000, atk = 0.007, rel = 0.01, gate = 1, amp = 1, i = 1, vol = ~vol, rate = 20, tune = 0,dseqval,
242                         a, b, c, d, e, f, pan=0, fc = 1;
243                         var s1, out, env1, s2, dseq,n1,n2,n3,n4,n5,n6,n7,n8,n9;
244                         #n1=[~gm];
245                         dseq = Dseq([/*1*/      #a,b,c,d,e,f=[ ~a,~b,~c,~d,~e,~f  ],/*2*/       [ a = a/~fth, b = b/~fth, c = c/~fth, d = d/~fth, e = e/~fth, f = f/~fth ],/*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, b = b*~fth, c = c*~fth, d = d/~fth, e = e/~fth, f = f/~fth ],/*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, b = b/~fth, c = c/~fth, d = d*~fth, e = e*~fth, f = f/~fth ],/*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, b = b*~fth, c = c*~fth, d = d*~fth, e = e*~fth, f = f/~fth ],/*29*/       [ a = a,         b = b,         c = c/~fth,    d = d/~fth,    e = e,         f = f ],/*30*/     [ a = a*~fth, b = b/~fth, c = c*~fth, d = d*~fth, e = e/~fth, f = f*~fth ],/*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, b = b*~fth, c = c/~fth, d = d*~fth, e = e/~fth, f = f/~fth ],/*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, b = b/~fth, c = c*~fth, d = d/~fth, e = e*~fth, f = f*~fth ],/*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, b = b/~fth, c = c*~fth, d = d*~fth, e = e/~fth, f = f/~fth ],/*63*/       [ a = a,         b = b*~fth,    c = c/~fth,    d = d,         e = e,         f = f*~fth ],/*64*/        [ a = a*~fth, b = b/~fth, c = c*~fth, d = d/~fth, e = e*~fth, f = f/~fth ]]
246                                 ++Array.fill((~gsinenum -1), {[/*1*/    [ a = a*n1,         b = b*n1*~fth,    c = c*n1,         d = d*n1*~fth,    e = e*n1,         f = f*n1*~fth ],/*2*/       [ a = a/~fth, b = b/~fth, c = c/~fth, d = d/~fth, e = e/~fth, f = f/~fth ],/*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, b = b*~fth, c = c*~fth, d = d/~fth, e = e/~fth, f = f/~fth ],/*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, b = b/~fth, c = c/~fth, d = d*~fth, e = e*~fth, f = f/~fth ],/*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, b = b*~fth, c = c*~fth, d = d*~fth, e = e*~fth, f = f/~fth ],/*29*/       [ a = a,         b = b,         c = c/~fth,    d = d/~fth,    e = e,         f = f ],/*30*/     [ a = a*~fth, b = b/~fth, c = c*~fth, d = d*~fth, e = e/~fth, f = f*~fth ],/*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, b = b*~fth, c = c/~fth, d = d*~fth, e = e/~fth, f = f/~fth ],/*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, b = b/~fth, c = c*~fth, d = d/~fth, e = e*~fth, f = f*~fth ],/*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, b = b/~fth, c = c*~fth, d = d*~fth, e = e/~fth, f = f/~fth ],/*63*/       [ a = a,         b = b*~fth,    c = c/~fth,    d = d,         e = e,         f = f*~fth ],/*64*/        [ a = a*~fth, b = b/~fth, c = c*~fth, d = d/~fth, e = e*~fth, f = f/~fth ]]
247                         }).flatten, inf);
248                         s1 = GrainSin.ar(1, Impulse.ar(dur+tune), 1/(dur+tune),Demand.ar(Impulse.ar(dur+tune), 0, dseq)*fc);
249                         OffsetOut.ar(0, s1.dup*vol);
250                 }, [\ir]).add;
251
252                 SynthDef(\gsineicrld1, {arg graindur = 0.04, dur = 2000, atk = 0.007, rel = 0.01, gate = 1, amp = 1, i = 1, vol = ~vol, rate = 20, tune = 0,dseqval,
253                         a, b, c, d, e, f, pan=0, fc = 1, id = -1;
254                         var s1, out, env1, s2, dseq,n1,n2,n3,n4,n5,n6,n7,n8,n9,af;
255                         #n1=[~gm];
256                         dseq = Dseq([[/*1*/     #a,b,c,d,e,f=[ ~a,~b,~c,~d,~e,~f  ],/*2*/       [ a = a/~fth, b = b/~fth, c = c/~fth, d = d/~fth, e = e/~fth, f = f/~fth ],/*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, b = b*~fth, c = c*~fth, d = d/~fth, e = e/~fth, f = f/~fth ],/*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, b = b/~fth, c = c/~fth, d = d*~fth, e = e*~fth, f = f/~fth ],/*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, b = b*~fth, c = c*~fth, d = d*~fth, e = e*~fth, f = f/~fth ],/*29*/       [ a = a,         b = b,         c = c/~fth,    d = d/~fth,    e = e,         f = f ],/*30*/     [ a = a*~fth, b = b/~fth, c = c*~fth, d = d*~fth, e = e/~fth, f = f*~fth ],/*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, b = b*~fth, c = c/~fth, d = d*~fth, e = e/~fth, f = f/~fth ],/*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, b = b/~fth, c = c*~fth, d = d/~fth, e = e*~fth, f = f*~fth ],/*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, b = b/~fth, c = c*~fth, d = d*~fth, e = e/~fth, f = f/~fth ],/*63*/       [ a = a,         b = b*~fth,    c = c/~fth,    d = d,         e = e,         f = f*~fth ],/*64*/        [ a = a*~fth, b = b/~fth, c = c*~fth, d = d/~fth, e = e*~fth, f = f/~fth ]]
257                                 ++Array.fill((~gsinenum -1), {[/*1*/    [ a = a*n1,         b = b*n1*~fth,    c = c*n1,         d = d*n1*~fth,    e = e*n1,         f = f*n1*~fth ],/*2*/       [ a = a/~fth, b = b/~fth, c = c/~fth, d = d/~fth, e = e/~fth, f = f/~fth ],/*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, b = b*~fth, c = c*~fth, d = d/~fth, e = e/~fth, f = f/~fth ],/*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, b = b/~fth, c = c/~fth, d = d*~fth, e = e*~fth, f = f/~fth ],/*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, b = b*~fth, c = c*~fth, d = d*~fth, e = e*~fth, f = f/~fth ],/*29*/       [ a = a,         b = b,         c = c/~fth,    d = d/~fth,    e = e,         f = f ],/*30*/     [ a = a*~fth, b = b/~fth, c = c*~fth, d = d*~fth, e = e/~fth, f = f*~fth ],/*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, b = b*~fth, c = c/~fth, d = d*~fth, e = e/~fth, f = f/~fth ],/*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, b = b/~fth, c = c*~fth, d = d/~fth, e = e*~fth, f = f*~fth ],/*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, b = b/~fth, c = c*~fth, d = d*~fth, e = e/~fth, f = f/~fth ],/*63*/       [ a = a,         b = b*~fth,    c = c/~fth,    d = d,         e = e,         f = f*~fth ],/*64*/        [ a = a*~fth, b = b/~fth, c = c*~fth, d = d/~fth, e = e*~fth, f = f/~fth ]]
258                         }).flatten].flatten.reverse, inf);
259                         s1 = GrainSin.ar(1, Impulse.ar(dur+tune), 1/(dur+tune), Demand.ar(Impulse.ar(dur+tune), 0, dseq));
260                         OffsetOut.ar(0, s1.dup*vol);
261                 }, [\ir]).add;
262
263                 SynthDef(\gsineicfld2, {arg graindur = 0.04, dur = 2000, atk = 0.007, rel = 0.01, gate = 1, amp = 1, i = 1, vol = ~vol, rate = 20, tune = 0,dseqval,
264                         a, b, c, d, e, f, pan=0, fc = 1;
265                         var s1, out, env1, s2, dseq,n1,n2,n3,n4,n5,n6,n7,n8,n9;
266                         #n1=[~gm2];
267                         dseq = Dseq([/*1*/      #a,b,c,d,e,f=[ ~a,~b,~c,~d,~e,~f  ],/*2*/       [ a = a/~fth, b = b/~fth, c = c/~fth, d = d/~fth, e = e/~fth, f = f/~fth ],/*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, b = b*~fth, c = c*~fth, d = d/~fth, e = e/~fth, f = f/~fth ],/*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, b = b/~fth, c = c/~fth, d = d*~fth, e = e*~fth, f = f/~fth ],/*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, b = b*~fth, c = c*~fth, d = d*~fth, e = e*~fth, f = f/~fth ],/*29*/       [ a = a,         b = b,         c = c/~fth,    d = d/~fth,    e = e,         f = f ],/*30*/     [ a = a*~fth, b = b/~fth, c = c*~fth, d = d*~fth, e = e/~fth, f = f*~fth ],/*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, b = b*~fth, c = c/~fth, d = d*~fth, e = e/~fth, f = f/~fth ],/*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, b = b/~fth, c = c*~fth, d = d/~fth, e = e*~fth, f = f*~fth ],/*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, b = b/~fth, c = c*~fth, d = d*~fth, e = e/~fth, f = f/~fth ],/*63*/       [ a = a,         b = b*~fth,    c = c/~fth,    d = d,         e = e,         f = f*~fth ],/*64*/        [ a = a*~fth, b = b/~fth, c = c*~fth, d = d/~fth, e = e*~fth, f = f/~fth ]]
268                                 ++Array.fill((~gsinenum*2 -1), {[/*1*/  [ a = a*n1,         b = b*n1*~fth,    c = c*n1,         d = d*n1*~fth,    e = e*n1,         f = f*n1*~fth ],/*2*/       [ a = a/~fth, b = b/~fth, c = c/~fth, d = d/~fth, e = e/~fth, f = f/~fth ],/*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, b = b*~fth, c = c*~fth, d = d/~fth, e = e/~fth, f = f/~fth ],/*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, b = b/~fth, c = c/~fth, d = d*~fth, e = e*~fth, f = f/~fth ],/*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, b = b*~fth, c = c*~fth, d = d*~fth, e = e*~fth, f = f/~fth ],/*29*/       [ a = a,         b = b,         c = c/~fth,    d = d/~fth,    e = e,         f = f ],/*30*/     [ a = a*~fth, b = b/~fth, c = c*~fth, d = d*~fth, e = e/~fth, f = f*~fth ],/*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, b = b*~fth, c = c/~fth, d = d*~fth, e = e/~fth, f = f/~fth ],/*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, b = b/~fth, c = c*~fth, d = d/~fth, e = e*~fth, f = f*~fth ],/*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, b = b/~fth, c = c*~fth, d = d*~fth, e = e/~fth, f = f/~fth ],/*63*/       [ a = a,         b = b*~fth,    c = c/~fth,    d = d,         e = e,         f = f*~fth ],/*64*/        [ a = a*~fth, b = b/~fth, c = c*~fth, d = d/~fth, e = e*~fth, f = f/~fth ]]
269                         }).flatten, inf);
270                         s1 = GrainSin.ar(1, Impulse.ar(dur+tune), 1/(dur+tune),Demand.ar(Impulse.ar(dur+tune), 0, dseq)*fc);
271                         OffsetOut.ar(0, s1.dup*vol);
272                 }, [\ir]).add;
273
274                 SynthDef(\gsineicrld2, {arg graindur = 0.04, dur = 2000, atk = 0.007, rel = 0.01, gate = 1, amp = 1, i = 1, vol = ~vol, rate = 20, tune = 0,dseqval,
275                         a, b, c, d, e, f, pan=0, fc = 1, id = -1;
276                         var s1, out, env1, s2, dseq,n1,n2,n3,n4,n5,n6,n7,n8,n9,af;
277                         #n1=[~gm2];
278                         dseq = Dseq([[/*1*/     #a,b,c,d,e,f=[ ~a,~b,~c,~d,~e,~f  ],/*2*/       [ a = a/~fth, b = b/~fth, c = c/~fth, d = d/~fth, e = e/~fth, f = f/~fth ],/*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, b = b*~fth, c = c*~fth, d = d/~fth, e = e/~fth, f = f/~fth ],/*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, b = b/~fth, c = c/~fth, d = d*~fth, e = e*~fth, f = f/~fth ],/*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, b = b*~fth, c = c*~fth, d = d*~fth, e = e*~fth, f = f/~fth ],/*29*/       [ a = a,         b = b,         c = c/~fth,    d = d/~fth,    e = e,         f = f ],/*30*/     [ a = a*~fth, b = b/~fth, c = c*~fth, d = d*~fth, e = e/~fth, f = f*~fth ],/*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, b = b*~fth, c = c/~fth, d = d*~fth, e = e/~fth, f = f/~fth ],/*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, b = b/~fth, c = c*~fth, d = d/~fth, e = e*~fth, f = f*~fth ],/*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, b = b/~fth, c = c*~fth, d = d*~fth, e = e/~fth, f = f/~fth ],/*63*/       [ a = a,         b = b*~fth,    c = c/~fth,    d = d,         e = e,         f = f*~fth ],/*64*/        [ a = a*~fth, b = b/~fth, c = c*~fth, d = d/~fth, e = e*~fth, f = f/~fth ]]
279                                 ++Array.fill((~gsinenum*2 -1), {[/*1*/  [ a = a*n1,         b = b*n1*~fth,    c = c*n1,         d = d*n1*~fth,    e = e*n1,         f = f*n1*~fth ],/*2*/       [ a = a/~fth, b = b/~fth, c = c/~fth, d = d/~fth, e = e/~fth, f = f/~fth ],/*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, b = b*~fth, c = c*~fth, d = d/~fth, e = e/~fth, f = f/~fth ],/*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, b = b/~fth, c = c/~fth, d = d*~fth, e = e*~fth, f = f/~fth ],/*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, b = b*~fth, c = c*~fth, d = d*~fth, e = e*~fth, f = f/~fth ],/*29*/       [ a = a,         b = b,         c = c/~fth,    d = d/~fth,    e = e,         f = f ],/*30*/     [ a = a*~fth, b = b/~fth, c = c*~fth, d = d*~fth, e = e/~fth, f = f*~fth ],/*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, b = b*~fth, c = c/~fth, d = d*~fth, e = e/~fth, f = f/~fth ],/*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, b = b/~fth, c = c*~fth, d = d/~fth, e = e*~fth, f = f*~fth ],/*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, b = b/~fth, c = c*~fth, d = d*~fth, e = e/~fth, f = f/~fth ],/*63*/       [ a = a,         b = b*~fth,    c = c/~fth,    d = d,         e = e,         f = f*~fth ],/*64*/        [ a = a*~fth, b = b/~fth, c = c*~fth, d = d/~fth, e = e*~fth, f = f/~fth ]]
280                         }).flatten].flatten.reverse, inf);
281                         s1 = GrainSin.ar(1, Impulse.ar(dur+tune), 1/(dur+tune), Demand.ar(Impulse.ar(dur+tune), 0, dseq));
282                         OffsetOut.ar(0, s1.dup*vol);
283                 }, [\ir]).add;
284
285                 SynthDef(\gsineicfld6, {arg graindur = 0.04, dur = 2000, atk = 0.007, rel = 0.01, gate = 1, amp = 1, i = 1, vol = ~vol, rate = 20, tune = 0,dseqval,
286                         a, b, c, d, e, f, pan=0, fc = 1;
287                         var s1, out, env1, s2, dseq,n1,n2,n3,n4,n5,n6,n7,n8,n9;
288                         #n1=[~gm6];
289                         dseq = Dseq([/*1*/      #a,b,c,d,e,f=[ ~a,~b,~c,~d,~e,~f  ],/*2*/       [ a = a/~fth, b = b/~fth, c = c/~fth, d = d/~fth, e = e/~fth, f = f/~fth ],/*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, b = b*~fth, c = c*~fth, d = d/~fth, e = e/~fth, f = f/~fth ],/*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, b = b/~fth, c = c/~fth, d = d*~fth, e = e*~fth, f = f/~fth ],/*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, b = b*~fth, c = c*~fth, d = d*~fth, e = e*~fth, f = f/~fth ],/*29*/       [ a = a,         b = b,         c = c/~fth,    d = d/~fth,    e = e,         f = f ],/*30*/     [ a = a*~fth, b = b/~fth, c = c*~fth, d = d*~fth, e = e/~fth, f = f*~fth ],/*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, b = b*~fth, c = c/~fth, d = d*~fth, e = e/~fth, f = f/~fth ],/*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, b = b/~fth, c = c*~fth, d = d/~fth, e = e*~fth, f = f*~fth ],/*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, b = b/~fth, c = c*~fth, d = d*~fth, e = e/~fth, f = f/~fth ],/*63*/       [ a = a,         b = b*~fth,    c = c/~fth,    d = d,         e = e,         f = f*~fth ],/*64*/        [ a = a*~fth, b = b/~fth, c = c*~fth, d = d/~fth, e = e*~fth, f = f/~fth ]]
290                                 ++Array.fill((~gsinenum*6 -1), {[/*1*/  [ a = a*n1,         b = b*n1*~fth,    c = c*n1,         d = d*n1*~fth,    e = e*n1,         f = f*n1*~fth ],/*2*/       [ a = a/~fth, b = b/~fth, c = c/~fth, d = d/~fth, e = e/~fth, f = f/~fth ],/*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, b = b*~fth, c = c*~fth, d = d/~fth, e = e/~fth, f = f/~fth ],/*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, b = b/~fth, c = c/~fth, d = d*~fth, e = e*~fth, f = f/~fth ],/*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, b = b*~fth, c = c*~fth, d = d*~fth, e = e*~fth, f = f/~fth ],/*29*/       [ a = a,         b = b,         c = c/~fth,    d = d/~fth,    e = e,         f = f ],/*30*/     [ a = a*~fth, b = b/~fth, c = c*~fth, d = d*~fth, e = e/~fth, f = f*~fth ],/*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, b = b*~fth, c = c/~fth, d = d*~fth, e = e/~fth, f = f/~fth ],/*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, b = b/~fth, c = c*~fth, d = d/~fth, e = e*~fth, f = f*~fth ],/*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, b = b/~fth, c = c*~fth, d = d*~fth, e = e/~fth, f = f/~fth ],/*63*/       [ a = a,         b = b*~fth,    c = c/~fth,    d = d,         e = e,         f = f*~fth ],/*64*/        [ a = a*~fth, b = b/~fth, c = c*~fth, d = d/~fth, e = e*~fth, f = f/~fth ]]
291                         }).flatten, inf);
292                         s1 = GrainSin.ar(1, Impulse.ar(dur+tune), 1/(dur+tune),Demand.ar(Impulse.ar(dur+tune), 0, dseq)*fc);
293                         OffsetOut.ar(0, s1.dup*vol);
294                 }, [\ir]).add;
295
296                 SynthDef(\gsineicrld6, {arg graindur = 0.04, dur = 2000, atk = 0.007, rel = 0.01, gate = 1, amp = 1, i = 1, vol = ~vol, rate = 20, tune = 0,dseqval,
297                         a, b, c, d, e, f, pan=0, fc = 1;
298                         var s1, out, env1, s2, dseq,n1,n2,n3,n4,n5,n6,n7,n8,n9;
299                         #n1=[~gm6];
300                         dseq = Dseq([[/*1*/     #a,b,c,d,e,f=[ ~a,~b,~c,~d,~e,~f  ],/*2*/       [ a = a/~fth, b = b/~fth, c = c/~fth, d = d/~fth, e = e/~fth, f = f/~fth ],/*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, b = b*~fth, c = c*~fth, d = d/~fth, e = e/~fth, f = f/~fth ],/*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, b = b/~fth, c = c/~fth, d = d*~fth, e = e*~fth, f = f/~fth ],/*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, b = b*~fth, c = c*~fth, d = d*~fth, e = e*~fth, f = f/~fth ],/*29*/       [ a = a,         b = b,         c = c/~fth,    d = d/~fth,    e = e,         f = f ],/*30*/     [ a = a*~fth, b = b/~fth, c = c*~fth, d = d*~fth, e = e/~fth, f = f*~fth ],/*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, b = b*~fth, c = c/~fth, d = d*~fth, e = e/~fth, f = f/~fth ],/*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, b = b/~fth, c = c*~fth, d = d/~fth, e = e*~fth, f = f*~fth ],/*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, b = b/~fth, c = c*~fth, d = d*~fth, e = e/~fth, f = f/~fth ],/*63*/       [ a = a,         b = b*~fth,    c = c/~fth,    d = d,         e = e,         f = f*~fth ],/*64*/        [ a = a*~fth, b = b/~fth, c = c*~fth, d = d/~fth, e = e*~fth, f = f/~fth ]]
301                                 ++Array.fill((~gsinenum*6 -1), {[/*1*/  [ a = a*n1,         b = b*n1*~fth,    c = c*n1,         d = d*n1*~fth,    e = e*n1,         f = f*n1*~fth ],/*2*/       [ a = a/~fth, b = b/~fth, c = c/~fth, d = d/~fth, e = e/~fth, f = f/~fth ],/*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, b = b*~fth, c = c*~fth, d = d/~fth, e = e/~fth, f = f/~fth ],/*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, b = b/~fth, c = c/~fth, d = d*~fth, e = e*~fth, f = f/~fth ],/*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, b = b*~fth, c = c*~fth, d = d*~fth, e = e*~fth, f = f/~fth ],/*29*/       [ a = a,         b = b,         c = c/~fth,    d = d/~fth,    e = e,         f = f ],/*30*/     [ a = a*~fth, b = b/~fth, c = c*~fth, d = d*~fth, e = e/~fth, f = f*~fth ],/*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, b = b*~fth, c = c/~fth, d = d*~fth, e = e/~fth, f = f/~fth ],/*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, b = b/~fth, c = c*~fth, d = d/~fth, e = e*~fth, f = f*~fth ],/*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, b = b/~fth, c = c*~fth, d = d*~fth, e = e/~fth, f = f/~fth ],/*63*/       [ a = a,         b = b*~fth,    c = c/~fth,    d = d,         e = e,         f = f*~fth ],/*64*/        [ a = a*~fth, b = b/~fth, c = c*~fth, d = d/~fth, e = e*~fth, f = f/~fth ]]
302                         }).flatten].flatten.reverse, inf);
303                         s1 = GrainSin.ar(1, Impulse.ar(dur+tune), 1/(dur+tune),Demand.ar(Impulse.ar(dur+tune), 0, dseq)*fc);
304                         OffsetOut.ar(0, s1.dup*vol);
305                 }, [\ir]).add;
306
307
308         };
309
310         ~gsine2 = {
311                 SynthDef(\gsineicfld1, {arg graindur = 0.04, dur = 2000, atk = 0.007, rel = 0.01, gate = 1, amp = 1, i = 1, vol = ~vol, rate = 20, tune = 0,dseqval,
312                         a, b, c, d, e, f, pan=0, fc = 1;
313                         var s1, out, env1, s2, dseq,n1,n2,n3,n4,n5,n6,n7,n8,n9;
314                         #n1,n2,n3,n4,n5,n6,n7,n8,n9=[~ngm1,~ngm1,~ngm1,~ngm1,~ngm1,~ngm1,~ngm1,~ngm1,~ngm1];
315                         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 ]]
316                                 ++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 ]]
317                         }).flatten, inf);
318                         s1 = GrainSin.ar(1, Impulse.ar(dur+tune), 1/(dur+tune),Demand.ar(Impulse.ar(dur+tune), 0, dseq)*fc);
319                         OffsetOut.ar(0, s1.dup*vol);
320                 }, [\ir]).add;
321
322                 SynthDef(\gsineicrld1, {arg graindur = 0.04, dur = 2000, atk = 0.007, rel = 0.01, gate = 1, amp = 1, i = 1, vol = ~vol, rate = 20, tune = 0,dseqval,
323                         a, b, c, d, e, f, pan=0, fc = 1, id = -1;
324                         var s1, out, env1, s2, dseq,n1,n2,n3,n4,n5,n6,n7,n8,n9,af;
325                         #n1,n2,n3,n4,n5,n6,n7,n8,n9=[~ngm1,~ngm1,~ngm1,~ngm1,~ngm1,~ngm1,~ngm1,~ngm1,~ngm1];
326                         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 ]]
327                                 ++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 ]]
328                         }).flatten].flatten.reverse, inf);
329                         s1 = GrainSin.ar(1, Impulse.ar(dur+tune), 1/(dur+tune), Demand.ar(Impulse.ar(dur+tune), 0, dseq));
330                         OffsetOut.ar(0, s1.dup*vol);
331                 }, [\ir]).add;
332
333                 SynthDef(\gsineicfld2, {arg graindur = 0.04, dur = 2000, atk = 0.007, rel = 0.01, gate = 1, amp = 1, i = 1, vol = ~vol, rate = 20, tune = 0,dseqval,
334                         a, b, c, d, e, f, pan=0, fc = 1;
335                         var s1, out, env1, s2, dseq,n1,n2,n3,n4,n5,n6,n7,n8,n9;
336                         #n1,n2,n3,n4,n5,n6,n7,n8,n9=[~ngm2,~ngm2,~ngm2,~ngm2,~ngm2,~ngm2,~ngm2,~ngm2,~ngm2];
337                         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 ]]
338                                 ++Array.fill((~gsinenum*2 -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 ]]
339                         }).flatten, inf);
340                         s1 = GrainSin.ar(1, Impulse.ar(dur+tune), 1/(dur+tune),Demand.ar(Impulse.ar(dur+tune), 0, dseq)*fc);
341                         OffsetOut.ar(0, s1.dup*vol);
342                 }, [\ir]).add;
343
344                 SynthDef(\gsineicrld2, {arg graindur = 0.04, dur = 2000, atk = 0.007, rel = 0.01, gate = 1, amp = 1, i = 1, vol = ~vol, rate = 20, tune = 0,dseqval,
345                         a, b, c, d, e, f, pan=0, fc = 1, id = -1;
346                         var s1, out, env1, s2, dseq,n1,n2,n3,n4,n5,n6,n7,n8,n9,af;
347                         #n1,n2,n3,n4,n5,n6,n7,n8,n9=[~ngm2,~ngm2,~ngm2,~ngm2,~ngm2,~ngm2,~ngm2,~ngm2,~ngm2];
348                         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 ]]
349                                 ++Array.fill((~gsinenum*2 -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 ]]
350                         }).flatten].flatten.reverse, inf);
351                         s1 = GrainSin.ar(1, Impulse.ar(dur+tune), 1/(dur+tune), Demand.ar(Impulse.ar(dur+tune), 0, dseq));
352                         OffsetOut.ar(0, s1.dup*vol);
353                 }, [\ir]).add;
354
355                 SynthDef(\gsineicfld6, {arg graindur = 0.04, dur = 2000, atk = 0.007, rel = 0.01, gate = 1, amp = 1, i = 1, vol = ~vol, rate = 20, tune = 0,dseqval,
356                         a, b, c, d, e, f, pan=0, fc = 1;
357                         var s1, out, env1, s2, dseq,n1,n2,n3,n4,n5,n6,n7,n8,n9;
358                         #n1,n2,n3,n4,n5,n6,n7,n8,n9=[~ngm6,~ngm6,~ngm6,~ngm6,~ngm6,~ngm6,~ngm6,~ngm6,~ngm6];
359                         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 ]]
360                                 ++Array.fill((~gsinenum*6 -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 ]]
361                         }).flatten, inf);
362                         s1 = GrainSin.ar(1, Impulse.ar(dur+tune), 1/(dur+tune),Demand.ar(Impulse.ar(dur+tune), 0, dseq)*fc);
363                         OffsetOut.ar(0, s1.dup*vol);
364                 }, [\ir]).add;
365
366                 SynthDef(\gsineicrld6, {arg graindur = 0.04, dur = 2000, atk = 0.007, rel = 0.01, gate = 1, amp = 1, i = 1, vol = ~vol, rate = 20, tune = 0,dseqval,
367                         a, b, c, d, e, f, pan=0, fc = 1;
368                         var s1, out, env1, s2, dseq,n1,n2,n3,n4,n5,n6,n7,n8,n9;
369                         #n1,n2,n3,n4,n5,n6,n7,n8,n9=[~ngm6,~ngm6,~ngm6,~ngm6,~ngm6,~ngm6,~ngm6,~ngm6,~ngm6];
370                         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 ]]
371                                 ++Array.fill((~gsinenum*6 -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 ]]
372                         }).flatten].flatten.reverse, inf);
373                         s1 = GrainSin.ar(1, Impulse.ar(dur+tune), 1/(dur+tune),Demand.ar(Impulse.ar(dur+tune), 0, dseq)*fc);
374                         OffsetOut.ar(0, s1.dup*vol);
375                 }, [\ir]).add;
376
377
378         };
379
380
381         //starting values for synthdefs
382
383         if((~gsinenum == nil) and: (~synthdef != "gsineicld"), {
384                 (
385                         if(~basefreq == nil, {~basefreq = ~base_frequency});
386                         ~fmult = 16;
387                         (#a,b,c,d,e,f = [ ~basefreq,~basefreq,~basefreq,~basefreq,~basefreq,~basefreq  ];
388                                 ~a = a; ~b = b; ~c =c; ~d = d; ~e = e;~f=f;);
389
390                         ~fth = 1.4142135623729;
391                         ~gm = 1.6180339887499;
392                         ~gm2 = 1.2720196495141;
393                         ~gm6 = 1.0835058821738;
394                         ~stepratio = 1.0594630943593;
395                         ~nval = 1.0355417528;
396                         ~n9s = 1.86;
397                         ~n9 = 1.080059789899;
398                         ~n18 = 1.0392592260319;
399                         ~n27 = 1.0260044847071;
400                         ~n36 = 1.0194406437022;
401                         ~n45 = 1.0155225125043;
402                         ~n54 = 1.012918794725;
403                         ~n63 = 1.0110630844869;
404                         ~n72 = 1.0096735332285;
405                         ~ngm1 = 1.0549232131786;
406                         ~ngm2 = 1.0270945492887;
407                         ~ngm6 = 1.0089511542031;
408                         ~nval = ~ngm6;
409
410                         ~synthdef = "gsineicld"; ~gsinenum = ~synthdefnum;
411                         case
412                         {~gsine == nil}{~gsine1.value}
413                         {~gsine == 0}{~gsine1.value;}
414                         {~gsine == 1}{~gsine2.value;};
415
416                 );
417         });
418
419
420         //generaate GUI window
421
422         w = Window("Timewave Synth", Rect(0,0,Window.screenBounds.width,Window.screenBounds.height), border:true);
423
424         view = UserView(w, Window.screenBounds);
425         view.clearOnRefresh = false;
426         view.background = Color.black;
427
428         //vertical grid (inactive)
429
430         /*~b1 = Window.screenBounds.width/(12*4) /*25.462962962963*/; ~btu = 31; ~btd = 375; ~bw = 0.5; ~bh = 80; ~bcolor = Color.grey;
431         CompositeView(w, Rect(~b1, ~btu, ~bw, ~bh)).background = ~bcolor;
432         CompositeView(w, Rect(~b1, ~btd, ~bw, ~bh)).background = ~bcolor;
433         54.do({CompositeView(w, Rect(~b1 = ~b1+(Window.screenBounds.width/(12*4)), ~btu, ~bw, ~bh)).background = ~bcolor;});
434         ~b1 = Window.screenBounds.width/(12*4);
435         54.do({CompositeView(w, Rect(~b1 = ~b1+(Window.screenBounds.width/(12*4)), ~btd, ~bw, ~bh)).background = ~bcolor;});*/
436
437         ~nh = 2;
438         ~nw = ~nh*1.6180339887499;
439
440         ~tgrid = 30;
441         ~bgrid = Window.screenBounds.height-(Window.screenBounds.height/1.6180339887499)+30;
442
443         ~dc1 = ~tgrid-5; ~dc2 = ~bgrid-5; ~dca = 10;
444
445         //horizontal grid
446
447         9.do(x=~tgrid-10; {CompositeView(w, Rect(1, x=x+10, Window.screenBounds.width, 0.5)).background = Color.new255(51, 51, 51)});
448         9.do(x=~bgrid-10; {CompositeView(w, Rect(1, x=x+10, Window.screenBounds.width, 0.5)).background = Color.new255(51, 51, 51)});
449
450         ~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;);
451         ~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;);
452         ~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;);
453         ~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;);
454         ~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;);
455         ~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;);
456         ~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;);
457         ~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;);
458         ~zmid = (CompositeView(w, Rect(x, 280, ~nw, 2)).background = Color.clear;);
459         ~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;);
460         ~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;);
461         ~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;);
462         ~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;);
463         ~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;);
464         ~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;);
465         ~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;);
466         ~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;);
467
468
469         ~dc1 = ~tgrid-5; ~dc2 = ~bgrid-5; ~dca = 10;
470
471
472         //synth functions (open, flow, slide, pause, free)
473
474         ~synthopen = {
475                 case
476                 {((~l1a.isRunning == false) and: (~l1a1.isRunning == false)) or: ~l1a1.isRunning == true}{
477                         (1.do({var vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8,s1,s2,s3,s4,s5,s6,f1,f2,f3,f4,f5,f6,f7,f8,tune=0;
478                                 #vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8 = [~vol1,~vol2,~vol3,~vol4,~vol5,~vol6,~vol7,~vol8];
479                                 #f1,f2,f3,f4,f5,f6,f7,f8 = [ 0,0,0,0,0,0,0,0 ];
480                                 ~l1a1.set(\dur, f1,     \vol, vol1, \tune, tune);  ~l1b1.set(\dur, f1,  \vol, vol1, \tune, tune);
481                                 ~l1c1.set(\dur, f1/~icd3,       \vol, vol1, \tune, tune);  ~l1d1.set(\dur, f1/~icd3,  \vol, vol1, \tune, tune);
482                                 ~l1e1.set(\dur, f1/~icd6,       \vol, vol1, \tune, tune);  ~l1f1.set(\dur, f1/~icd6,  \vol, vol1, \tune, tune);
483                                 ~l2a1.set(\dur, f2,     \vol, vol2, \tune, tune);          ~l2b1.set(\dur, f2,  \vol, vol2, \tune, tune);
484                                 ~l2c1.set(\dur, f2/~icd3,       \vol, vol2, \tune, tune);  ~l2d1.set(\dur, f2/~icd3,  \vol, vol2, \tune, tune);
485                                 ~l2e1.set(\dur, f2/~icd6,       \vol, vol2, \tune, tune);  ~l2f1.set(\dur, f2/~icd6,  \vol, vol2, \tune, tune);
486                                 ~l3a1.set(\dur, f3,     \vol, vol3, \tune, tune);          ~l3b1.set(\dur, f3,  \vol, vol3, \tune, tune);
487                                 ~l3c1.set(\dur, f3/~icd3,       \vol, vol3, \tune, tune);  ~l3d1.set(\dur, f3/~icd3,  \vol, vol3, \tune, tune);
488                                 ~l3e1.set(\dur, f3/~icd6,       \vol, vol3, \tune, tune);  ~l3f1.set(\dur, f3/~icd6,  \vol, vol3, \tune, tune);
489                                 ~l4a1.set(\dur, f4,    \vol, vol4, \tune, tune);           ~l4b1.set(\dur, f4,  \vol, vol4, \tune, tune);
490                                 ~l4c1.set(\dur, f4/~icd3,       \vol, vol4, \tune, tune);  ~l4d1.set(\dur, f4/~icd3,  \vol, vol4, \tune, tune);
491                                 ~l4e1.set(\dur, f4/~icd6,       \vol, vol4, \tune, tune);  ~l4f1.set(\dur, f4/~icd6,  \vol, vol4, \tune, tune);
492                                 ~l5a1.set(\dur, f5,    \vol, vol5, \tune, tune);           ~l5b1.set(\dur, f5,  \vol, vol5, \tune, tune);
493                                 ~l5c1.set(\dur, f5/~icd3,       \vol, vol5, \tune, tune);  ~l5d1.set(\dur, f5/~icd3,  \vol, vol5, \tune, tune);
494                                 ~l5e1.set(\dur, f5/~icd6,       \vol, vol5, \tune, tune);  ~l5f1.set(\dur, f5/~icd6,  \vol, vol5, \tune, tune);
495                                 ~l6a1.set(\dur, f6,    \vol, vol6, \tune, tune);           ~l6b1.set(\dur, f6,  \vol, vol6, \tune, tune);
496                                 ~l6c1.set(\dur, f6/~icd3,       \vol, vol6, \tune, tune);  ~l6d1.set(\dur, f6/~icd3,  \vol, vol6, \tune, tune);
497                                 ~l6e1.set(\dur, f6/~icd6,       \vol, vol6, \tune, tune);  ~l6f1.set(\dur, f6/~icd6,  \vol, vol6, \tune, tune);
498                                 ~l7a1.set(\dur, f7,    \vol, vol7, \tune, tune);           ~l7b1.set(\dur, f7,  \vol, vol7, \tune, tune);
499                                 ~l7c1.set(\dur, f7/~icd3,       \vol, vol7, \tune, tune);  ~l7d1.set(\dur, f7/~icd3,  \vol, vol7, \tune, tune);
500                                 ~l7e1.set(\dur, f7/~icd6,       \vol, vol7, \tune, tune);  ~l7f1.set(\dur, f7/~icd6,  \vol, vol7, \tune, tune);
501                                 ~l8a1.set(\dur, f8,    \vol, vol8, \tune, tune);           ~l8b1.set(\dur, f8,  \vol, vol8, \tune, tune);
502                                 ~l8c1.set(\dur, f8/~icd3,       \vol, vol8, \tune, tune);  ~l8d1.set(\dur, f8/~icd3,  \vol, vol8, \tune, tune);
503                                 ~l8e1.set(\dur, f8/~icd6,       \vol, vol8, \tune, tune);  ~l8f1.set(\dur, f8/~icd6,  \vol, vol8, \tune, tune);
504                         }););
505
506                         (
507                                 1.do({var vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8,vol9,vol10,vol11,vol12,s1,s2,s3,s4,s5,s6,f1,f2,f3,f4,f5,f6,f7,f8,tune=0;
508                                         #vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8 = [~vol1,~vol2,~vol3,~vol4,~vol5,~vol6,~vol7,~vol8];
509                                         #s1,s2,s3,s4,s5,s6 = [\gsineicfld6, \gsineicrld6, \gsineicfld2, \gsineicrld2, \gsineicfld1, \gsineicrld1];
510                                         ~l1a = Synth(s1, [\dur, ~f1,    \vol, vol1, \tune, tune]).register;    ~l1b = Synth(s2, [\dur, ~f1,    \vol, vol1, \tune, tune]);
511                                         ~l1c = Synth(s3, [\dur, ~f1/~icd3,  \vol, vol1, \tune, tune]);   ~l1d = Synth(s4, [\dur, ~f1/~icd3,  \vol, vol1, \tune, tune]);
512                                         ~l1e = Synth(s5, [\dur, ~f1/~icd6,  \vol, vol1, \tune, tune]);   ~l1f = Synth(s6, [\dur, ~f1/~icd6,  \vol, vol1, \tune, tune]);
513                                         ~l2a = Synth(s1, [\dur, ~f2,    \vol, vol2, \tune, tune]);        ~l2b = Synth(s2, [\dur, ~f2,    \vol, vol2, \tune, tune]);
514                                         ~l2c = Synth(s3, [\dur, ~f2/~icd3,  \vol, vol2, \tune, tune]);   ~l2d = Synth(s4, [\dur, ~f2/~icd3,  \vol, vol2, \tune, tune]);
515                                         ~l2e = Synth(s5, [\dur, ~f2/~icd6,  \vol, vol2, \tune, tune]);   ~l2f = Synth(s6, [\dur, ~f2/~icd6,  \vol, vol2, \tune, tune]);
516                                         ~l3a = Synth(s1, [\dur, ~f3,    \vol, vol3, \tune, tune]);        ~l3b = Synth(s2, [\dur, ~f3,   \vol, vol3, \tune, tune]);
517                                         ~l3c = Synth(s3, [\dur, ~f3/~icd3,  \vol, vol3, \tune, tune]);   ~l3d = Synth(s4, [\dur, ~f3/~icd3, \vol, vol3, \tune, tune]);
518                                         ~l3e = Synth(s5, [\dur, ~f3/~icd6,  \vol, vol3, \tune, tune]);   ~l3f = Synth(s6, [\dur, ~f3/~icd6, \vol, vol3, \tune, tune]);
519                                         ~l4a = Synth(s1, [\dur, ~f4,    \vol, vol4, \tune, tune]);       ~l4b = Synth(s2, [\dur, ~f4,   \vol, vol4, \tune, tune]);
520                                         ~l4c = Synth(s3, [\dur, ~f4/~icd3,  \vol, vol4, \tune, tune]);  ~l4d = Synth(s4, [\dur, ~f4/~icd3, \vol, vol4, \tune, tune]);
521                                         ~l4e = Synth(s5, [\dur, ~f4/~icd6,  \vol, vol4, \tune, tune]);   ~l4f = Synth(s6, [\dur, ~f4/~icd6, \vol, vol4, \tune, tune]);
522                                         ~l5a = Synth(s1, [\dur, ~f5,    \vol, vol5, \tune, tune]);       ~l5b = Synth(s2, [\dur, ~f5,   \vol, vol5, \tune, tune]);
523                                         ~l5c = Synth(s3, [\dur, ~f5/~icd3,  \vol, vol5, \tune, tune]);   ~l5d = Synth(s4, [\dur, ~f5/~icd3, \vol, vol5, \tune, tune]);
524                                         ~l5e = Synth(s5, [\dur, ~f5/~icd6,  \vol, vol5, \tune, tune]);   ~l5f = Synth(s6, [\dur, ~f5/~icd6, \vol, vol5, \tune, tune]);
525                                         ~l6a = Synth(s1, [\dur, ~f6,    \vol, vol6, \tune, tune]);       ~l6b = Synth(s2, [\dur, ~f6,   \vol, vol6, \tune, tune]);
526                                         ~l6c = Synth(s3, [\dur, ~f6/~icd3,  \vol, vol6, \tune, tune]);   ~l6d = Synth(s4, [\dur, ~f6/~icd3, \vol, vol6, \tune, tune]);
527                                         ~l6e = Synth(s5, [\dur, ~f6/~icd6,  \vol, vol6, \tune, tune]);   ~l6f = Synth(s6, [\dur, ~f6/~icd6, \vol, vol6, \tune, tune]);
528                                         ~l7a = Synth(s1, [\dur, ~f7,    \vol, vol7, \tune, tune]);       ~l7b = Synth(s2, [\dur, ~f7,   \vol, vol7, \tune, tune]);
529                                         ~l7c = Synth(s3, [\dur, ~f7/~icd3,  \vol, vol7, \tune, tune]);   ~l7d = Synth(s4, [\dur, ~f7/~icd3, \vol, vol7, \tune, tune]);
530                                         ~l7e = Synth(s5, [\dur, ~f7/~icd6,  \vol, vol7, \tune, tune]);   ~l7f = Synth(s6, [\dur, ~f7/~icd6, \vol, vol7, \tune, tune]);
531                                         ~l8a = Synth(s1, [\dur, ~f8,    \vol, vol8, \tune, tune]);  ~l8b = Synth(s2, [\dur, ~f8,   \vol, vol8, \tune, tune]);
532                                         ~l8c = Synth(s3, [\dur, ~f8/~icd3,  \vol, vol8, \tune, tune]);   ~l8d = Synth(s4, [\dur, ~f8/~icd3, \vol, vol8, \tune, tune]);
533                                         ~l8e = Synth(s5, [\dur, ~f8/~icd6,  \vol, vol8, \tune, tune]);   ~l8f = Synth(s6, [\dur, ~f8/~icd6, \vol, vol8, \tune, tune]);
534
535                                 });
536                         );
537                         AppClock.sched(0.161803398875,{
538                                 ([~l1a1,~l1b1,~l1c1,~l1d1,~l1e1,~l1f1,~l2a1,~l2b1,~l2c1,~l2d1,~l2e1,~l2f1,~l3a1,~l3b1,~l3c1,~l3d1,~l3e1,~l3f1,~l4a1,~l4b1,~l4c1,~l4d1,~l4e1,~l4f1,~l5a1,~l5b1,~l5c1,~l5d1,~l5e1,~l5f1,~l6a1,~l6b1,~l6c1,~l6d1,~l6e1,~l6f1,~l7a1,~l7b1,~l7c1,~l7d1,~l7e1,~l7f1,~l8a1,~l8b1,~l8c1,~l8d1,~l8e1,~l8f1 ].do(_.free)); ~slideroutine.stop;
539                         });
540                 }
541                 {~l1a.isRunning == true}{
542                         (1.do({var vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8,s1,s2,s3,s4,s5,s6,f1,f2,f3,f4,f5,f6,f7,f8,tune=0;
543                                 #vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8 = [~vol1,~vol2,~vol3,~vol4,~vol5,~vol6,~vol7,~vol8];
544                                 #f1,f2,f3,f4,f5,f6,f7,f8 = [ 0,0,0,0,0,0,0,0 ];
545                                 ~l1a.set(\dur, f1,     \vol, vol1, \tune, tune);  ~l1b.set(\dur, f1,  \vol, vol1, \tune, tune);
546                                 ~l1c.set(\dur, f1/~icd3,       \vol, vol1, \tune, tune);  ~l1d.set(\dur, f1/~icd3,  \vol, vol1, \tune, tune);
547                                 ~l1e.set(\dur, f1/~icd6,       \vol, vol1, \tune, tune);  ~l1f.set(\dur, f1/~icd6,  \vol, vol1, \tune, tune);
548                                 ~l2a.set(\dur, f2,     \vol, vol2, \tune, tune);          ~l2b.set(\dur, f2,  \vol, vol2, \tune, tune);
549                                 ~l2c.set(\dur, f2/~icd3,       \vol, vol2, \tune, tune);  ~l2d.set(\dur, f2/~icd3,  \vol, vol2, \tune, tune);
550                                 ~l2e.set(\dur, f2/~icd6,       \vol, vol2, \tune, tune);  ~l2f.set(\dur, f2/~icd6,  \vol, vol2, \tune, tune);
551                                 ~l3a.set(\dur, f3,     \vol, vol3, \tune, tune);          ~l3b.set(\dur, f3,  \vol, vol3, \tune, tune);
552                                 ~l3c.set(\dur, f3/~icd3,       \vol, vol3, \tune, tune);  ~l3d.set(\dur, f3/~icd3,  \vol, vol3, \tune, tune);
553                                 ~l3e.set(\dur, f3/~icd6,       \vol, vol3, \tune, tune);  ~l3f.set(\dur, f3/~icd6,  \vol, vol3, \tune, tune);
554                                 ~l4a.set(\dur, f4,    \vol, vol4, \tune, tune);           ~l4b.set(\dur, f4,  \vol, vol4, \tune, tune);
555                                 ~l4c.set(\dur, f4/~icd3,       \vol, vol4, \tune, tune);  ~l4d.set(\dur, f4/~icd3,  \vol, vol4, \tune, tune);
556                                 ~l4e.set(\dur, f4/~icd6,       \vol, vol4, \tune, tune);  ~l4f.set(\dur, f4/~icd6,  \vol, vol4, \tune, tune);
557                                 ~l5a.set(\dur, f5,    \vol, vol5, \tune, tune);           ~l5b.set(\dur, f5,  \vol, vol5, \tune, tune);
558                                 ~l5c.set(\dur, f5/~icd3,       \vol, vol5, \tune, tune);  ~l5d.set(\dur, f5/~icd3,  \vol, vol5, \tune, tune);
559                                 ~l5e.set(\dur, f5/~icd6,       \vol, vol5, \tune, tune);  ~l5f.set(\dur, f5/~icd6,  \vol, vol5, \tune, tune);
560                                 ~l6a.set(\dur, f6,    \vol, vol6, \tune, tune);           ~l6b.set(\dur, f6,  \vol, vol6, \tune, tune);
561                                 ~l6c.set(\dur, f6/~icd3,       \vol, vol6, \tune, tune);  ~l6d.set(\dur, f6/~icd3,  \vol, vol6, \tune, tune);
562                                 ~l6e.set(\dur, f6/~icd6,       \vol, vol6, \tune, tune);  ~l6f.set(\dur, f6/~icd6,  \vol, vol6, \tune, tune);
563                                 ~l7a.set(\dur, f7,    \vol, vol7, \tune, tune);           ~l7b.set(\dur, f7,  \vol, vol7, \tune, tune);
564                                 ~l7c.set(\dur, f7/~icd3,       \vol, vol7, \tune, tune);  ~l7d.set(\dur, f7/~icd3,  \vol, vol7, \tune, tune);
565                                 ~l7e.set(\dur, f7/~icd6,       \vol, vol7, \tune, tune);  ~l7f.set(\dur, f7/~icd6,  \vol, vol7, \tune, tune);
566                                 ~l8a.set(\dur, f8,    \vol, vol8, \tune, tune);           ~l8b.set(\dur, f8,  \vol, vol8, \tune, tune);
567                                 ~l8c.set(\dur, f8/~icd3,       \vol, vol8, \tune, tune);  ~l8d.set(\dur, f8/~icd3,  \vol, vol8, \tune, tune);
568                                 ~l8e.set(\dur, f8/~icd6,       \vol, vol8, \tune, tune);  ~l8f.set(\dur, f8/~icd6,  \vol, vol8, \tune, tune);
569                         }););
570
571                         (
572                                 1.do({var vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8,vol9,vol10,vol11,vol12,s1,s2,s3,s4,s5,s6,f1,f2,f3,f4,f5,f6,f7,f8,tune=0;
573                                         #vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8 = [~vol1,~vol2,~vol3,~vol4,~vol5,~vol6,~vol7,~vol8];
574                                         #s1,s2,s3,s4,s5,s6 = [\gsineicfld6, \gsineicrld6, \gsineicfld2, \gsineicrld2, \gsineicfld1, \gsineicrld1];
575                                         ~l1a1 = Synth(s1, [\dur, ~f1,    \vol, vol1, \tune, tune]).register;    ~l1b1 = Synth(s2, [\dur, ~f1,    \vol, vol1, \tune, tune]);
576                                         ~l1c1 = Synth(s3, [\dur, ~f1/~icd3,  \vol, vol1, \tune, tune]);   ~l1d1 = Synth(s4, [\dur, ~f1/~icd3,  \vol, vol1, \tune, tune]);
577                                         ~l1e1 = Synth(s5, [\dur, ~f1/~icd6,  \vol, vol1, \tune, tune]);   ~l1f1 = Synth(s6, [\dur, ~f1/~icd6,  \vol, vol1, \tune, tune]);
578                                         ~l2a1 = Synth(s1, [\dur, ~f2,    \vol, vol2, \tune, tune]);        ~l2b1 = Synth(s2, [\dur, ~f2,    \vol, vol2, \tune, tune]);
579                                         ~l2c1 = Synth(s3, [\dur, ~f2/~icd3,  \vol, vol2, \tune, tune]);   ~l2d1 = Synth(s4, [\dur, ~f2/~icd3,  \vol, vol2, \tune, tune]);
580                                         ~l2e1 = Synth(s5, [\dur, ~f2/~icd6,  \vol, vol2, \tune, tune]);   ~l2f1 = Synth(s6, [\dur, ~f2/~icd6,  \vol, vol2, \tune, tune]);
581                                         ~l3a1 = Synth(s1, [\dur, ~f3,    \vol, vol3, \tune, tune]);        ~l3b1 = Synth(s2, [\dur, ~f3,   \vol, vol3, \tune, tune]);
582                                         ~l3c1 = Synth(s3, [\dur, ~f3/~icd3,  \vol, vol3, \tune, tune]);   ~l3d1 = Synth(s4, [\dur, ~f3/~icd3, \vol, vol3, \tune, tune]);
583                                         ~l3e1 = Synth(s5, [\dur, ~f3/~icd6,  \vol, vol3, \tune, tune]);   ~l3f1 = Synth(s6, [\dur, ~f3/~icd6, \vol, vol3, \tune, tune]);
584                                         ~l4a1 = Synth(s1, [\dur, ~f4,    \vol, vol4, \tune, tune]);       ~l4b1 = Synth(s2, [\dur, ~f4,   \vol, vol4, \tune, tune]);
585                                         ~l4c1 = Synth(s3, [\dur, ~f4/~icd3,  \vol, vol4, \tune, tune]);  ~l4d1 = Synth(s4, [\dur, ~f4/~icd3, \vol, vol4, \tune, tune]);
586                                         ~l4e1 = Synth(s5, [\dur, ~f4/~icd6,  \vol, vol4, \tune, tune]);   ~l4f1 = Synth(s6, [\dur, ~f4/~icd6, \vol, vol4, \tune, tune]);
587                                         ~l5a1 = Synth(s1, [\dur, ~f5,    \vol, vol5, \tune, tune]);       ~l5b1 = Synth(s2, [\dur, ~f5,   \vol, vol5, \tune, tune]);
588                                         ~l5c1 = Synth(s3, [\dur, ~f5/~icd3,  \vol, vol5, \tune, tune]);   ~l5d1 = Synth(s4, [\dur, ~f5/~icd3, \vol, vol5, \tune, tune]);
589                                         ~l5e1 = Synth(s5, [\dur, ~f5/~icd6,  \vol, vol5, \tune, tune]);   ~l5f1 = Synth(s6, [\dur, ~f5/~icd6, \vol, vol5, \tune, tune]);
590                                         ~l6a1 = Synth(s1, [\dur, ~f6,    \vol, vol6, \tune, tune]);       ~l6b1 = Synth(s2, [\dur, ~f6,   \vol, vol6, \tune, tune]);
591                                         ~l6c1 = Synth(s3, [\dur, ~f6/~icd3,  \vol, vol6, \tune, tune]);   ~l6d1 = Synth(s4, [\dur, ~f6/~icd3, \vol, vol6, \tune, tune]);
592                                         ~l6e1 = Synth(s5, [\dur, ~f6/~icd6,  \vol, vol6, \tune, tune]);   ~l6f1 = Synth(s6, [\dur, ~f6/~icd6, \vol, vol6, \tune, tune]);
593                                         ~l7a1 = Synth(s1, [\dur, ~f7,    \vol, vol7, \tune, tune]);       ~l7b1 = Synth(s2, [\dur, ~f7,   \vol, vol7, \tune, tune]);
594                                         ~l7c1 = Synth(s3, [\dur, ~f7/~icd3,  \vol, vol7, \tune, tune]);   ~l7d1 = Synth(s4, [\dur, ~f7/~icd3, \vol, vol7, \tune, tune]);
595                                         ~l7e1 = Synth(s5, [\dur, ~f7/~icd6,  \vol, vol7, \tune, tune]);   ~l7f1 = Synth(s6, [\dur, ~f7/~icd6, \vol, vol7, \tune, tune]);
596                                         ~l8a1 = Synth(s1, [\dur, ~f8,    \vol, vol8, \tune, tune]);  ~l8b1 = Synth(s2, [\dur, ~f8,   \vol, vol8, \tune, tune]);
597                                         ~l8c1 = Synth(s3, [\dur, ~f8/~icd3,  \vol, vol8, \tune, tune]);   ~l8d1 = Synth(s4, [\dur, ~f8/~icd3, \vol, vol8, \tune, tune]);
598                                         ~l8e1 = Synth(s5, [\dur, ~f8/~icd6,  \vol, vol8, \tune, tune]);   ~l8f1 = Synth(s6, [\dur, ~f8/~icd6, \vol, vol8, \tune, tune]);
599
600                                 });
601                         );
602                         AppClock.sched(0.161803398875,{
603                                 ([~l1a,~l1b,~l1c,~l1d,~l1e,~l1f,~l2a,~l2b,~l2c,~l2d,~l2e,~l2f,~l3a,~l3b,~l3c,~l3d,~l3e,~l3f,~l4a,~l4b,~l4c,~l4d,~l4e,~l4f,~l5a,~l5b,~l5c,~l5d,~l5e,~l5f,~l6a,~l6b,~l6c,~l6d,~l6e,~l6f,~l7a,~l7b,~l7c,~l7d,~l7e,~l7f,~l8a,~l8b,~l8c,~l8d,~l8e,~l8f].do(_.free)); ~slideroutine.stop;
604                         });
605                 };
606
607                 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;);});
608                 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;);});
609                 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;);});
610                 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;);});
611                 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;);});
612                 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;);});
613                 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;);});
614                 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;);});
615
616                 b3.value = 1;
617         };
618
619         ~synthflow = {
620                 case
621                 {~l1a1.isRunning == true}{
622                         (1.do({var vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8,s1,s2,s3,s4,s5,s6,f1,f2,f3,f4,f5,f6,f7,f8,tune=0;
623                                 #vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8 = [~vol1,~vol2,~vol3,~vol4,~vol5,~vol6,~vol7,~vol8];
624                                 ~l1a1.set(\dur, ~f1,     \vol, vol1, \tune, tune);  ~l1b1.set(\dur, ~f1,  \vol, vol1, \tune, tune);
625                                 ~l1c1.set(\dur, ~f1/~icd3,       \vol, vol1, \tune, tune);  ~l1d1.set(\dur, ~f1/~icd3,  \vol, vol1, \tune, tune);
626                                 ~l1e1.set(\dur, ~f1/~icd6,       \vol, vol1, \tune, tune);  ~l1f1.set(\dur, ~f1/~icd6,  \vol, vol1, \tune, tune);
627                                 ~l2a1.set(\dur, ~f2,     \vol, vol2, \tune, tune);          ~l2b1.set(\dur, ~f2,  \vol, vol2, \tune, tune);
628                                 ~l2c1.set(\dur, ~f2/~icd3,       \vol, vol2, \tune, tune);  ~l2d1.set(\dur, ~f2/~icd3,  \vol, vol2, \tune, tune);
629                                 ~l2e1.set(\dur, ~f2/~icd6,       \vol, vol2, \tune, tune);  ~l2f1.set(\dur, ~f2/~icd6,  \vol, vol2, \tune, tune);
630                                 ~l3a1.set(\dur, ~f3,     \vol, vol3, \tune, tune);          ~l3b1.set(\dur, ~f3,  \vol, vol3, \tune, tune);
631                                 ~l3c1.set(\dur, ~f3/~icd3,       \vol, vol3, \tune, tune);  ~l3d1.set(\dur, ~f3/~icd3,  \vol, vol3, \tune, tune);
632                                 ~l3e1.set(\dur, ~f3/~icd6,       \vol, vol3, \tune, tune);  ~l3f1.set(\dur, ~f3/~icd6,  \vol, vol3, \tune, tune);
633                                 ~l4a1.set(\dur, ~f4,    \vol, vol4, \tune, tune);           ~l4b1.set(\dur, ~f4,  \vol, vol4, \tune, tune);
634                                 ~l4c1.set(\dur, ~f4/~icd3,       \vol, vol4, \tune, tune);  ~l4d1.set(\dur, ~f4/~icd3,  \vol, vol4, \tune, tune);
635                                 ~l4e1.set(\dur, ~f4/~icd6,       \vol, vol4, \tune, tune);  ~l4f1.set(\dur, ~f4/~icd6,  \vol, vol4, \tune, tune);
636                                 ~l5a1.set(\dur, ~f5,    \vol, vol5, \tune, tune);           ~l5b1.set(\dur, ~f5,  \vol, vol5, \tune, tune);
637                                 ~l5c1.set(\dur, ~f5/~icd3,       \vol, vol5, \tune, tune);  ~l5d1.set(\dur, ~f5/~icd3,  \vol, vol5, \tune, tune);
638                                 ~l5e1.set(\dur, ~f5/~icd6,       \vol, vol5, \tune, tune);  ~l5f1.set(\dur, ~f5/~icd6,  \vol, vol5, \tune, tune);
639                                 ~l6a1.set(\dur, ~f6,    \vol, vol6, \tune, tune);           ~l6b1.set(\dur, ~f6,  \vol, vol6, \tune, tune);
640                                 ~l6c1.set(\dur, ~f6/~icd3,       \vol, vol6, \tune, tune);  ~l6d1.set(\dur, ~f6/~icd3,  \vol, vol6, \tune, tune);
641                                 ~l6e1.set(\dur, ~f6/~icd6,       \vol, vol6, \tune, tune);  ~l6f1.set(\dur, ~f6/~icd6,  \vol, vol6, \tune, tune);
642                                 ~l7a1.set(\dur, ~f7,    \vol, vol7, \tune, tune);           ~l7b1.set(\dur, ~f7,  \vol, vol7, \tune, tune);
643                                 ~l7c1.set(\dur, ~f7/~icd3,       \vol, vol7, \tune, tune);  ~l7d1.set(\dur, ~f7/~icd3,  \vol, vol7, \tune, tune);
644                                 ~l7e1.set(\dur, ~f7/~icd6,       \vol, vol7, \tune, tune);  ~l7f1.set(\dur, ~f7/~icd6,  \vol, vol7, \tune, tune);
645                                 ~l8a1.set(\dur, ~f8,    \vol, vol8, \tune, tune);           ~l8b1.set(\dur, ~f8,  \vol, vol8, \tune, tune);
646                                 ~l8c1.set(\dur, ~f8/~icd3,       \vol, vol8, \tune, tune);  ~l8d1.set(\dur, ~f8/~icd3,  \vol, vol8, \tune, tune);
647                                 ~l8e1.set(\dur, ~f8/~icd6,       \vol, vol8, \tune, tune);  ~l8f1.set(\dur, ~f8/~icd6,  \vol, vol8, \tune, tune);
648                         }););
649                 }
650                 {~l1a.isRunning == true} {
651                         (1.do({var vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8,s1,s2,s3,s4,s5,s6,f1,f2,f3,f4,f5,f6,f7,f8,tune=0;
652                                 #vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8 = [~vol1,~vol2,~vol3,~vol4,~vol5,~vol6,~vol7,~vol8];
653                                 ~l1a.set(\dur, ~f1,     \vol, vol1, \tune, tune);  ~l1b.set(\dur, ~f1,  \vol, vol1, \tune, tune);
654                                 ~l1c.set(\dur, ~f1/~icd3,       \vol, vol1, \tune, tune);  ~l1d.set(\dur, ~f1/~icd3,  \vol, vol1, \tune, tune);
655                                 ~l1e.set(\dur, ~f1/~icd6,       \vol, vol1, \tune, tune);  ~l1f.set(\dur, ~f1/~icd6,  \vol, vol1, \tune, tune);
656                                 ~l2a.set(\dur, ~f2,     \vol, vol2, \tune, tune);          ~l2b.set(\dur, ~f2,  \vol, vol2, \tune, tune);
657                                 ~l2c.set(\dur, ~f2/~icd3,       \vol, vol2, \tune, tune);  ~l2d.set(\dur, ~f2/~icd3,  \vol, vol2, \tune, tune);
658                                 ~l2e.set(\dur, ~f2/~icd6,       \vol, vol2, \tune, tune);  ~l2f.set(\dur, ~f2/~icd6,  \vol, vol2, \tune, tune);
659                                 ~l3a.set(\dur, ~f3,     \vol, vol3, \tune, tune);          ~l3b.set(\dur, ~f3,  \vol, vol3, \tune, tune);
660                                 ~l3c.set(\dur, ~f3/~icd3,       \vol, vol3, \tune, tune);  ~l3d.set(\dur, ~f3/~icd3,  \vol, vol3, \tune, tune);
661                                 ~l3e.set(\dur, ~f3/~icd6,       \vol, vol3, \tune, tune);  ~l3f.set(\dur, ~f3/~icd6,  \vol, vol3, \tune, tune);
662                                 ~l4a.set(\dur, ~f4,    \vol, vol4, \tune, tune);           ~l4b.set(\dur, ~f4,  \vol, vol4, \tune, tune);
663                                 ~l4c.set(\dur, ~f4/~icd3,       \vol, vol4, \tune, tune);  ~l4d.set(\dur, ~f4/~icd3,  \vol, vol4, \tune, tune);
664                                 ~l4e.set(\dur, ~f4/~icd6,       \vol, vol4, \tune, tune);  ~l4f.set(\dur, ~f4/~icd6,  \vol, vol4, \tune, tune);
665                                 ~l5a.set(\dur, ~f5,    \vol, vol5, \tune, tune);           ~l5b.set(\dur, ~f5,  \vol, vol5, \tune, tune);
666                                 ~l5c.set(\dur, ~f5/~icd3,       \vol, vol5, \tune, tune);  ~l5d.set(\dur, ~f5/~icd3,  \vol, vol5, \tune, tune);
667                                 ~l5e.set(\dur, ~f5/~icd6,       \vol, vol5, \tune, tune);  ~l5f.set(\dur, ~f5/~icd6,  \vol, vol5, \tune, tune);
668                                 ~l6a.set(\dur, ~f6,    \vol, vol6, \tune, tune);           ~l6b.set(\dur, ~f6,  \vol, vol6, \tune, tune);
669                                 ~l6c.set(\dur, ~f6/~icd3,       \vol, vol6, \tune, tune);  ~l6d.set(\dur, ~f6/~icd3,  \vol, vol6, \tune, tune);
670                                 ~l6e.set(\dur, ~f6/~icd6,       \vol, vol6, \tune, tune);  ~l6f.set(\dur, ~f6/~icd6,  \vol, vol6, \tune, tune);
671                                 ~l7a.set(\dur, ~f7,    \vol, vol7, \tune, tune);           ~l7b.set(\dur, ~f7,  \vol, vol7, \tune, tune);
672                                 ~l7c.set(\dur, ~f7/~icd3,       \vol, vol7, \tune, tune);  ~l7d.set(\dur, ~f7/~icd3,  \vol, vol7, \tune, tune);
673                                 ~l7e.set(\dur, ~f7/~icd6,       \vol, vol7, \tune, tune);  ~l7f.set(\dur, ~f7/~icd6,  \vol, vol7, \tune, tune);
674                                 ~l8a.set(\dur, ~f8,    \vol, vol8, \tune, tune);           ~l8b.set(\dur, ~f8,  \vol, vol8, \tune, tune);
675                                 ~l8c.set(\dur, ~f8/~icd3,       \vol, vol8, \tune, tune);  ~l8d.set(\dur, ~f8/~icd3,  \vol, vol8, \tune, tune);
676                                 ~l8e.set(\dur, ~f8/~icd6,       \vol, vol8, \tune, tune);  ~l8f.set(\dur, ~f8/~icd6,  \vol, vol8, \tune, tune);
677
678                         }););
679                 };
680
681                 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;);});
682                 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;);});
683                 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;);});
684                 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;);});
685                 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;);});
686                 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;);});
687                 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;);});
688                 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;);});
689
690         };
691
692         ~synthslide = {
693                 case
694                 {~l1a1.isRunning == true}{(//fprog
695                         ~slideroutine = Routine({1.do({var vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8,s1,s2,s3,s4,s5,s6,f1,f2,f3,f4,f5,f6,f7,f8,tune=0;
696                                 #vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8 = [~vol1,~vol2,~vol3,~vol4,~vol5,~vol6,~vol7,~vol8];
697                                 ~slidedo.do({~slidecount=~slidecount-1;
698                                         (
699                                                 [ ~f1=~f1+g,~f2=~f2+h,~f3=~f3+i,~f4=~f4+j,~f5=~f5+k,~f6=~f6+l,~f7=~f7+m,~f8=~f8+n ];
700                                                 ~l1a1.set(\dur, ~f1,     \vol, vol1, \tune, tune);  ~l1b1.set(\dur, ~f1,  \vol, vol1, \tune, tune);
701                                                 ~l1c1.set(\dur, ~f1/~icd3,       \vol, vol1, \tune, tune);  ~l1d1.set(\dur, ~f1/~icd3,  \vol, vol1, \tune, tune);
702                                                 ~l1e1.set(\dur, ~f1/~icd6,       \vol, vol1, \tune, tune);  ~l1f1.set(\dur, ~f1/~icd6,  \vol, vol1, \tune, tune);
703                                                 ~l2a1.set(\dur, ~f2,     \vol, vol2, \tune, tune);          ~l2b1.set(\dur, ~f2,  \vol, vol2, \tune, tune);
704                                                 ~l2c1.set(\dur, ~f2/~icd3,       \vol, vol2, \tune, tune);  ~l2d1.set(\dur, ~f2/~icd3,  \vol, vol2, \tune, tune);
705                                                 ~l2e1.set(\dur, ~f2/~icd6,       \vol, vol2, \tune, tune);  ~l2f1.set(\dur, ~f2/~icd6,  \vol, vol2, \tune, tune);
706                                                 ~l3a1.set(\dur, ~f3,     \vol, vol3, \tune, tune);          ~l3b1.set(\dur, ~f3,  \vol, vol3, \tune, tune);
707                                                 ~l3c1.set(\dur, ~f3/~icd3,       \vol, vol3, \tune, tune);  ~l3d1.set(\dur, ~f3/~icd3,  \vol, vol3, \tune, tune);
708                                                 ~l3e1.set(\dur, ~f3/~icd6,       \vol, vol3, \tune, tune);  ~l3f1.set(\dur, ~f3/~icd6,  \vol, vol3, \tune, tune);
709                                                 ~l4a1.set(\dur, ~f4,    \vol, vol4, \tune, tune);           ~l4b1.set(\dur, ~f4,  \vol, vol4, \tune, tune);
710                                                 ~l4c1.set(\dur, ~f4/~icd3,       \vol, vol4, \tune, tune);  ~l4d1.set(\dur, ~f4/~icd3,  \vol, vol4, \tune, tune);
711                                                 ~l4e1.set(\dur, ~f4/~icd6,       \vol, vol4, \tune, tune);  ~l4f1.set(\dur, ~f4/~icd6,  \vol, vol4, \tune, tune);
712                                                 ~l5a1.set(\dur, ~f5,    \vol, vol5, \tune, tune);           ~l5b1.set(\dur, ~f5,  \vol, vol5, \tune, tune);
713                                                 ~l5c1.set(\dur, ~f5/~icd3,       \vol, vol5, \tune, tune);  ~l5d1.set(\dur, ~f5/~icd3,  \vol, vol5, \tune, tune);
714                                                 ~l5e1.set(\dur, ~f5/~icd6,       \vol, vol5, \tune, tune);  ~l5f1.set(\dur, ~f5/~icd6,  \vol, vol5, \tune, tune);
715                                                 ~l6a1.set(\dur, ~f6,    \vol, vol6, \tune, tune);           ~l6b1.set(\dur, ~f6,  \vol, vol6, \tune, tune);
716                                                 ~l6c1.set(\dur, ~f6/~icd3,       \vol, vol6, \tune, tune);  ~l6d1.set(\dur, ~f6/~icd3,  \vol, vol6, \tune, tune);
717                                                 ~l6e1.set(\dur, ~f6/~icd6,       \vol, vol6, \tune, tune);  ~l6f1.set(\dur, ~f6/~icd6,  \vol, vol6, \tune, tune);
718                                                 ~l7a1.set(\dur, ~f7,    \vol, vol7, \tune, tune);           ~l7b1.set(\dur, ~f7,  \vol, vol7, \tune, tune);
719                                                 ~l7c1.set(\dur, ~f7/~icd3,       \vol, vol7, \tune, tune);  ~l7d1.set(\dur, ~f7/~icd3,  \vol, vol7, \tune, tune);
720                                                 ~l7e1.set(\dur, ~f7/~icd6,       \vol, vol7, \tune, tune);  ~l7f1.set(\dur, ~f7/~icd6,  \vol, vol7, \tune, tune);
721                                                 ~l8a1.set(\dur, ~f8,    \vol, vol8, \tune, tune);           ~l8b1.set(\dur, ~f8,  \vol, vol8, \tune, tune);
722                                                 ~l8c1.set(\dur, ~f8/~icd3,       \vol, vol8, \tune, tune);  ~l8d1.set(\dur, ~f8/~icd3,  \vol, vol8, \tune, tune);
723                                                 ~l8e1.set(\dur, ~f8/~icd6,       \vol, vol8, \tune, tune);  ~l8f1.set(\dur, ~f8/~icd6,  \vol, vol8, \tune, tune);
724
725                                         );
726
727                                         {if(~slidecount==0,{
728                                                 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;);});
729                                                 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;);});
730                                                 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;);});
731                                                 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;);});
732                                                 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;);});
733                                                 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;);});
734                                                 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;);});
735                                                 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;);});
736                                         });}.defer;
737
738                                         (~slidetime/~slidedo).wait;});});}).play;);}
739                 {~l1a.isRunning == true} {(//fprog
740                         ~slideroutine = Routine({1.do({var vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8,s1,s2,s3,s4,s5,s6,f1,f2,f3,f4,f5,f6,f7,f8,tune=0;
741                                 #vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8 = [~vol1,~vol2,~vol3,~vol4,~vol5,~vol6,~vol7,~vol8];
742                                 ~slidedo.do({~slidecount=~slidecount-1;
743                                         (
744                                                 [ ~f1=~f1+g,~f2=~f2+h,~f3=~f3+i,~f4=~f4+j,~f5=~f5+k,~f6=~f6+l,~f7=~f7+m,~f8=~f8+n ];
745                                                 ~l1a.set(\dur, ~f1,     \vol, vol1, \tune, tune);  ~l1b.set(\dur, ~f1,  \vol, vol1, \tune, tune);
746                                                 ~l1c.set(\dur, ~f1/~icd3,       \vol, vol1, \tune, tune);  ~l1d.set(\dur, ~f1/~icd3,  \vol, vol1, \tune, tune);
747                                                 ~l1e.set(\dur, ~f1/~icd6,       \vol, vol1, \tune, tune);  ~l1f.set(\dur, ~f1/~icd6,  \vol, vol1, \tune, tune);
748                                                 ~l2a.set(\dur, ~f2,     \vol, vol2, \tune, tune);          ~l2b.set(\dur, ~f2,  \vol, vol2, \tune, tune);
749                                                 ~l2c.set(\dur, ~f2/~icd3,       \vol, vol2, \tune, tune);  ~l2d.set(\dur, ~f2/~icd3,  \vol, vol2, \tune, tune);
750                                                 ~l2e.set(\dur, ~f2/~icd6,       \vol, vol2, \tune, tune);  ~l2f.set(\dur, ~f2/~icd6,  \vol, vol2, \tune, tune);
751                                                 ~l3a.set(\dur, ~f3,     \vol, vol3, \tune, tune);          ~l3b.set(\dur, ~f3,  \vol, vol3, \tune, tune);
752                                                 ~l3c.set(\dur, ~f3/~icd3,       \vol, vol3, \tune, tune);  ~l3d.set(\dur, ~f3/~icd3,  \vol, vol3, \tune, tune);
753                                                 ~l3e.set(\dur, ~f3/~icd6,       \vol, vol3, \tune, tune);  ~l3f.set(\dur, ~f3/~icd6,  \vol, vol3, \tune, tune);
754                                                 ~l4a.set(\dur, ~f4,    \vol, vol4, \tune, tune);           ~l4b.set(\dur, ~f4,  \vol, vol4, \tune, tune);
755                                                 ~l4c.set(\dur, ~f4/~icd3,       \vol, vol4, \tune, tune);  ~l4d.set(\dur, ~f4/~icd3,  \vol, vol4, \tune, tune);
756                                                 ~l4e.set(\dur, ~f4/~icd6,       \vol, vol4, \tune, tune);  ~l4f.set(\dur, ~f4/~icd6,  \vol, vol4, \tune, tune);
757                                                 ~l5a.set(\dur, ~f5,    \vol, vol5, \tune, tune);           ~l5b.set(\dur, ~f5,  \vol, vol5, \tune, tune);
758                                                 ~l5c.set(\dur, ~f5/~icd3,       \vol, vol5, \tune, tune);  ~l5d.set(\dur, ~f5/~icd3,  \vol, vol5, \tune, tune);
759                                                 ~l5e.set(\dur, ~f5/~icd6,       \vol, vol5, \tune, tune);  ~l5f.set(\dur, ~f5/~icd6,  \vol, vol5, \tune, tune);
760                                                 ~l6a.set(\dur, ~f6,    \vol, vol6, \tune, tune);           ~l6b.set(\dur, ~f6,  \vol, vol6, \tune, tune);
761                                                 ~l6c.set(\dur, ~f6/~icd3,       \vol, vol6, \tune, tune);  ~l6d.set(\dur, ~f6/~icd3,  \vol, vol6, \tune, tune);
762                                                 ~l6e.set(\dur, ~f6/~icd6,       \vol, vol6, \tune, tune);  ~l6f.set(\dur, ~f6/~icd6,  \vol, vol6, \tune, tune);
763                                                 ~l7a.set(\dur, ~f7,    \vol, vol7, \tune, tune);           ~l7b.set(\dur, ~f7,  \vol, vol7, \tune, tune);
764                                                 ~l7c.set(\dur, ~f7/~icd3,       \vol, vol7, \tune, tune);  ~l7d.set(\dur, ~f7/~icd3,  \vol, vol7, \tune, tune);
765                                                 ~l7e.set(\dur, ~f7/~icd6,       \vol, vol7, \tune, tune);  ~l7f.set(\dur, ~f7/~icd6,  \vol, vol7, \tune, tune);
766                                                 ~l8a.set(\dur, ~f8,    \vol, vol8, \tune, tune);           ~l8b.set(\dur, ~f8,  \vol, vol8, \tune, tune);
767                                                 ~l8c.set(\dur, ~f8/~icd3,       \vol, vol8, \tune, tune);  ~l8d.set(\dur, ~f8/~icd3,  \vol, vol8, \tune, tune);
768                                                 ~l8e.set(\dur, ~f8/~icd6,       \vol, vol8, \tune, tune);  ~l8f.set(\dur, ~f8/~icd6,  \vol, vol8, \tune, tune);
769
770
771                                         );
772
773                                         {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;);});
774                                                 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;);});
775                                                 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;);});
776                                                 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;);});
777                                                 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;);});
778                                                 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;);});
779                                                 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;);});
780                                                 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;);});
781                                         });}.defer;
782
783                                         (~slidetime/~slidedo).wait;});});}).play;);};
784         };
785
786         ~synthpause = {(
787                 case
788                 {~l1a1.isRunning == true}{
789                         (1.do({var vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8,s1,s2,s3,s4,s5,s6,f1,f2,f3,f4,f5,f6,f7,f8,tune=0;
790                                 #vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8 = [~vol1,~vol2,~vol3,~vol4,~vol5,~vol6,~vol7,~vol8];
791                                 #f1,f2,f3,f4,f5,f6,f7,f8 = [ 0,0,0,0,0,0,0,0 ];
792                                 ~l1a1.set(\dur, f1,     \vol, vol1, \tune, tune);          ~l1b1.set(\dur, f1,  \vol, vol1, \tune, tune);
793                                 ~l1c1.set(\dur, f1/~icd3,       \vol, vol1, \tune, tune);  ~l1d1.set(\dur, f1/~icd3,  \vol, vol1, \tune, tune);
794                                 ~l1e1.set(\dur, f1/~icd6,       \vol, vol1, \tune, tune);  ~l1f1.set(\dur, f1/~icd6,  \vol, vol1, \tune, tune);
795                                 ~l2a1.set(\dur, f2,     \vol, vol2, \tune, tune);          ~l2b1.set(\dur, f2,  \vol, vol2, \tune, tune);
796                                 ~l2c1.set(\dur, f2/~icd3,       \vol, vol2, \tune, tune);  ~l2d1.set(\dur, f2/~icd3,  \vol, vol2, \tune, tune);
797                                 ~l2e1.set(\dur, f2/~icd6,       \vol, vol2, \tune, tune);  ~l2f1.set(\dur, f2/~icd6,  \vol, vol2, \tune, tune);
798                                 ~l3a1.set(\dur, f3,     \vol, vol3, \tune, tune);          ~l3b1.set(\dur, f3,  \vol, vol3, \tune, tune);
799                                 ~l3c1.set(\dur, f3/~icd3,       \vol, vol3, \tune, tune);  ~l3d1.set(\dur, f3/~icd3,  \vol, vol3, \tune, tune);
800                                 ~l3e1.set(\dur, f3/~icd6,       \vol, vol3, \tune, tune);  ~l3f1.set(\dur, f3/~icd6,  \vol, vol3, \tune, tune);
801                                 ~l4a1.set(\dur, f4,    \vol, vol4, \tune, tune);           ~l4b1.set(\dur, f4,  \vol, vol4, \tune, tune);
802                                 ~l4c1.set(\dur, f4/~icd3,       \vol, vol4, \tune, tune);  ~l4d1.set(\dur, f4/~icd3,  \vol, vol4, \tune, tune);
803                                 ~l4e1.set(\dur, f4/~icd6,       \vol, vol4, \tune, tune);  ~l4f1.set(\dur, f4/~icd6,  \vol, vol4, \tune, tune);
804                                 ~l5a1.set(\dur, f5,    \vol, vol5, \tune, tune);           ~l5b1.set(\dur, f5,  \vol, vol5, \tune, tune);
805                                 ~l5c1.set(\dur, f5/~icd3,       \vol, vol5, \tune, tune);  ~l5d1.set(\dur, f5/~icd3,  \vol, vol5, \tune, tune);
806                                 ~l5e1.set(\dur, f5/~icd6,       \vol, vol5, \tune, tune);  ~l5f1.set(\dur, f5/~icd6,  \vol, vol5, \tune, tune);
807                                 ~l6a1.set(\dur, f6,    \vol, vol6, \tune, tune);           ~l6b1.set(\dur, f6,  \vol, vol6, \tune, tune);
808                                 ~l6c1.set(\dur, f6/~icd3,       \vol, vol6, \tune, tune);  ~l6d1.set(\dur, f6/~icd3,  \vol, vol6, \tune, tune);
809                                 ~l6e1.set(\dur, f6/~icd6,       \vol, vol6, \tune, tune);  ~l6f1.set(\dur, f6/~icd6,  \vol, vol6, \tune, tune);
810                                 ~l7a1.set(\dur, f7,    \vol, vol7, \tune, tune);           ~l7b1.set(\dur, f7,  \vol, vol7, \tune, tune);
811                                 ~l7c1.set(\dur, f7/~icd3,       \vol, vol7, \tune, tune);  ~l7d1.set(\dur, f7/~icd3,  \vol, vol7, \tune, tune);
812                                 ~l7e1.set(\dur, f7/~icd6,       \vol, vol7, \tune, tune);  ~l7f1.set(\dur, f7/~icd6,  \vol, vol7, \tune, tune);
813                                 ~l8a1.set(\dur, f8,    \vol, vol8, \tune, tune);           ~l8b1.set(\dur, f8,  \vol, vol8, \tune, tune);
814                                 ~l8c1.set(\dur, f8/~icd3,       \vol, vol8, \tune, tune);  ~l8d1.set(\dur, f8/~icd3,  \vol, vol8, \tune, tune);
815                                 ~l8e1.set(\dur, f8/~icd6,       \vol, vol8, \tune, tune);  ~l8f1.set(\dur, f8/~icd6,  \vol, vol8, \tune, tune);
816                         }););
817                 }
818                 {~l1a.isRunning == true} {
819                         (1.do({var vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8,s1,s2,s3,s4,s5,s6,f1,f2,f3,f4,f5,f6,f7,f8,tune=0;
820                                 #vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8 = [~vol1,~vol2,~vol3,~vol4,~vol5,~vol6,~vol7,~vol8];
821                                 #f1,f2,f3,f4,f5,f6,f7,f8 = [ 0,0,0,0,0,0,0,0 ];
822                                 ~l1a.set(\dur, f1,     \vol, vol1, \tune, tune);  ~l1b.set(\dur, f1,  \vol, vol1, \tune, tune);
823                                 ~l1c.set(\dur, f1/~icd3,       \vol, vol1, \tune, tune);  ~l1d.set(\dur, f1/~icd3,  \vol, vol1, \tune, tune);
824                                 ~l1e.set(\dur, f1/~icd6,       \vol, vol1, \tune, tune);  ~l1f.set(\dur, f1/~icd6,  \vol, vol1, \tune, tune);
825                                 ~l2a.set(\dur, f2,     \vol, vol2, \tune, tune);          ~l2b.set(\dur, f2,  \vol, vol2, \tune, tune);
826                                 ~l2c.set(\dur, f2/~icd3,       \vol, vol2, \tune, tune);  ~l2d.set(\dur, f2/~icd3,  \vol, vol2, \tune, tune);
827                                 ~l2e.set(\dur, f2/~icd6,       \vol, vol2, \tune, tune);  ~l2f.set(\dur, f2/~icd6,  \vol, vol2, \tune, tune);
828                                 ~l3a.set(\dur, f3,     \vol, vol3, \tune, tune);          ~l3b.set(\dur, f3,  \vol, vol3, \tune, tune);
829                                 ~l3c.set(\dur, f3/~icd3,       \vol, vol3, \tune, tune);  ~l3d.set(\dur, f3/~icd3,  \vol, vol3, \tune, tune);
830                                 ~l3e.set(\dur, f3/~icd6,       \vol, vol3, \tune, tune);  ~l3f.set(\dur, f3/~icd6,  \vol, vol3, \tune, tune);
831                                 ~l4a.set(\dur, f4,    \vol, vol4, \tune, tune);           ~l4b.set(\dur, f4,  \vol, vol4, \tune, tune);
832                                 ~l4c.set(\dur, f4/~icd3,       \vol, vol4, \tune, tune);  ~l4d.set(\dur, f4/~icd3,  \vol, vol4, \tune, tune);
833                                 ~l4e.set(\dur, f4/~icd6,       \vol, vol4, \tune, tune);  ~l4f.set(\dur, f4/~icd6,  \vol, vol4, \tune, tune);
834                                 ~l5a.set(\dur, f5,    \vol, vol5, \tune, tune);           ~l5b.set(\dur, f5,  \vol, vol5, \tune, tune);
835                                 ~l5c.set(\dur, f5/~icd3,       \vol, vol5, \tune, tune);  ~l5d.set(\dur, f5/~icd3,  \vol, vol5, \tune, tune);
836                                 ~l5e.set(\dur, f5/~icd6,       \vol, vol5, \tune, tune);  ~l5f.set(\dur, f5/~icd6,  \vol, vol5, \tune, tune);
837                                 ~l6a.set(\dur, f6,    \vol, vol6, \tune, tune);           ~l6b.set(\dur, f6,  \vol, vol6, \tune, tune);
838                                 ~l6c.set(\dur, f6/~icd3,       \vol, vol6, \tune, tune);  ~l6d.set(\dur, f6/~icd3,  \vol, vol6, \tune, tune);
839                                 ~l6e.set(\dur, f6/~icd6,       \vol, vol6, \tune, tune);  ~l6f.set(\dur, f6/~icd6,  \vol, vol6, \tune, tune);
840                                 ~l7a.set(\dur, f7,    \vol, vol7, \tune, tune);           ~l7b.set(\dur, f7,  \vol, vol7, \tune, tune);
841                                 ~l7c.set(\dur, f7/~icd3,       \vol, vol7, \tune, tune);  ~l7d.set(\dur, f7/~icd3,  \vol, vol7, \tune, tune);
842                                 ~l7e.set(\dur, f7/~icd6,       \vol, vol7, \tune, tune);  ~l7f.set(\dur, f7/~icd6,  \vol, vol7, \tune, tune);
843                                 ~l8a.set(\dur, f8,    \vol, vol8, \tune, tune);           ~l8b.set(\dur, f8,  \vol, vol8, \tune, tune);
844                                 ~l8c.set(\dur, f8/~icd3,       \vol, vol8, \tune, tune);  ~l8d.set(\dur, f8/~icd3,  \vol, vol8, \tune, tune);
845                                 ~l8e.set(\dur, f8/~icd6,       \vol, vol8, \tune, tune);  ~l8f.set(\dur, f8/~icd6,  \vol, vol8, \tune, tune);
846
847                         }););
848                 };
849                 );
850         };
851
852         ~synthfree = {
853                 (
854                         case
855                         {((~l1a.isRunning == false) and: (~l1a1.isRunning == false)) or: ~l1a1.isRunning == true}{
856                                 (1.do({var vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8,s1,s2,s3,s4,s5,s6,f1,f2,f3,f4,f5,f6,f7,f8,tune=0;
857                                 #vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8 = [~vol1,~vol2,~vol3,~vol4,~vol5,~vol6,~vol7,~vol8];
858                                 #f1,f2,f3,f4,f5,f6,f7,f8 = [ 0,0,0,0,0,0,0,0 ];
859                                         ~l1a1.set(\dur, f1,     \vol, vol1, \tune, tune);  ~l1b1.set(\dur, f1,  \vol, vol1, \tune, tune);
860                                         ~l1c1.set(\dur, f1/~icd3,       \vol, vol1, \tune, tune);  ~l1d1.set(\dur, f1/~icd3,  \vol, vol1, \tune, tune);
861                                         ~l1e1.set(\dur, f1/~icd6,       \vol, vol1, \tune, tune);  ~l1f1.set(\dur, f1/~icd6,  \vol, vol1, \tune, tune);
862                                         ~l2a1.set(\dur, f2,     \vol, vol2, \tune, tune);          ~l2b1.set(\dur, f2,  \vol, vol2, \tune, tune);
863                                         ~l2c1.set(\dur, f2/~icd3,       \vol, vol2, \tune, tune);  ~l2d1.set(\dur, f2/~icd3,  \vol, vol2, \tune, tune);
864                                         ~l2e1.set(\dur, f2/~icd6,       \vol, vol2, \tune, tune);  ~l2f1.set(\dur, f2/~icd6,  \vol, vol2, \tune, tune);
865                                         ~l3a1.set(\dur, f3,     \vol, vol3, \tune, tune);          ~l3b1.set(\dur, f3,  \vol, vol3, \tune, tune);
866                                         ~l3c1.set(\dur, f3/~icd3,       \vol, vol3, \tune, tune);  ~l3d1.set(\dur, f3/~icd3,  \vol, vol3, \tune, tune);
867                                         ~l3e1.set(\dur, f3/~icd6,       \vol, vol3, \tune, tune);  ~l3f1.set(\dur, f3/~icd6,  \vol, vol3, \tune, tune);
868                                         ~l4a1.set(\dur, f4,    \vol, vol4, \tune, tune);           ~l4b1.set(\dur, f4,  \vol, vol4, \tune, tune);
869                                         ~l4c1.set(\dur, f4/~icd3,       \vol, vol4, \tune, tune);  ~l4d1.set(\dur, f4/~icd3,  \vol, vol4, \tune, tune);
870                                         ~l4e1.set(\dur, f4/~icd6,       \vol, vol4, \tune, tune);  ~l4f1.set(\dur, f4/~icd6,  \vol, vol4, \tune, tune);
871                                         ~l5a1.set(\dur, f5,    \vol, vol5, \tune, tune);           ~l5b1.set(\dur, f5,  \vol, vol5, \tune, tune);
872                                         ~l5c1.set(\dur, f5/~icd3,       \vol, vol5, \tune, tune);  ~l5d1.set(\dur, f5/~icd3,  \vol, vol5, \tune, tune);
873                                         ~l5e1.set(\dur, f5/~icd6,       \vol, vol5, \tune, tune);  ~l5f1.set(\dur, f5/~icd6,  \vol, vol5, \tune, tune);
874                                         ~l6a1.set(\dur, f6,    \vol, vol6, \tune, tune);           ~l6b1.set(\dur, f6,  \vol, vol6, \tune, tune);
875                                         ~l6c1.set(\dur, f6/~icd3,       \vol, vol6, \tune, tune);  ~l6d1.set(\dur, f6/~icd3,  \vol, vol6, \tune, tune);
876                                         ~l6e1.set(\dur, f6/~icd6,       \vol, vol6, \tune, tune);  ~l6f1.set(\dur, f6/~icd6,  \vol, vol6, \tune, tune);
877                                         ~l7a1.set(\dur, f7,    \vol, vol7, \tune, tune);           ~l7b1.set(\dur, f7,  \vol, vol7, \tune, tune);
878                                         ~l7c1.set(\dur, f7/~icd3,       \vol, vol7, \tune, tune);  ~l7d1.set(\dur, f7/~icd3,  \vol, vol7, \tune, tune);
879                                         ~l7e1.set(\dur, f7/~icd6,       \vol, vol7, \tune, tune);  ~l7f1.set(\dur, f7/~icd6,  \vol, vol7, \tune, tune);
880                                         ~l8a1.set(\dur, f8,    \vol, vol8, \tune, tune);           ~l8b1.set(\dur, f8,  \vol, vol8, \tune, tune);
881                                         ~l8c1.set(\dur, f8/~icd3,       \vol, vol8, \tune, tune);  ~l8d1.set(\dur, f8/~icd3,  \vol, vol8, \tune, tune);
882                                         ~l8e1.set(\dur, f8/~icd6,       \vol, vol8, \tune, tune);  ~l8f1.set(\dur, f8/~icd6,  \vol, vol8, \tune, tune);
883                                 }););
884                                 AppClock.sched(0.161803398875,{
885                                         ([~l1a1,~l1b1,~l1c1,~l1d1,~l1e1,~l1f1,~l2a1,~l2b1,~l2c1,~l2d1,~l2e1,~l2f1,~l3a1,~l3b1,~l3c1,~l3d1,~l3e1,~l3f1,~l4a1,~l4b1,~l4c1,~l4d1,~l4e1,~l4f1,~l5a1,~l5b1,~l5c1,~l5d1,~l5e1,~l5f1,~l6a1,~l6b1,~l6c1,~l6d1,~l6e1,~l6f1,~l7a1,~l7b1,~l7c1,~l7d1,~l7e1,~l7f1,~l8a1,~l8b1,~l8c1,~l8d1,~l8e1,~l8f1 ].do(_.free)); ~slideroutine.stop;
886                                 });
887                         }
888                         {~l1a.isRunning == true}{
889                                 (1.do({var vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8,s1,s2,s3,s4,s5,s6,f1,f2,f3,f4,f5,f6,f7,f8,tune=0;
890                                 #vol1,vol2,vol3,vol4,vol5,vol6,vol7,vol8 = [~vol1,~vol2,~vol3,~vol4,~vol5,~vol6,~vol7,~vol8];
891                                 #f1,f2,f3,f4,f5,f6,f7,f8 = [ 0,0,0,0,0,0,0,0 ];
892                                         ~l1a.set(\dur, f1,     \vol, vol1, \tune, tune);  ~l1b.set(\dur, f1,  \vol, vol1, \tune, tune);
893                                         ~l1c.set(\dur, f1/~icd3,       \vol, vol1, \tune, tune);  ~l1d.set(\dur, f1/~icd3,  \vol, vol1, \tune, tune);
894                                         ~l1e.set(\dur, f1/~icd6,       \vol, vol1, \tune, tune);  ~l1f.set(\dur, f1/~icd6,  \vol, vol1, \tune, tune);
895                                         ~l2a.set(\dur, f2,     \vol, vol2, \tune, tune);          ~l2b.set(\dur, f2,  \vol, vol2, \tune, tune);
896                                         ~l2c.set(\dur, f2/~icd3,       \vol, vol2, \tune, tune);  ~l2d.set(\dur, f2/~icd3,  \vol, vol2, \tune, tune);
897                                         ~l2e.set(\dur, f2/~icd6,       \vol, vol2, \tune, tune);  ~l2f.set(\dur, f2/~icd6,  \vol, vol2, \tune, tune);
898                                         ~l3a.set(\dur, f3,     \vol, vol3, \tune, tune);          ~l3b.set(\dur, f3,  \vol, vol3, \tune, tune);
899                                         ~l3c.set(\dur, f3/~icd3,       \vol, vol3, \tune, tune);  ~l3d.set(\dur, f3/~icd3,  \vol, vol3, \tune, tune);
900                                         ~l3e.set(\dur, f3/~icd6,       \vol, vol3, \tune, tune);  ~l3f.set(\dur, f3/~icd6,  \vol, vol3, \tune, tune);
901                                         ~l4a.set(\dur, f4,    \vol, vol4, \tune, tune);           ~l4b.set(\dur, f4,  \vol, vol4, \tune, tune);
902                                         ~l4c.set(\dur, f4/~icd3,       \vol, vol4, \tune, tune);  ~l4d.set(\dur, f4/~icd3,  \vol, vol4, \tune, tune);
903                                         ~l4e.set(\dur, f4/~icd6,       \vol, vol4, \tune, tune);  ~l4f.set(\dur, f4/~icd6,  \vol, vol4, \tune, tune);
904                                         ~l5a.set(\dur, f5,    \vol, vol5, \tune, tune);           ~l5b.set(\dur, f5,  \vol, vol5, \tune, tune);
905                                         ~l5c.set(\dur, f5/~icd3,       \vol, vol5, \tune, tune);  ~l5d.set(\dur, f5/~icd3,  \vol, vol5, \tune, tune);
906                                         ~l5e.set(\dur, f5/~icd6,       \vol, vol5, \tune, tune);  ~l5f.set(\dur, f5/~icd6,  \vol, vol5, \tune, tune);
907                                         ~l6a.set(\dur, f6,    \vol, vol6, \tune, tune);           ~l6b.set(\dur, f6,  \vol, vol6, \tune, tune);
908                                         ~l6c.set(\dur, f6/~icd3,       \vol, vol6, \tune, tune);  ~l6d.set(\dur, f6/~icd3,  \vol, vol6, \tune, tune);
909                                         ~l6e.set(\dur, f6/~icd6,       \vol, vol6, \tune, tune);  ~l6f.set(\dur, f6/~icd6,  \vol, vol6, \tune, tune);
910                                         ~l7a.set(\dur, f7,    \vol, vol7, \tune, tune);           ~l7b.set(\dur, f7,  \vol, vol7, \tune, tune);
911                                         ~l7c.set(\dur, f7/~icd3,       \vol, vol7, \tune, tune);  ~l7d.set(\dur, f7/~icd3,  \vol, vol7, \tune, tune);
912                                         ~l7e.set(\dur, f7/~icd6,       \vol, vol7, \tune, tune);  ~l7f.set(\dur, f7/~icd6,  \vol, vol7, \tune, tune);
913                                         ~l8a.set(\dur, f8,    \vol, vol8, \tune, tune);           ~l8b.set(\dur, f8,  \vol, vol8, \tune, tune);
914                                         ~l8c.set(\dur, f8/~icd3,       \vol, vol8, \tune, tune);  ~l8d.set(\dur, f8/~icd3,  \vol, vol8, \tune, tune);
915                                         ~l8e.set(\dur, f8/~icd6,       \vol, vol8, \tune, tune);  ~l8f.set(\dur, f8/~icd6,  \vol, vol8, \tune, tune);
916                                 }););
917                                 AppClock.sched(0.161803398875,{
918                                         ([~l1a,~l1b,~l1c,~l1d,~l1e,~l1f,~l2a,~l2b,~l2c,~l2d,~l2e,~l2f,~l3a,~l3b,~l3c,~l3d,~l3e,~l3f,~l4a,~l4b,~l4c,~l4d,~l4e,~l4f,~l5a,~l5b,~l5c,~l5d,~l5e,~l5f,~l6a,~l6b,~l6c,~l6d,~l6e,~l6f,~l7a,~l7b,~l7c,~l7d,~l7e,~l7f,~l8a,~l8b,~l8c,~l8d,~l8e,~l8f].do(_.free)); ~slideroutine.stop;
919                                 });
920                         };
921                 );
922         };
923
924
925         //timer values
926
927         case
928         {~slot1 == nil}{""}
929         {~slot2 == nil}{""}
930         {~slot3 == nil}{""}
931         {~slot4 == nil}{""}
932         {~slot5 == nil}{""}
933         {~slot6 == nil}{""}
934         {~slot7 == nil}{""}
935         {~slot8 == nil}{""};
936
937         ~timevals = {(~tst = TextView(w, Rect(~tspl,~tspt, ~tspw, ~tsph)).background_(Color.black);
938                 (~tst.string =
939                         "o1:_"++~time1o.value.asString++"_f1:_"++~time1f.value.asString++"_s1:_"++~time1s.value.asString++"\n" ++
940                         "o2:_"++~time2o.value.asString++"_f2:_"++~time2f.value.asString++"_s2:_"++~time2s.value.asString++"\n" ++
941                         "o3:_"++~time3o.value.asString++"_f3:_"++~time3f.value.asString++"_s3:_"++~time3s.value.asString++"\n" ++
942                         "o4:_"++~time4o.value.asString++"_f4:_"++~time4f.value.asString++"_s4:_"++~time4s.value.asString++"\n" ++
943                         "o5:_"++~time5o.value.asString++"_f5:_"++~time5f.value.asString++"_s5:_"++~time5s.value.asString++"\n" ++
944                         "o6:_"++~time6o.value.asString++"_f6:_"++~time6f.value.asString++"_s6:_"++~time6s.value.asString++"\n" ++
945                         "o7:_"++~time7o.value.asString++"_f7:_"++~time7f.value.asString++"_s7:_"++~time7s.value.asString++"\n" ++
946                         "o8:_"++~time8o.value.asString++"_f8:_"++~time8f.value.asString++"_s8:_"++~time8s.value.asString++"\n" ++"\n" ++
947                         if(~slot8 != ~slot, {
948                                 (~slot1 = ~slot2).asString++"\n" ++
949                                 (~slot2 = ~slot3).asString++"\n" ++
950                                 (~slot3 = ~slot4).asString++"\n" ++
951                                 (~slot4 = ~slot5).asString++"\n" ++
952                                 (~slot5 = ~slot6).asString++"\n" ++
953                                 (~slot6 = ~slot7).asString++"\n" ++
954                                 (~slot7 = ~slot8).asString++"\n" ++
955                                 (~slot8 = ~slot).asString;
956                                 },{
957                                         (~slot1).asString++"\n" ++
958                                         (~slot2).asString++"\n" ++
959                                         (~slot3).asString++"\n" ++
960                                         (~slot4).asString++"\n" ++
961                                         (~slot5).asString++"\n" ++
962                                         (~slot6).asString++"\n" ++
963                                         (~slot7).asString++"\n" ++
964                                         (~slot8).asString;
965                         });
966
967                 );
968                 ~tst.stringColor = Color.white;
969         )};
970
971
972         //monitoring number of synths function
973
974         ~numsynthsfunc = {
975                 if((~numsynths != nil) or: (~numsynths.isPlaying == true), {~numsynths.stop;});
976                 ~numsynths = Routine({inf.do({if((s.numSynths > 49) and: (3.wait; s.numSynths > 49) and: (6.wait; s.numSynths > 49), {
977
978                         AppClock.sched(0, {
979                                 if(~numsynthmessage != nil, {~numsynthmessage.close;});
980                                 ~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;
981                                 ~numsynthmessagestring = StaticText(~numsynthmessage, Rect(0,0,340+46,340+46/1.6180339887499)).background_(Color.black);
982                                 ~numsynthmessagestring.align = \topLeft;
983                                 ~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.";
984                                 ~numsynthmessagestring.stringColor = Color.white;
985                                 ~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;});});
986                                 ~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;});});
987                                 ~numsynthmessage.front;
988                         });
989                 }); 1.wait;});}).play;
990         };
991
992         ~numsynthsfunc.value;
993
994
995         //mouse down action
996
997         view.mouseDownAction = {
998                 |v, x, y, mod, butNum|
999                 point = [x,y];
1000                 if(butNum == 0, { v.refresh;
1001
1002                         //generate dots on mouse down action
1003
1004                         ~tgrid = 30;
1005                         ~bgrid = Window.screenBounds.height-(Window.screenBounds.height/1.6180339887499)+30;
1006
1007                         case
1008                         {y<~tgrid} {nil}
1009                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z1.close;~z1 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1010                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z2.close;~z2 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1011                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z3.close;~z3 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1012                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z4.close;~z4 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1013                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z5.close;~z5 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1014                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z6.close;~z6 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1015                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {~z7.close;~z7 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1016                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {~z8.close;~z8 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1017                         {y>~tgrid and: y<~bgrid} {nil}
1018                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z1.close;~z1 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1019                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z2.close;~z2 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1020                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z3.close;~z3 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1021                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z4.close;~z4 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1022                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z5.close;~z5 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1023                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z6.close;~z6 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1024                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z7.close;~z7 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1025                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z8.close;~z8 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1026                 }, {});
1027
1028                 ~tgrid = 30;
1029                 ~bgrid = Window.screenBounds.height-(Window.screenBounds.height/1.6180339887499)+30;
1030
1031                 //set synth values on mouse down action
1032
1033                 case
1034                 {~l1a.isRunning == true}{
1035                         case
1036                         {y<~tgrid} {nil}
1037                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1038                                 ~l1a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1039                                 ~l1b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f1=q.value; ~undof1=~f1;
1040                                 ~l1c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1041                                 ~l1d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1042                                 ~l1e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1043                                 ~l1f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1044                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1045                                 ~l2a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1046                                 ~l2b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f2=q.value; ~undof2=~f2;
1047                                 ~l2c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1048                                 ~l2d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1049                                 ~l2e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1050                                 ~l2f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1051                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1052                                 ~l3a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1053                                 ~l3b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f3=q.value; ~undof3=~f3;
1054                                 ~l3c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1055                                 ~l3d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1056                                 ~l3e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1057                                 ~l3f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1058                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1059                                 ~l4a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1060                                 ~l4b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f4=q.value; ~undof4=~f4;
1061                                 ~l4c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1062                                 ~l4d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1063                                 ~l4e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1064                                 ~l4f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1065                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1066                                 ~l5a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1067                                 ~l5b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f5=q.value; ~undof5=~f5;
1068                                 ~l5c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1069                                 ~l5d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1070                                 ~l5e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1071                                 ~l5f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1072                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1073                                 ~l6a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1074                                 ~l6b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f6=q.value; ~undof6=~f6;
1075                                 ~l6c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1076                                 ~l6d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1077                                 ~l6e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1078                                 ~l6f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1079                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1080                                 ~l7a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1081                                 ~l7b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f7=q.value; ~undof7=~f7;
1082                                 ~l7c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1083                                 ~l7d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1084                                 ~l7e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1085                                 ~l7f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1086                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1087                                 ~l8a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1088                                 ~l8b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f8=q.value; ~undof8=~f8;
1089                                 ~l8c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1090                                 ~l8d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1091                                 ~l8e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1092                                 ~l8f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1093                         {y>~tgrid and: y<~bgrid} {nil}
1094                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1095                                 ~l1a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1096                                 ~l1b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f1=q.value; ~undof1=~f1;
1097                                 ~l1c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1098                                 ~l1d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1099                                 ~l1e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1100                                 ~l1f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1101                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1102                                 ~l2a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1103                                 ~l2b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f2=q.value; ~undof2=~f2;
1104                                 ~l2c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1105                                 ~l2d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1106                                 ~l2e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1107                                 ~l2f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1108                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1109                                 ~l3a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1110                                 ~l3b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f3=q.value; ~undof3=~f3;
1111                                 ~l3c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1112                                 ~l3d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1113                                 ~l3e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1114                                 ~l3f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1115                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1116                                 ~l4a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1117                                 ~l4b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f4=q.value; ~undof4=~f4;
1118                                 ~l4c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1119                                 ~l4d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1120                                 ~l4e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1121                                 ~l4f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1122                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1123                                 ~l5a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1124                                 ~l5b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f5=q.value; ~undof5=~f5;
1125                                 ~l5c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1126                                 ~l5d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1127                                 ~l5e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1128                                 ~l5f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1129                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1130                                 ~l6a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1131                                 ~l6b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f6=q.value; ~undof6=~f6;
1132                                 ~l6c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1133                                 ~l6d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1134                                 ~l6e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1135                                 ~l6f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1136                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1137                                 ~l7a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1138                                 ~l7b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f7=q.value; ~undof7=~f7;
1139                                 ~l7c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1140                                 ~l7d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1141                                 ~l7e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1142                                 ~l7f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1143                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1144                                 ~l8a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1145                                 ~l8b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f8=q.value; ~undof8=~f8;
1146                                 ~l8c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1147                                 ~l8d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1148                                 ~l8e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1149                                 ~l8f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);};
1150                 }
1151                 {~l1a1.isRunning == true}{
1152                         case
1153                         {y<~tgrid} {nil}
1154                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1155                                 ~l1a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1156                                 ~l1b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f1=q.value; ~undof1=~f1;
1157                                 ~l1c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1158                                 ~l1d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1159                                 ~l1e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1160                                 ~l1f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1161                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1162                                 ~l2a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1163                                 ~l2b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f2=q.value; ~undof2=~f2;
1164                                 ~l2c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1165                                 ~l2d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1166                                 ~l2e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1167                                 ~l2f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1168                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1169                                 ~l3a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1170                                 ~l3b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f3=q.value; ~undof3=~f3;
1171                                 ~l3c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1172                                 ~l3d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1173                                 ~l3e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1174                                 ~l3f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1175                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1176                                 ~l4a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1177                                 ~l4b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f4=q.value; ~undof4=~f4;
1178                                 ~l4c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1179                                 ~l4d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1180                                 ~l4e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1181                                 ~l4f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1182                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1183                                 ~l5a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1184                                 ~l5b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f5=q.value; ~undof5=~f5;
1185                                 ~l5c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1186                                 ~l5d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1187                                 ~l5e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1188                                 ~l5f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1189                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1190                                 ~l6a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1191                                 ~l6b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f6=q.value; ~undof6=~f6;
1192                                 ~l6c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1193                                 ~l6d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1194                                 ~l6e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1195                                 ~l6f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1196                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1197                                 ~l7a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1198                                 ~l7b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f7=q.value; ~undof7=~f7;
1199                                 ~l7c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1200                                 ~l7d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1201                                 ~l7e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1202                                 ~l7f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1203                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1204                                 ~l8a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1205                                 ~l8b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f8=q.value; ~undof8=~f8;
1206                                 ~l8c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1207                                 ~l8d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1208                                 ~l8e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1209                                 ~l8f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1210                         {y>~tgrid and: y<~bgrid} {nil}
1211                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1212                                 ~l1a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1213                                 ~l1b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f1=q.value; ~undof1=~f1;
1214                                 ~l1c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1215                                 ~l1d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1216                                 ~l1e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1217                                 ~l1f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1218                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1219                                 ~l2a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1220                                 ~l2b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f2=q.value; ~undof2=~f2;
1221                                 ~l2c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1222                                 ~l2d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1223                                 ~l2e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1224                                 ~l2f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1225                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1226                                 ~l3a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1227                                 ~l3b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f3=q.value; ~undof3=~f3;
1228                                 ~l3c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1229                                 ~l3d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1230                                 ~l3e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1231                                 ~l3f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1232                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1233                                 ~l4a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1234                                 ~l4b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f4=q.value; ~undof4=~f4;
1235                                 ~l4c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1236                                 ~l4d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1237                                 ~l4e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1238                                 ~l4f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1239                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1240                                 ~l5a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1241                                 ~l5b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f5=q.value; ~undof5=~f5;
1242                                 ~l5c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1243                                 ~l5d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1244                                 ~l5e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1245                                 ~l5f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1246                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1247                                 ~l6a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1248                                 ~l6b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f6=q.value; ~undof6=~f6;
1249                                 ~l6c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1250                                 ~l6d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1251                                 ~l6e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1252                                 ~l6f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1253                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1254                                 ~l7a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1255                                 ~l7b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f7=q.value; ~undof7=~f7;
1256                                 ~l7c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1257                                 ~l7d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1258                                 ~l7e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1259                                 ~l7f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1260                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1261                                 ~l8a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1262                                 ~l8b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f8=q.value; ~undof8=~f8;
1263                                 ~l8c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1264                                 ~l8d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1265                                 ~l8e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1266                                 ~l8f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);};
1267                 };
1268         };
1269
1270
1271         //mouse move action
1272
1273         view.mouseMoveAction = {
1274                 |v, x, y|
1275
1276                 ~nh = 2;
1277                 ~nw = ~nh*1.6180339887499;
1278
1279                 //generate dots on mouse move action
1280
1281                 ~tgrid = 30;
1282                 ~bgrid = Window.screenBounds.height-(Window.screenBounds.height/1.6180339887499)+30;
1283
1284                 case
1285                 {y<~tgrid} {nil}
1286                 {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z1.close;~z25.close;~z1 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1287                 {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z2.close;~z26.close;~z2 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1288                 {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z3.close;~z27.close;~z3 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1289                 {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z4.close;~z28.close;~z4 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1290                 {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z5.close;~z29.close;~z5 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1291                 {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)}  {~z6.close;~z30.close;~z6 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1292                 {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {~z7.close;~z31.close;~z7 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1293                 {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {~z8.close;~z32.close;~z8 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1294                 {y>~tgrid and: y<~bgrid} {nil}
1295                 {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z1.close;~z25.close;~z1 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1296                 {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z2.close;~z26.close;~z2 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1297                 {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z3.close;~z27.close;~z3 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1298                 {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z4.close;~z28.close;~z4 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1299                 {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z5.close;~z29.close;~z5 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1300                 {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z6.close;~z30.close;~z6 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1301                 {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z7.close;~z31.close;~z7 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)}
1302                 {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {~z8.close;~z32.close;~z8 = (CompositeView(w, Rect(x, y, ~nw, 2)).background = Color.white;)};
1303                 w.refresh;
1304
1305                 ~tgrid = 30;
1306                 ~bgrid = Window.screenBounds.height-(Window.screenBounds.height/1.6180339887499)+30;
1307
1308                 //set synth values on mouse move action
1309
1310                 case
1311                 {~l1a.isRunning == true}{
1312                         case
1313                         {y<~tgrid} {nil}
1314                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1315                                 ~l1a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1316                                 ~l1b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f1=q.value; ~undof1=~f1;
1317                                 ~l1c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1318                                 ~l1d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1319                                 ~l1e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1320                                 ~l1f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1321                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1322                                 ~l2a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1323                                 ~l2b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f2=q.value; ~undof2=~f2;
1324                                 ~l2c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1325                                 ~l2d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1326                                 ~l2e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1327                                 ~l2f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1328                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1329                                 ~l3a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1330                                 ~l3b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f3=q.value; ~undof3=~f3;
1331                                 ~l3c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1332                                 ~l3d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1333                                 ~l3e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1334                                 ~l3f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1335                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1336                                 ~l4a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1337                                 ~l4b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f4=q.value; ~undof4=~f4;
1338                                 ~l4c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1339                                 ~l4d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1340                                 ~l4e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1341                                 ~l4f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1342                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1343                                 ~l5a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1344                                 ~l5b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f5=q.value; ~undof5=~f5;
1345                                 ~l5c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1346                                 ~l5d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1347                                 ~l5e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1348                                 ~l5f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1349                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1350                                 ~l6a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1351                                 ~l6b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f6=q.value; ~undof6=~f6;
1352                                 ~l6c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1353                                 ~l6d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1354                                 ~l6e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1355                                 ~l6f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1356                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1357                                 ~l7a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1358                                 ~l7b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f7=q.value; ~undof7=~f7;
1359                                 ~l7c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1360                                 ~l7d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1361                                 ~l7e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1362                                 ~l7f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1363                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1364                                 ~l8a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1365                                 ~l8b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f8=q.value; ~undof8=~f8;
1366                                 ~l8c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1367                                 ~l8d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1368                                 ~l8e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1369                                 ~l8f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1370                         {y>~tgrid and: y<~bgrid} {nil}
1371                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1372                                 ~l1a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1373                                 ~l1b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f1=q.value; ~undof1=~f1;
1374                                 ~l1c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1375                                 ~l1d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1376                                 ~l1e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1377                                 ~l1f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1378                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1379                                 ~l2a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1380                                 ~l2b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f2=q.value; ~undof2=~f2;
1381                                 ~l2c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1382                                 ~l2d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1383                                 ~l2e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1384                                 ~l2f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1385                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1386                                 ~l3a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1387                                 ~l3b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f3=q.value; ~undof3=~f3;
1388                                 ~l3c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1389                                 ~l3d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1390                                 ~l3e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1391                                 ~l3f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1392                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1393                                 ~l4a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1394                                 ~l4b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f4=q.value; ~undof4=~f4;
1395                                 ~l4c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1396                                 ~l4d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1397                                 ~l4e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1398                                 ~l4f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1399                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1400                                 ~l5a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1401                                 ~l5b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f5=q.value; ~undof5=~f5;
1402                                 ~l5c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1403                                 ~l5d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1404                                 ~l5e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1405                                 ~l5f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1406                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1407                                 ~l6a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1408                                 ~l6b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f6=q.value; ~undof6=~f6;
1409                                 ~l6c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1410                                 ~l6d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1411                                 ~l6e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1412                                 ~l6f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1413                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1414                                 ~l7a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1415                                 ~l7b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f7=q.value; ~undof7=~f7;
1416                                 ~l7c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1417                                 ~l7d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1418                                 ~l7e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1419                                 ~l7f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1420                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1421                                 ~l8a.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1422                                 ~l8b.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f8=q.value; ~undof8=~f8;
1423                                 ~l8c.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1424                                 ~l8d.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1425                                 ~l8e.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1426                                 ~l8f.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);};
1427                 }
1428                 {~l1a1.isRunning == true}{
1429                         case
1430                         {y<~tgrid} {nil}
1431                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1432                                 ~l1a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1433                                 ~l1b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f1=q.value; ~undof1=~f1;
1434                                 ~l1c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1435                                 ~l1d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1436                                 ~l1e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1437                                 ~l1f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1438                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1439                                 ~l2a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1440                                 ~l2b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f2=q.value; ~undof2=~f2;
1441                                 ~l2c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1442                                 ~l2d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1443                                 ~l2e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1444                                 ~l2f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1445                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1446                                 ~l3a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1447                                 ~l3b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f3=q.value; ~undof3=~f3;
1448                                 ~l3c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1449                                 ~l3d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1450                                 ~l3e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1451                                 ~l3f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1452                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1453                                 ~l4a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1454                                 ~l4b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f4=q.value; ~undof4=~f4;
1455                                 ~l4c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1456                                 ~l4d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1457                                 ~l4e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1458                                 ~l4f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1459                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1460                                 ~l5a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1461                                 ~l5b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f5=q.value; ~undof5=~f5;
1462                                 ~l5c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1463                                 ~l5d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1464                                 ~l5e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1465                                 ~l5f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1466                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1467                                 ~l6a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1468                                 ~l6b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f6=q.value; ~undof6=~f6;
1469                                 ~l6c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1470                                 ~l6d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1471                                 ~l6e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1472                                 ~l6f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1473                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1474                                 ~l7a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1475                                 ~l7b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f7=q.value; ~undof7=~f7;
1476                                 ~l7c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1477                                 ~l7d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1478                                 ~l7e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1479                                 ~l7f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1480                         {y>=(~tgrid) and: y<=(~tgrid=~tgrid+10)} {
1481                                 ~l8a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)));
1482                                 ~l8b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value); ~f8=q.value; ~undof8=~f8;
1483                                 ~l8c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd3);
1484                                 ~l8d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd3);
1485                                 ~l8e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1))/~icd6);
1486                                 ~l8f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin1,~outmax1)).value/~icd6);}
1487                         {y>~tgrid and: y<~bgrid} {nil}
1488                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1489                                 ~l1a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1490                                 ~l1b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f1=q.value; ~undof1=~f1;
1491                                 ~l1c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1492                                 ~l1d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1493                                 ~l1e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1494                                 ~l1f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1495                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1496                                 ~l2a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1497                                 ~l2b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f2=q.value; ~undof2=~f2;
1498                                 ~l2c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1499                                 ~l2d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1500                                 ~l2e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1501                                 ~l2f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1502                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1503                                 ~l3a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1504                                 ~l3b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f3=q.value; ~undof3=~f3;
1505                                 ~l3c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1506                                 ~l3d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1507                                 ~l3e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1508                                 ~l3f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1509                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1510                                 ~l4a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1511                                 ~l4b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f4=q.value; ~undof4=~f4;
1512                                 ~l4c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1513                                 ~l4d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1514                                 ~l4e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1515                                 ~l4f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1516                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1517                                 ~l5a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1518                                 ~l5b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f5=q.value; ~undof5=~f5;
1519                                 ~l5c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1520                                 ~l5d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1521                                 ~l5e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1522                                 ~l5f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1523                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1524                                 ~l6a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1525                                 ~l6b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f6=q.value; ~undof6=~f6;
1526                                 ~l6c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1527                                 ~l6d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1528                                 ~l6e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1529                                 ~l6f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1530                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1531                                 ~l7a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1532                                 ~l7b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f7=q.value; ~undof7=~f7;
1533                                 ~l7c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1534                                 ~l7d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1535                                 ~l7e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1536                                 ~l7f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);}
1537                         {y>=(~bgrid) and: y<=(~bgrid=~bgrid+10)} {
1538                                 ~l8a1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)));
1539                                 ~l8b1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value); ~f8=q.value; ~undof8=~f8;
1540                                 ~l8c1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd3);
1541                                 ~l8d1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd3);
1542                                 ~l8e1.set(\dur, ((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2))/~icd6);
1543                                 ~l8f1.set(\dur, q=((x/(Window.screenBounds.width)).linexp(0,1,~outmin2,~outmax2)).value/~icd6);};
1544                 };
1545         };
1546
1547         ~tgrid = 30;
1548         ~bgrid = Window.screenBounds.height-(Window.screenBounds.height/1.6180339887499)+30;
1549         ~dc1 = ~tgrid-5; ~dc2 = ~bgrid-5; ~dca = 10;
1550
1551         ~bpl = Window.screenBounds.width-340;
1552         ~bpt = Window.screenBounds.height-88;
1553         ~bph = 40;
1554         ~bpw = 40/1.6180339887499;
1555
1556
1557         //copy button
1558
1559         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;
1560                 if(button.value == 1, {
1561
1562                         ~tsc = TextView(w, Rect(0,0, 1600*2, 354)).background_(Color.black);
1563                         (~tsc.string =
1564                                 "saved open/flow 1-8: "++"\n"++"\n"++
1565                                 "[~f1="++fp1.asString++",~f2="++fp2.asString++",~f3="++fp3.asString++",~f4="++fp4.asString++",~f5="++fp5.asString++",~f6="++fp6.asString++",~f7="++fp7.asString++",~f8="++fp8.asString++"];"++" "++"~synthopen.value; ~trace.value; (a).wait;"++"\n"++
1566                                 "[~f1="++fp1b.asString++",~f2="++fp2b.asString++",~f3="++fp3b.asString++",~f4="++fp4b.asString++",~f5="++fp5b.asString++",~f6="++fp6b.asString++",~f7="++fp7b.asString++",~f8="++fp8b.asString++"];"++" "++"~synthflow.value; ~trace.value; (a).wait;"++"\n"++
1567                                 "[~f1="++fp1c.asString++",~f2="++fp2c.asString++",~f3="++fp3c.asString++",~f4="++fp4c.asString++",~f5="++fp5c.asString++",~f6="++fp6c.asString++",~f7="++fp7c.asString++",~f8="++fp8c.asString++"];"++" "++"~synthflow.value; ~trace.value; (a).wait;"++"\n"++
1568                                 "[~f1="++fp1d.asString++",~f2="++fp2d.asString++",~f3="++fp3d.asString++",~f4="++fp4d.asString++",~f5="++fp5d.asString++",~f6="++fp6d.asString++",~f7="++fp7d.asString++",~f8="++fp8d.asString++"];"++" "++"~synthflow.value; ~trace.value; (a).wait;"++"\n"++
1569                                 "[~f1="++fp1e.asString++",~f2="++fp2e.asString++",~f3="++fp3e.asString++",~f4="++fp4e.asString++",~f5="++fp5e.asString++",~f6="++fp6e.asString++",~f7="++fp7e.asString++",~f8="++fp8e.asString++"];"++" "++"~synthflow.value; ~trace.value; (a).wait;"++"\n"++
1570                                 "[~f1="++fp1f.asString++",~f2="++fp2f.asString++",~f3="++fp3f.asString++",~f4="++fp4f.asString++",~f5="++fp5f.asString++",~f6="++fp6f.asString++",~f7="++fp7f.asString++",~f8="++fp8f.asString++"];"++" "++"~synthflow.value; ~trace.value; (a).wait;"++"\n"++
1571                                 "[~f1="++fp1g.asString++",~f2="++fp2g.asString++",~f3="++fp3g.asString++",~f4="++fp4g.asString++",~f5="++fp5g.asString++",~f6="++fp6g.asString++",~f7="++fp7g.asString++",~f8="++fp8g.asString++"];"++" "++"~synthflow.value; ~trace.value; (a).wait;"++"\n"++
1572                                 "[~f1="++fp1h.asString++",~f2="++fp2h.asString++",~f3="++fp3h.asString++",~f4="++fp4h.asString++",~f5="++fp5h.asString++",~f6="++fp6h.asString++",~f7="++fp7h.asString++",~f8="++fp8h.asString++"];"++" "++"~synthflow.value; ~trace.value; (a).wait;"++"\n"++"\n"++
1573
1574                                 "saved slide 1-8: "++"\n"++"\n"++
1575
1576                                 "#s,t,u,v,w,x,y,z = [ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8 ]; [~f1="++fp1.asString++",~f2="++fp2.asString++",~f3="++fp3.asString++",~f4="++fp4.asString++",~f5="++fp5.asString++",~f6="++fp6.asString++",~f7="++fp7.asString++",~f8="++fp8.asString++"];"++" "++"~slidetime = 1; ~slidedo = 432; ~synthslide.value; ~trace.value; (a).wait;"++"\n"++
1577                                 "#s,t,u,v,w,x,y,z = [ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8 ]; [~f1="++fp1b.asString++",~f2="++fp2b.asString++",~f3="++fp3b.asString++",~f4="++fp4b.asString++",~f5="++fp5b.asString++",~f6="++fp6b.asString++",~f7="++fp7b.asString++",~f8="++fp8b.asString++"];"++" "++"~slidetime = 1; ~slidedo = 432; ~synthslide.value; ~trace.value; (a).wait;"++"\n"++
1578                                 "#s,t,u,v,w,x,y,z = [ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8 ]; [~f1="++fp1c.asString++",~f2="++fp2c.asString++",~f3="++fp3c.asString++",~f4="++fp4c.asString++",~f5="++fp5c.asString++",~f6="++fp6c.asString++",~f7="++fp7c.asString++",~f8="++fp8c.asString++"];"++" "++"~slidetime = 1; ~slidedo = 432; ~synthslide.value; ~trace.value; (a).wait;"++"\n"++
1579                                 "#s,t,u,v,w,x,y,z = [ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8 ]; [~f1="++fp1d.asString++",~f2="++fp2d.asString++",~f3="++fp3d.asString++",~f4="++fp4d.asString++",~f5="++fp5d.asString++",~f6="++fp6d.asString++",~f7="++fp7d.asString++",~f8="++fp8d.asString++"];"++" "++"~slidetime = 1; ~slidedo = 432; ~synthslide.value; ~trace.value; (a).wait;"++"\n"++
1580                                 "#s,t,u,v,w,x,y,z = [ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8 ]; [~f1="++fp1e.asString++",~f2="++fp2e.asString++",~f3="++fp3e.asString++",~f4="++fp4e.asString++",~f5="++fp5e.asString++",~f6="++fp6e.asString++",~f7="++fp7e.asString++",~f8="++fp8e.asString++"];"++" "++"~slidetime = 1; ~slidedo = 432; ~synthslide.value; ~trace.value; (a).wait;"++"\n"++
1581                                 "#s,t,u,v,w,x,y,z = [ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8 ]; [~f1="++fp1f.asString++",~f2="++fp2f.asString++",~f3="++fp3f.asString++",~f4="++fp4f.asString++",~f5="++fp5f.asString++",~f6="++fp6f.asString++",~f7="++fp7f.asString++",~f8="++fp8f.asString++"];"++" "++"~slidetime = 1; ~slidedo = 432; ~synthslide.value; ~trace.value; (a).wait;"++"\n"++
1582                                 "#s,t,u,v,w,x,y,z = [ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8 ]; [~f1="++fp1g.asString++",~f2="++fp2g.asString++",~f3="++fp3g.asString++",~f4="++fp4g.asString++",~f5="++fp5g.asString++",~f6="++fp6g.asString++",~f7="++fp7g.asString++",~f8="++fp8g.asString++"];"++" "++"~slidetime = 1; ~slidedo = 432; ~synthslide.value; ~trace.value; (a).wait;"++"\n"++
1583                                 "#s,t,u,v,w,x,y,z = [ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8 ]; [~f1="++fp1h.asString++",~f2="++fp2h.asString++",~f3="++fp3h.asString++",~f4="++fp4h.asString++",~f5="++fp5h.asString++",~f6="++fp6h.asString++",~f7="++fp7h.asString++",~f8="++fp8h.asString++"];"++" "++"~slidetime = 1; ~slidedo = 432; ~synthslide.value; ~trace.value; (a).wait;"++"\n"++"\n"++
1584
1585                                 "current: "++"\n"++
1586                                 "[~f1="++~f1.asString++",~f2="++~f2.asString++",~f3="++~f3.asString++",~f4="++~f4.asString++",~f5="++~f5.asString++",~f6="++~f6.asString++",~f7="++~f7.asString++",~f8="++~f8.asString++"]"
1587                         );
1588                         ~tsc.stringColor = Color.white;
1589                         (str= [ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8/*,~f9,~f10,~f11,~f12*/ ];("echo"+str+"| xclip -selection clipboard").unixCmd;);
1590                         [ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8/*,~f9,~f10,~f11,~f12*/ ].postln;},
1591                         {~tsc.close;});
1592         });
1593
1594
1595         //stop timer button
1596
1597         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;
1598                 if(~timer.isPlaying == true, {
1599                         if(~tst.value == nil, {~timer.stop; ~systemclock.stop; ~systemclock.clear;},{~tst.close;
1600                                 ~timevals.value;
1601                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear;});
1602                 });
1603         });
1604
1605
1606         //timer button
1607
1608         ~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, {
1609                 if(~tst != nil, {~tst.close});
1610                 ~timevals.value;
1611                 ~timer.stop; ~systemclock.stop; ~systemclock.clear;},{if(~tst.value == nil, {~timer.stop; ~systemclock.stop; ~systemclock.clear;},{~timer.stop; ~systemclock.stop; ~systemclock.clear; ~tst.close;})})});
1612
1613
1614         //start/stop synth button
1615
1616         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_({
1617                 arg synthbutton; if(synthbutton.value == 1, {
1618                         ~l1a = Synth(\gsineicfld, [\dur, 432]).register;~l1a1 = Synth(\gsineicfld, [\dur, 432]).register;[~l1a, ~l1a1].do(_.free);~l1a = Synth(\gsineicfld, [\dur, 432]).register;~l1a1 = Synth(\gsineicfld, [\dur, 432]).register;[~l1a, ~l1a1].do(_.free);
1619                         ~synthopen.value;
1620                         ~numsynths.stop; ~numsynthsfunc.value;
1621                         ~midifunc.value;
1622                         },
1623                         {~synthfree.value; b4.value = 0;})
1624         });
1625
1626
1627         //pause/unpause button
1628
1629         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_({
1630                 arg synthbutton; if(synthbutton.value == 1, {~synthpause.value; ~timer.stop;},
1631                         {~synthflow.value; if(~time == 0, {~timer.stop;}, {~timer = Routine({inf.do({~time = ~time+0.01; ~time.postln; 0.01.wait;});}); SystemClock.play(~timer);})})
1632         });
1633
1634
1635         //open/flow/slide buttons coordinate values
1636
1637         ~bph = 26;
1638         ~bpw = 26/1.6180339887499;
1639         ~bpl = Window.screenBounds.width-(~bph*8)-20;
1640         ~bpt = Window.screenBounds.height-88;
1641
1642         ~bp01l = ~bpl;
1643         ~bp02l = ~bpl+(~bph*1);
1644         ~bp03l = ~bpl+(~bph*2);
1645         ~bp04l = ~bpl+(~bph*3);
1646         ~bp05l = ~bpl+(~bph*4);
1647         ~bp06l = ~bpl+(~bph*5);
1648         ~bp07l = ~bpl+(~bph*6);
1649         ~bp08l = ~bpl+(~bph*7);
1650         ~bpf1l = ~bpl;
1651         ~bpf2l = ~bpl+(~bph*1);
1652         ~bpf3l = ~bpl+(~bph*2);
1653         ~bpf4l = ~bpl+(~bph*3);
1654         ~bpf5l = ~bpl+(~bph*4);
1655         ~bpf6l = ~bpl+(~bph*5);
1656         ~bpf7l = ~bpl+(~bph*6);
1657         ~bpf8l = ~bpl+(~bph*7);
1658
1659         ~bp01t = ~bpt;
1660         ~bp02t = ~bpt;
1661         ~bp03t = ~bpt;
1662         ~bp04t = ~bpt;
1663         ~bp05t = ~bpt;
1664         ~bp06t = ~bpt;
1665         ~bp07t = ~bpt;
1666         ~bp08t = ~bpt;
1667         ~bpf1t = ~bpt+~bpw;
1668         ~bpf2t = ~bpt+~bpw;
1669         ~bpf3t = ~bpt+~bpw;
1670         ~bpf4t = ~bpt+~bpw;
1671         ~bpf5t = ~bpt+~bpw;
1672         ~bpf6t = ~bpt+~bpw;
1673         ~bpf7t = ~bpt+~bpw;
1674         ~bpf8t = ~bpt+~bpw;
1675
1676         ~bp01h = ~bph;
1677         ~bp02h = ~bph;
1678         ~bp03h = ~bph;
1679         ~bp04h = ~bph;
1680         ~bp05h = ~bph;
1681         ~bp06h = ~bph;
1682         ~bp07h = ~bph;
1683         ~bp08h = ~bph;
1684         ~bpf1h = ~bph;
1685         ~bpf2h = ~bph;
1686         ~bpf3h = ~bph;
1687         ~bpf4h = ~bph;
1688         ~bpf5h = ~bph;
1689         ~bpf6h = ~bph;
1690         ~bpf7h = ~bph;
1691         ~bpf8h = ~bph;
1692
1693         ~bp01w = ~bpw;
1694         ~bp02w = ~bpw;
1695         ~bp03w = ~bpw;
1696         ~bp04w = ~bpw;
1697         ~bp05w = ~bpw;
1698         ~bp06w = ~bpw;
1699         ~bp07w = ~bpw;
1700         ~bp08w = ~bpw;
1701         ~bpf1w = ~bpw;
1702         ~bpf2w = ~bpw;
1703         ~bpf3w = ~bpw;
1704         ~bpf4w = ~bpw;
1705         ~bpf5w = ~bpw;
1706         ~bpf6w = ~bpw;
1707         ~bpf7w = ~bpw;
1708         ~bpf8w = ~bpw;
1709
1710         ~tspw=280+210;
1711         ~tsph=280+210/~gm;
1712         ~tspl=Window.screenBounds.width-~tspw;
1713         ~tspt=~bpt-310;
1714
1715
1716         //synthopen 1-8 buttons
1717
1718         ~bplaceo1 = Button.new(w,Rect(~bp01l,~bp01t,~bp01h,~bp01w)).states_([["o1",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
1719
1720                 [~f1=fp1,~f2=fp2,~f3=fp3,~f4=fp4,~f5=fp5,~f6=fp6,~f7=fp7,~f8=fp8];
1721
1722                 ~synthopen.value;
1723                 ~currentsynth = "o1"; ~synthmonitorfunc.value;
1724
1725                 if(~ts.value == 1,
1726                         {if(~tst == nil, {nil}, {~tst.close;});
1727                                 ~timevals.value;
1728                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time1o = 0;
1729                                 ~timer = Routine({inf.do({
1730                                         ~time1o =
1731                                         ~time1o+0.01; ~slot = "o1_"+~time1o.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
1732                         {nil});
1733         });
1734
1735         ~bplaceo2 = Button.new(w,Rect(~bp02l,~bp02t,~bp02h,~bp02w)).states_([["o2",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
1736
1737                 [~f1=fp1b,~f2=fp2b,~f3=fp3b,~f4=fp4b,~f5=fp5b,~f6=fp6b,~f7=fp7b,~f8=fp8b];
1738
1739                 ~synthopen.value;
1740                 ~currentsynth = "o2"; ~synthmonitorfunc.value;
1741
1742                 if(~ts.value == 1,
1743                         {if(~tst == nil, {nil}, {~tst.close;});
1744                                 ~timevals.value;
1745                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time2o = 0;
1746                                 ~timer = Routine({inf.do({
1747                                         ~time2o =
1748                                         ~time2o+0.01; ~slot = "o2_"+~time2o.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
1749                         {nil});
1750         });
1751         ~bplaceo3 = Button.new(w,Rect(~bp03l,~bp03t,~bp03h,~bp03w)).states_([["o3",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
1752
1753                 [~f1=fp1c,~f2=fp2c,~f3=fp3c,~f4=fp4c,~f5=fp5c,~f6=fp6c,~f7=fp7c,~f8=fp8c];
1754
1755                 ~synthopen.value;
1756                 ~currentsynth = "o3"; ~synthmonitorfunc.value;
1757
1758                 if(~ts.value == 1,
1759                         {if(~tst == nil, {nil}, {~tst.close;});
1760                                 ~timevals.value;
1761                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time3o = 0;
1762                                 ~timer = Routine({inf.do({
1763                                         ~time3o =
1764                                         ~time3o+0.01; ~slot = "o3_"+~time3o.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
1765                         {nil});
1766         });
1767         ~bplaceo4 = Button.new(w,Rect(~bp04l,~bp04t,~bp04h,~bp04w)).states_([["o4",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
1768
1769                 [~f1=fp1d,~f2=fp2d,~f3=fp3d,~f4=fp4d,~f5=fp5d,~f6=fp6d,~f7=fp7d,~f8=fp8d];
1770
1771                 ~synthopen.value;
1772                 ~currentsynth = "o4"; ~synthmonitorfunc.value;
1773
1774                 if(~ts.value == 1,
1775                         {if(~tst == nil, {nil}, {~tst.close;});
1776                                 ~timevals.value;
1777                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time4o = 0;
1778                                 ~timer = Routine({inf.do({
1779                                         ~time4o =
1780                                         ~time4o+0.01; ~slot = "o4_"+~time4o.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
1781                         {nil});
1782
1783         });
1784
1785         ~bplaceo5 = Button.new(w,Rect(~bp05l,~bp05t,~bp05h,~bp05w)).states_([["o5",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
1786
1787                 [~f1=fp1e,~f2=fp2e,~f3=fp3e,~f4=fp4e,~f5=fp5e,~f6=fp6e,~f7=fp7e,~f8=fp8e];
1788
1789                 ~synthopen.value;
1790                 ~currentsynth = "o5"; ~synthmonitorfunc.value;
1791
1792                 if(~ts.value == 1,
1793                         {if(~tst == nil, {nil}, {~tst.close;});
1794                                 ~timevals.value;
1795                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time5o = 0;
1796                                 ~timer = Routine({inf.do({
1797                                         ~time5o =
1798                                         ~time5o+0.01; ~slot = "o5_"+~time5o.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
1799                         {nil});
1800
1801         });
1802         ~bplaceo6 = Button.new(w,Rect(~bp06l,~bp06t,~bp06h,~bp06w)).states_([["o6",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
1803
1804                 [~f1=fp1f,~f2=fp2f,~f3=fp3f,~f4=fp4f,~f5=fp5f,~f6=fp6f,~f7=fp7f,~f8=fp8f];
1805
1806                 ~synthopen.value;
1807                 ~currentsynth = "o6"; ~synthmonitorfunc.value;
1808
1809                 if(~ts.value == 1,
1810                         {if(~tst == nil, {nil}, {~tst.close;});
1811                                 ~timevals.value;
1812                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time6o = 0;
1813                                 ~timer = Routine({inf.do({
1814                                         ~time6o =
1815                                         ~time6o+0.01; ~slot = "o6_"+~time6o.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
1816                         {nil});
1817         });
1818         ~bplaceo7 = Button.new(w,Rect(~bp07l,~bp07t,~bp07h,~bp07w)).states_([["o7",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
1819
1820                 [~f1=fp1g,~f2=fp2g,~f3=fp3g,~f4=fp4g,~f5=fp5g,~f6=fp6g,~f7=fp7g,~f8=fp8g];
1821
1822                 ~synthopen.value;
1823                 ~currentsynth = "o7"; ~synthmonitorfunc.value;
1824
1825                 if(~ts.value == 1,
1826                         {if(~tst == nil, {nil}, {~tst.close;});
1827                                 ~timevals.value;
1828                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time7o = 0;
1829                                 ~timer = Routine({inf.do({
1830                                         ~time7o =
1831                                         ~time7o+0.01; ~slot = "o7_"+~time7o.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
1832                         {nil});
1833         });
1834         ~bplaceo8 = Button.new(w,Rect(~bp08l,~bp08t,~bp08h,~bp08w)).states_([["o8",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
1835
1836                 [~f1=fp1h,~f2=fp2h,~f3=fp3h,~f4=fp4h,~f5=fp5h,~f6=fp6h,~f7=fp7h,~f8=fp8h];
1837
1838                 ~synthopen.value;
1839                 ~currentsynth = "o8"; ~synthmonitorfunc.value;
1840
1841                 if(~ts.value == 1,
1842                         {if(~tst == nil, {nil}, {~tst.close;});
1843                                 ~timevals.value;
1844                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time8o = 0;
1845                                 ~timer = Routine({inf.do({
1846                                         ~time8o =
1847                                         ~time8o+0.01; ~slot = "o8_"+~time8o.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
1848                         {nil});
1849         });
1850
1851
1852         //synthflow 1-8 buttons
1853
1854         ~bplacef1 = Button.new(w,Rect(~bpf1l,~bpf1t,~bpf1h,~bpf1w)).states_([["f1",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
1855
1856                 [~f1=fp1,~f2=fp2,~f3=fp3,~f4=fp4,~f5=fp5,~f6=fp6,~f7=fp7,~f8=fp8];
1857
1858                 ~synthflow.value;
1859                 ~currentsynth = "f1"; ~synthmonitorfunc.value;
1860
1861                 if(~ts.value == 1,
1862                         {if(~tst == nil, {nil}, {~tst.close;});
1863                                 ~timevals.value;
1864                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time1f = 0;
1865                                 ~timer = Routine({inf.do({
1866                                         ~time1f =
1867                                         ~time1f+0.01; ~slot = "f1_"+~time1f.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
1868                         {nil});
1869         });
1870         ~bplacef2 = Button.new(w,Rect(~bpf2l,~bpf2t,~bpf2h,~bpf2w)).states_([["f2",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
1871
1872                 [~f1=fp1b,~f2=fp2b,~f3=fp3b,~f4=fp4b,~f5=fp5b,~f6=fp6b,~f7=fp7b,~f8=fp8b];
1873
1874                 ~synthflow.value;
1875                 ~currentsynth = "f2"; ~synthmonitorfunc.value;
1876
1877                 if(~ts.value == 1,
1878                         {if(~tst == nil, {nil}, {~tst.close;});
1879                                 ~timevals.value;
1880                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time2f = 0;
1881                                 ~timer = Routine({inf.do({
1882                                         ~time2f =
1883                                         ~time2f+0.01; ~slot = "f2_"+~time2f.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
1884                         {nil});
1885         });
1886
1887         ~bplacef3 = Button.new(w,Rect(~bpf3l,~bpf3t,~bpf3h,~bpf3w)).states_([["f3",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
1888
1889                 [~f1=fp1c,~f2=fp2c,~f3=fp3c,~f4=fp4c,~f5=fp5c,~f6=fp6c,~f7=fp7c,~f8=fp8c];
1890
1891                 ~synthflow.value;
1892                 ~currentsynth = "f3"; ~synthmonitorfunc.value;
1893
1894                 if(~ts.value == 1,
1895                         {if(~tst == nil, {nil}, {~tst.close;});
1896                                 ~timevals.value;
1897                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time3f = 0;
1898                                 ~timer = Routine({inf.do({
1899                                         ~time3f =
1900                                         ~time3f+0.01; ~slot = "f3_"+~time3f.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
1901                         {nil});
1902         });
1903         ~bplacef4 = Button.new(w,Rect(~bpf4l,~bpf4t,~bpf4h,~bpf4w)).states_([["f4",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
1904
1905                 [~f1=fp1d,~f2=fp2d,~f3=fp3d,~f4=fp4d,~f5=fp5d,~f6=fp6d,~f7=fp7d,~f8=fp8d];
1906
1907                 ~synthflow.value;
1908                 ~currentsynth = "f4"; ~synthmonitorfunc.value;
1909
1910                 if(~ts.value == 1,
1911                         {if(~tst == nil, {nil}, {~tst.close;});
1912                                 ~timevals.value;
1913                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time4f = 0;
1914                                 ~timer = Routine({inf.do({
1915                                         ~time4f =
1916                                         ~time4f+0.01; ~slot = "f4_"+~time4f.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
1917                         {nil});
1918         });
1919
1920         ~bplacef5 = Button.new(w,Rect(~bpf5l,~bpf5t,~bpf5h,~bpf5w)).states_([["f5",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
1921
1922                 [~f1=fp1e,~f2=fp2e,~f3=fp3e,~f4=fp4e,~f5=fp5e,~f6=fp6e,~f7=fp7e,~f8=fp8e];
1923
1924                 ~synthflow.value;
1925                 ~currentsynth = "f5"; ~synthmonitorfunc.value;
1926
1927                 if(~ts.value == 1,
1928                         {if(~tst == nil, {nil}, {~tst.close;});
1929                                 ~timevals.value;
1930                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time5f = 0;
1931                                 ~timer = Routine({inf.do({
1932                                         ~time5f =
1933                                         ~time5f+0.01; ~slot = "f5_"+~time5f.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
1934                         {nil});
1935         });
1936
1937         ~bplacef6 = Button.new(w,Rect(~bpf6l,~bpf6t,~bpf6h,~bpf6w)).states_([["f6",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
1938
1939                 [~f1=fp1f,~f2=fp2f,~f3=fp3f,~f4=fp4f,~f5=fp5f,~f6=fp6f,~f7=fp7f,~f8=fp8f];
1940
1941                 ~synthflow.value;
1942                 ~currentsynth = "f6"; ~synthmonitorfunc.value;
1943
1944                 if(~ts.value == 1,
1945                         {if(~tst == nil, {nil}, {~tst.close;});
1946                                 ~timevals.value;
1947                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time6f = 0;
1948                                 ~timer = Routine({inf.do({
1949                                         ~time6f =
1950                                         ~time6f+0.01; ~slot = "f6_"+~time6f.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
1951                         {nil});
1952         });
1953
1954
1955         ~bplacef7 = Button.new(w,Rect(~bpf7l,~bpf7t,~bpf7h,~bpf7w)).states_([["f7",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
1956
1957                 [~f1=fp1g,~f2=fp2g,~f3=fp3g,~f4=fp4g,~f5=fp5g,~f6=fp6g,~f7=fp7g,~f8=fp8g];
1958
1959                 ~synthflow.value;
1960                 ~currentsynth = "f7"; ~synthmonitorfunc.value;
1961
1962                 if(~ts.value == 1,
1963                         {if(~tst == nil, {nil}, {~tst.close;});
1964                                 ~timevals.value;
1965                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time7f = 0;
1966                                 ~timer = Routine({inf.do({
1967                                         ~time7f =
1968                                         ~time7f+0.01; ~slot = "f7_"+~time7f.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
1969                         {nil});
1970         });
1971         ~bplacef8 = Button.new(w,Rect(~bpf8l,~bpf8t,~bpf8h,~bpf8w)).states_([["f8",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
1972
1973                 [~f1=fp1h,~f2=fp2h,~f3=fp3h,~f4=fp4h,~f5=fp5h,~f6=fp6h,~f7=fp7h,~f8=fp8h];
1974
1975                 ~synthflow.value;
1976                 ~currentsynth = "f8"; ~synthmonitorfunc.value;
1977
1978                 if(~ts.value == 1,
1979                         {if(~tst == nil, {nil}, {~tst.close;});
1980                                 ~timevals.value;
1981                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time8f = 0;
1982                                 ~timer = Routine({inf.do({
1983                                         ~time8f =
1984                                         ~time8f+0.01; ~slot = "f8_"+~time8f.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
1985                         {nil});
1986         });
1987
1988
1989         //synthslide 1-8 buttons
1990
1991         ~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;
1992
1993                 if(~slidetime1 == nil, {~slidetime1 = 4}); if(~slidedo1 == nil, {~slidedo1 = 2000;}); ~slidecount = ~slidedo1;
1994                 #g,h,i,j,k,l,m,n,o,p,q,r = (([ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8 ]-
1995                         [ fp1,fp2,fp3,fp4,fp5,fp6,fp7,fp8 ])*(-1)/~slidedo1);
1996
1997                 ~slidetime =~slidetime1; ~slidedo = ~slidedo1;
1998
1999                 ~slideroutine.stop;
2000
2001                 ~synthslide.value;
2002                 ~currentsynth = "s1"; ~synthmonitorfunc.value;
2003
2004                 if(~ts.value == 1,
2005                         {if(~tst == nil, {nil}, {~tst.close;});
2006                                 ~timevals.value;
2007                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time1s = 0;
2008                                 ~timer = Routine({inf.do({
2009                                         ~time1s =
2010                                         ~time1s+0.01; ~slot = "s1_"+~time1s.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
2011                         {nil});
2012
2013         });
2014         ~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;
2015
2016                 if(~slidetime2 == nil, {~slidetime2 = 4}); if(~slidedo2 == nil, {~slidedo2 = 2000;}); ~slidecount = ~slidedo2;
2017                 #g,h,i,j,k,l,m,n,o,p,q,r = (([ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8 ]-
2018                         [ fp1b,fp2b,fp3b,fp4b,fp5b,fp6b,fp7b,fp8b ])*(-1)/~slidedo2);
2019
2020                 ~slidetime = ~slidetime2; ~slidedo = ~slidedo2;
2021
2022                 ~slideroutine.stop;
2023
2024                 ~synthslide.value;
2025                 ~currentsynth = "s2"; ~synthmonitorfunc.value;
2026
2027                 if(~ts.value == 1,
2028                         {if(~tst == nil, {nil}, {~tst.close;});
2029                                 ~timevals.value;
2030                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time2s = 0;
2031                                 ~timer = Routine({inf.do({
2032                                         ~time2s =
2033                                         ~time2s+0.01; ~slot = "s2_"+~time2s.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
2034                         {nil});
2035
2036         });
2037         ~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;
2038
2039                 if(~slidetime3 == nil, {~slidetime3 = 4}); if(~slidedo3 == nil, {~slidedo3 = 2000;}); ~slidecount = ~slidedo3;
2040                 #g,h,i,j,k,l,m,n,o,p,q,r = (([ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8 ]-
2041                         [ fp1c,fp2c,fp3c,fp4c,fp5c,fp6c,fp7c,fp8c ])*(-1)/~slidedo3);
2042
2043                 ~slidetime = ~slidetime3; ~slidedo = ~slidedo3;
2044
2045                 ~slideroutine.stop;
2046
2047                 ~synthslide.value;
2048                 ~currentsynth = "s3"; ~synthmonitorfunc.value;
2049
2050                 if(~ts.value == 1,
2051                         {if(~tst == nil, {nil}, {~tst.close;});
2052                                 ~timevals.value;
2053                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time3s = 0;
2054                                 ~timer = Routine({inf.do({
2055                                         ~time3s =
2056                                         ~time3s+0.01; ~slot = "s3_"+~time3s.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
2057                         {nil});
2058
2059         });
2060         ~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;
2061
2062                 if(~slidetime4 == nil, {~slidetime4 = 4}); if(~slidedo4 == nil, {~slidedo4 = 2000;}); ~slidecount = ~slidedo4;
2063                 #g,h,i,j,k,l,m,n,o,p,q,r = (([ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8 ]-
2064                         [ fp1d,fp2d,fp3d,fp4d,fp5d,fp6d,fp7d,fp8d ])*(-1)/~slidedo4);
2065
2066                 ~slidetime = ~slidetime4; ~slidedo = ~slidedo4;
2067
2068                 ~slideroutine.stop;
2069
2070                 ~synthslide.value;
2071                 ~currentsynth = "s4"; ~synthmonitorfunc.value;
2072
2073                 if(~ts.value == 1,
2074                         {if(~tst == nil, {nil}, {~tst.close;});
2075                                 ~timevals.value;
2076                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time4s = 0;
2077                                 ~timer = Routine({inf.do({
2078                                         ~time4s =
2079                                         ~time4s+0.01; ~slot = "s4_"+~time4s.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
2080                         {nil});
2081         });
2082         ~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;
2083
2084                 if(~slidetime5 == nil, {~slidetime5 = 4}); if(~slidedo5 == nil, {~slidedo5 = 2000;}); ~slidecount = ~slidedo5;
2085                 #g,h,i,j,k,l,m,n,o,p,q,r = (([ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8 ]-
2086                         [ fp1e,fp2e,fp3e,fp4e,fp5e,fp6e,fp7e,fp8e ])*(-1)/~slidedo5);
2087
2088                 ~slidetime = ~slidetime5; ~slidedo = ~slidedo5;
2089
2090                 ~slideroutine.stop;
2091
2092                 ~synthslide.value;
2093                 ~currentsynth = "s5"; ~synthmonitorfunc.value;
2094
2095                 if(~ts.value == 1,
2096                         {if(~tst == nil, {nil}, {~tst.close;});
2097                                 ~timevals.value;
2098                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time5s = 0;
2099                                 ~timer = Routine({inf.do({
2100                                         ~time5s =
2101                                         ~time5s+0.01; ~slot = "s5_"+~time5s.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
2102                         {nil});
2103
2104         });
2105         ~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;
2106
2107                 if(~slidetime6 == nil, {~slidetime6 = 4}); if(~slidedo6 == nil, {~slidedo6 = 2000;}); ~slidecount = ~slidedo6;
2108                 #g,h,i,j,k,l,m,n,o,p,q,r = (([ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8 ]-
2109                         [ fp1f,fp2f,fp3f,fp4f,fp5f,fp6f,fp7f,fp8f ])*(-1)/~slidedo6);
2110
2111                 ~slidetime = ~slidetime6; ~slidedo = ~slidedo6;
2112                 ~slideroutine.stop;
2113
2114                 ~synthslide.value;
2115                 ~currentsynth = "s6"; ~synthmonitorfunc.value;
2116
2117                 if(~ts.value == 1,
2118                         {if(~tst == nil, {nil}, {~tst.close;});
2119                                 ~timevals.value;
2120                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time6s = 0;
2121                                 ~timer = Routine({inf.do({
2122                                         ~time6s =
2123                                         ~time6s+0.01; ~slot = "s6_"+~time6s.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
2124                         {nil});
2125
2126         });
2127         ~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;
2128
2129                 if(~slidetime7 == nil, {~slidetime7 = 4}); if(~slidedo7 == nil, {~slidedo7 = 2000;}); ~slidecount = ~slidedo7;
2130                 #g,h,i,j,k,l,m,n,o,p,q,r = (([ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8 ]-
2131                         [ fp1g,fp2g,fp3g,fp4g,fp5g,fp6g,fp7g,fp8g ])*(-1)/~slidedo7);
2132
2133                 ~slidetime = ~slidetime7; ~slidedo = ~slidedo7;
2134                 ~slideroutine.stop;
2135
2136                 ~synthslide.value;
2137                 ~currentsynth = "s7"; ~synthmonitorfunc.value;
2138
2139                 if(~ts.value == 1,
2140                         {if(~tst == nil, {nil}, {~tst.close;});
2141                                 ~timevals.value;
2142                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time7s = 0;
2143                                 ~timer = Routine({inf.do({
2144                                         ~time7s =
2145                                         ~time7s+0.01; ~slot = "s7_"+~time7s.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
2146                         {nil});
2147
2148         });
2149         ~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;
2150
2151                 if(~slidetime8 == nil, {~slidetime8 = 4}); if(~slidedo8 == nil, {~slidedo8 = 2000;}); ~slidecount = ~slidedo8;
2152                 #g,h,i,j,k,l,m,n,o,p,q,r = (([ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8 ]-
2153                         [ fp1h,fp2h,fp3h,fp4h,fp5h,fp6h,fp7h,fp8h])*(-1)/~slidedo8);
2154
2155                 ~slidetime = ~slidetime8; ~slidedo = ~slidedo8;
2156
2157                 ~slideroutine.stop;
2158
2159                 ~synthslide.value;
2160                 ~currentsynth = "s8"; ~synthmonitorfunc.value;
2161
2162                 if(~ts.value == 1,
2163                         {if(~tst == nil, {nil}, {~tst.close;});
2164                                 ~timevals.value;
2165                                 ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time8s = 0;
2166                                 ~timer = Routine({inf.do({
2167                                         ~time8s =
2168                                         ~time8s+0.01; ~slot = "s8_"+~time8s.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
2169                         {nil});
2170         });
2171
2172
2173         //if slidetime/slidedo is nil
2174
2175         if(~slidetimeall == nil, {~slidetimeall = 1});
2176         if(~slidetime1 == nil, {~slidetime1 = 1});
2177         if(~slidetime2 == nil, {~slidetime2 = 1});
2178         if(~slidetime3 == nil, {~slidetime3 = 1});
2179         if(~slidetime4 == nil, {~slidetime4 = 1});
2180         if(~slidetime5 == nil, {~slidetime5 = 1});
2181         if(~slidetime6 == nil, {~slidetime6 = 1});
2182         if(~slidetime7 == nil, {~slidetime7 = 1});
2183         if(~slidetime8 == nil, {~slidetime8 = 1});
2184
2185         if(~slidedoall == nil, {~slidedoall = 432});
2186         if(~slidedo1 == nil, {~slidedo1 = 432});
2187         if(~slidedo2 == nil, {~slidedo2 = 432});
2188         if(~slidedo3 == nil, {~slidedo3 = 432});
2189         if(~slidedo4 == nil, {~slidedo4 = 432});
2190         if(~slidedo5 == nil, {~slidedo5 = 432});
2191         if(~slidedo6 == nil, {~slidedo6 = 432});
2192         if(~slidedo7 == nil, {~slidedo7 = 432});
2193         if(~slidedo8 == nil, {~slidedo8 = 432});
2194
2195
2196         //set slide values button
2197
2198         ~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;
2199
2200                 if(button.value == 1, {
2201                         ({
2202                                 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;
2203                                 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;
2204                                 ~slideview = View(w, Rect(Window.screenBounds.width-(340+46),Window.screenBounds.height-(340+46/1.6180339887499)-110,340+46,340+46/1.6180339887499)).front;
2205
2206                                 tall = StaticText(~slideview, Rect(lefttime , top=top, width, height)).background_(Color.black).string_("all time").stringColor_(Color.white);
2207                                 t1 = StaticText(~slideview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("s1 time").stringColor_(Color.white);
2208                                 t2 = StaticText(~slideview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("s2 time").stringColor_(Color.white);
2209                                 t3 = StaticText(~slideview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("s3 time").stringColor_(Color.white);
2210                                 t4 = StaticText(~slideview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("s4 time").stringColor_(Color.white);
2211                                 t5 = StaticText(~slideview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("s5 time").stringColor_(Color.white);
2212                                 t6 = StaticText(~slideview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("s6 time").stringColor_(Color.white);
2213                                 t7 = StaticText(~slideview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("s7 time").stringColor_(Color.white);
2214                                 t8 = StaticText(~slideview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("s8 time").stringColor_(Color.white);
2215
2216                                 top = 0;
2217
2218                                 stall=NumberBox(~slideview, Rect(lefttimebox , top=top, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~slidetimeall);
2219                                 st1=NumberBox(~slideview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~slidetime1);
2220                                 st2=NumberBox(~slideview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~slidetime2);
2221                                 st3=NumberBox(~slideview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~slidetime3);
2222                                 st4=NumberBox(~slideview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~slidetime4);
2223                                 st5=NumberBox(~slideview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~slidetime5);
2224                                 st6=NumberBox(~slideview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~slidetime6);
2225                                 st7=NumberBox(~slideview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~slidetime7);
2226                                 st8=NumberBox(~slideview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~slidetime8);
2227
2228                                 top = 0;
2229
2230                                 iall = StaticText(~slideview, Rect(leftdo , top=top, width, height)).background_(Color.black).string_("all incr").stringColor_(Color.white);
2231                                 i1 = StaticText(~slideview, Rect(leftdo , top=top+height, width, height)).background_(Color.black).string_("s1 incr").stringColor_(Color.white);
2232                                 i2 = StaticText(~slideview, Rect(leftdo , top=top+height, width, height)).background_(Color.black).string_("s2 incr").stringColor_(Color.white);
2233                                 i3 = StaticText(~slideview, Rect(leftdo , top=top+height, width, height)).background_(Color.black).string_("s3 incr").stringColor_(Color.white);
2234                                 i4 = StaticText(~slideview, Rect(leftdo , top=top+height, width, height)).background_(Color.black).string_("s4 incr").stringColor_(Color.white);
2235                                 i5 = StaticText(~slideview, Rect(leftdo , top=top+height, width, height)).background_(Color.black).string_("s5 incr").stringColor_(Color.white);
2236                                 i6 = StaticText(~slideview, Rect(leftdo , top=top+height, width, height)).background_(Color.black).string_("s6 incr").stringColor_(Color.white);
2237                                 i7 = StaticText(~slideview, Rect(leftdo , top=top+height, width, height)).background_(Color.black).string_("s7 incr").stringColor_(Color.white);
2238                                 i8 = StaticText(~slideview, Rect(leftdo , top=top+height, width, height)).background_(Color.black).string_("s8 incr").stringColor_(Color.white);
2239
2240                                 top = 0;
2241
2242                                 siall=NumberBox(~slideview, Rect(leftdobox , top=top, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~slidedoall);
2243                                 si1=NumberBox(~slideview, Rect(leftdobox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~slidedo1);
2244                                 si2=NumberBox(~slideview, Rect(leftdobox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~slidedo2);
2245                                 si3=NumberBox(~slideview, Rect(leftdobox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~slidedo3);
2246                                 si4=NumberBox(~slideview, Rect(leftdobox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~slidedo4);
2247                                 si5=NumberBox(~slideview, Rect(leftdobox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~slidedo5);
2248                                 si6=NumberBox(~slideview, Rect(leftdobox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~slidedo6);
2249                                 si7=NumberBox(~slideview, Rect(leftdobox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~slidedo7);
2250                                 si8=NumberBox(~slideview, Rect(leftdobox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~slidedo8);
2251
2252                                 stall.action_({arg val;
2253                                         ~slidetimeall = val.value;
2254                                         ~slidetime1 = val.value;
2255                                         ~slidetime2 = val.value;
2256                                         ~slidetime3 = val.value;
2257                                         ~slidetime4 = val.value;
2258                                         ~slidetime5 = val.value;
2259                                         ~slidetime6 = val.value;
2260                                         ~slidetime7 = val.value;
2261                                         ~slidetime8 = val.value;
2262                                         ~slideview.close; ~slidevals.valueAction_(1);
2263                                 });
2264                                 st1.action_({arg val; ~slidetime1 = val.value;});
2265                                 st2.action_({arg val; ~slidetime2 = val.value;});
2266                                 st3.action_({arg val; ~slidetime3 = val.value;});
2267                                 st4.action_({arg val; ~slidetime4 = val.value;});
2268                                 st5.action_({arg val; ~slidetime5 = val.value;});
2269                                 st6.action_({arg val; ~slidetime6 = val.value;});
2270                                 st7.action_({arg val; ~slidetime7 = val.value;});
2271                                 st8.action_({arg val; ~slidetime8 = val.value;});
2272
2273                                 siall.action_({arg val;
2274                                         ~slidedoall = val.value;
2275                                         ~slidedo1 = val.value;
2276                                         ~slidedo2 = val.value;
2277                                         ~slidedo3 = val.value;
2278                                         ~slidedo4 = val.value;
2279                                         ~slidedo5 = val.value;
2280                                         ~slidedo6 = val.value;
2281                                         ~slidedo7 = val.value;
2282                                         ~slidedo8 = val.value;
2283                                         ~slideview.close; ~slidevals.valueAction_(1);
2284                                 });
2285                                 si1.action_({arg val; ~slidedo1 = val.value;});
2286                                 si2.action_({arg val; ~slidedo2 = val.value;});
2287                                 si3.action_({arg val; ~slidedo3 = val.value;});
2288                                 si4.action_({arg val; ~slidedo4 = val.value;});
2289                                 si5.action_({arg val; ~slidedo5 = val.value;});
2290                                 si6.action_({arg val; ~slidedo6 = val.value;});
2291                                 si7.action_({arg val; ~slidedo7 = val.value;});
2292                                 si8.action_({arg val; ~slidedo8 = val.value;});
2293
2294                                 ~slideview.background_(Color.black);
2295
2296                                 ~closeslidebutton = Button.new(~slideview,Rect(220, top+40, 40, 40/~gm)).states_([["close",Color.white,Color.black]]).action_({arg button;
2297
2298                                         ~slideview.close; ~slidevals.value = 0;
2299                                 });
2300
2301                         }.value);
2302
2303                         ~slideview.front;
2304                 }, {~slideview.close});
2305         });
2306
2307
2308         //mute/unmute 1-8 buttons
2309
2310         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;
2311                 case
2312                 {~l1a1.isRunning == true}{
2313                         if(button.value == 0, {
2314                                 (~vol1 = ~vol;
2315                                         1.do({
2316                                                 ~l1a1.set(\vol, ~vol1);  ~l1b1.set(\vol, ~vol1);
2317                                                 ~l1c1.set(\vol, ~vol1);  ~l1d1.set(\vol, ~vol1);
2318                                                 ~l1e1.set(\vol, ~vol1);  ~l1f1.set(\vol, ~vol1);
2319
2320                                 }););
2321                                 }, {(~vol1 = 0;
2322                                         1.do({
2323                                                 ~l1a1.set(\vol, ~vol1);  ~l1b1.set(\vol, ~vol1);
2324                                                 ~l1c1.set(\vol, ~vol1);  ~l1d1.set(\vol, ~vol1);
2325                                                 ~l1e1.set(\vol, ~vol1);  ~l1f1.set(\vol, ~vol1);
2326
2327                                         }););
2328                         });
2329                 }
2330                 {~l1a.isRunning == true}{
2331                         if(button.value == 0, {
2332                                 (~vol1 = ~vol;
2333                                         1.do({
2334                                                 ~l1a.set(\vol, ~vol1);  ~l1b.set(\vol, ~vol1);
2335                                                 ~l1c.set(\vol, ~vol1);  ~l1d.set(\vol, ~vol1);
2336                                                 ~l1e.set(\vol, ~vol1);  ~l1f.set(\vol, ~vol1);
2337
2338                                 }););
2339                                 }, {(~vol1 = 0;
2340                                         1.do({
2341                                                 ~l1a.set(\vol, ~vol1);  ~l1b.set(\vol, ~vol1);
2342                                                 ~l1c.set(\vol, ~vol1);  ~l1d.set(\vol, ~vol1);
2343                                                 ~l1e.set(\vol, ~vol1);  ~l1f.set(\vol, ~vol1);
2344
2345                                         }););
2346                         });
2347                 };
2348         });
2349
2350         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;
2351                 case
2352                 {~l1a1.isRunning == true}{
2353                         if(button.value == 0, {
2354                                 (~vol2 = ~vol;
2355                                         1.do({
2356                                                 ~l2a1.set(\vol, ~vol2);  ~l2b1.set(\vol, ~vol2);
2357                                                 ~l2c1.set(\vol, ~vol2);  ~l2d1.set(\vol, ~vol2);
2358                                                 ~l2e1.set(\vol, ~vol2);  ~l2f1.set(\vol, ~vol2);
2359
2360                                 }););
2361                                 }, {(~vol2 = 0;
2362                                         1.do({
2363                                                 ~l2a1.set(\vol, ~vol2);  ~l2b1.set(\vol, ~vol2);
2364                                                 ~l2c1.set(\vol, ~vol2);  ~l2d1.set(\vol, ~vol2);
2365                                                 ~l2e1.set(\vol, ~vol2);  ~l2f1.set(\vol, ~vol2);
2366
2367                                         }););
2368                         });
2369                 }
2370                 {~l1a.isRunning == true}{
2371                         if(button.value == 0, {
2372                                 (~vol2 = ~vol;
2373                                         1.do({
2374                                                 ~l2a.set(\vol, ~vol2);  ~l2b.set(\vol, ~vol2);
2375                                                 ~l2c.set(\vol, ~vol2);  ~l2d.set(\vol, ~vol2);
2376                                                 ~l2e.set(\vol, ~vol2);  ~l2f.set(\vol, ~vol2);
2377
2378                                 }););
2379                                 }, {(~vol2 = 0;
2380                                         1.do({
2381                                                 ~l2a.set(\vol, ~vol2);  ~l2b.set(\vol, ~vol2);
2382                                                 ~l2c.set(\vol, ~vol2);  ~l2d.set(\vol, ~vol2);
2383                                                 ~l2e.set(\vol, ~vol2);  ~l2f.set(\vol, ~vol2);
2384
2385                                         }););
2386                         });
2387                 };
2388         });
2389         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;
2390                 case
2391                 {~l1a1.isRunning == true}{
2392                         if(button.value == 0, {
2393                                 (~vol3 = ~vol;
2394                                         1.do({
2395                                                 ~l3a1.set(\vol, ~vol3);  ~l3b1.set(\vol, ~vol3);
2396                                                 ~l3c1.set(\vol, ~vol3);  ~l3d1.set(\vol, ~vol3);
2397                                                 ~l3e1.set(\vol, ~vol3);  ~l3f1.set(\vol, ~vol3);
2398
2399                                 }););
2400                                 }, {(~vol3 = 0;
2401                                         1.do({
2402                                                 ~l3a1.set(\vol, ~vol3);  ~l3b1.set(\vol, ~vol3);
2403                                                 ~l3c1.set(\vol, ~vol3);  ~l3d1.set(\vol, ~vol3);
2404                                                 ~l3e1.set(\vol, ~vol3);  ~l3f1.set(\vol, ~vol3);
2405
2406                                         }););
2407                         });
2408                 }
2409                 {~l1a.isRunning == true}{
2410                         if(button.value == 0, {
2411                                 (~vol3 = ~vol;
2412                                         1.do({
2413                                                 ~l3a.set(\vol, ~vol3);  ~l3b.set(\vol, ~vol3);
2414                                                 ~l3c.set(\vol, ~vol3);  ~l3d.set(\vol, ~vol3);
2415                                                 ~l3e.set(\vol, ~vol3);  ~l3f.set(\vol, ~vol3);
2416
2417                                 }););
2418                                 }, {(~vol3 = 0;
2419                                         1.do({
2420                                                 ~l3a.set(\vol, ~vol3);  ~l3b.set(\vol, ~vol3);
2421                                                 ~l3c.set(\vol, ~vol3);  ~l3d.set(\vol, ~vol3);
2422                                                 ~l3e.set(\vol, ~vol3);  ~l3f.set(\vol, ~vol3);
2423
2424                                         }););
2425                         });
2426                 };
2427         });
2428         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;
2429                 case
2430                 {~l1a1.isRunning == true}{
2431                         if(button.value == 0, {
2432                                 (~vol4 = ~vol;
2433                                         1.do({
2434                                                 ~l4a1.set(\vol, ~vol4);  ~l4b1.set(\vol, ~vol4);
2435                                                 ~l4c1.set(\vol, ~vol4);  ~l4d1.set(\vol, ~vol4);
2436                                                 ~l4e1.set(\vol, ~vol4);  ~l4f1.set(\vol, ~vol4);
2437
2438                                 }););
2439                                 }, {(~vol4 = 0;
2440                                         1.do({
2441                                                 ~l4a1.set(\vol, ~vol4);  ~l4b1.set(\vol, ~vol4);
2442                                                 ~l4c1.set(\vol, ~vol4);  ~l4d1.set(\vol, ~vol4);
2443                                                 ~l4e1.set(\vol, ~vol4);  ~l4f1.set(\vol, ~vol4);
2444
2445                                         }););
2446                         });
2447                 }
2448                 {~l1a.isRunning == true}{
2449                         if(button.value == 0, {
2450                                 (~vol4 = ~vol;
2451                                         1.do({
2452                                                 ~l4a.set(\vol, ~vol4);  ~l4b.set(\vol, ~vol4);
2453                                                 ~l4c.set(\vol, ~vol4);  ~l4d.set(\vol, ~vol4);
2454                                                 ~l4e.set(\vol, ~vol4);  ~l4f.set(\vol, ~vol4);
2455
2456                                 }););
2457                                 }, {(~vol4 = 0;
2458                                         1.do({
2459                                                 ~l4a.set(\vol, ~vol4);  ~l4b.set(\vol, ~vol4);
2460                                                 ~l4c.set(\vol, ~vol4);  ~l4d.set(\vol, ~vol4);
2461                                                 ~l4e.set(\vol, ~vol4);  ~l4f.set(\vol, ~vol4);
2462
2463                                         }););
2464                         });
2465                 };
2466         });
2467         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;
2468                 case
2469                 {~l1a1.isRunning == true}{
2470                         if(button.value == 0, {
2471                                 (~vol5 = ~vol;
2472                                         1.do({
2473                                                 ~l5a1.set(\vol, ~vol5);  ~l5b1.set(\vol, ~vol5);
2474                                                 ~l5c1.set(\vol, ~vol5);  ~l5d1.set(\vol, ~vol5);
2475                                                 ~l5e1.set(\vol, ~vol5);  ~l5f1.set(\vol, ~vol5);
2476
2477                                 }););
2478                                 }, {(~vol5 = 0;
2479                                         1.do({
2480                                                 ~l5a1.set(\vol, ~vol5);  ~l5b1.set(\vol, ~vol5);
2481                                                 ~l5c1.set(\vol, ~vol5);  ~l5d1.set(\vol, ~vol5);
2482                                                 ~l5e1.set(\vol, ~vol5);  ~l5f1.set(\vol, ~vol5);
2483
2484                                         }););
2485                         });
2486                 }
2487                 {~l1a.isRunning == true}{
2488                         if(button.value == 0, {
2489                                 (~vol5 = ~vol;
2490                                         1.do({
2491                                                 ~l5a.set(\vol, ~vol5);  ~l5b.set(\vol, ~vol5);
2492                                                 ~l5c.set(\vol, ~vol5);  ~l5d.set(\vol, ~vol5);
2493                                                 ~l5e.set(\vol, ~vol5);  ~l5f.set(\vol, ~vol5);
2494
2495                                 }););
2496                                 }, {(~vol5 = 0;
2497                                         1.do({
2498                                                 ~l5a.set(\vol, ~vol5);  ~l5b.set(\vol, ~vol5);
2499                                                 ~l5c.set(\vol, ~vol5);  ~l5d.set(\vol, ~vol5);
2500                                                 ~l5e.set(\vol, ~vol5);  ~l5f.set(\vol, ~vol5);
2501
2502                                         }););
2503                         });
2504                 };
2505         });
2506         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;
2507                 case
2508                 {~l1a1.isRunning == true}{
2509                         if(button.value == 0, {
2510                                 (~vol6 = ~vol;
2511                                         1.do({
2512                                                 ~l6a1.set(\vol, ~vol6);  ~l6b1.set(\vol, ~vol6);
2513                                                 ~l6c1.set(\vol, ~vol6);  ~l6d1.set(\vol, ~vol6);
2514                                                 ~l6e1.set(\vol, ~vol6);  ~l6f1.set(\vol, ~vol6);
2515
2516                                 }););
2517                                 }, {(~vol6 = 0;
2518                                         1.do({
2519                                                 ~l6a1.set(\vol, ~vol6);  ~l6b1.set(\vol, ~vol6);
2520                                                 ~l6c1.set(\vol, ~vol6);  ~l6d1.set(\vol, ~vol6);
2521                                                 ~l6e1.set(\vol, ~vol6);  ~l6f1.set(\vol, ~vol6);
2522
2523                                         }););
2524                         });
2525                 }
2526                 {~l1a.isRunning == true}{
2527                         if(button.value == 0, {
2528                                 (~vol6 = ~vol;
2529                                         1.do({
2530                                                 ~l6a.set(\vol, ~vol6);  ~l6b.set(\vol, ~vol6);
2531                                                 ~l6c.set(\vol, ~vol6);  ~l6d.set(\vol, ~vol6);
2532                                                 ~l6e.set(\vol, ~vol6);  ~l6f.set(\vol, ~vol6);
2533
2534                                 }););
2535                                 }, {(~vol6 = 0;
2536                                         1.do({
2537                                                 ~l6a.set(\vol, ~vol6);  ~l6b.set(\vol, ~vol6);
2538                                                 ~l6c.set(\vol, ~vol6);  ~l6d.set(\vol, ~vol6);
2539                                                 ~l6e.set(\vol, ~vol6);  ~l6f.set(\vol, ~vol6);
2540
2541                                         }););
2542                         });
2543                 };
2544
2545         });
2546         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;
2547                 case
2548                 {~l1a1.isRunning == true}{
2549                         if(button.value == 0, {
2550                                 (~vol7 = ~vol;
2551                                         1.do({
2552                                                 ~l7a1.set(\vol, ~vol7);  ~l7b1.set(\vol, ~vol7);
2553                                                 ~l7c1.set(\vol, ~vol7);  ~l7d1.set(\vol, ~vol7);
2554                                                 ~l7e1.set(\vol, ~vol7);  ~l7f1.set(\vol, ~vol7);
2555
2556                                 }););
2557                                 }, {(~vol7 = 0;
2558                                         1.do({
2559                                                 ~l7a1.set(\vol, ~vol7);  ~l7b1.set(\vol, ~vol7);
2560                                                 ~l7c1.set(\vol, ~vol7);  ~l7d1.set(\vol, ~vol7);
2561                                                 ~l7e1.set(\vol, ~vol7);  ~l7f1.set(\vol, ~vol7);
2562
2563                                         }););
2564                         });
2565                 }
2566                 {~l1a.isRunning == true}{
2567                         if(button.value == 0, {
2568                                 (~vol7 = ~vol;
2569                                         1.do({
2570                                                 ~l7a.set(\vol, ~vol7);  ~l7b.set(\vol, ~vol7);
2571                                                 ~l7c.set(\vol, ~vol7);  ~l7d.set(\vol, ~vol7);
2572                                                 ~l7e.set(\vol, ~vol7);  ~l7f.set(\vol, ~vol7);
2573
2574                                 }););
2575                                 }, {(~vol7 = 0;
2576                                         1.do({
2577                                                 ~l7a.set(\vol, ~vol7);  ~l7b.set(\vol, ~vol7);
2578                                                 ~l7c.set(\vol, ~vol7);  ~l7d.set(\vol, ~vol7);
2579                                                 ~l7e.set(\vol, ~vol7);  ~l7f.set(\vol, ~vol7);
2580
2581                                         }););
2582                         });
2583                 };
2584         });
2585         mute8 = Button.new(w,Rect(~bpl+(16*8),~bpt+69+5,16,16/1.6180339887499)).states_([["8",Color.white,Color.black],["",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
2586                 case
2587                 {~l1a1.isRunning == true}{
2588                         if(button.value == 0, {
2589                                 (~vol8 = ~vol;
2590                                         1.do({
2591                                                 ~l8a1.set(\vol, ~vol8);  ~l8b1.set(\vol, ~vol8);
2592                                                 ~l8c1.set(\vol, ~vol8);  ~l8d1.set(\vol, ~vol8);
2593                                                 ~l8e1.set(\vol, ~vol8);  ~l8f1.set(\vol, ~vol8);
2594
2595                                 }););
2596                                 }, {(~vol8 = 0;
2597                                         1.do({
2598                                                 ~l8a1.set(\vol, ~vol8);  ~l8b1.set(\vol, ~vol8);
2599                                                 ~l8c1.set(\vol, ~vol8);  ~l8d1.set(\vol, ~vol8);
2600                                                 ~l8e1.set(\vol, ~vol8);  ~l8f1.set(\vol, ~vol8);
2601
2602                                         }););
2603                         });
2604                 }
2605                 {~l1a.isRunning == true}{
2606                         if(button.value == 0, {
2607                                 (~vol8 = ~vol;
2608                                         1.do({
2609                                                 ~l8a.set(\vol, ~vol8);  ~l8b.set(\vol, ~vol8);
2610                                                 ~l8c.set(\vol, ~vol8);  ~l8d.set(\vol, ~vol8);
2611                                                 ~l8e.set(\vol, ~vol8);  ~l8f.set(\vol, ~vol8);
2612
2613                                 }););
2614                                 }, {(~vol8 = 0;
2615                                         1.do({
2616                                                 ~l8a.set(\vol, ~vol8);  ~l8b.set(\vol, ~vol8);
2617                                                 ~l8c.set(\vol, ~vol8);  ~l8d.set(\vol, ~vol8);
2618                                                 ~l8e.set(\vol, ~vol8);  ~l8f.set(\vol, ~vol8);
2619
2620                                         }););
2621                         });
2622                 };
2623         });
2624
2625
2626         //mute/unmute all button
2627
2628         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;
2629
2630                 if(button.value == 0, {
2631                         mute1.value = 0;
2632                         mute2.value = 0;
2633                         mute3.value = 0;
2634                         mute4.value = 0;
2635                         mute5.value = 0;
2636                         mute6.value = 0;
2637                         mute7.value = 0;
2638                         mute8.value = 0;
2639
2640                         ~vol1 = ~vol;
2641                         ~vol2 = ~vol;
2642                         ~vol3 = ~vol;
2643                         ~vol4 = ~vol;
2644                         ~vol5 = ~vol;
2645                         ~vol6 = ~vol;
2646                         ~vol7 = ~vol;
2647                         ~vol8 = ~vol;
2648
2649                         },
2650                         {
2651                                 mute1.value = 1;
2652                                 mute2.value = 1;
2653                                 mute3.value = 1;
2654                                 mute4.value = 1;
2655                                 mute5.value = 1;
2656                                 mute6.value = 1;
2657                                 mute7.value = 1;
2658                                 mute8.value = 1;
2659
2660                                 ~vol1 = 0;
2661                                 ~vol2 = 0;
2662                                 ~vol3 = 0;
2663                                 ~vol4 = 0;
2664                                 ~vol5 = 0;
2665                                 ~vol6 = 0;
2666                                 ~vol7 = 0;
2667                                 ~vol8 = 0;
2668
2669                 });
2670                 ~synthflow.value;
2671         });
2672
2673
2674         //generate values for KW(King Wen) sequences per timewave instance pop-up menu
2675
2676         x=0;
2677         ~menu2values = Array.fill(20, {(x=x+1).asString++" kws/inst"});
2678
2679
2680         //KW(King Wen) sequences per timewave instance upon starting value
2681
2682         case
2683         {~gsinenum == nil}{~menu2start = ~menu2values.at(~synthdefnum-1)}
2684         {~gsinenum == 1}{~menu2start = ~menu2values.at(0)}
2685         {~gsinenum == 2}{~menu2start = ~menu2values.at(1)}
2686         {~gsinenum == 3}{~menu2start = ~menu2values.at(2)}
2687         {~gsinenum == 4}{~menu2start = ~menu2values.at(3)}
2688         {~gsinenum == 5}{~menu2start = ~menu2values.at(4)}
2689         {~gsinenum == 6}{~menu2start = ~menu2values.at(5)}
2690         {~gsinenum == 7}{~menu2start = ~menu2values.at(6)}
2691         {~gsinenum == 8}{~menu2start = ~menu2values.at(7)}
2692         {~gsinenum == 9}{~menu2start = ~menu2values.at(8)}
2693         {~gsinenum == 10}{~menu2start = ~menu2values.at(9)}
2694         {~gsinenum == 11}{~menu2start = ~menu2values.at(10)}
2695         {~gsinenum == 12}{~menu2start = ~menu2values.at(11)}
2696         {~gsinenum == 13}{~menu2start = ~menu2values.at(12)}
2697         {~gsinenum == 14}{~menu2start = ~menu2values.at(13)}
2698         {~gsinenum == 15}{~menu2start = ~menu2values.at(14)}
2699         {~gsinenum == 16}{~menu2start = ~menu2values.at(15)};
2700         if(~menu2synthdefstart.value == nil, {~menu2synthdefstart = ~synthdefnum}, {~menu2synthdefstart = ~gsinenum});
2701
2702
2703         //KW(King Wen) sequences per timewave instance pop-up menu
2704
2705         menu2=PopUpMenu(w,Rect(20+60*2+16,Window.screenBounds.height-52+(30/1.6180339887499*0),60*2,60/1.6180339887499)).items_(~mvalue = (-1); [~menu2start.asString]++Array.fill(16, {~menu2values.at(~mvalue = ~mvalue+1);});).background_(Color.black).stringColor_(Color.white);
2706
2707
2708         //pop-menu for base frequency
2709
2710         ~bfreqstart = ~basefreq;
2711         ~bfreq = PopUpMenu(w, Rect(20+60*2+16,Window.screenBounds.height-88+(30/1.6180339887499*0),120,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;});
2712
2713
2714         //set button for KW sequences per timewave instance, basefreq, and gsine
2715
2716         set1=Button(w,Rect(20+60*2+16+120, Window.screenBounds.height-52+(16/1.6180339887499*0),60,60/1.6180339887499)).states_([["set",Color.white,Color.black]]).mouseDownAction_({
2717
2718                 ~st = StaticText(w, Rect(20+60*2+16+190,Window.screenBounds.height-40, 62, 20)).background_(Color.black);
2719                 ~st.stringColor = Color.white;
2720                 ~st.string = "loading...";
2721                 AppClock.sched(0.2,{
2722                         ~st.close;
2723                 });
2724
2725                 AppClock.sched(0,{
2726
2727                         if(~bfreq.value > 0, {~basefreq = ~freqmap.at(~bfreq.value - 1)}, {~basefreq = ~bfreqstart});
2728
2729                         (#a,b,c,d,e,f = [ ~basefreq,~basefreq,~basefreq,~basefreq,~basefreq,~basefreq  ]; ~a = a; ~b = b; ~c =c; ~d = d; ~e = e;~f=f;);
2730
2731                         case
2732                         {menu2.value == 0}{~gsinenum = ~menu2synthdefstart; ~gsine.value;}
2733                         {menu2.value == 1}{~gsinenum = 1; ~gsine.value;}
2734                         {menu2.value == 2}{~gsinenum = 2; ~gsine.value;}
2735                         {menu2.value == 3}{~gsinenum = 3; ~gsine.value;}
2736                         {menu2.value == 4}{~gsinenum = 4; ~gsine.value;}
2737                         {menu2.value == 5}{~gsinenum = 5; ~gsine.value;}
2738                         {menu2.value == 6}{~gsinenum = 6; ~gsine.value;}
2739                         {menu2.value == 7}{~gsinenum = 7; ~gsine.value;}
2740                         {menu2.value == 8}{~gsinenum = 8; ~gsine.value;}
2741                         {menu2.value == 9}{~gsinenum = 9; ~gsine.value;}
2742                         {menu2.value == 10}{~gsinenum = 10; ~gsine.value;}
2743                         {menu2.value == 11}{~gsinenum = 11; ~gsine.value;}
2744                         {menu2.value == 12}{~gsinenum = 12; ~gsine.value;}
2745                         {menu2.value == 13}{~gsinenum = 13; ~gsine.value;}
2746                         {menu2.value == 14}{~gsinenum = 14; ~gsine.value;}
2747                         {menu2.value == 15}{~gsinenum = 15; ~gsine.value;}
2748                         {menu2.value == 16}{~gsinenum = 16; ~gsine.value;};
2749                 });
2750
2751         })
2752         .action_({
2753         });
2754
2755
2756         //midi Korg NanoKontrol function
2757
2758         ~midifunc = {
2759                 ~snb = 0;
2760                 /*~etemp = EqualTemperament(12, calibratefreq: 432, calibratenote: 69);*/
2761
2762
2763                 //midi set frequency
2764
2765                 MIDIFunc.cc({if(~snb == 0, {~snb = 1},{~snb = 0});}, ccNum: 60);
2766                 MIDIdef.cc('l1', { |val|
2767                         case
2768                         {~l1a.isRunning == true}{
2769                                 ~l1a.set(\dur, ~f1 = \dur.asSpec.map(val / 127));
2770                                 ~l1b.set(\dur,      \dur.asSpec.map(val / 127));
2771                                 ~l1c.set(\dur,      \dur.asSpec.map(val / 127)/~icd3);
2772                                 ~l1d.set(\dur,      \dur.asSpec.map(val / 127)/~icd3);
2773                                 ~l1e.set(\dur,      \dur.asSpec.map(val / 127)/~icd6);
2774                                 ~l1f.set(\dur,      \dur.asSpec.map(val / 127)/~icd6);
2775                         }{~l1a1.isRunning == true}{
2776                                 ~l1a1.set(\dur, ~f1 = \dur.asSpec.map(val / 127));
2777                                 ~l1b1.set(\dur,      \dur.asSpec.map(val / 127));
2778                                 ~l1c1.set(\dur,      \dur.asSpec.map(val / 127)/~icd3);
2779                                 ~l1d1.set(\dur,      \dur.asSpec.map(val / 127)/~icd3);
2780                                 ~l1e1.set(\dur,      \dur.asSpec.map(val / 127)/~icd6);
2781                                 ~l1f1.set(\dur,      \dur.asSpec.map(val / 127)/~icd6);
2782                         };
2783                         ~tunefreq1 = ~f1; ~f1 = ~f1+~f1t;
2784                         {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;);});
2785                         }.defer;
2786                 }, ccNum: [0]);
2787                 MIDIdef.cc('l2', { |val|
2788                         case
2789                         {~l1a.isRunning == true}{
2790                                 ~l2a.set(\dur, ~f2 = \dur.asSpec.map(val / 127));
2791                                 ~l2b.set(\dur,      \dur.asSpec.map(val / 127));
2792                                 ~l2c.set(\dur,      \dur.asSpec.map(val / 127)/~icd3);
2793                                 ~l2d.set(\dur,      \dur.asSpec.map(val / 127)/~icd3);
2794                                 ~l2e.set(\dur,      \dur.asSpec.map(val / 127)/~icd6);
2795                                 ~l2f.set(\dur,      \dur.asSpec.map(val / 127)/~icd6);
2796                         }{~l1a1.isRunning == true}{
2797                                 ~l2a1.set(\dur, ~f2 = \dur.asSpec.map(val / 127));
2798                                 ~l2b1.set(\dur,      \dur.asSpec.map(val / 127));
2799                                 ~l2c1.set(\dur,      \dur.asSpec.map(val / 127)/~icd3);
2800                                 ~l2d1.set(\dur,      \dur.asSpec.map(val / 127)/~icd3);
2801                                 ~l2e1.set(\dur,      \dur.asSpec.map(val / 127)/~icd6);
2802                                 ~l2f1.set(\dur,      \dur.asSpec.map(val / 127)/~icd6);
2803                         };
2804                         ~tunefreq2 = ~f2; ~f2 = ~f2+~f2t;
2805                         {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;);});
2806                         }.defer;
2807                 }, ccNum: [1]);
2808                 MIDIdef.cc('l3', { |val|
2809                         case
2810                         {~l1a.isRunning == true}{
2811                                 ~l3a.set(\dur, ~f3 = \dur.asSpec.map(val / 127));
2812                                 ~l3b.set(\dur,      \dur.asSpec.map(val / 127));
2813                                 ~l3c.set(\dur,      \dur.asSpec.map(val / 127)/~icd3);
2814                                 ~l3d.set(\dur,      \dur.asSpec.map(val / 127)/~icd3);
2815                                 ~l3e.set(\dur,      \dur.asSpec.map(val / 127)/~icd6);
2816                                 ~l3f.set(\dur,      \dur.asSpec.map(val / 127)/~icd6);
2817                         }{~l1a1.isRunning == true}{
2818                                 ~l3a1.set(\dur, ~f3 = \dur.asSpec.map(val / 127));
2819                                 ~l3b1.set(\dur,      \dur.asSpec.map(val / 127));
2820                                 ~l3c1.set(\dur,      \dur.asSpec.map(val / 127)/~icd3);
2821                                 ~l3d1.set(\dur,      \dur.asSpec.map(val / 127)/~icd3);
2822                                 ~l3e1.set(\dur,      \dur.asSpec.map(val / 127)/~icd6);
2823                                 ~l3f1.set(\dur,      \dur.asSpec.map(val / 127)/~icd6);
2824                         };
2825                         ~tunefreq3 = ~f3; ~f3 = ~f3+~f3t;
2826                         {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;);});
2827                         }.defer;
2828                 }, ccNum: 2);
2829                 MIDIdef.cc('l4', { |val|
2830                         case
2831                         {~l1a.isRunning == true}{
2832                                 ~l4a.set(\dur, ~f4 = \dur.asSpec.map(val / 127));
2833                                 ~l4b.set(\dur,      \dur.asSpec.map(val / 127));
2834                                 ~l4c.set(\dur,      \dur.asSpec.map(val / 127)/~icd3);
2835                                 ~l4d.set(\dur,      \dur.asSpec.map(val / 127)/~icd3);
2836                                 ~l4e.set(\dur,      \dur.asSpec.map(val / 127)/~icd6);
2837                                 ~l4f.set(\dur,      \dur.asSpec.map(val / 127)/~icd6);
2838                         }{~l1a1.isRunning == true}{
2839                                 ~l4a1.set(\dur, ~f4 = \dur.asSpec.map(val / 127));
2840                                 ~l4b1.set(\dur,      \dur.asSpec.map(val / 127));
2841                                 ~l4c1.set(\dur,      \dur.asSpec.map(val / 127)/~icd3);
2842                                 ~l4d1.set(\dur,      \dur.asSpec.map(val / 127)/~icd3);
2843                                 ~l4e1.set(\dur,      \dur.asSpec.map(val / 127)/~icd6);
2844                                 ~l4f1.set(\dur,      \dur.asSpec.map(val / 127)/~icd6);
2845                         };
2846                         ~tunefreq4 = ~f4; ~f4 = ~f4+~f4t;
2847                         {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;);});
2848                         }.defer;
2849                 }, ccNum: 3);
2850                 MIDIdef.cc('l5', { |val|
2851                         case
2852                         {~l1a.isRunning == true}{
2853                                 ~l5a.set(\dur, ~f5 = \dur.asSpec.map(val / 127));
2854                                 ~l5b.set(\dur,      \dur.asSpec.map(val / 127));
2855                                 ~l5c.set(\dur,      \dur.asSpec.map(val / 127)/~icd3);
2856                                 ~l5d.set(\dur,      \dur.asSpec.map(val / 127)/~icd3);
2857                                 ~l5e.set(\dur,      \dur.asSpec.map(val / 127)/~icd6);
2858                                 ~l5f.set(\dur,      \dur.asSpec.map(val / 127)/~icd6);
2859                         }{~l1a1.isRunning == true}{
2860                                 ~l5a1.set(\dur, ~f5 = \dur.asSpec.map(val / 127));
2861                                 ~l5b1.set(\dur,      \dur.asSpec.map(val / 127));
2862                                 ~l5c1.set(\dur,      \dur.asSpec.map(val / 127)/~icd3);
2863                                 ~l5d1.set(\dur,      \dur.asSpec.map(val / 127)/~icd3);
2864                                 ~l5e1.set(\dur,      \dur.asSpec.map(val / 127)/~icd6);
2865                                 ~l5f1.set(\dur,      \dur.asSpec.map(val / 127)/~icd6);
2866                         };
2867                         ~tunefreq5 = ~f5; ~f5 = ~f5+~f5t;
2868                         {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;);});
2869                         }.defer;
2870                 }, ccNum: 4);
2871                 MIDIdef.cc('l6', { |val|
2872                         case
2873                         {~l1a.isRunning == true}{
2874                                 ~l6a.set(\dur, ~f6 = \dur.asSpec.map(val / 127));
2875                                 ~l6b.set(\dur,      \dur.asSpec.map(val / 127));
2876                                 ~l6c.set(\dur,      \dur.asSpec.map(val / 127)/~icd3);
2877                                 ~l6d.set(\dur,      \dur.asSpec.map(val / 127)/~icd3);
2878                                 ~l6e.set(\dur,      \dur.asSpec.map(val / 127)/~icd6);
2879                                 ~l6f.set(\dur,      \dur.asSpec.map(val / 127)/~icd6);
2880                         }{~l1a1.isRunning == true}{
2881                                 ~l6a1.set(\dur, ~f6 = \dur.asSpec.map(val / 127));
2882                                 ~l6b1.set(\dur,      \dur.asSpec.map(val / 127));
2883                                 ~l6c1.set(\dur,      \dur.asSpec.map(val / 127)/~icd3);
2884                                 ~l6d1.set(\dur,      \dur.asSpec.map(val / 127)/~icd3);
2885                                 ~l6e1.set(\dur,      \dur.asSpec.map(val / 127)/~icd6);
2886                                 ~l6f1.set(\dur,      \dur.asSpec.map(val / 127)/~icd6);
2887                         };
2888                         ~tunefreq6 = ~f6; ~f6 = ~f6+~f6t;
2889                         {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;);});
2890                         }.defer;
2891                 }, ccNum: 5);
2892                 MIDIdef.cc('l7', { |val|
2893                         case
2894                         {~l1a.isRunning == true}{
2895                                 ~l7a.set(\dur, ~f7 = \dur.asSpec.map(val / 127));
2896                                 ~l7b.set(\dur,      \dur.asSpec.map(val / 127));
2897                                 ~l7c.set(\dur,      \dur.asSpec.map(val / 127)/~icd3);
2898                                 ~l7d.set(\dur,      \dur.asSpec.map(val / 127)/~icd3);
2899                                 ~l7e.set(\dur,      \dur.asSpec.map(val / 127)/~icd6);
2900                                 ~l7f.set(\dur,      \dur.asSpec.map(val / 127)/~icd6);
2901                         }{~l1a1.isRunning == true}{
2902                                 ~l7a1.set(\dur, ~f7 = \dur.asSpec.map(val / 127));
2903                                 ~l7b1.set(\dur,      \dur.asSpec.map(val / 127));
2904                                 ~l7c1.set(\dur,      \dur.asSpec.map(val / 127)/~icd3);
2905                                 ~l7d1.set(\dur,      \dur.asSpec.map(val / 127)/~icd3);
2906                                 ~l7e1.set(\dur,      \dur.asSpec.map(val / 127)/~icd6);
2907                                 ~l7f1.set(\dur,      \dur.asSpec.map(val / 127)/~icd6);
2908                         };
2909                         ~tunefreq7 = ~f7; ~f7 = ~f7+~f7t;
2910                         {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;);});
2911                         }.defer;
2912                 }, ccNum: 6);
2913                 MIDIdef.cc('l8', { |val|
2914                         case
2915                         {~l1a.isRunning == true}{
2916                                 ~l8a.set(\dur, ~f8 = \dur.asSpec.map(val / 127));
2917                                 ~l8b.set(\dur,      \dur.asSpec.map(val / 127));
2918                                 ~l8c.set(\dur,      \dur.asSpec.map(val / 127)/~icd3);
2919                                 ~l8d.set(\dur,      \dur.asSpec.map(val / 127)/~icd3);
2920                                 ~l8e.set(\dur,      \dur.asSpec.map(val / 127)/~icd6);
2921                                 ~l8f.set(\dur,      \dur.asSpec.map(val / 127)/~icd6);
2922                         }{~l1a1.isRunning == true}{
2923                                 ~l8a1.set(\dur, ~f8 = \dur.asSpec.map(val / 127));
2924                                 ~l8b1.set(\dur,      \dur.asSpec.map(val / 127));
2925                                 ~l8c1.set(\dur,      \dur.asSpec.map(val / 127)/~icd3);
2926                                 ~l8d1.set(\dur,      \dur.asSpec.map(val / 127)/~icd3);
2927                                 ~l8e1.set(\dur,      \dur.asSpec.map(val / 127)/~icd6);
2928                                 ~l8f1.set(\dur,      \dur.asSpec.map(val / 127)/~icd6);
2929                         };
2930                         ~tunefreq8 = ~f8; ~f8 = ~f8+~f8t;
2931                         {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;);});
2932                         }.defer;
2933                 }, ccNum: 7);
2934
2935
2936                 //if midi tuning frequency values are nil
2937
2938                 if(~f1t == nil, {~f1t = 0});
2939                 if(~f2t == nil, {~f2t = 0});
2940                 if(~f3t == nil, {~f3t = 0});
2941                 if(~f4t == nil, {~f4t = 0});
2942                 if(~f5t == nil, {~f5t = 0});
2943                 if(~f6t == nil, {~f6t = 0});
2944                 if(~f7t == nil, {~f7t = 0});
2945                 if(~f8t == nil, {~f8t = 0});
2946
2947
2948                 //midi set tuning frequency
2949
2950                 MIDIFunc.cc({|val|
2951                         ~f1 = ~f1-~f1t;
2952                         Spec.add(\tune, ([0, ~tunefreq1*~stepratio-~tunefreq1, \lin]));
2953                         case
2954                         {~l1a.isRunning == true}{
2955                                 ~l1a.set(\tune, ~f1t = \tune.asSpec.map(val / 127));
2956                                 ~l1b.set(\tune,      \tune.asSpec.map(val / 127));
2957                                 ~l1c.set(\tune,      \tune.asSpec.map(val / 127)/~icd3);
2958                                 ~l1d.set(\tune,      \tune.asSpec.map(val / 127)/~icd3);
2959                                 ~l1e.set(\tune,      \tune.asSpec.map(val / 127)/~icd6);
2960                                 ~l1f.set(\tune,      \tune.asSpec.map(val / 127)/~icd6);
2961                         }{~l1a1.isRunning == true}{
2962                                 ~l1a1.set(\tune, ~f1t = \tune.asSpec.map(val / 127));
2963                                 ~l1b1.set(\tune,      \tune.asSpec.map(val / 127));
2964                                 ~l1c1.set(\tune,      \tune.asSpec.map(val / 127)/~icd3);
2965                                 ~l1d1.set(\tune,      \tune.asSpec.map(val / 127)/~icd3);
2966                                 ~l1e1.set(\tune,      \tune.asSpec.map(val / 127)/~icd6);
2967                                 ~l1f1.set(\tune,      \tune.asSpec.map(val / 127)/~icd6);
2968                         };
2969                         ~f1 = ~f1+~f1t;
2970                         {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;);});
2971                         }.defer;
2972                 }, ccNum: 16);
2973                 MIDIFunc.cc({|val|
2974                         ~f2 = ~f2-~f2t;
2975                         Spec.add(\tune, ([0, ~tunefreq2*~stepratio-~tunefreq2, \lin]));
2976                         case
2977                         {~l1a.isRunning == true}{
2978                                 ~l2a.set(\tune, ~f2t = \tune.asSpec.map(val / 127));
2979                                 ~l2b.set(\tune,      \tune.asSpec.map(val / 127));
2980                                 ~l2c.set(\tune,      \tune.asSpec.map(val / 127)/~icd3);
2981                                 ~l2d.set(\tune,      \tune.asSpec.map(val / 127)/~icd3);
2982                                 ~l2e.set(\tune,      \tune.asSpec.map(val / 127)/~icd6);
2983                                 ~l2f.set(\tune,      \tune.asSpec.map(val / 127)/~icd6);
2984                         }{~l1a1.isRunning == true}{
2985                                 ~l2a1.set(\tune, ~f2t = \tune.asSpec.map(val / 127));
2986                                 ~l2b1.set(\tune,      \tune.asSpec.map(val / 127));
2987                                 ~l2c1.set(\tune,      \tune.asSpec.map(val / 127)/~icd3);
2988                                 ~l2d1.set(\tune,      \tune.asSpec.map(val / 127)/~icd3);
2989                                 ~l2e1.set(\tune,      \tune.asSpec.map(val / 127)/~icd6);
2990                                 ~l2f1.set(\tune,      \tune.asSpec.map(val / 127)/~icd6);
2991                         };
2992                         ~f2 = ~f2+~f2t;
2993                         {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;);});
2994                         }.defer;
2995                 }, ccNum: 17);
2996                 MIDIFunc.cc({|val|
2997                         ~f3 = ~f3-~f3t;
2998                         Spec.add(\tune, ([0, ~tunefreq3*~stepratio-~tunefreq3, \lin]));
2999                         case
3000                         {~l1a.isRunning == true}{
3001                                 ~l3a.set(\tune, ~f3t = \tune.asSpec.map(val / 127));
3002                                 ~l3b.set(\tune,      \tune.asSpec.map(val / 127));
3003                                 ~l3c.set(\tune,      \tune.asSpec.map(val / 127)/~icd3);
3004                                 ~l3d.set(\tune,      \tune.asSpec.map(val / 127)/~icd3);
3005                                 ~l3e.set(\tune,      \tune.asSpec.map(val / 127)/~icd6);
3006                                 ~l3f.set(\tune,      \tune.asSpec.map(val / 127)/~icd6);
3007                         }{~l1a1.isRunning == true}{
3008                                 ~l3a1.set(\tune, ~f3t = \tune.asSpec.map(val / 127));
3009                                 ~l3b1.set(\tune,      \tune.asSpec.map(val / 127));
3010                                 ~l3c1.set(\tune,      \tune.asSpec.map(val / 127)/~icd3);
3011                                 ~l3d1.set(\tune,      \tune.asSpec.map(val / 127)/~icd3);
3012                                 ~l3e1.set(\tune,      \tune.asSpec.map(val / 127)/~icd6);
3013                                 ~l3f1.set(\tune,      \tune.asSpec.map(val / 127)/~icd6);
3014                         };
3015                         ~f3 = ~f3+~f3t;
3016                         {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;);});
3017                         }.defer;
3018                 }, ccNum: 18);
3019                 MIDIFunc.cc({|val|
3020                         ~f4 = ~f4-~f4t;
3021                         Spec.add(\tune, ([0, ~tunefreq4*~stepratio-~tunefreq4, \lin]));
3022                         case
3023                         {~l1a.isRunning == true}{
3024                                 ~l4a.set(\tune, ~f4t = \tune.asSpec.map(val / 127));
3025                                 ~l4b.set(\tune,      \tune.asSpec.map(val / 127));
3026                                 ~l4c.set(\tune,      \tune.asSpec.map(val / 127)/~icd3);
3027                                 ~l4d.set(\tune,      \tune.asSpec.map(val / 127)/~icd3);
3028                                 ~l4e.set(\tune,      \tune.asSpec.map(val / 127)/~icd6);
3029                                 ~l4f.set(\tune,      \tune.asSpec.map(val / 127)/~icd6);
3030                         }{~l1a1.isRunning == true}{
3031                                 ~l4a1.set(\tune, ~f4t = \tune.asSpec.map(val / 127));
3032                                 ~l4b1.set(\tune,      \tune.asSpec.map(val / 127));
3033                                 ~l4c1.set(\tune,      \tune.asSpec.map(val / 127)/~icd3);
3034                                 ~l4d1.set(\tune,      \tune.asSpec.map(val / 127)/~icd3);
3035                                 ~l4e1.set(\tune,      \tune.asSpec.map(val / 127)/~icd6);
3036                                 ~l4f1.set(\tune,      \tune.asSpec.map(val / 127)/~icd6);
3037                         };
3038                         ~f4 = ~f4+~f4t;
3039                         {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;);});
3040                         }.defer;
3041                 }, ccNum: 19);
3042                 MIDIFunc.cc({|val|
3043                         ~f5 = ~f5-~f5t;
3044                         Spec.add(\tune, ([0, ~tunefreq5*~stepratio-~tunefreq5, \lin]));
3045                         case
3046                         {~l1a.isRunning == true}{
3047                                 ~l5a.set(\tune, ~f5t = \tune.asSpec.map(val / 127));
3048                                 ~l5b.set(\tune,      \tune.asSpec.map(val / 127));
3049                                 ~l5c.set(\tune,      \tune.asSpec.map(val / 127)/~icd3);
3050                                 ~l5d.set(\tune,      \tune.asSpec.map(val / 127)/~icd3);
3051                                 ~l5e.set(\tune,      \tune.asSpec.map(val / 127)/~icd6);
3052                                 ~l5f.set(\tune,      \tune.asSpec.map(val / 127)/~icd6);
3053                         }{~l1a1.isRunning == true}{
3054                                 ~l5a1.set(\tune, ~f5t = \tune.asSpec.map(val / 127));
3055                                 ~l5b1.set(\tune,      \tune.asSpec.map(val / 127));
3056                                 ~l5c1.set(\tune,      \tune.asSpec.map(val / 127)/~icd3);
3057                                 ~l5d1.set(\tune,      \tune.asSpec.map(val / 127)/~icd3);
3058                                 ~l5e1.set(\tune,      \tune.asSpec.map(val / 127)/~icd6);
3059                                 ~l5f1.set(\tune,      \tune.asSpec.map(val / 127)/~icd6);
3060                         };
3061                         ~f5 = ~f5+~f5t;
3062                         {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;);});
3063                         }.defer;
3064                 }, ccNum: 20);
3065                 MIDIFunc.cc({|val|
3066                         ~f6 = ~f6-~f6t;
3067                         Spec.add(\tune, ([0, ~tunefreq6*~stepratio-~tunefreq6, \lin]));
3068                         case
3069                         {~l1a.isRunning == true}{
3070                                 ~l6a.set(\tune, ~f6t = \tune.asSpec.map(val / 127));
3071                                 ~l6b.set(\tune,      \tune.asSpec.map(val / 127));
3072                                 ~l6c.set(\tune,      \tune.asSpec.map(val / 127)/~icd3);
3073                                 ~l6d.set(\tune,      \tune.asSpec.map(val / 127)/~icd3);
3074                                 ~l6e.set(\tune,      \tune.asSpec.map(val / 127)/~icd6);
3075                                 ~l6f.set(\tune,      \tune.asSpec.map(val / 127)/~icd6);
3076                         }{~l1a1.isRunning == true}{
3077                                 ~l6a1.set(\tune, ~f6t = \tune.asSpec.map(val / 127));
3078                                 ~l6b1.set(\tune,      \tune.asSpec.map(val / 127));
3079                                 ~l6c1.set(\tune,      \tune.asSpec.map(val / 127)/~icd3);
3080                                 ~l6d1.set(\tune,      \tune.asSpec.map(val / 127)/~icd3);
3081                                 ~l6e1.set(\tune,      \tune.asSpec.map(val / 127)/~icd6);
3082                                 ~l6f1.set(\tune,      \tune.asSpec.map(val / 127)/~icd6);
3083                         };
3084                         ~f6 = ~f6+~f6t;
3085                         {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;);});
3086                         }.defer;
3087                 }, ccNum: 21);
3088                 MIDIFunc.cc({|val|
3089                         ~f7 = ~f7-~f7t;
3090                         Spec.add(\tune, ([0, ~tunefreq7*~stepratio-~tunefreq7, \lin]));
3091                         case
3092                         {~l1a.isRunning == true}{
3093                                 ~l7a.set(\tune, ~f7t = \tune.asSpec.map(val / 127));
3094                                 ~l7b.set(\tune,      \tune.asSpec.map(val / 127));
3095                                 ~l7c.set(\tune,      \tune.asSpec.map(val / 127)/~icd3);
3096                                 ~l7d.set(\tune,      \tune.asSpec.map(val / 127)/~icd3);
3097                                 ~l7e.set(\tune,      \tune.asSpec.map(val / 127)/~icd6);
3098                                 ~l7f.set(\tune,      \tune.asSpec.map(val / 127)/~icd6);
3099                         }{~l1a1.isRunning == true}{
3100                                 ~l7a1.set(\tune, ~f7t = \tune.asSpec.map(val / 127));
3101                                 ~l7b1.set(\tune,      \tune.asSpec.map(val / 127));
3102                                 ~l7c1.set(\tune,      \tune.asSpec.map(val / 127)/~icd3);
3103                                 ~l7d1.set(\tune,      \tune.asSpec.map(val / 127)/~icd3);
3104                                 ~l7e1.set(\tune,      \tune.asSpec.map(val / 127)/~icd6);
3105                                 ~l7f1.set(\tune,      \tune.asSpec.map(val / 127)/~icd6);
3106                         };
3107                         ~f7 = ~f7+~f7t;
3108                         {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;);});
3109                         }.defer;
3110                 }, ccNum: 22);
3111                 MIDIFunc.cc({|val|
3112                         ~f8 = ~f8-~f8t;
3113                         Spec.add(\tune, ([0, ~tunefreq8*~stepratio-~tunefreq8, \lin]));
3114                         case
3115                         {~l1a.isRunning == true}{
3116                                 ~l8a.set(\tune, ~f8t = \tune.asSpec.map(val / 127));
3117                                 ~l8b.set(\tune,      \tune.asSpec.map(val / 127));
3118                                 ~l8c.set(\tune,      \tune.asSpec.map(val / 127)/~icd3);
3119                                 ~l8d.set(\tune,      \tune.asSpec.map(val / 127)/~icd3);
3120                                 ~l8e.set(\tune,      \tune.asSpec.map(val / 127)/~icd6);
3121                                 ~l8f.set(\tune,      \tune.asSpec.map(val / 127)/~icd6);
3122                         }{~l1a1.isRunning == true}{
3123                                 ~l8a1.set(\tune, ~f7t = \tune.asSpec.map(val / 127));
3124                                 ~l8b1.set(\tune,      \tune.asSpec.map(val / 127));
3125                                 ~l8c1.set(\tune,      \tune.asSpec.map(val / 127)/~icd3);
3126                                 ~l8d1.set(\tune,      \tune.asSpec.map(val / 127)/~icd3);
3127                                 ~l8e1.set(\tune,      \tune.asSpec.map(val / 127)/~icd6);
3128                                 ~l8f1.set(\tune,      \tune.asSpec.map(val / 127)/~icd6);
3129                         };
3130                         ~f8 = ~f8+~f8t;
3131                         {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;);});
3132                         }.defer;
3133                 }, ccNum: 23);
3134
3135
3136                 //Korg NanoKontrol button assignments
3137
3138
3139                 //start/stop synth and pause/unpause synth buttons
3140
3141                 MIDIFunc.cc({|val| {case{b3.value == 0}{b3.valueAction = 1};}.defer;}, ccNum: 41);
3142                 MIDIFunc.cc({|val| {case{b3.value == 1}{b3.valueAction = 0};}.defer;}, ccNum: 42);
3143                 MIDIFunc.cc({|val| {case{b4.value == 0}{b4.valueAction = 1};}.defer;}, ccNum: 43);
3144                 MIDIFunc.cc({|val| {case{b4.value == 1}{b4.valueAction = 0};}.defer;}, ccNum: 44);
3145
3146
3147                 //open/flow/slide buttons (inactive)
3148
3149                 /*MIDIFunc.cc({|val| {~bplaceo1.valueAction=0}.defer;}, ccNum: 32);
3150                 MIDIFunc.cc({|val| {~bplaceo2.valueAction=0}.defer;}, ccNum: 33);
3151                 MIDIFunc.cc({|val| {~bplaceo3.valueAction=0}.defer;}, ccNum: 34);
3152                 MIDIFunc.cc({|val| {~bplaceo4.valueAction=0}.defer;}, ccNum: 35);
3153                 MIDIFunc.cc({|val| {~bplaceo5.valueAction=0}.defer;}, ccNum: 36);
3154                 MIDIFunc.cc({|val| {~bplaceo6.valueAction=0}.defer;}, ccNum: 37);
3155                 MIDIFunc.cc({|val| {~bplaceo7.valueAction=0}.defer;}, ccNum: 38);
3156                 MIDIFunc.cc({|val| {~bplaceo8.valueAction=0}.defer;}, ccNum: 39);
3157                 MIDIFunc.cc({|val| {~bplacef1.valueAction=0}.defer;}, ccNum: 48);
3158                 MIDIFunc.cc({|val| {~bplacef2.valueAction=0}.defer;}, ccNum: 49);
3159                 MIDIFunc.cc({|val| {~bplacef3.valueAction=0}.defer;}, ccNum: 50);
3160                 MIDIFunc.cc({|val| {~bplacef4.valueAction=0}.defer;}, ccNum: 51);
3161                 MIDIFunc.cc({|val| {~bplacef5.valueAction=0}.defer;}, ccNum: 52);
3162                 MIDIFunc.cc({|val| {~bplacef6.valueAction=0}.defer;}, ccNum: 53);
3163                 MIDIFunc.cc({|val| {~bplacef7.valueAction=0}.defer;}, ccNum: 54);
3164                 MIDIFunc.cc({|val| {~bplacef8.valueAction=0}.defer;}, ccNum: 55);
3165                 MIDIFunc.cc({|val| {~bplaces1.valueAction=0}.defer;}, ccNum: 64);
3166                 MIDIFunc.cc({|val| {~bplaces2.valueAction=0}.defer;}, ccNum: 65);
3167                 MIDIFunc.cc({|val| {~bplaces3.valueAction=0}.defer;}, ccNum: 66);
3168                 MIDIFunc.cc({|val| {~bplaces4.valueAction=0}.defer;}, ccNum: 67);
3169                 MIDIFunc.cc({|val| {~bplaces5.valueAction=0}.defer;}, ccNum: 68);
3170                 MIDIFunc.cc({|val| {~bplaces6.valueAction=0}.defer;}, ccNum: 69);
3171                 MIDIFunc.cc({|val| {~bplaces7.valueAction=0}.defer;}, ccNum: 70);
3172                 MIDIFunc.cc({|val| {~bplaces8.valueAction=0}.defer;}, ccNum: 71);
3173                 */
3174
3175
3176                 //mute/unmute buttons
3177
3178                 MIDIFunc.cc({|val| {mute1.valueAction = 1;}.defer;}, ccNum: 48);
3179                 MIDIFunc.cc({|val| {mute2.valueAction = 1;}.defer;}, ccNum: 49);
3180                 MIDIFunc.cc({|val| {mute3.valueAction = 1;}.defer;}, ccNum: 50);
3181                 MIDIFunc.cc({|val| {mute4.valueAction = 1;}.defer;}, ccNum: 51);
3182                 MIDIFunc.cc({|val| {mute5.valueAction = 1;}.defer;}, ccNum: 52);
3183                 MIDIFunc.cc({|val| {mute6.valueAction = 1;}.defer;}, ccNum: 53);
3184                 MIDIFunc.cc({|val| {mute7.valueAction = 1;}.defer;}, ccNum: 54);
3185                 MIDIFunc.cc({|val| {mute8.valueAction = 1;}.defer;}, ccNum: 55);
3186                 MIDIFunc.cc({|val| {mute1.valueAction = 1;mute2.valueAction = 1;mute3.valueAction = 1;mute4.valueAction = 1;mute5.valueAction = 1;mute6.valueAction = 1;mute7.valueAction = 1;mute8.valueAction = 1;}.defer;}, ccNum: 58);
3187                 MIDIFunc.cc({|val| {mute1.valueAction = 0;}.defer;}, ccNum: 32);
3188                 MIDIFunc.cc({|val| {mute2.valueAction = 0;}.defer;}, ccNum: 33);
3189                 MIDIFunc.cc({|val| {mute3.valueAction = 0;}.defer;}, ccNum: 34);
3190                 MIDIFunc.cc({|val| {mute4.valueAction = 0;}.defer;}, ccNum: 35);
3191                 MIDIFunc.cc({|val| {mute5.valueAction = 0;}.defer;}, ccNum: 36);
3192                 MIDIFunc.cc({|val| {mute6.valueAction = 0;}.defer;}, ccNum: 37);
3193                 MIDIFunc.cc({|val| {mute7.valueAction = 0;}.defer;}, ccNum: 38);
3194                 MIDIFunc.cc({|val| {mute8.valueAction = 0;}.defer;}, ccNum: 39);
3195                 MIDIFunc.cc({|val| {mute1.valueAction = 0;mute2.valueAction = 0;mute3.valueAction = 0;mute4.valueAction = 0;mute5.valueAction = 0;mute6.valueAction = 0;mute7.valueAction = 0;mute8.valueAction = 1;}.defer;}, ccNum: 59);
3196
3197                 /*MIDIFunc.cc({ |val| ([~a2,~b2,~c2,~d2,~e2,~f2]).postln;}, ccNum: [0]);*/
3198                 /*MIDIFunc.cc({ |val|~l1.set(\tune, 0);}, ccNum: [32]);*/
3199                 /*MIDIFunc.cc({ |val| ([(~w),(~x),(~y),(~z),(~u),(~v),~r,~s]).postln;}, ccNum: [64]);*/
3200                 /*~basefreq= 432.cpsmidi-69;*/
3201                 /*Spec.add(\dur, ~etemp.cps([0, 127, \exp]));*/
3202
3203                 Spec.add(\dur, ([~freqmap.at(0), ~freqmap.at(127), \exp]));
3204                 /*Spec.add(\tune, ([0, 128, \lin]));*/
3205         };
3206
3207
3208         //evaluate midi function
3209
3210         ~midifunc.value;
3211
3212
3213         //keyboard number buttons to choose synth
3214
3215         keycodeb = Button.new(w,Rect(Window.screenBounds.width-20-16,~bpt+160,16,16/1.6180339887499)).states_([
3216                 ["1",Color.white,Color.black],
3217                 ["2",Color.white,Color.black],
3218                 ["3",Color.white,Color.black],
3219                 ["4",Color.white,Color.black],
3220                 ["5",Color.white,Color.black],
3221                 ["6",Color.white,Color.black],
3222                 ["7",Color.white,Color.black],
3223                 ["8",Color.white,Color.black]]).action_({arg button;
3224
3225                 case
3226                 {button.value == 0}{
3227                         ~z25.background = Color.green; ~z1.background = Color.green;
3228                         ~z26.background = Color.white; ~z2.background = Color.white;
3229                         ~z27.background = Color.white; ~z3.background = Color.white;
3230                         ~z28.background = Color.white; ~z4.background = Color.white;
3231                         ~z29.background = Color.white; ~z5.background = Color.white;
3232                         ~z30.background = Color.white; ~z6.background = Color.white;
3233                         ~z31.background = Color.white; ~z7.background = Color.white;
3234                         ~z32.background = Color.white; ~z8.background = Color.white;
3235                 }
3236                 {button.value == 1}{
3237                         ~z25.background = Color.white; ~z1.background = Color.white;
3238                         ~z26.background = Color.green; ~z2.background = Color.green;
3239                         ~z27.background = Color.white; ~z3.background = Color.white;
3240                         ~z28.background = Color.white; ~z4.background = Color.white;
3241                         ~z29.background = Color.white; ~z5.background = Color.white;
3242                         ~z30.background = Color.white; ~z6.background = Color.white;
3243                         ~z31.background = Color.white; ~z7.background = Color.white;
3244                         ~z32.background = Color.white; ~z8.background = Color.white;
3245                 }
3246                 {button.value == 2}{
3247                         ~z25.background = Color.white; ~z1.background = Color.white;
3248                         ~z26.background = Color.white; ~z2.background = Color.white;
3249                         ~z27.background = Color.green; ~z3.background = Color.green;
3250                         ~z28.background = Color.white; ~z4.background = Color.white;
3251                         ~z29.background = Color.white; ~z5.background = Color.white;
3252                         ~z30.background = Color.white; ~z6.background = Color.white;
3253                         ~z31.background = Color.white; ~z7.background = Color.white;
3254                         ~z32.background = Color.white; ~z8.background = Color.white;
3255                 }
3256                 {button.value == 3}{
3257                         ~z25.background = Color.white; ~z1.background = Color.white;
3258                         ~z26.background = Color.white; ~z2.background = Color.white;
3259                         ~z27.background = Color.white; ~z3.background = Color.white;
3260                         ~z28.background = Color.green; ~z4.background = Color.green;
3261                         ~z29.background = Color.white; ~z5.background = Color.white;
3262                         ~z30.background = Color.white; ~z6.background = Color.white;
3263                         ~z31.background = Color.white; ~z7.background = Color.white;
3264                         ~z32.background = Color.white; ~z8.background = Color.white;
3265                 }
3266                 {button.value == 4}{
3267                         ~z25.background = Color.white; ~z1.background = Color.white;
3268                         ~z26.background = Color.white; ~z2.background = Color.white;
3269                         ~z27.background = Color.white; ~z3.background = Color.white;
3270                         ~z28.background = Color.white; ~z4.background = Color.white;
3271                         ~z29.background = Color.green; ~z5.background = Color.green;
3272                         ~z30.background = Color.white; ~z6.background = Color.white;
3273                         ~z31.background = Color.white; ~z7.background = Color.white;
3274                         ~z32.background = Color.white; ~z8.background = Color.white;
3275                 }
3276                 {button.value == 5}{
3277                         ~z25.background = Color.white; ~z1.background = Color.white;
3278                         ~z26.background = Color.white; ~z2.background = Color.white;
3279                         ~z27.background = Color.white; ~z3.background = Color.white;
3280                         ~z28.background = Color.white; ~z4.background = Color.white;
3281                         ~z29.background = Color.white; ~z5.background = Color.white;
3282                         ~z30.background = Color.green; ~z6.background = Color.green;
3283                         ~z31.background = Color.white; ~z7.background = Color.white;
3284                         ~z32.background = Color.white; ~z8.background = Color.white;
3285                 }
3286                 {button.value == 6}{
3287                         ~z25.background = Color.white; ~z1.background = Color.white;
3288                         ~z26.background = Color.white; ~z2.background = Color.white;
3289                         ~z27.background = Color.white; ~z3.background = Color.white;
3290                         ~z28.background = Color.white; ~z4.background = Color.white;
3291                         ~z29.background = Color.white; ~z5.background = Color.white;
3292                         ~z30.background = Color.white; ~z6.background = Color.white;
3293                         ~z31.background = Color.green; ~z7.background = Color.green;
3294                         ~z32.background = Color.white; ~z8.background = Color.white;
3295                 }
3296                 {button.value == 7}{
3297                         ~z25.background = Color.white; ~z1.background = Color.white;
3298                         ~z26.background = Color.white; ~z2.background = Color.white;
3299                         ~z27.background = Color.white; ~z3.background = Color.white;
3300                         ~z28.background = Color.white; ~z4.background = Color.white;
3301                         ~z29.background = Color.white; ~z5.background = Color.white;
3302                         ~z30.background = Color.white; ~z6.background = Color.white;
3303                         ~z31.background = Color.white; ~z7.background = Color.white;
3304                         ~z32.background = Color.green; ~z8.background = Color.green;
3305                 }
3306
3307         });
3308
3309
3310         //misc. keyboard buttons
3311
3312         w.view.keyDownAction = { arg view, char, modifiers, unicode, keycode;
3313                 [char, modifiers, unicode, keycode];
3314
3315                 //copy
3316                 if(unicode == ~c_unicode, {
3317                         case
3318                         {b.value == 0}{b.valueAction = 1}
3319                         {b.value == 1}{b.valueAction = 0};
3320                 });
3321
3322                 //start/stop synth
3323                 if(unicode == ~s_unicode, {
3324                         case
3325                         {b3.value == 0}{b3.valueAction = 1}
3326                         {b3.value == 1}{b3.valueAction = 0};
3327                 });
3328
3329                 //pause/unpause synth
3330                 if(unicode == ~spacebar_unicode, {
3331                         case
3332                         {b4.value == 0}{b4.valueAction = 1}
3333                         {b4.value == 1}{b4.valueAction = 0};
3334                 });
3335
3336                 //timer function
3337                 if(unicode == ~t_unicode, {
3338                         case
3339                         {~ts.value == 0}{~ts.valueAction = 1}
3340                         {~ts.value == 1}{~ts.valueAction = 0};
3341                 });
3342
3343                 //routine function
3344                 if(unicode == ~r_unicode, {
3345                         case
3346                         {~rviewbutton.value == 0}{~rviewbutton.valueAction = 1}
3347                         {~rviewbutton.value == 1}{~rviewbutton.valueAction = 0};
3348                 });
3349
3350                 //mute/unmute all synths
3351                 if(unicode == ~m_unicode, {
3352                         case
3353                         {muteall.value == 0}{muteall.valueAction = 1}
3354                         {muteall.value == 1}{muteall.valueAction = 0};
3355                 });
3356
3357                 //minimize GUI window
3358                 if(unicode == ~escape_unicode, {w.minimize;});
3359
3360
3361                 //keyboard number actions
3362
3363                 case
3364                 {unicode == ~one_unicode}{keycodeb.valueAction_(0)}
3365                 {unicode == ~two_unicode}{keycodeb.valueAction_(1)}
3366                 {unicode == ~three_unicode}{keycodeb.valueAction_(2)}
3367                 {unicode == ~four_unicode}{keycodeb.valueAction_(3)}
3368                 {unicode == ~five_unicode}{keycodeb.valueAction_(4)}
3369                 {unicode == ~six_unicode}{keycodeb.valueAction_(5)}
3370                 {unicode == ~seven_unicode}{keycodeb.valueAction_(6)}
3371                 {unicode == ~eight_unicode}{keycodeb.valueAction_(7)}
3372
3373
3374                 //keyboard up/down arrow actions
3375
3376                 {(keycode == ~uparrow_keycode) or: (unicode == ~i_unicode)}{keycodeb.valueAction_(keycodeb.value-1)}
3377                 {(keycode == ~downarrow_keycode) or: (unicode == ~k_unicode)}{keycodeb.valueAction_(keycodeb.value+1)};
3378
3379
3380                 //set synth frequency using left/right arrow keys or j/l keys
3381
3382                 if((~f1 >= ~freqmap.at(127)), {~freqmap.at(127)},
3383                         {if((keycodeb.value == 0) and: ((keycode == ~rightarrow_keycode) or: (unicode == ~l_unicode)), {
3384                                 ~freqmapval1 = ~f1.cpsmidi.round;
3385                                 case
3386                                 {~l1a.isRunning == true}{
3387                                         ~l1a.set(\dur, ~f1 = ~freqmap.at(~freqmapval1 = ~freqmapval1.value+1));
3388                                         ~l1b.set(\dur, ~f1);
3389                                         ~l1c.set(\dur, ~f1/~icd3);
3390                                         ~l1d.set(\dur, ~f1/~icd3);
3391                                         ~l1e.set(\dur, ~f1/~icd6);
3392                                         ~l1f.set(\dur, ~f1/~icd6);
3393                                 }
3394                                 {~l1a1.isRunning == true}{
3395                                         ~l1a1.set(\dur, ~f1 = ~freqmap.at(~freqmapval1 = ~freqmapval1.value+1));
3396                                         ~l1b1.set(\dur, ~f1);
3397                                         ~l1c1.set(\dur, ~f1/~icd3);
3398                                         ~l1d1.set(\dur, ~f1/~icd3);
3399                                         ~l1e1.set(\dur, ~f1/~icd6);
3400                                         ~l1f1.set(\dur, ~f1/~icd6);
3401                                 };
3402                                 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;);});
3403                                 ~z25.background = Color.green; ~z1.background = Color.green;
3404                                 ~z26.background = Color.white; ~z2.background = Color.white;
3405                                 ~z27.background = Color.white; ~z3.background = Color.white;
3406                                 ~z28.background = Color.white; ~z4.background = Color.white;
3407                                 ~z29.background = Color.white; ~z5.background = Color.white;
3408                                 ~z30.background = Color.white; ~z6.background = Color.white;
3409                                 ~z31.background = Color.white; ~z7.background = Color.white;
3410                                 ~z32.background = Color.white; ~z8.background = Color.white;
3411                 });});
3412                 if((~f1 <= ~freqmap.at(0)), {~freqmap.at(0)},
3413                         {if((keycodeb.value == 0) and: ((keycode == ~leftarrow_keycode) or: (unicode == ~j_unicode)), {
3414                                 ~freqmapval1 = ~f1.cpsmidi.round;
3415                                 case
3416                                 {~l1a.isRunning == true}{
3417                                         ~l1a.set(\dur, ~f1 = ~freqmap.at(~freqmapval1 = ~freqmapval1.value-1));
3418                                         ~l1b.set(\dur, ~f1);
3419                                         ~l1c.set(\dur, ~f1/~icd3);
3420                                         ~l1d.set(\dur, ~f1/~icd3);
3421                                         ~l1e.set(\dur, ~f1/~icd6);
3422                                         ~l1f.set(\dur, ~f1/~icd6);
3423                                 }
3424                                 {~l1a1.isRunning == true}{
3425                                         ~l1a1.set(\dur, ~f1 = ~freqmap.at(~freqmapval1 = ~freqmapval1.value-1));
3426                                         ~l1b1.set(\dur, ~f1);
3427                                         ~l1c1.set(\dur, ~f1/~icd3);
3428                                         ~l1d1.set(\dur, ~f1/~icd3);
3429                                         ~l1e1.set(\dur, ~f1/~icd6);
3430                                         ~l1f1.set(\dur, ~f1/~icd6);
3431                                 };
3432                                 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;);});
3433
3434                                 ~z25.background = Color.green; ~z1.background = Color.green;
3435                                 ~z26.background = Color.white; ~z2.background = Color.white;
3436                                 ~z27.background = Color.white; ~z3.background = Color.white;
3437                                 ~z28.background = Color.white; ~z4.background = Color.white;
3438                                 ~z29.background = Color.white; ~z5.background = Color.white;
3439                                 ~z30.background = Color.white; ~z6.background = Color.white;
3440                                 ~z31.background = Color.white; ~z7.background = Color.white;
3441                                 ~z32.background = Color.white; ~z8.background = Color.white;
3442                 });});
3443
3444                 if((~f2 >= ~freqmap.at(127)), {~freqmap.at(127)},
3445                         {if((keycodeb.value == 1) and: ((keycode == ~rightarrow_keycode) or: (unicode == ~l_unicode)), {
3446                                 ~freqmapval2 = ~f2.cpsmidi.round;
3447                                 case
3448                                 {~l1a.isRunning == true}{
3449                                         ~l2a.set(\dur, ~f2 = ~freqmap.at(~freqmapval2 = ~freqmapval2.value+1));
3450                                         ~l2b.set(\dur, ~f2);
3451                                         ~l2c.set(\dur, ~f2/~icd3);
3452                                         ~l2d.set(\dur, ~f2/~icd3);
3453                                         ~l2e.set(\dur, ~f2/~icd6);
3454                                         ~l2f.set(\dur, ~f2/~icd6);
3455                                 }
3456                                 {~l1a1.isRunning == true}{
3457                                         ~l2a1.set(\dur, ~f2 = ~freqmap.at(~freqmapval2 = ~freqmapval2.value+1));
3458                                         ~l2b1.set(\dur, ~f2);
3459                                         ~l2c1.set(\dur, ~f2/~icd3);
3460                                         ~l2d1.set(\dur, ~f2/~icd3);
3461                                         ~l2e1.set(\dur, ~f2/~icd6);
3462                                         ~l2f1.set(\dur, ~f2/~icd6);
3463                                 };
3464                                 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;);});
3465                                 ~z25.background = Color.white; ~z1.background = Color.white;
3466                                 ~z26.background = Color.green; ~z2.background = Color.green;
3467                                 ~z27.background = Color.white; ~z3.background = Color.white;
3468                                 ~z28.background = Color.white; ~z4.background = Color.white;
3469                                 ~z29.background = Color.white; ~z5.background = Color.white;
3470                                 ~z30.background = Color.white; ~z6.background = Color.white;
3471                                 ~z31.background = Color.white; ~z7.background = Color.white;
3472                                 ~z32.background = Color.white; ~z8.background = Color.white;
3473                 });});
3474                 if((~f2 <= ~freqmap.at(0)), {~freqmap.at(0)},
3475                         {if((keycodeb.value == 1) and: ((keycode == ~leftarrow_keycode) or: (unicode == ~j_unicode)), {
3476                                 ~freqmapval2 = ~f2.cpsmidi.round;
3477                                 case
3478                                 {~l1a.isRunning == true}{
3479                                         ~l2a.set(\dur, ~f2 = ~freqmap.at(~freqmapval2 = ~freqmapval2.value-1));
3480                                         ~l2b.set(\dur, ~f2);
3481                                         ~l2c.set(\dur, ~f2/~icd3);
3482                                         ~l2d.set(\dur, ~f2/~icd3);
3483                                         ~l2e.set(\dur, ~f2/~icd6);
3484                                         ~l2f.set(\dur, ~f2/~icd6);
3485                                 }
3486                                 {~l1a1.isRunning == true}{
3487                                         ~l2a1.set(\dur, ~f2 = ~freqmap.at(~freqmapval2 = ~freqmapval2.value-1));
3488                                         ~l2b1.set(\dur, ~f2);
3489                                         ~l2c1.set(\dur, ~f2/~icd3);
3490                                         ~l2d1.set(\dur, ~f2/~icd3);
3491                                         ~l2e1.set(\dur, ~f2/~icd6);
3492                                         ~l2f1.set(\dur, ~f2/~icd6);
3493                                 };
3494                                 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;);});
3495
3496                                 ~z25.background = Color.white; ~z1.background = Color.white;
3497                                 ~z26.background = Color.green; ~z2.background = Color.green;
3498                                 ~z27.background = Color.white; ~z3.background = Color.white;
3499                                 ~z28.background = Color.white; ~z4.background = Color.white;
3500                                 ~z29.background = Color.white; ~z5.background = Color.white;
3501                                 ~z30.background = Color.white; ~z6.background = Color.white;
3502                                 ~z31.background = Color.white; ~z7.background = Color.white;
3503                                 ~z32.background = Color.white; ~z8.background = Color.white;
3504                 });});
3505
3506                 if((~f3 >= ~freqmap.at(127)), {~freqmap.at(127)},
3507                         {if((keycodeb.value == 2) and: ((keycode == ~rightarrow_keycode) or: (unicode == ~l_unicode)), {
3508                                 ~freqmapval3 = ~f3.cpsmidi.round;
3509                                 case
3510                                 {~l1a.isRunning == true}{
3511                                         ~l3a.set(\dur, ~f3 = ~freqmap.at(~freqmapval3 = ~freqmapval3.value+1));
3512                                         ~l3b.set(\dur, ~f3);
3513                                         ~l3c.set(\dur, ~f3/~icd3);
3514                                         ~l3d.set(\dur, ~f3/~icd3);
3515                                         ~l3e.set(\dur, ~f3/~icd6);
3516                                         ~l3f.set(\dur, ~f3/~icd6);
3517                                 }
3518                                 {~l1a1.isRunning == true}{
3519                                         ~l3a1.set(\dur, ~f3 = ~freqmap.at(~freqmapval3 = ~freqmapval3.value+1));
3520                                         ~l3b1.set(\dur, ~f3);
3521                                         ~l3c1.set(\dur, ~f3/~icd3);
3522                                         ~l3d1.set(\dur, ~f3/~icd3);
3523                                         ~l3e1.set(\dur, ~f3/~icd6);
3524                                         ~l3f1.set(\dur, ~f3/~icd6);
3525                                 };
3526                                 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;);});
3527                                 ~z25.background = Color.white; ~z1.background = Color.white;
3528                                 ~z26.background = Color.white; ~z2.background = Color.white;
3529                                 ~z27.background = Color.green; ~z3.background = Color.green;
3530                                 ~z28.background = Color.white; ~z4.background = Color.white;
3531                                 ~z29.background = Color.white; ~z5.background = Color.white;
3532                                 ~z30.background = Color.white; ~z6.background = Color.white;
3533                                 ~z31.background = Color.white; ~z7.background = Color.white;
3534                                 ~z32.background = Color.white; ~z8.background = Color.white;
3535                 });});
3536                 if((~f3 <= ~freqmap.at(0)), {~freqmap.at(0)},
3537                         {if((keycodeb.value == 2) and: ((keycode == ~leftarrow_keycode) or: (unicode == ~j_unicode)), {
3538                                 ~freqmapval3 = ~f3.cpsmidi.round;
3539                                 case
3540                                 {~l1a.isRunning == true}{
3541                                         ~l3a.set(\dur, ~f3 = ~freqmap.at(~freqmapval3 = ~freqmapval3.value-1));
3542                                         ~l3b.set(\dur, ~f3);
3543                                         ~l3c.set(\dur, ~f3/~icd3);
3544                                         ~l3d.set(\dur, ~f3/~icd3);
3545                                         ~l3e.set(\dur, ~f3/~icd6);
3546                                         ~l3f.set(\dur, ~f3/~icd6);
3547                                 }
3548                                 {~l1a1.isRunning == true}{
3549                                         ~l3a1.set(\dur, ~f3 = ~freqmap.at(~freqmapval3 = ~freqmapval3.value-1));
3550                                         ~l3b1.set(\dur, ~f3);
3551                                         ~l3c1.set(\dur, ~f3/~icd3);
3552                                         ~l3d1.set(\dur, ~f3/~icd3);
3553                                         ~l3e1.set(\dur, ~f3/~icd6);
3554                                         ~l3f1.set(\dur, ~f3/~icd6);
3555                                 };
3556                                 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;);});
3557
3558                                 ~z25.background = Color.white; ~z1.background = Color.white;
3559                                 ~z26.background = Color.white; ~z2.background = Color.white;
3560                                 ~z27.background = Color.green; ~z3.background = Color.green;
3561                                 ~z28.background = Color.white; ~z4.background = Color.white;
3562                                 ~z29.background = Color.white; ~z5.background = Color.white;
3563                                 ~z30.background = Color.white; ~z6.background = Color.white;
3564                                 ~z31.background = Color.white; ~z7.background = Color.white;
3565                                 ~z32.background = Color.white; ~z8.background = Color.white;
3566                 });});
3567
3568                 if((~f4 >= ~freqmap.at(127)), {~freqmap.at(127)},
3569                         {if((keycodeb.value == 3) and: ((keycode == ~rightarrow_keycode) or: (unicode == ~l_unicode)), {
3570                                 ~freqmapval4 = ~f4.cpsmidi.round;
3571                                 case
3572                                 {~l1a.isRunning == true}{
3573                                         ~l4a.set(\dur, ~f4 = ~freqmap.at(~freqmapval4 = ~freqmapval4.value+1));
3574                                         ~l4b.set(\dur, ~f4);
3575                                         ~l4c.set(\dur, ~f4/~icd3);
3576                                         ~l4d.set(\dur, ~f4/~icd3);
3577                                         ~l4e.set(\dur, ~f4/~icd6);
3578                                         ~l4f.set(\dur, ~f4/~icd6);
3579                                 }
3580                                 {~l1a1.isRunning == true}{
3581                                         ~l4a1.set(\dur, ~f4 = ~freqmap.at(~freqmapval4 = ~freqmapval4.value+1));
3582                                         ~l4b1.set(\dur, ~f4);
3583                                         ~l4c1.set(\dur, ~f4/~icd3);
3584                                         ~l4d1.set(\dur, ~f4/~icd3);
3585                                         ~l4e1.set(\dur, ~f4/~icd6);
3586                                         ~l4f1.set(\dur, ~f4/~icd6);
3587                                 };
3588                                 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;);});
3589                                 ~z25.background = Color.white; ~z1.background = Color.white;
3590                                 ~z26.background = Color.white; ~z2.background = Color.white;
3591                                 ~z27.background = Color.white; ~z3.background = Color.white;
3592                                 ~z28.background = Color.green; ~z4.background = Color.green;
3593                                 ~z29.background = Color.white; ~z5.background = Color.white;
3594                                 ~z30.background = Color.white; ~z6.background = Color.white;
3595                                 ~z31.background = Color.white; ~z7.background = Color.white;
3596                                 ~z32.background = Color.white; ~z8.background = Color.white;
3597                 });});
3598                 if((~f4 <= ~freqmap.at(0)), {~freqmap.at(0)},
3599                         {if((keycodeb.value == 3) and: ((keycode == ~leftarrow_keycode) or: (unicode == ~j_unicode)), {
3600                                 ~freqmapval4 = ~f4.cpsmidi.round;
3601                                 case
3602                                 {~l1a.isRunning == true}{
3603                                         ~l4a.set(\dur, ~f4 = ~freqmap.at(~freqmapval4 = ~freqmapval4.value-1));
3604                                         ~l4b.set(\dur, ~f4);
3605                                         ~l4c.set(\dur, ~f4/~icd3);
3606                                         ~l4d.set(\dur, ~f4/~icd3);
3607                                         ~l4e.set(\dur, ~f4/~icd6);
3608                                         ~l4f.set(\dur, ~f4/~icd6);
3609                                 }
3610                                 {~l1a1.isRunning == true}{
3611                                         ~l4a1.set(\dur, ~f4 = ~freqmap.at(~freqmapval4 = ~freqmapval4.value-1));
3612                                         ~l4b1.set(\dur, ~f4);
3613                                         ~l4c1.set(\dur, ~f4/~icd3);
3614                                         ~l4d1.set(\dur, ~f4/~icd3);
3615                                         ~l4e1.set(\dur, ~f4/~icd6);
3616                                         ~l4f1.set(\dur, ~f4/~icd6);
3617                                 };
3618                                 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;);});
3619
3620                                 ~z25.background = Color.white; ~z1.background = Color.white;
3621                                 ~z26.background = Color.white; ~z2.background = Color.white;
3622                                 ~z27.background = Color.white; ~z3.background = Color.white;
3623                                 ~z28.background = Color.green; ~z4.background = Color.green;
3624                                 ~z29.background = Color.white; ~z5.background = Color.white;
3625                                 ~z30.background = Color.white; ~z6.background = Color.white;
3626                                 ~z31.background = Color.white; ~z7.background = Color.white;
3627                                 ~z32.background = Color.white; ~z8.background = Color.white;
3628                 });});
3629
3630                 if((~f5 >= ~freqmap.at(127)), {~freqmap.at(127)},
3631                         {if((keycodeb.value == 4) and: ((keycode == ~rightarrow_keycode) or: (unicode == ~l_unicode)), {
3632                                 ~freqmapval5 = ~f5.cpsmidi.round;
3633                                 case
3634                                 {~l1a.isRunning == true}{
3635                                         ~l5a.set(\dur, ~f5 = ~freqmap.at(~freqmapval5 = ~freqmapval5.value+1));
3636                                         ~l5b.set(\dur, ~f5);
3637                                         ~l5c.set(\dur, ~f5/~icd3);
3638                                         ~l5d.set(\dur, ~f5/~icd3);
3639                                         ~l5e.set(\dur, ~f5/~icd6);
3640                                         ~l5f.set(\dur, ~f5/~icd6);
3641                                 }
3642                                 {~l1a1.isRunning == true}{
3643                                         ~l5a1.set(\dur, ~f5 = ~freqmap.at(~freqmapval5 = ~freqmapval5.value+1));
3644                                         ~l5b1.set(\dur, ~f5);
3645                                         ~l5c1.set(\dur, ~f5/~icd3);
3646                                         ~l5d1.set(\dur, ~f5/~icd3);
3647                                         ~l5e1.set(\dur, ~f5/~icd6);
3648                                         ~l5f1.set(\dur, ~f5/~icd6);
3649                                 };
3650                                 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;);});
3651                                 ~z25.background = Color.white; ~z1.background = Color.white;
3652                                 ~z26.background = Color.white; ~z2.background = Color.white;
3653                                 ~z27.background = Color.white; ~z3.background = Color.white;
3654                                 ~z28.background = Color.white; ~z4.background = Color.white;
3655                                 ~z29.background = Color.green; ~z5.background = Color.green;
3656                                 ~z30.background = Color.white; ~z6.background = Color.white;
3657                                 ~z31.background = Color.white; ~z7.background = Color.white;
3658                                 ~z32.background = Color.white; ~z8.background = Color.white;
3659                 });});
3660                 if((~f5 <= ~freqmap.at(0)), {~freqmap.at(0)},
3661                         {if((keycodeb.value == 4) and: ((keycode == ~leftarrow_keycode) or: (unicode == ~j_unicode)), {
3662                                 ~freqmapval5 = ~f5.cpsmidi.round;
3663                                 case
3664                                 {~l1a.isRunning == true}{
3665                                         ~l5a.set(\dur, ~f5 = ~freqmap.at(~freqmapval5 = ~freqmapval5.value-1));
3666                                         ~l5b.set(\dur, ~f5);
3667                                         ~l5c.set(\dur, ~f5/~icd3);
3668                                         ~l5d.set(\dur, ~f5/~icd3);
3669                                         ~l5e.set(\dur, ~f5/~icd6);
3670                                         ~l5f.set(\dur, ~f5/~icd6);
3671                                 }
3672                                 {~l1a1.isRunning == true}{
3673                                         ~l5a1.set(\dur, ~f5 = ~freqmap.at(~freqmapval5 = ~freqmapval5.value-1));
3674                                         ~l5b1.set(\dur, ~f5);
3675                                         ~l5c1.set(\dur, ~f5/~icd3);
3676                                         ~l5d1.set(\dur, ~f5/~icd3);
3677                                         ~l5e1.set(\dur, ~f5/~icd6);
3678                                         ~l5f1.set(\dur, ~f5/~icd6);
3679                                 };
3680                                 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;);});
3681
3682                                 ~z25.background = Color.white; ~z1.background = Color.white;
3683                                 ~z26.background = Color.white; ~z2.background = Color.white;
3684                                 ~z27.background = Color.white; ~z3.background = Color.white;
3685                                 ~z28.background = Color.white; ~z4.background = Color.white;
3686                                 ~z29.background = Color.green; ~z5.background = Color.green;
3687                                 ~z30.background = Color.white; ~z6.background = Color.white;
3688                                 ~z31.background = Color.white; ~z7.background = Color.white;
3689                                 ~z32.background = Color.white; ~z8.background = Color.white;
3690                 });});
3691
3692                 if((~f6 >= ~freqmap.at(127)), {~freqmap.at(127)},
3693                         {if((keycodeb.value == 5) and: ((keycode == ~rightarrow_keycode) or: (unicode == ~l_unicode)), {
3694                                 ~freqmapval6 = ~f6.cpsmidi.round;
3695                                 case
3696                                 {~l1a.isRunning == true}{
3697                                         ~l6a.set(\dur, ~f6 = ~freqmap.at(~freqmapval6 = ~freqmapval6.value+1));
3698                                         ~l6b.set(\dur, ~f6);
3699                                         ~l6c.set(\dur, ~f6/~icd3);
3700                                         ~l6d.set(\dur, ~f6/~icd3);
3701                                         ~l6e.set(\dur, ~f6/~icd6);
3702                                         ~l6f.set(\dur, ~f6/~icd6);
3703                                 }
3704                                 {~l1a1.isRunning == true}{
3705                                         ~l6a1.set(\dur, ~f6 = ~freqmap.at(~freqmapval6 = ~freqmapval6.value+1));
3706                                         ~l6b1.set(\dur, ~f6);
3707                                         ~l6c1.set(\dur, ~f6/~icd3);
3708                                         ~l6d1.set(\dur, ~f6/~icd3);
3709                                         ~l6e1.set(\dur, ~f6/~icd6);
3710                                         ~l6f1.set(\dur, ~f6/~icd6);
3711                                 };
3712                                 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;);});
3713                                 ~z25.background = Color.white; ~z1.background = Color.white;
3714                                 ~z26.background = Color.white; ~z2.background = Color.white;
3715                                 ~z27.background = Color.white; ~z3.background = Color.white;
3716                                 ~z28.background = Color.white; ~z4.background = Color.white;
3717                                 ~z29.background = Color.white; ~z5.background = Color.white;
3718                                 ~z30.background = Color.green; ~z6.background = Color.green;
3719                                 ~z31.background = Color.white; ~z7.background = Color.white;
3720                                 ~z32.background = Color.white; ~z8.background = Color.white;
3721                 });});
3722                 if((~f6 <= ~freqmap.at(0)), {~freqmap.at(0)},
3723                         {if((keycodeb.value == 5) and: ((keycode == ~leftarrow_keycode) or: (unicode == ~j_unicode)), {
3724                                 ~freqmapval6 = ~f6.cpsmidi.round;
3725                                 case
3726                                 {~l1a.isRunning == true}{
3727                                         ~l6a.set(\dur, ~f6 = ~freqmap.at(~freqmapval6 = ~freqmapval6.value-1));
3728                                         ~l6b.set(\dur, ~f6);
3729                                         ~l6c.set(\dur, ~f6/~icd3);
3730                                         ~l6d.set(\dur, ~f6/~icd3);
3731                                         ~l6e.set(\dur, ~f6/~icd6);
3732                                         ~l6f.set(\dur, ~f6/~icd6);
3733                                 }
3734                                 {~l1a1.isRunning == true}{
3735                                         ~l6a1.set(\dur, ~f6 = ~freqmap.at(~freqmapval6 = ~freqmapval6.value-1));
3736                                         ~l6b1.set(\dur, ~f6);
3737                                         ~l6c1.set(\dur, ~f6/~icd3);
3738                                         ~l6d1.set(\dur, ~f6/~icd3);
3739                                         ~l6e1.set(\dur, ~f6/~icd6);
3740                                         ~l6f1.set(\dur, ~f6/~icd6);
3741                                 };
3742                                 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;);});
3743
3744                                 ~z25.background = Color.white; ~z1.background = Color.white;
3745                                 ~z26.background = Color.white; ~z2.background = Color.white;
3746                                 ~z27.background = Color.white; ~z3.background = Color.white;
3747                                 ~z28.background = Color.white; ~z4.background = Color.white;
3748                                 ~z29.background = Color.white; ~z5.background = Color.white;
3749                                 ~z30.background = Color.green; ~z6.background = Color.green;
3750                                 ~z31.background = Color.white; ~z7.background = Color.white;
3751                                 ~z32.background = Color.white; ~z8.background = Color.white;
3752                 });});
3753
3754                 if((~f7 >= ~freqmap.at(127)), {~freqmap.at(127)},
3755                         {if((keycodeb.value == 6) and: ((keycode == ~rightarrow_keycode) or: (unicode == ~l_unicode)), {
3756                                 ~freqmapval7 = ~f7.cpsmidi.round;
3757                                 case
3758                                 {~l1a.isRunning == true}{
3759                                         ~l7a.set(\dur, ~f7 = ~freqmap.at(~freqmapval7 = ~freqmapval7.value+1));
3760                                         ~l7b.set(\dur, ~f7);
3761                                         ~l7c.set(\dur, ~f7/~icd3);
3762                                         ~l7d.set(\dur, ~f7/~icd3);
3763                                         ~l7e.set(\dur, ~f7/~icd6);
3764                                         ~l7f.set(\dur, ~f7/~icd6);
3765                                 }
3766                                 {~l1a1.isRunning == true}{
3767                                         ~l7a1.set(\dur, ~f7 = ~freqmap.at(~freqmapval7 = ~freqmapval7.value+1));
3768                                         ~l7b1.set(\dur, ~f7);
3769                                         ~l7c1.set(\dur, ~f7/~icd3);
3770                                         ~l7d1.set(\dur, ~f7/~icd3);
3771                                         ~l7e1.set(\dur, ~f7/~icd6);
3772                                         ~l7f1.set(\dur, ~f7/~icd6);
3773                                 };
3774                                 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;);});
3775                                 ~z25.background = Color.white; ~z1.background = Color.white;
3776                                 ~z26.background = Color.white; ~z2.background = Color.white;
3777                                 ~z27.background = Color.white; ~z3.background = Color.white;
3778                                 ~z28.background = Color.white; ~z4.background = Color.white;
3779                                 ~z29.background = Color.white; ~z5.background = Color.white;
3780                                 ~z30.background = Color.white; ~z6.background = Color.white;
3781                                 ~z31.background = Color.green; ~z7.background = Color.green;
3782                                 ~z32.background = Color.white; ~z8.background = Color.white;
3783                 });});
3784                 if((~f7 <= ~freqmap.at(0)), {~freqmap.at(0)},
3785                         {if((keycodeb.value == 6) and: ((keycode == ~leftarrow_keycode) or: (unicode == ~j_unicode)), {
3786                                 ~freqmapval7 = ~f7.cpsmidi.round;
3787                                 case
3788                                 {~l1a.isRunning == true}{
3789                                         ~l7a.set(\dur, ~f7 = ~freqmap.at(~freqmapval7 = ~freqmapval7.value-1));
3790                                         ~l7b.set(\dur, ~f7);
3791                                         ~l7c.set(\dur, ~f7/~icd3);
3792                                         ~l7d.set(\dur, ~f7/~icd3);
3793                                         ~l7e.set(\dur, ~f7/~icd6);
3794                                         ~l7f.set(\dur, ~f7/~icd6);
3795                                 }
3796                                 {~l1a1.isRunning == true}{
3797                                         ~l7a1.set(\dur, ~f7 = ~freqmap.at(~freqmapval7 = ~freqmapval7.value-1));
3798                                         ~l7b1.set(\dur, ~f7);
3799                                         ~l7c1.set(\dur, ~f7/~icd3);
3800                                         ~l7d1.set(\dur, ~f7/~icd3);
3801                                         ~l7e1.set(\dur, ~f7/~icd6);
3802                                         ~l7f1.set(\dur, ~f7/~icd6);
3803                                 };
3804                                 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;);});
3805
3806                                 ~z25.background = Color.white; ~z1.background = Color.white;
3807                                 ~z26.background = Color.white; ~z2.background = Color.white;
3808                                 ~z27.background = Color.white; ~z3.background = Color.white;
3809                                 ~z28.background = Color.white; ~z4.background = Color.white;
3810                                 ~z29.background = Color.white; ~z5.background = Color.white;
3811                                 ~z30.background = Color.white; ~z6.background = Color.white;
3812                                 ~z31.background = Color.green; ~z7.background = Color.green;
3813                                 ~z32.background = Color.white; ~z8.background = Color.white;
3814                 });});
3815
3816                 if((~f8 >= ~freqmap.at(127)), {~freqmap.at(127)},
3817                         {if((keycodeb.value == 7) and: ((keycode == ~rightarrow_keycode) or: (unicode == ~l_unicode)), {
3818                                 ~freqmapval8 = ~f8.cpsmidi.round;
3819                                 case
3820                                 {~l1a.isRunning == true}{
3821                                         ~l8a.set(\dur, ~f8 = ~freqmap.at(~freqmapval8 = ~freqmapval8.value+1));
3822                                         ~l8b.set(\dur, ~f8);
3823                                         ~l8c.set(\dur, ~f8/~icd3);
3824                                         ~l8d.set(\dur, ~f8/~icd3);
3825                                         ~l8e.set(\dur, ~f8/~icd6);
3826                                         ~l8f.set(\dur, ~f8/~icd6);
3827                                 }
3828                                 {~l1a1.isRunning == true}{
3829                                         ~l8a1.set(\dur, ~f8 = ~freqmap.at(~freqmapval8 = ~freqmapval8.value+1));
3830                                         ~l8b1.set(\dur, ~f8);
3831                                         ~l8c1.set(\dur, ~f8/~icd3);
3832                                         ~l8d1.set(\dur, ~f8/~icd3);
3833                                         ~l8e1.set(\dur, ~f8/~icd6);
3834                                         ~l8f1.set(\dur, ~f8/~icd6);
3835                                 };
3836                                 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;);});
3837                                 ~z25.background = Color.white; ~z1.background = Color.white;
3838                                 ~z26.background = Color.white; ~z2.background = Color.white;
3839                                 ~z27.background = Color.white; ~z3.background = Color.white;
3840                                 ~z28.background = Color.white; ~z4.background = Color.white;
3841                                 ~z29.background = Color.white; ~z5.background = Color.white;
3842                                 ~z30.background = Color.white; ~z6.background = Color.white;
3843                                 ~z31.background = Color.white; ~z7.background = Color.white;
3844                                 ~z32.background = Color.green; ~z8.background = Color.green;
3845                 });});
3846                 if((~f8 <= ~freqmap.at(0)), {~freqmap.at(0)},
3847                         {if((keycodeb.value == 7) and: ((keycode == ~leftarrow_keycode) or: (unicode == ~j_unicode)), {
3848                                 ~freqmapval8 = ~f8.cpsmidi.round;
3849                                 case
3850                                 {~l1a.isRunning == true}{
3851                                         ~l8a.set(\dur, ~f8 = ~freqmap.at(~freqmapval8 = ~freqmapval8.value-1));
3852                                         ~l8b.set(\dur, ~f8);
3853                                         ~l8c.set(\dur, ~f8/~icd3);
3854                                         ~l8d.set(\dur, ~f8/~icd3);
3855                                         ~l8e.set(\dur, ~f8/~icd6);
3856                                         ~l8f.set(\dur, ~f8/~icd6);
3857                                 }
3858                                 {~l1a1.isRunning == true}{
3859                                         ~l8a1.set(\dur, ~f8 = ~freqmap.at(~freqmapval8 = ~freqmapval8.value-1));
3860                                         ~l8b1.set(\dur, ~f8);
3861                                         ~l8c1.set(\dur, ~f8/~icd3);
3862                                         ~l8d1.set(\dur, ~f8/~icd3);
3863                                         ~l8e1.set(\dur, ~f8/~icd6);
3864                                         ~l8f1.set(\dur, ~f8/~icd6);
3865                                 };
3866                                 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;);});
3867
3868                                 ~z25.background = Color.white; ~z1.background = Color.white;
3869                                 ~z26.background = Color.white; ~z2.background = Color.white;
3870                                 ~z27.background = Color.white; ~z3.background = Color.white;
3871                                 ~z28.background = Color.white; ~z4.background = Color.white;
3872                                 ~z29.background = Color.white; ~z5.background = Color.white;
3873                                 ~z30.background = Color.white; ~z6.background = Color.white;
3874                                 ~z31.background = Color.white; ~z7.background = Color.white;
3875                                 ~z32.background = Color.green; ~z8.background = Color.green;
3876                 });});
3877
3878
3879         };
3880
3881
3882         //if routine function values are nil
3883
3884         if(~rslot1a == nil, {~rslot1a = ~bplaceo1;}); if(~rslot1b == nil, {~rslot1b = ~bplacef1;});
3885         if(~rslot2 == nil, {~rslot2 = ~bplacef2;});
3886         if(~rslot3 == nil, {~rslot3 = ~bplacef3;});
3887         if(~rslot4 == nil, {~rslot4 = ~bplacef4;});
3888         if(~rslot5 == nil, {~rslot5 = ~bplacef5;});
3889         if(~rslot6 == nil, {~rslot6 = ~bplacef6;});
3890         if(~rslot7 == nil, {~rslot7 = ~bplacef7;});
3891         if(~rslot8 == nil, {~rslot8 = ~bplacef8;});
3892         if(~rtimeall == nil, {~rtimeall = 8;});
3893         if(~rtime1 == nil, {~rtime1 = 8;});
3894         if(~rtime2 == nil, {~rtime2 = 8;});
3895         if(~rtime3 == nil, {~rtime3 = 8;});
3896         if(~rtime4 == nil, {~rtime4 = 8;});
3897         if(~rtime5 == nil, {~rtime5 = 8;});
3898         if(~rtime6 == nil, {~rtime6 = 8;});
3899         if(~rtime7 == nil, {~rtime7 = 8;});
3900         if(~rtime8 == nil, {~rtime8 = 8;});
3901         if(~rdoall == nil, {~rdoall = 1;});
3902         if(~rdo1a == nil, {~rdo1a = "o1";}); if(~rdo1b == nil, {~rdo1b = "f1";});
3903         if(~rdo2 == nil, {~rdo2 = "f2";});
3904         if(~rdo3 == nil, {~rdo3 = "f3";});
3905         if(~rdo4 == nil, {~rdo4 = "f4";});
3906         if(~rdo5 == nil, {~rdo5 = "f5";});
3907         if(~rdo6 == nil, {~rdo6 = "f6";});
3908         if(~rdo7 == nil, {~rdo7 = "f7";});
3909         if(~rdo8 == nil, {~rdo8 = "f8";});
3910
3911
3912         //misc. routine button functions (see below)
3913
3914         ~si1aset = {
3915                 if(~si1a.value == "o1", {~rslot1a = ~bplaceo1; ~rdo1a = ~si1a.value;});
3916                 if(~si1a.value == "f1", {~rslot1a = ~bplacef1; ~rdo1a = ~si1a.value;});
3917                 if(~si1a.value == "s1", {~rslot1a = ~bplaces1; ~rdo1a = ~si1a.value;});
3918                 if(~si1a.value == "o2", {~rslot1a = ~bplaceo2; ~rdo1a = ~si1a.value;});
3919                 if(~si1a.value == "f2", {~rslot1a = ~bplacef2; ~rdo1a = ~si1a.value;});
3920                 if(~si1a.value == "s2", {~rslot1a = ~bplaces2; ~rdo1a = ~si1a.value;});
3921                 if(~si1a.value == "o3", {~rslot1a = ~bplaceo3; ~rdo1a = ~si1a.value;});
3922                 if(~si1a.value == "f3", {~rslot1a = ~bplacef3; ~rdo1a = ~si1a.value;});
3923                 if(~si1a.value == "s3", {~rslot1a = ~bplaces3; ~rdo1a = ~si1a.value;});
3924                 if(~si1a.value == "o4", {~rslot1a = ~bplaceo4; ~rdo1a = ~si1a.value;});
3925                 if(~si1a.value == "f4", {~rslot1a = ~bplacef4; ~rdo1a = ~si1a.value;});
3926                 if(~si1a.value == "s4", {~rslot1a = ~bplaces4; ~rdo1a = ~si1a.value;});
3927                 if(~si1a.value == "o5", {~rslot1a = ~bplaceo5; ~rdo1a = ~si1a.value;});
3928                 if(~si1a.value == "f5", {~rslot1a = ~bplacef5; ~rdo1a = ~si1a.value;});
3929                 if(~si1a.value == "s5", {~rslot1a = ~bplaces5; ~rdo1a = ~si1a.value;});
3930                 if(~si1a.value == "o6", {~rslot1a = ~bplaceo6; ~rdo1a = ~si1a.value;});
3931                 if(~si1a.value == "f6", {~rslot1a = ~bplacef6; ~rdo1a = ~si1a.value;});
3932                 if(~si1a.value == "s6", {~rslot1a = ~bplaces6; ~rdo1a = ~si1a.value;});
3933                 if(~si1a.value == "o7", {~rslot1a = ~bplaceo7; ~rdo1a = ~si1a.value;});
3934                 if(~si1a.value == "f7", {~rslot1a = ~bplacef7; ~rdo1a = ~si1a.value;});
3935                 if(~si1a.value == "s7", {~rslot1a = ~bplaces7; ~rdo1a = ~si1a.value;});
3936                 if(~si1a.value == "o8", {~rslot1a = ~bplaceo8; ~rdo1a = ~si1a.value;});
3937                 if(~si1a.value == "f8", {~rslot1a = ~bplacef8; ~rdo1a = ~si1a.value;});
3938                 if(~si1a.value == "s8", {~rslot1a = ~bplaces8; ~rdo1a = ~si1a.value;});
3939         };
3940         ~si1bset = {
3941                 if(~si1b.value == "o1", {~rslot1b = ~bplaceo1; ~rdo1b = ~si1b.value;});
3942                 if(~si1b.value == "f1", {~rslot1b = ~bplacef1; ~rdo1b = ~si1b.value;});
3943                 if(~si1b.value == "s1", {~rslot1b = ~bplaces1; ~rdo1b = ~si1b.value;});
3944                 if(~si1b.value == "o2", {~rslot1b = ~bplaceo2; ~rdo1b = ~si1b.value;});
3945                 if(~si1b.value == "f2", {~rslot1b = ~bplacef2; ~rdo1b = ~si1b.value;});
3946                 if(~si1b.value == "s2", {~rslot1b = ~bplaces2; ~rdo1b = ~si1b.value;});
3947                 if(~si1b.value == "o3", {~rslot1b = ~bplaceo3; ~rdo1b = ~si1b.value;});
3948                 if(~si1b.value == "f3", {~rslot1b = ~bplacef3; ~rdo1b = ~si1b.value;});
3949                 if(~si1b.value == "s3", {~rslot1b = ~bplaces3; ~rdo1b = ~si1b.value;});
3950                 if(~si1b.value == "o4", {~rslot1b = ~bplaceo4; ~rdo1b = ~si1b.value;});
3951                 if(~si1b.value == "f4", {~rslot1b = ~bplacef4; ~rdo1b = ~si1b.value;});
3952                 if(~si1b.value == "s4", {~rslot1b = ~bplaces4; ~rdo1b = ~si1b.value;});
3953                 if(~si1b.value == "o5", {~rslot1b = ~bplaceo5; ~rdo1b = ~si1b.value;});
3954                 if(~si1b.value == "f5", {~rslot1b = ~bplacef5; ~rdo1b = ~si1b.value;});
3955                 if(~si1b.value == "s5", {~rslot1b = ~bplaces5; ~rdo1b = ~si1b.value;});
3956                 if(~si1b.value == "o6", {~rslot1b = ~bplaceo6; ~rdo1b = ~si1b.value;});
3957                 if(~si1b.value == "f6", {~rslot1b = ~bplacef6; ~rdo1b = ~si1b.value;});
3958                 if(~si1b.value == "s6", {~rslot1b = ~bplaces6; ~rdo1b = ~si1b.value;});
3959                 if(~si1b.value == "o7", {~rslot1b = ~bplaceo7; ~rdo1b = ~si1b.value;});
3960                 if(~si1b.value == "f7", {~rslot1b = ~bplacef7; ~rdo1b = ~si1b.value;});
3961                 if(~si1b.value == "s7", {~rslot1b = ~bplaces7; ~rdo1b = ~si1b.value;});
3962                 if(~si1b.value == "o8", {~rslot1b = ~bplaceo8; ~rdo1b = ~si1b.value;});
3963                 if(~si1b.value == "f8", {~rslot1b = ~bplacef8; ~rdo1b = ~si1b.value;});
3964                 if(~si1b.value == "s8", {~rslot1b = ~bplaces8; ~rdo1b = ~si1b.value;});
3965         };
3966         ~si2set = {
3967                 if(~si2.value == "o1", {~rslot2 = ~bplaceo1; ~rdo2 = ~si2.value;});
3968                 if(~si2.value == "f1", {~rslot2 = ~bplacef1; ~rdo2 = ~si2.value;});
3969                 if(~si2.value == "s1", {~rslot2 = ~bplaces1; ~rdo2 = ~si2.value;});
3970                 if(~si2.value == "o2", {~rslot2 = ~bplaceo2; ~rdo2 = ~si2.value;});
3971                 if(~si2.value == "f2", {~rslot2 = ~bplacef2; ~rdo2 = ~si2.value;});
3972                 if(~si2.value == "s2", {~rslot2 = ~bplaces2; ~rdo2 = ~si2.value;});
3973                 if(~si2.value == "o3", {~rslot2 = ~bplaceo3; ~rdo2 = ~si2.value;});
3974                 if(~si2.value == "f3", {~rslot2 = ~bplacef3; ~rdo2 = ~si2.value;});
3975                 if(~si2.value == "s3", {~rslot2 = ~bplaces3; ~rdo2 = ~si2.value;});
3976                 if(~si2.value == "o4", {~rslot2 = ~bplaceo4; ~rdo2 = ~si2.value;});
3977                 if(~si2.value == "f4", {~rslot2 = ~bplacef4; ~rdo2 = ~si2.value;});
3978                 if(~si2.value == "s4", {~rslot2 = ~bplaces4; ~rdo2 = ~si2.value;});
3979                 if(~si2.value == "o5", {~rslot2 = ~bplaceo5; ~rdo2 = ~si2.value;});
3980                 if(~si2.value == "f5", {~rslot2 = ~bplacef5; ~rdo2 = ~si2.value;});
3981                 if(~si2.value == "s5", {~rslot2 = ~bplaces5; ~rdo2 = ~si2.value;});
3982                 if(~si2.value == "o6", {~rslot2 = ~bplaceo6; ~rdo2 = ~si2.value;});
3983                 if(~si2.value == "f6", {~rslot2 = ~bplacef6; ~rdo2 = ~si2.value;});
3984                 if(~si2.value == "s6", {~rslot2 = ~bplaces6; ~rdo2 = ~si2.value;});
3985                 if(~si2.value == "o7", {~rslot2 = ~bplaceo7; ~rdo2 = ~si2.value;});
3986                 if(~si2.value == "f7", {~rslot2 = ~bplacef7; ~rdo2 = ~si2.value;});
3987                 if(~si2.value == "s7", {~rslot2 = ~bplaces7; ~rdo2 = ~si2.value;});
3988                 if(~si2.value == "o8", {~rslot2 = ~bplaceo8; ~rdo2 = ~si2.value;});
3989                 if(~si2.value == "f8", {~rslot2 = ~bplacef8; ~rdo2 = ~si2.value;});
3990                 if(~si2.value == "s8", {~rslot2 = ~bplaces8; ~rdo2 = ~si2.value;});
3991         };
3992         ~si3set = {
3993                 if(~si3.value == "o1", {~rslot3 = ~bplaceo1; ~rdo3 = ~si3.value;});
3994                 if(~si3.value == "f1", {~rslot3 = ~bplacef1; ~rdo3 = ~si3.value;});
3995                 if(~si3.value == "s1", {~rslot3 = ~bplaces1; ~rdo3 = ~si3.value;});
3996                 if(~si3.value == "o2", {~rslot3 = ~bplaceo2; ~rdo3 = ~si3.value;});
3997                 if(~si3.value == "f2", {~rslot3 = ~bplacef2; ~rdo3 = ~si3.value;});
3998                 if(~si3.value == "s2", {~rslot3 = ~bplaces2; ~rdo3 = ~si3.value;});
3999                 if(~si3.value == "o3", {~rslot3 = ~bplaceo3; ~rdo3 = ~si3.value;});
4000                 if(~si3.value == "f3", {~rslot3 = ~bplacef3; ~rdo3 = ~si3.value;});
4001                 if(~si3.value == "s3", {~rslot3 = ~bplaces3; ~rdo3 = ~si3.value;});
4002                 if(~si3.value == "o4", {~rslot3 = ~bplaceo4; ~rdo3 = ~si3.value;});
4003                 if(~si3.value == "f4", {~rslot3 = ~bplacef4; ~rdo3 = ~si3.value;});
4004                 if(~si3.value == "s4", {~rslot3 = ~bplaces4; ~rdo3 = ~si3.value;});
4005                 if(~si3.value == "o5", {~rslot3 = ~bplaceo5; ~rdo3 = ~si3.value;});
4006                 if(~si3.value == "f5", {~rslot3 = ~bplacef5; ~rdo3 = ~si3.value;});
4007                 if(~si3.value == "s5", {~rslot3 = ~bplaces5; ~rdo3 = ~si3.value;});
4008                 if(~si3.value == "o6", {~rslot3 = ~bplaceo6; ~rdo3 = ~si3.value;});
4009                 if(~si3.value == "f6", {~rslot3 = ~bplacef6; ~rdo3 = ~si3.value;});
4010                 if(~si3.value == "s6", {~rslot3 = ~bplaces6; ~rdo3 = ~si3.value;});
4011                 if(~si3.value == "o7", {~rslot3 = ~bplaceo7; ~rdo3 = ~si3.value;});
4012                 if(~si3.value == "f7", {~rslot3 = ~bplacef7; ~rdo3 = ~si3.value;});
4013                 if(~si3.value == "s7", {~rslot3 = ~bplaces7; ~rdo3 = ~si3.value;});
4014                 if(~si3.value == "o8", {~rslot3 = ~bplaceo8; ~rdo3 = ~si3.value;});
4015                 if(~si3.value == "f8", {~rslot3 = ~bplacef8; ~rdo3 = ~si3.value;});
4016                 if(~si3.value == "s8", {~rslot3 = ~bplaces8; ~rdo3 = ~si3.value;});
4017         };
4018         ~si4set = {
4019                 if(~si4.value == "o1", {~rslot4 = ~bplaceo1; ~rdo4 = ~si4.value;});
4020                 if(~si4.value == "f1", {~rslot4 = ~bplacef1; ~rdo4 = ~si4.value;});
4021                 if(~si4.value == "s1", {~rslot4 = ~bplaces1; ~rdo4 = ~si4.value;});
4022                 if(~si4.value == "o2", {~rslot4 = ~bplaceo2; ~rdo4 = ~si4.value;});
4023                 if(~si4.value == "f2", {~rslot4 = ~bplacef2; ~rdo4 = ~si4.value;});
4024                 if(~si4.value == "s2", {~rslot4 = ~bplaces2; ~rdo4 = ~si4.value;});
4025                 if(~si4.value == "o3", {~rslot4 = ~bplaceo3; ~rdo4 = ~si4.value;});
4026                 if(~si4.value == "f3", {~rslot4 = ~bplacef3; ~rdo4 = ~si4.value;});
4027                 if(~si4.value == "s3", {~rslot4 = ~bplaces3; ~rdo4 = ~si4.value;});
4028                 if(~si4.value == "o4", {~rslot4 = ~bplaceo4; ~rdo4 = ~si4.value;});
4029                 if(~si4.value == "f4", {~rslot4 = ~bplacef4; ~rdo4 = ~si4.value;});
4030                 if(~si4.value == "s4", {~rslot4 = ~bplaces4; ~rdo4 = ~si4.value;});
4031                 if(~si4.value == "o5", {~rslot4 = ~bplaceo5; ~rdo4 = ~si4.value;});
4032                 if(~si4.value == "f5", {~rslot4 = ~bplacef5; ~rdo4 = ~si4.value;});
4033                 if(~si4.value == "s5", {~rslot4 = ~bplaces5; ~rdo4 = ~si4.value;});
4034                 if(~si4.value == "o6", {~rslot4 = ~bplaceo6; ~rdo4 = ~si4.value;});
4035                 if(~si4.value == "f6", {~rslot4 = ~bplacef6; ~rdo4 = ~si4.value;});
4036                 if(~si4.value == "s6", {~rslot4 = ~bplaces6; ~rdo4 = ~si4.value;});
4037                 if(~si4.value == "o7", {~rslot4 = ~bplaceo7; ~rdo4 = ~si4.value;});
4038                 if(~si4.value == "f7", {~rslot4 = ~bplacef7; ~rdo4 = ~si4.value;});
4039                 if(~si4.value == "s7", {~rslot4 = ~bplaces7; ~rdo4 = ~si4.value;});
4040                 if(~si4.value == "o8", {~rslot4 = ~bplaceo8; ~rdo4 = ~si4.value;});
4041                 if(~si4.value == "f8", {~rslot4 = ~bplacef8; ~rdo4 = ~si4.value;});
4042                 if(~si4.value == "s8", {~rslot4 = ~bplaces8; ~rdo4 = ~si4.value;});
4043         };
4044         ~si5set = {
4045                 if(~si5.value == "o1", {~rslot5 = ~bplaceo1; ~rdo5 = ~si5.value;});
4046                 if(~si5.value == "f1", {~rslot5 = ~bplacef1; ~rdo5 = ~si5.value;});
4047                 if(~si5.value == "s1", {~rslot5 = ~bplaces1; ~rdo5 = ~si5.value;});
4048                 if(~si5.value == "o2", {~rslot5 = ~bplaceo2; ~rdo5 = ~si5.value;});
4049                 if(~si5.value == "f2", {~rslot5 = ~bplacef2; ~rdo5 = ~si5.value;});
4050                 if(~si5.value == "s2", {~rslot5 = ~bplaces2; ~rdo5 = ~si5.value;});
4051                 if(~si5.value == "o3", {~rslot5 = ~bplaceo3; ~rdo5 = ~si5.value;});
4052                 if(~si5.value == "f3", {~rslot5 = ~bplacef3; ~rdo5 = ~si5.value;});
4053                 if(~si5.value == "s3", {~rslot5 = ~bplaces3; ~rdo5 = ~si5.value;});
4054                 if(~si5.value == "o4", {~rslot5 = ~bplaceo4; ~rdo5 = ~si5.value;});
4055                 if(~si5.value == "f4", {~rslot5 = ~bplacef4; ~rdo5 = ~si5.value;});
4056                 if(~si5.value == "s4", {~rslot5 = ~bplaces4; ~rdo5 = ~si5.value;});
4057                 if(~si5.value == "o5", {~rslot5 = ~bplaceo5; ~rdo5 = ~si5.value;});
4058                 if(~si5.value == "f5", {~rslot5 = ~bplacef5; ~rdo5 = ~si5.value;});
4059                 if(~si5.value == "s5", {~rslot5 = ~bplaces5; ~rdo5 = ~si5.value;});
4060                 if(~si5.value == "o6", {~rslot5 = ~bplaceo6; ~rdo5 = ~si5.value;});
4061                 if(~si5.value == "f6", {~rslot5 = ~bplacef6; ~rdo5 = ~si5.value;});
4062                 if(~si5.value == "s6", {~rslot5 = ~bplaces6; ~rdo5 = ~si5.value;});
4063                 if(~si5.value == "o7", {~rslot5 = ~bplaceo7; ~rdo5 = ~si5.value;});
4064                 if(~si5.value == "f7", {~rslot5 = ~bplacef7; ~rdo5 = ~si5.value;});
4065                 if(~si5.value == "s7", {~rslot5 = ~bplaces7; ~rdo5 = ~si5.value;});
4066                 if(~si5.value == "o8", {~rslot5 = ~bplaceo8; ~rdo5 = ~si5.value;});
4067                 if(~si5.value == "f8", {~rslot5 = ~bplacef8; ~rdo5 = ~si5.value;});
4068                 if(~si5.value == "s8", {~rslot5 = ~bplaces8; ~rdo5 = ~si5.value;});
4069         };
4070         ~si6set = {
4071                 if(~si6.value == "o1", {~rslot6 = ~bplaceo1; ~rdo6 = ~si6.value;});
4072                 if(~si6.value == "f1", {~rslot6 = ~bplacef1; ~rdo6 = ~si6.value;});
4073                 if(~si6.value == "s1", {~rslot6 = ~bplaces1; ~rdo6 = ~si6.value;});
4074                 if(~si6.value == "o2", {~rslot6 = ~bplaceo2; ~rdo6 = ~si6.value;});
4075                 if(~si6.value == "f2", {~rslot6 = ~bplacef2; ~rdo6 = ~si6.value;});
4076                 if(~si6.value == "s2", {~rslot6 = ~bplaces2; ~rdo6 = ~si6.value;});
4077                 if(~si6.value == "o3", {~rslot6 = ~bplaceo3; ~rdo6 = ~si6.value;});
4078                 if(~si6.value == "f3", {~rslot6 = ~bplacef3; ~rdo6 = ~si6.value;});
4079                 if(~si6.value == "s3", {~rslot6 = ~bplaces3; ~rdo6 = ~si6.value;});
4080                 if(~si6.value == "o4", {~rslot6 = ~bplaceo4; ~rdo6 = ~si6.value;});
4081                 if(~si6.value == "f4", {~rslot6 = ~bplacef4; ~rdo6 = ~si6.value;});
4082                 if(~si6.value == "s4", {~rslot6 = ~bplaces4; ~rdo6 = ~si6.value;});
4083                 if(~si6.value == "o5", {~rslot6 = ~bplaceo5; ~rdo6 = ~si6.value;});
4084                 if(~si6.value == "f5", {~rslot6 = ~bplacef5; ~rdo6 = ~si6.value;});
4085                 if(~si6.value == "s5", {~rslot6 = ~bplaces5; ~rdo6 = ~si6.value;});
4086                 if(~si6.value == "o6", {~rslot6 = ~bplaceo6; ~rdo6 = ~si6.value;});
4087                 if(~si6.value == "f6", {~rslot6 = ~bplacef6; ~rdo6 = ~si6.value;});
4088                 if(~si6.value == "s6", {~rslot6 = ~bplaces6; ~rdo6 = ~si6.value;});
4089                 if(~si6.value == "o7", {~rslot6 = ~bplaceo7; ~rdo6 = ~si6.value;});
4090                 if(~si6.value == "f7", {~rslot6 = ~bplacef7; ~rdo6 = ~si6.value;});
4091                 if(~si6.value == "s7", {~rslot6 = ~bplaces7; ~rdo6 = ~si6.value;});
4092                 if(~si6.value == "o8", {~rslot6 = ~bplaceo8; ~rdo6 = ~si6.value;});
4093                 if(~si6.value == "f8", {~rslot6 = ~bplacef8; ~rdo6 = ~si6.value;});
4094                 if(~si6.value == "s8", {~rslot6 = ~bplaces8; ~rdo6 = ~si6.value;});
4095         };
4096         ~si7set = {
4097                 if(~si7.value == "o1", {~rslot7 = ~bplaceo1; ~rdo7 = ~si7.value;});
4098                 if(~si7.value == "f1", {~rslot7 = ~bplacef1; ~rdo7 = ~si7.value;});
4099                 if(~si7.value == "s1", {~rslot7 = ~bplaces1; ~rdo7 = ~si7.value;});
4100                 if(~si7.value == "o2", {~rslot7 = ~bplaceo2; ~rdo7 = ~si7.value;});
4101                 if(~si7.value == "f2", {~rslot7 = ~bplacef2; ~rdo7 = ~si7.value;});
4102                 if(~si7.value == "s2", {~rslot7 = ~bplaces2; ~rdo7 = ~si7.value;});
4103                 if(~si7.value == "o3", {~rslot7 = ~bplaceo3; ~rdo7 = ~si7.value;});
4104                 if(~si7.value == "f3", {~rslot7 = ~bplacef3; ~rdo7 = ~si7.value;});
4105                 if(~si7.value == "s3", {~rslot7 = ~bplaces3; ~rdo7 = ~si7.value;});
4106                 if(~si7.value == "o4", {~rslot7 = ~bplaceo4; ~rdo7 = ~si7.value;});
4107                 if(~si7.value == "f4", {~rslot7 = ~bplacef4; ~rdo7 = ~si7.value;});
4108                 if(~si7.value == "s4", {~rslot7 = ~bplaces4; ~rdo7 = ~si7.value;});
4109                 if(~si7.value == "o5", {~rslot7 = ~bplaceo5; ~rdo7 = ~si7.value;});
4110                 if(~si7.value == "f5", {~rslot7 = ~bplacef5; ~rdo7 = ~si7.value;});
4111                 if(~si7.value == "s5", {~rslot7 = ~bplaces5; ~rdo7 = ~si7.value;});
4112                 if(~si7.value == "o6", {~rslot7 = ~bplaceo6; ~rdo7 = ~si7.value;});
4113                 if(~si7.value == "f6", {~rslot7 = ~bplacef6; ~rdo7 = ~si7.value;});
4114                 if(~si7.value == "s6", {~rslot7 = ~bplaces6; ~rdo7 = ~si7.value;});
4115                 if(~si7.value == "o7", {~rslot7 = ~bplaceo7; ~rdo7 = ~si7.value;});
4116                 if(~si7.value == "f7", {~rslot7 = ~bplacef7; ~rdo7 = ~si7.value;});
4117                 if(~si7.value == "s7", {~rslot7 = ~bplaces7; ~rdo7 = ~si7.value;});
4118                 if(~si7.value == "o8", {~rslot7 = ~bplaceo8; ~rdo7 = ~si7.value;});
4119                 if(~si7.value == "f8", {~rslot7 = ~bplacef8; ~rdo7 = ~si7.value;});
4120                 if(~si7.value == "s8", {~rslot7 = ~bplaces8; ~rdo7 = ~si7.value;});
4121         };
4122         ~si8set = {
4123                 if(~si8.value == "o1", {~rslot8 = ~bplaceo1; ~rdo8 = ~si8.value;});
4124                 if(~si8.value == "f1", {~rslot8 = ~bplacef1; ~rdo8 = ~si8.value;});
4125                 if(~si8.value == "s1", {~rslot8 = ~bplaces1; ~rdo8 = ~si8.value;});
4126                 if(~si8.value == "o2", {~rslot8 = ~bplaceo2; ~rdo8 = ~si8.value;});
4127                 if(~si8.value == "f2", {~rslot8 = ~bplacef2; ~rdo8 = ~si8.value;});
4128                 if(~si8.value == "s2", {~rslot8 = ~bplaces2; ~rdo8 = ~si8.value;});
4129                 if(~si8.value == "o3", {~rslot8 = ~bplaceo3; ~rdo8 = ~si8.value;});
4130                 if(~si8.value == "f3", {~rslot8 = ~bplacef3; ~rdo8 = ~si8.value;});
4131                 if(~si8.value == "s3", {~rslot8 = ~bplaces3; ~rdo8 = ~si8.value;});
4132                 if(~si8.value == "o4", {~rslot8 = ~bplaceo4; ~rdo8 = ~si8.value;});
4133                 if(~si8.value == "f4", {~rslot8 = ~bplacef4; ~rdo8 = ~si8.value;});
4134                 if(~si8.value == "s4", {~rslot8 = ~bplaces4; ~rdo8 = ~si8.value;});
4135                 if(~si8.value == "o5", {~rslot8 = ~bplaceo5; ~rdo8 = ~si8.value;});
4136                 if(~si8.value == "f5", {~rslot8 = ~bplacef5; ~rdo8 = ~si8.value;});
4137                 if(~si8.value == "s5", {~rslot8 = ~bplaces5; ~rdo8 = ~si8.value;});
4138                 if(~si8.value == "o6", {~rslot8 = ~bplaceo6; ~rdo8 = ~si8.value;});
4139                 if(~si8.value == "f6", {~rslot8 = ~bplacef6; ~rdo8 = ~si8.value;});
4140                 if(~si8.value == "s6", {~rslot8 = ~bplaces6; ~rdo8 = ~si8.value;});
4141                 if(~si8.value == "o7", {~rslot8 = ~bplaceo7; ~rdo8 = ~si8.value;});
4142                 if(~si8.value == "f7", {~rslot8 = ~bplacef7; ~rdo8 = ~si8.value;});
4143                 if(~si8.value == "s7", {~rslot8 = ~bplaces7; ~rdo8 = ~si8.value;});
4144                 if(~si8.value == "o8", {~rslot8 = ~bplaceo8; ~rdo8 = ~si8.value;});
4145                 if(~si8.value == "f8", {~rslot8 = ~bplacef8; ~rdo8 = ~si8.value;});
4146                 if(~si8.value == "s8", {~rslot8 = ~bplaces8; ~rdo8 = ~si8.value;});
4147         };
4148
4149
4150         //routine function button
4151
4152         ~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;
4153
4154                 if(button.value == 1, {
4155                         ({
4156                                 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;
4157                                 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;
4158                                 ~rview = View(w, Rect(Window.screenBounds.width-(340+46),Window.screenBounds.height-(340+46/1.6180339887499)-110,340+46,340+46/1.6180339887499)).front;
4159                                 /*w.view.decorator=FlowLayout(w.view.bounds);
4160                                 w.view.decorator.gap=2@2;*/
4161
4162                                 top = 0;
4163
4164                                 i1 = StaticText(~rview, Rect(leftdo , top=top, width, height)).background_(Color.black).string_("rslot1").stringColor_(Color.white);
4165                                 i2 = StaticText(~rview, Rect(leftdo , top=top+height, width, height)).background_(Color.black).string_("rslot2").stringColor_(Color.white);
4166                                 i3 = StaticText(~rview, Rect(leftdo , top=top+height, width, height)).background_(Color.black).string_("rslot3").stringColor_(Color.white);
4167                                 i4 = StaticText(~rview, Rect(leftdo , top=top+height, width, height)).background_(Color.black).string_("rslot4").stringColor_(Color.white);
4168                                 i5 = StaticText(~rview, Rect(leftdo , top=top+height, width, height)).background_(Color.black).string_("rslot5").stringColor_(Color.white);
4169                                 i6 = StaticText(~rview, Rect(leftdo , top=top+height, width, height)).background_(Color.black).string_("rslot6").stringColor_(Color.white);
4170                                 i7 = StaticText(~rview, Rect(leftdo , top=top+height, width, height)).background_(Color.black).string_("rslot7").stringColor_(Color.white);
4171                                 i8 = StaticText(~rview, Rect(leftdo , top=top+height, width, height)).background_(Color.black).string_("rslot8").stringColor_(Color.white);
4172
4173                                 top = 0;
4174
4175                                 ~si1a=TextField(~rview, Rect(leftdobox , top=top, widthbox/2, heightbox)).background_(Color.black).stringColor_(Color.white).value_(~rdo1a);
4176                                 ~si1b=TextField(~rview, Rect(leftdobox+(widthbox/2) , top=top, widthbox/2, heightbox)).background_(Color.black).stringColor_(Color.white).value_(~rdo1b);
4177                                 ~si2=TextField(~rview, Rect(leftdobox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).stringColor_(Color.white).value_(~rdo2);
4178                                 ~si3=TextField(~rview, Rect(leftdobox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).stringColor_(Color.white).value_(~rdo3);
4179                                 ~si4=TextField(~rview, Rect(leftdobox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).stringColor_(Color.white).value_(~rdo4);
4180                                 ~si5=TextField(~rview, Rect(leftdobox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).stringColor_(Color.white).value_(~rdo5);
4181                                 ~si6=TextField(~rview, Rect(leftdobox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).stringColor_(Color.white).value_(~rdo6);
4182                                 ~si7=TextField(~rview, Rect(leftdobox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).stringColor_(Color.white).value_(~rdo7);
4183                                 ~si8=TextField(~rview, Rect(leftdobox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).stringColor_(Color.white).value_(~rdo8);
4184
4185                                 top = 0;
4186
4187                                 t1 = StaticText(~rview, Rect(lefttime , top=top, width, height)).background_(Color.black).string_("rtime1").stringColor_(Color.white);
4188                                 t2 = StaticText(~rview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("rtime2").stringColor_(Color.white);
4189                                 t3 = StaticText(~rview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("rtime3").stringColor_(Color.white);
4190                                 t4 = StaticText(~rview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("rtime4").stringColor_(Color.white);
4191                                 t5 = StaticText(~rview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("rtime5").stringColor_(Color.white);
4192                                 t6 = StaticText(~rview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("rtime6").stringColor_(Color.white);
4193                                 t7 = StaticText(~rview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("rtime7").stringColor_(Color.white);
4194                                 t8 = StaticText(~rview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("rtime8").stringColor_(Color.white);
4195                                 tall = StaticText(~rview, Rect(lefttime , top=top+height, width, height)).background_(Color.black).string_("all time").stringColor_(Color.white);
4196
4197
4198                                 top = 0;
4199
4200                                 st1=NumberBox(~rview, Rect(lefttimebox , top=top, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~rtime1);
4201                                 st2=NumberBox(~rview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~rtime2);
4202                                 st3=NumberBox(~rview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~rtime3);
4203                                 st4=NumberBox(~rview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~rtime4);
4204                                 st5=NumberBox(~rview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~rtime5);
4205                                 st6=NumberBox(~rview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~rtime6);
4206                                 st7=NumberBox(~rview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~rtime7);
4207                                 st8=NumberBox(~rview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~rtime8);
4208                                 stall=NumberBox(~rview, Rect(lefttimebox , top=top+heightbox, widthbox, heightbox)).background_(Color.black).normalColor_(Color.white;).value_(~rtimeall);
4209
4210
4211                                 ~si1a.action_({~si1aset.value});
4212                                 ~si1b.action_({~si1bset.value});
4213                                 ~si2.action_({~si2set.value});
4214                                 ~si3.action_({~si3set.value});
4215                                 ~si4.action_({~si4set.value});
4216                                 ~si5.action_({~si5set.value});
4217                                 ~si6.action_({~si6set.value});
4218                                 ~si7.action_({~si7set.value});
4219                                 ~si8.action_({~si8set.value});
4220
4221                                 stall.action_({arg val;
4222                                         ~rtimeall = val.value;
4223                                         ~rtime1 = val.value;
4224                                         ~rtime2 = val.value;
4225                                         ~rtime3 = val.value;
4226                                         ~rtime4 = val.value;
4227                                         ~rtime5 = val.value;
4228                                         ~rtime6 = val.value;
4229                                         ~rtime7 = val.value;
4230                                         ~rtime8 = val.value;
4231                                         ~rview.close; ~rviewbutton.valueAction_(1);
4232                                 });
4233                                 st1.action_({arg val; ~rtime1 = val.value;});
4234                                 st2.action_({arg val; ~rtime2 = val.value;});
4235                                 st3.action_({arg val; ~rtime3 = val.value;});
4236                                 st4.action_({arg val; ~rtime4 = val.value;});
4237                                 st5.action_({arg val; ~rtime5 = val.value;});
4238                                 st6.action_({arg val; ~rtime6 = val.value;});
4239                                 st7.action_({arg val; ~rtime7 = val.value;});
4240                                 st8.action_({arg val; ~rtime8 = val.value;});
4241
4242                                 ~rview.background_(Color.black);
4243
4244                                 ~metronomeincr = 1;
4245
4246                                 ~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;
4247
4248                                         if(button.value == 1, {
4249
4250                                                 ~metronome = Task({
4251                                                         inf.do({
4252                                                                 AppClock.sched(0, {~metronomebutton.value = 1;});
4253                                                                 ~metronomeincr.wait;
4254                                                                 AppClock.sched(0, {~metronomebutton.value = 0;});
4255                                                                 ~metronomeincr.wait;
4256                                                         });
4257                                                 });
4258
4259                                                 ~loop = Task({
4260                                                         1.do({
4261                                                                 {~rslot1a.valueAction_(0)}.defer;
4262                                                                 ~rtime1.wait;
4263                                                                 {~rslot2.valueAction_(0)}.defer;
4264                                                                 ~rtime2.wait;
4265                                                                 {~rslot3.valueAction_(0)}.defer;
4266                                                                 ~rtime3.wait;
4267                                                                 {~rslot4.valueAction_(0)}.defer;
4268                                                                 ~rtime4.wait;
4269                                                                 {~rslot5.valueAction_(0)}.defer;
4270                                                                 ~rtime5.wait;
4271                                                                 {~rslot6.valueAction_(0)}.defer;
4272                                                                 ~rtime6.wait;
4273                                                                 {~rslot7.valueAction_(0)}.defer;
4274                                                                 ~rtime7.wait;
4275                                                                 {~rslot8.valueAction_(0)}.defer;
4276                                                                 ~rtime8.wait;
4277                                                         });
4278                                                         inf.do({
4279                                                                 {~rslot1b.valueAction_(0)}.defer;
4280                                                                 ~rtime1.wait;
4281                                                                 {~rslot2.valueAction_(0)}.defer;
4282                                                                 ~rtime2.wait;
4283                                                                 {~rslot3.valueAction_(0)}.defer;
4284                                                                 ~rtime3.wait;
4285                                                                 {~rslot4.valueAction_(0)}.defer;
4286                                                                 ~rtime4.wait;
4287                                                                 {~rslot5.valueAction_(0)}.defer;
4288                                                                 ~rtime5.wait;
4289                                                                 {~rslot6.valueAction_(0)}.defer;
4290                                                                 ~rtime6.wait;
4291                                                                 {~rslot7.valueAction_(0)}.defer;
4292                                                                 ~rtime7.wait;
4293                                                                 {~rslot8.valueAction_(0)}.defer;
4294                                                                 ~rtime8.wait;
4295                                                         });
4296                                                 }); SystemClock(~metronome.start); SystemClock(~loop.start); ~numsynths.stop;}, {
4297
4298                                                         SystemClock(~metronome.stop); SystemClock(~loop.stop); SystemClock(~loop.reset); ~synthfree.value; ~pauseroutinebutton.value = 0; ~numsynths.stop; ~numsynthsfunc.value;});
4299                                 });
4300
4301                                 ~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;
4302
4303                                         if(button.value == 1, {SystemClock(~loop.pause); ~synthpause.value;}, {SystemClock(~loop.resume); ~synthflow.value;});
4304                                 });
4305
4306                                 ~closeroutinebutton = Button.new(~rview,Rect(220, top+40, 40, 40/~gm)).states_([["close",Color.white,Color.black]]).action_({arg button;
4307
4308                                         ~rview.close; ~rviewbutton.value = 0;
4309                                 });
4310
4311                                 ~metronomebutton = Button.new(~rview,Rect(120, top+40, 40, 40/~gm)).states_([["",Color.white,Color.red],["",Color.white,Color.blue]]).action_({arg button;});
4312
4313                         }.value);
4314
4315                         if(~loop.isPlaying == true, {~routinebutton.value = 1;});
4316                         ~rview.front;
4317                 }, {~rview.close});
4318         });
4319
4320
4321         //synth identifier function
4322
4323         ~synthmonitor = StaticText(w, Rect(Window.screenBounds.width-14,~bpt+49,18,18/1.6180339887499)).background_(Color.black).stringColor_(Color.white);
4324         ~synthmonitor.string = if(~currentsynth == nil, {"nil".asString});
4325
4326         ~synthmonitorfunc = {
4327                 ~synthmonitor.close;
4328                 ~synthmonitor = StaticText(w, Rect(Window.screenBounds.width-14,~bpt+49,18,18/1.6180339887499)).background_(Color.black).stringColor_(Color.white);
4329                 ~synthmonitor.string = ~currentsynth.asString;
4330                 ~synthmonitor.font = Font(size: 10);
4331         };
4332
4333         ~synthmonitorfunc.value;
4334
4335
4336         //information button
4337
4338         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;
4339
4340                 if(button.value == 1, {
4341                         ~hb = TextView(w, Rect(0,0, Window.screenBounds.width, Window.screenBounds.height-200)).background_(Color.black);
4342                         (~hb.string =
4343                                 "(scroll down to see more)"++"\n"++"\n"++"\n"++
4344                                 "ctrl/cmd-period: stop synth/free server"++"\n"++"\n"++"\n"++
4345                                 "GUI Buttons"++"\n"++"\n"++"\n"++
4346                                 "synth0/synth1: start/stop synth set"++"\n"++"\n"++
4347                                 "pause0/pause1: pause/unpause synth set"++"\n"++"\n"++
4348                                 "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"++
4349                                 "copy: copy frequency/note info"++"\n"++"\n"++
4350                                 "kws/inst: change number of kw(King Wen) sequences per time wave instance. press set to load"++"\n"++"\n"++
4351                                 "steps/kws: change number of interval steps which occur in each kw sequence. press set to load"++"\n"++"\n"++
4352                                 "hz frequency: set the base frequency. press set to load"++"\n"++"\n"++
4353                                 "s1-s8: set/save note positions"++"\n"++"\n"++
4354                                 "uc-u8: undo changes to set note positions. press set to load"++"\n"++"\n"++
4355                                 "o1-o8: play set/saved note positions by opening a new synth set"++"\n"++"\n"++
4356                                 "f1-f8: flow transition to set/saved note positions"++"\n"++"\n"++
4357                                 "s1-s8: slide transition to set/saved note positions"++"\n"++"\n"++
4358                                 "g1-g8: groups of saved note positions"++"\n"++"\n"++
4359                                 "uc1-uc8: revert to former saved note positions"++"\n"++"\n"++
4360                                 "rc: start recording"++"\n"++"\n"++
4361                                 "prc: pause recording"++"\n"++"\n"++
4362                                 "/rc: stop recording"++"\n"++"\n"++
4363                                 "m/u: mute/unmute all"++"\n"++"\n"++
4364                                 "1-8: mute or unmute individual synth"++"\n"++"\n"++
4365                                 "rw: random western scale"++"\n"++"\n"++
4366                                 "re: random eastern scale"++"\n"++"\n"++
4367                                 "r: routine/loop function - rslot for synth set, rtime for time between transitions"++"\n"++"\n"++
4368                                 "st: stop synth timer/show timer results"++"\n"++"\n"++
4369                                 "s: set slide time/increment"++"\n"++"\n"++
4370                                 "i: help"++"\n"++"\n"++
4371                                 "m: minimize window"++"\n"++"\n"++
4372                                 "c: close window"++"\n"++"\n"++"\n"++
4373                                 "Keyboard Functions (functionality will vary with device)"++"\n"++"\n"++"\n"++
4374                                 "s: start/stop synth set"++"\n"++"\n"++
4375                                 "space bar: pause/unpause synth set"++"\n"++"\n"++
4376                                 "ctrl-period/cmd-period: stop synth/free server"++"\n"++"\n"++
4377                                 "left/right arrow(or J and L): move down/up note"++"\n"++"\n"++
4378                                 "up/down arrow(or I and K): change synth for left/right arrow note function"++"\n"++"\n"++
4379                                 "#1-8 on keyboard: choose synth for left/right arrow note function"++"\n"++"\n"++
4380                                 "r: routine/loop function - rslot for synth set, rtime for time between transitions"++"\n"++"\n"++
4381                                 "m: mute/unmute all"++"\n"++"\n"++
4382                                 "c: copy function"++"\n"++"\n"++
4383                                 "t: timed synth function"++"\n"++"\n"++
4384                                 "esc: minimize window"
4385                                 ;
4386                         );
4387                         ~hb.stringColor = Color.white;
4388                         },
4389                         {~hb.close;});
4390         });
4391
4392
4393         //random notes button 1
4394
4395         ~randombutton1 = Button.new(w,Rect(Window.screenBounds.width-20-20-20-20,~bpt+69+5-(20/~gm),20,20/1.6180339887499)).states_([["rw",Color.white,Color.black]]).action_({arg button;
4396
4397                 if((~l1a.isRunning == true) or: (~l1a1.isRunning == true), {
4398                         8.do(x = 0; {("f"++(x=x+1)).asSymbol.envirPut(~freqmap.at(rrand(36, 91));)});
4399                         ~synthflow.value;
4400                 });
4401         });
4402
4403
4404         //random notes button 2
4405
4406         ~randombutton2 = Button.new(w,Rect(Window.screenBounds.width-20-20-20,~bpt+69+5-(20/~gm),20,20/1.6180339887499)).states_([["re",Color.white,Color.black]]).action_({arg button;
4407
4408                 if((~l1a.isRunning == true) or: (~l1a1.isRunning == true), {
4409                         8.do(x = 0; {("f"++(x=x+1)).asSymbol.envirPut((~freqmap.at(127)/8).rand;)});
4410                         ~synthflow.value;
4411                 });
4412         });
4413
4414
4415         //setgroup buttons, sg1-sg8
4416
4417         ~setgroup1 = Button.new(w,Rect(Window.screenBounds.width-(Window.screenBounds.width/2)-(20*4),~bpt+69+5,20,20/1.6180339887499)).states_([["g1",Color.white,Color.black],["s1",Color.green,Color.black]]).action_({arg button;
4418
4419                 if(button.value == 1, {
4420                         #fp1,fp2,fp3,fp4,fp5,fp6,fp7,fp8,fp9,fp10,fp11,fp12=[~sg1a1,~sg1a2,~sg1a3,~sg1a4,~sg1a5,~sg1a6,~sg1a7,~sg1a8,~sg1a9,~sg1a10,~sg1a11,~sg1a12];
4421                         #fp1b,fp2b,fp3b,fp4b,fp5b,fp6b,fp7b,fp8b,fp9b,fp10b,fp11b,fp12b=[~sg1b1,~sg1b2,~sg1b3,~sg1b4,~sg1b5,~sg1b6,~sg1b7,~sg1b8,~sg1b9,~sg1b10,~sg1b11,~sg1b12];
4422                         #fp1c,fp2c,fp3c,fp4c,fp5c,fp6c,fp7c,fp8c,fp9c,fp10c,fp11c,fp12c=[~sg1c1,~sg1c2,~sg1c3,~sg1c4,~sg1c5,~sg1c6,~sg1c7,~sg1c8,~sg1c9,~sg1c10,~sg1c11,~sg1c12];
4423                         #fp1d,fp2d,fp3d,fp4d,fp5d,fp6d,fp7d,fp8d,fp9d,fp10d,fp11d,fp12d=[~sg1d1,~sg1d2,~sg1d3,~sg1d4,~sg1d5,~sg1d6,~sg1d7,~sg1d8,~sg1d9,~sg1d10,~sg1d11,~sg1d12];
4424                         #fp1e,fp2e,fp3e,fp4e,fp5e,fp6e,fp7e,fp8e,fp9e,fp10e,fp11e,fp12e=[~sg1e1,~sg1e2,~sg1e3,~sg1e4,~sg1e5,~sg1e6,~sg1e7,~sg1e8,~sg1e9,~sg1e10,~sg1e11,~sg1e12];
4425                         #fp1f,fp2f,fp3f,fp4f,fp5f,fp6f,fp7f,fp8f,fp9f,fp10f,fp11f,fp12f=[~sg1f1,~sg1f2,~sg1f3,~sg1f4,~sg1f5,~sg1f6,~sg1f7,~sg1f8,~sg1f9,~sg1f10,~sg1f11,~sg1f12];
4426                         #fp1g,fp2g,fp3g,fp4g,fp5g,fp6g,fp7g,fp8g,fp9g,fp10g,fp11g,fp12g=[~sg1g1,~sg1g2,~sg1g3,~sg1g4,~sg1g5,~sg1g6,~sg1g7,~sg1g8,~sg1g9,~sg1g10,~sg1g11,~sg1g12];
4427                         #fp1h,fp2h,fp3h,fp4h,fp5h,fp6h,fp7h,fp8h,fp9h,fp10h,fp11h,fp12h=[~sg1h1,~sg1h2,~sg1h3,~sg1h4,~sg1h5,~sg1h6,~sg1h7,~sg1h8,~sg1h9,~sg1h10,~sg1h11,~sg1h12];
4428
4429                         ~setgroup2.value = 0;
4430                         ~setgroup3.value = 0;
4431                         ~setgroup4.value = 0;
4432                         ~setgroup5.value = 0;
4433                         ~setgroup6.value = 0;
4434                         ~setgroup7.value = 0;
4435                         ~setgroup8.value = 0;
4436
4437                         ~setgroupval = 1;
4438                 });
4439         });
4440         ~setgroup2 = Button.new(w,Rect(Window.screenBounds.width-(Window.screenBounds.width/2)-(20*3),~bpt+69+5,20,20/1.6180339887499)).states_([["g2",Color.white,Color.black],["s2",Color.green,Color.black]]).action_({arg button;
4441
4442                 if(button.value == 1, {
4443                         #fp1,fp2,fp3,fp4,fp5,fp6,fp7,fp8,fp9,fp10,fp11,fp12=[~sg2a1,~sg2a2,~sg2a3,~sg2a4,~sg2a5,~sg2a6,~sg2a7,~sg2a8,~sg2a9,~sg2a10,~sg2a11,~sg2a12];
4444                         #fp1b,fp2b,fp3b,fp4b,fp5b,fp6b,fp7b,fp8b,fp9b,fp10b,fp11b,fp12b=[~sg2b1,~sg2b2,~sg2b3,~sg2b4,~sg2b5,~sg2b6,~sg2b7,~sg2b8,~sg2b9,~sg2b10,~sg2b11,~sg2b12];
4445                         #fp1c,fp2c,fp3c,fp4c,fp5c,fp6c,fp7c,fp8c,fp9c,fp10c,fp11c,fp12c=[~sg2c1,~sg2c2,~sg2c3,~sg2c4,~sg2c5,~sg2c6,~sg2c7,~sg2c8,~sg2c9,~sg2c10,~sg2c11,~sg2c12];
4446                         #fp1d,fp2d,fp3d,fp4d,fp5d,fp6d,fp7d,fp8d,fp9d,fp10d,fp11d,fp12d=[~sg2d1,~sg2d2,~sg2d3,~sg2d4,~sg2d5,~sg2d6,~sg2d7,~sg2d8,~sg2d9,~sg2d10,~sg2d11,~sg2d12];
4447                         #fp1e,fp2e,fp3e,fp4e,fp5e,fp6e,fp7e,fp8e,fp9e,fp10e,fp11e,fp12e=[~sg2e1,~sg2e2,~sg2e3,~sg2e4,~sg2e5,~sg2e6,~sg2e7,~sg2e8,~sg2e9,~sg2e10,~sg2e11,~sg2e12];
4448                         #fp1f,fp2f,fp3f,fp4f,fp5f,fp6f,fp7f,fp8f,fp9f,fp10f,fp11f,fp12f=[~sg2f1,~sg2f2,~sg2f3,~sg2f4,~sg2f5,~sg2f6,~sg2f7,~sg2f8,~sg2f9,~sg2f10,~sg2f11,~sg2f12];
4449                         #fp1g,fp2g,fp3g,fp4g,fp5g,fp6g,fp7g,fp8g,fp9g,fp10g,fp11g,fp12g=[~sg2g1,~sg2g2,~sg2g3,~sg2g4,~sg2g5,~sg2g6,~sg2g7,~sg2g8,~sg2g9,~sg2g10,~sg2g11,~sg2g12];
4450                         #fp1h,fp2h,fp3h,fp4h,fp5h,fp6h,fp7h,fp8h,fp9h,fp10h,fp11h,fp12h=[~sg2h1,~sg2h2,~sg2h3,~sg2h4,~sg2h5,~sg2h6,~sg2h7,~sg2h8,~sg2h9,~sg2h10,~sg2h11,~sg2h12];
4451
4452                         ~setgroup1.value = 0;
4453                         ~setgroup3.value = 0;
4454                         ~setgroup4.value = 0;
4455                         ~setgroup5.value = 0;
4456                         ~setgroup6.value = 0;
4457                         ~setgroup7.value = 0;
4458                         ~setgroup8.value = 0;
4459
4460                         ~setgroupval = 2;
4461                 });
4462         });
4463         ~setgroup3 = Button.new(w,Rect(Window.screenBounds.width-(Window.screenBounds.width/2)-(20*2),~bpt+69+5,20,20/1.6180339887499)).states_([["g3",Color.white,Color.black],["s3",Color.green,Color.black]]).action_({arg button;
4464
4465                 if(button.value == 1, {
4466                         #fp1,fp2,fp3,fp4,fp5,fp6,fp7,fp8,fp9,fp10,fp11,fp12=[~sg3a1,~sg3a2,~sg3a3,~sg3a4,~sg3a5,~sg3a6,~sg3a7,~sg3a8,~sg3a9,~sg3a10,~sg3a11,~sg3a12];
4467                         #fp1b,fp2b,fp3b,fp4b,fp5b,fp6b,fp7b,fp8b,fp9b,fp10b,fp11b,fp12b=[~sg3b1,~sg3b2,~sg3b3,~sg3b4,~sg3b5,~sg3b6,~sg3b7,~sg3b8,~sg3b9,~sg3b10,~sg3b11,~sg3b12];
4468                         #fp1c,fp2c,fp3c,fp4c,fp5c,fp6c,fp7c,fp8c,fp9c,fp10c,fp11c,fp12c=[~sg3c1,~sg3c2,~sg3c3,~sg3c4,~sg3c5,~sg3c6,~sg3c7,~sg3c8,~sg3c9,~sg3c10,~sg3c11,~sg3c12];
4469                         #fp1d,fp2d,fp3d,fp4d,fp5d,fp6d,fp7d,fp8d,fp9d,fp10d,fp11d,fp12d=[~sg3d1,~sg3d2,~sg3d3,~sg3d4,~sg3d5,~sg3d6,~sg3d7,~sg3d8,~sg3d9,~sg3d10,~sg3d11,~sg3d12];
4470                         #fp1e,fp2e,fp3e,fp4e,fp5e,fp6e,fp7e,fp8e,fp9e,fp10e,fp11e,fp12e=[~sg3e1,~sg3e2,~sg3e3,~sg3e4,~sg3e5,~sg3e6,~sg3e7,~sg3e8,~sg3e9,~sg3e10,~sg3e11,~sg3e12];
4471                         #fp1f,fp2f,fp3f,fp4f,fp5f,fp6f,fp7f,fp8f,fp9f,fp10f,fp11f,fp12f=[~sg3f1,~sg3f2,~sg3f3,~sg3f4,~sg3f5,~sg3f6,~sg3f7,~sg3f8,~sg3f9,~sg3f10,~sg3f11,~sg3f12];
4472                         #fp1g,fp2g,fp3g,fp4g,fp5g,fp6g,fp7g,fp8g,fp9g,fp10g,fp11g,fp12g=[~sg3g1,~sg3g2,~sg3g3,~sg3g4,~sg3g5,~sg3g6,~sg3g7,~sg3g8,~sg3g9,~sg3g10,~sg3g11,~sg3g12];
4473                         #fp1h,fp2h,fp3h,fp4h,fp5h,fp6h,fp7h,fp8h,fp9h,fp10h,fp11h,fp12h=[~sg3h1,~sg3h2,~sg3h3,~sg3h4,~sg3h5,~sg3h6,~sg3h7,~sg3h8,~sg3h9,~sg3h10,~sg3h11,~sg3h12];
4474
4475                         ~setgroup1.value = 0;
4476                         ~setgroup2.value = 0;
4477                         ~setgroup4.value = 0;
4478                         ~setgroup5.value = 0;
4479                         ~setgroup6.value = 0;
4480                         ~setgroup7.value = 0;
4481                         ~setgroup8.value = 0;
4482
4483                         ~setgroupval = 3;
4484                 });
4485         });
4486         ~setgroup4 = Button.new(w,Rect(Window.screenBounds.width-(Window.screenBounds.width/2)-(20*1),~bpt+69+5,20,20/1.6180339887499)).states_([["g4",Color.white,Color.black],["s4",Color.green,Color.black]]).action_({arg button;
4487
4488                 if(button.value == 1, {
4489                         #fp1,fp2,fp3,fp4,fp5,fp6,fp7,fp8,fp9,fp10,fp11,fp12=[~sg4a1,~sg4a2,~sg4a3,~sg4a4,~sg4a5,~sg4a6,~sg4a7,~sg4a8,~sg4a9,~sg4a10,~sg4a11,~sg4a12];
4490                         #fp1b,fp2b,fp3b,fp4b,fp5b,fp6b,fp7b,fp8b,fp9b,fp10b,fp11b,fp12b=[~sg4b1,~sg4b2,~sg4b3,~sg4b4,~sg4b5,~sg4b6,~sg4b7,~sg4b8,~sg4b9,~sg4b10,~sg4b11,~sg4b12];
4491                         #fp1c,fp2c,fp3c,fp4c,fp5c,fp6c,fp7c,fp8c,fp9c,fp10c,fp11c,fp12c=[~sg4c1,~sg4c2,~sg4c3,~sg4c4,~sg4c5,~sg4c6,~sg4c7,~sg4c8,~sg4c9,~sg4c10,~sg4c11,~sg4c12];
4492                         #fp1d,fp2d,fp3d,fp4d,fp5d,fp6d,fp7d,fp8d,fp9d,fp10d,fp11d,fp12d=[~sg4d1,~sg4d2,~sg4d3,~sg4d4,~sg4d5,~sg4d6,~sg4d7,~sg4d8,~sg4d9,~sg4d10,~sg4d11,~sg4d12];
4493                         #fp1e,fp2e,fp3e,fp4e,fp5e,fp6e,fp7e,fp8e,fp9e,fp10e,fp11e,fp12e=[~sg4e1,~sg4e2,~sg4e3,~sg4e4,~sg4e5,~sg4e6,~sg4e7,~sg4e8,~sg4e9,~sg4e10,~sg4e11,~sg4e12];
4494                         #fp1f,fp2f,fp3f,fp4f,fp5f,fp6f,fp7f,fp8f,fp9f,fp10f,fp11f,fp12f=[~sg4f1,~sg4f2,~sg4f3,~sg4f4,~sg4f5,~sg4f6,~sg4f7,~sg4f8,~sg4f9,~sg4f10,~sg4f11,~sg4f12];
4495                         #fp1g,fp2g,fp3g,fp4g,fp5g,fp6g,fp7g,fp8g,fp9g,fp10g,fp11g,fp12g=[~sg4g1,~sg4g2,~sg4g3,~sg4g4,~sg4g5,~sg4g6,~sg4g7,~sg4g8,~sg4g9,~sg4g10,~sg4g11,~sg4g12];
4496                         #fp1h,fp2h,fp3h,fp4h,fp5h,fp6h,fp7h,fp8h,fp9h,fp10h,fp11h,fp12h=[~sg4h1,~sg4h2,~sg4h3,~sg4h4,~sg4h5,~sg4h6,~sg4h7,~sg4h8,~sg4h9,~sg4h10,~sg4h11,~sg4h12];
4497
4498                         ~setgroup1.value = 0;
4499                         ~setgroup2.value = 0;
4500                         ~setgroup3.value = 0;
4501                         ~setgroup5.value = 0;
4502                         ~setgroup6.value = 0;
4503                         ~setgroup7.value = 0;
4504                         ~setgroup8.value = 0;
4505
4506                         ~setgroupval = 4;
4507                 });
4508         });
4509         ~setgroup5 = Button.new(w,Rect(Window.screenBounds.width-(Window.screenBounds.width/2)+(0*1),~bpt+69+5,20,20/1.6180339887499)).states_([["g5",Color.white,Color.black],["s5",Color.green,Color.black]]).action_({arg button;
4510
4511                 if(button.value == 1, {
4512                         #fp1,fp2,fp3,fp4,fp5,fp6,fp7,fp8,fp9,fp10,fp11,fp12=[~sg5a1,~sg5a2,~sg5a3,~sg5a4,~sg5a5,~sg5a6,~sg5a7,~sg5a8,~sg5a9,~sg5a10,~sg5a11,~sg5a12];
4513                         #fp1b,fp2b,fp3b,fp4b,fp5b,fp6b,fp7b,fp8b,fp9b,fp10b,fp11b,fp12b=[~sg5b1,~sg5b2,~sg5b3,~sg5b4,~sg5b5,~sg5b6,~sg5b7,~sg5b8,~sg5b9,~sg5b10,~sg5b11,~sg5b12];
4514                         #fp1c,fp2c,fp3c,fp4c,fp5c,fp6c,fp7c,fp8c,fp9c,fp10c,fp11c,fp12c=[~sg5c1,~sg5c2,~sg5c3,~sg5c4,~sg5c5,~sg5c6,~sg5c7,~sg5c8,~sg5c9,~sg5c10,~sg5c11,~sg5c12];
4515                         #fp1d,fp2d,fp3d,fp4d,fp5d,fp6d,fp7d,fp8d,fp9d,fp10d,fp11d,fp12d=[~sg5d1,~sg5d2,~sg5d3,~sg5d4,~sg5d5,~sg5d6,~sg5d7,~sg5d8,~sg5d9,~sg5d10,~sg5d11,~sg5d12];
4516                         #fp1e,fp2e,fp3e,fp4e,fp5e,fp6e,fp7e,fp8e,fp9e,fp10e,fp11e,fp12e=[~sg5e1,~sg5e2,~sg5e3,~sg5e4,~sg5e5,~sg5e6,~sg5e7,~sg5e8,~sg5e9,~sg5e10,~sg5e11,~sg5e12];
4517                         #fp1f,fp2f,fp3f,fp4f,fp5f,fp6f,fp7f,fp8f,fp9f,fp10f,fp11f,fp12f=[~sg5f1,~sg5f2,~sg5f3,~sg5f4,~sg5f5,~sg5f6,~sg5f7,~sg5f8,~sg5f9,~sg5f10,~sg5f11,~sg5f12];
4518                         #fp1g,fp2g,fp3g,fp4g,fp5g,fp6g,fp7g,fp8g,fp9g,fp10g,fp11g,fp12g=[~sg5g1,~sg5g2,~sg5g3,~sg5g4,~sg5g5,~sg5g6,~sg5g7,~sg5g8,~sg5g9,~sg5g10,~sg5g11,~sg5g12];
4519                         #fp1h,fp2h,fp3h,fp4h,fp5h,fp6h,fp7h,fp8h,fp9h,fp10h,fp11h,fp12h=[~sg5h1,~sg5h2,~sg5h3,~sg5h4,~sg5h5,~sg5h6,~sg5h7,~sg5h8,~sg5h9,~sg5h10,~sg5h11,~sg5h12];
4520
4521                         ~setgroup1.value = 0;
4522                         ~setgroup2.value = 0;
4523                         ~setgroup3.value = 0;
4524                         ~setgroup4.value = 0;
4525                         ~setgroup6.value = 0;
4526                         ~setgroup7.value = 0;
4527                         ~setgroup8.value = 0;
4528
4529                         ~setgroupval = 5;
4530                 });
4531         });
4532         ~setgroup6 = Button.new(w,Rect(Window.screenBounds.width-(Window.screenBounds.width/2)+(20*1),~bpt+69+5,20,20/1.6180339887499)).states_([["g6",Color.white,Color.black],["s6",Color.green,Color.black]]).action_({arg button;
4533
4534                 if(button.value == 1, {
4535                         #fp1,fp2,fp3,fp4,fp5,fp6,fp7,fp8,fp9,fp10,fp11,fp12=[~sg6a1,~sg6a2,~sg6a3,~sg6a4,~sg6a5,~sg6a6,~sg6a7,~sg6a8,~sg6a9,~sg6a10,~sg6a11,~sg6a12];
4536                         #fp1b,fp2b,fp3b,fp4b,fp5b,fp6b,fp7b,fp8b,fp9b,fp10b,fp11b,fp12b=[~sg6b1,~sg6b2,~sg6b3,~sg6b4,~sg6b5,~sg6b6,~sg6b7,~sg6b8,~sg6b9,~sg6b10,~sg6b11,~sg6b12];
4537                         #fp1c,fp2c,fp3c,fp4c,fp5c,fp6c,fp7c,fp8c,fp9c,fp10c,fp11c,fp12c=[~sg6c1,~sg6c2,~sg6c3,~sg6c4,~sg6c5,~sg6c6,~sg6c7,~sg6c8,~sg6c9,~sg6c10,~sg6c11,~sg6c12];
4538                         #fp1d,fp2d,fp3d,fp4d,fp5d,fp6d,fp7d,fp8d,fp9d,fp10d,fp11d,fp12d=[~sg6d1,~sg6d2,~sg6d3,~sg6d4,~sg6d5,~sg6d6,~sg6d7,~sg6d8,~sg6d9,~sg6d10,~sg6d11,~sg6d12];
4539                         #fp1e,fp2e,fp3e,fp4e,fp5e,fp6e,fp7e,fp8e,fp9e,fp10e,fp11e,fp12e=[~sg6e1,~sg6e2,~sg6e3,~sg6e4,~sg6e5,~sg6e6,~sg6e7,~sg6e8,~sg6e9,~sg6e10,~sg6e11,~sg6e12];
4540                         #fp1f,fp2f,fp3f,fp4f,fp5f,fp6f,fp7f,fp8f,fp9f,fp10f,fp11f,fp12f=[~sg6f1,~sg6f2,~sg6f3,~sg6f4,~sg6f5,~sg6f6,~sg6f7,~sg6f8,~sg6f9,~sg6f10,~sg6f11,~sg6f12];
4541                         #fp1g,fp2g,fp3g,fp4g,fp5g,fp6g,fp7g,fp8g,fp9g,fp10g,fp11g,fp12g=[~sg6g1,~sg6g2,~sg6g3,~sg6g4,~sg6g5,~sg6g6,~sg6g7,~sg6g8,~sg6g9,~sg6g10,~sg6g11,~sg6g12];
4542                         #fp1h,fp2h,fp3h,fp4h,fp5h,fp6h,fp7h,fp8h,fp9h,fp10h,fp11h,fp12h=[~sg6h1,~sg6h2,~sg6h3,~sg6h4,~sg6h5,~sg6h6,~sg6h7,~sg6h8,~sg6h9,~sg6h10,~sg6h11,~sg6h12];
4543
4544                         ~setgroup1.value = 0;
4545                         ~setgroup2.value = 0;
4546                         ~setgroup3.value = 0;
4547                         ~setgroup4.value = 0;
4548                         ~setgroup5.value = 0;
4549                         ~setgroup7.value = 0;
4550                         ~setgroup8.value = 0;
4551
4552                         ~setgroupval = 6;
4553                 });
4554         });
4555         ~setgroup7 = Button.new(w,Rect(Window.screenBounds.width-(Window.screenBounds.width/2)+(20*2),~bpt+69+5,20,20/1.6180339887499)).states_([["g7",Color.white,Color.black],["s7",Color.green,Color.black]]).action_({arg button;
4556
4557                 if(button.value == 1, {
4558                         #fp1,fp2,fp3,fp4,fp5,fp6,fp7,fp8,fp9,fp10,fp11,fp12=[~sg7a1,~sg7a2,~sg7a3,~sg7a4,~sg7a5,~sg7a6,~sg7a7,~sg7a8,~sg7a9,~sg7a10,~sg7a11,~sg7a12];
4559                         #fp1b,fp2b,fp3b,fp4b,fp5b,fp6b,fp7b,fp8b,fp9b,fp10b,fp11b,fp12b=[~sg7b1,~sg7b2,~sg7b3,~sg7b4,~sg7b5,~sg7b6,~sg7b7,~sg7b8,~sg7b9,~sg7b10,~sg7b11,~sg7b12];
4560                         #fp1c,fp2c,fp3c,fp4c,fp5c,fp6c,fp7c,fp8c,fp9c,fp10c,fp11c,fp12c=[~sg7c1,~sg7c2,~sg7c3,~sg7c4,~sg7c5,~sg7c6,~sg7c7,~sg7c8,~sg7c9,~sg7c10,~sg7c11,~sg7c12];
4561                         #fp1d,fp2d,fp3d,fp4d,fp5d,fp6d,fp7d,fp8d,fp9d,fp10d,fp11d,fp12d=[~sg7d1,~sg7d2,~sg7d3,~sg7d4,~sg7d5,~sg7d6,~sg7d7,~sg7d8,~sg7d9,~sg7d10,~sg7d11,~sg7d12];
4562                         #fp1e,fp2e,fp3e,fp4e,fp5e,fp6e,fp7e,fp8e,fp9e,fp10e,fp11e,fp12e=[~sg7e1,~sg7e2,~sg7e3,~sg7e4,~sg7e5,~sg7e6,~sg7e7,~sg7e8,~sg7e9,~sg7e10,~sg7e11,~sg7e12];
4563                         #fp1f,fp2f,fp3f,fp4f,fp5f,fp6f,fp7f,fp8f,fp9f,fp10f,fp11f,fp12f=[~sg7f1,~sg7f2,~sg7f3,~sg7f4,~sg7f5,~sg7f6,~sg7f7,~sg7f8,~sg7f9,~sg7f10,~sg7f11,~sg7f12];
4564                         #fp1g,fp2g,fp3g,fp4g,fp5g,fp6g,fp7g,fp8g,fp9g,fp10g,fp11g,fp12g=[~sg7g1,~sg7g2,~sg7g3,~sg7g4,~sg7g5,~sg7g6,~sg7g7,~sg7g8,~sg7g9,~sg7g10,~sg7g11,~sg7g12];
4565                         #fp1h,fp2h,fp3h,fp4h,fp5h,fp6h,fp7h,fp8h,fp9h,fp10h,fp11h,fp12h=[~sg7h1,~sg7h2,~sg7h3,~sg7h4,~sg7h5,~sg7h6,~sg7h7,~sg7h8,~sg7h9,~sg7h10,~sg7h11,~sg7h12];
4566
4567                         ~setgroup1.value = 0;
4568                         ~setgroup2.value = 0;
4569                         ~setgroup3.value = 0;
4570                         ~setgroup4.value = 0;
4571                         ~setgroup5.value = 0;
4572                         ~setgroup6.value = 0;
4573                         ~setgroup8.value = 0;
4574
4575                         ~setgroupval = 7;
4576                 });
4577         });
4578         ~setgroup8 = Button.new(w,Rect(Window.screenBounds.width-(Window.screenBounds.width/2)+(20*3),~bpt+69+5,20,20/1.6180339887499)).states_([["g8",Color.white,Color.black],["s8",Color.green,Color.black]]).action_({arg button;
4579
4580                 if(button.value == 1, {
4581                         #fp1,fp2,fp3,fp4,fp5,fp6,fp7,fp8,fp9,fp10,fp11,fp12=[~sg8a1,~sg8a2,~sg8a3,~sg8a4,~sg8a5,~sg8a6,~sg8a7,~sg8a8,~sg8a9,~sg8a10,~sg8a11,~sg8a12];
4582                         #fp1b,fp2b,fp3b,fp4b,fp5b,fp6b,fp7b,fp8b,fp9b,fp10b,fp11b,fp12b=[~sg8b1,~sg8b2,~sg8b3,~sg8b4,~sg8b5,~sg8b6,~sg8b7,~sg8b8,~sg8b9,~sg8b10,~sg8b11,~sg8b12];
4583                         #fp1c,fp2c,fp3c,fp4c,fp5c,fp6c,fp7c,fp8c,fp9c,fp10c,fp11c,fp12c=[~sg8c1,~sg8c2,~sg8c3,~sg8c4,~sg8c5,~sg8c6,~sg8c7,~sg8c8,~sg8c9,~sg8c10,~sg8c11,~sg8c12];
4584                         #fp1d,fp2d,fp3d,fp4d,fp5d,fp6d,fp7d,fp8d,fp9d,fp10d,fp11d,fp12d=[~sg8d1,~sg8d2,~sg8d3,~sg8d4,~sg8d5,~sg8d6,~sg8d7,~sg8d8,~sg8d9,~sg8d10,~sg8d11,~sg8d12];
4585                         #fp1e,fp2e,fp3e,fp4e,fp5e,fp6e,fp7e,fp8e,fp9e,fp10e,fp11e,fp12e=[~sg8e1,~sg8e2,~sg8e3,~sg8e4,~sg8e5,~sg8e6,~sg8e7,~sg8e8,~sg8e9,~sg8e10,~sg8e11,~sg8e12];
4586                         #fp1f,fp2f,fp3f,fp4f,fp5f,fp6f,fp7f,fp8f,fp9f,fp10f,fp11f,fp12f=[~sg8f1,~sg8f2,~sg8f3,~sg8f4,~sg8f5,~sg8f6,~sg8f7,~sg8f8,~sg8f9,~sg8f10,~sg8f11,~sg8f12];
4587                         #fp1g,fp2g,fp3g,fp4g,fp5g,fp6g,fp7g,fp8g,fp9g,fp10g,fp11g,fp12g=[~sg8g1,~sg8g2,~sg8g3,~sg8g4,~sg8g5,~sg8g6,~sg8g7,~sg8g8,~sg8g9,~sg8g10,~sg8g11,~sg8g12];
4588                         #fp1h,fp2h,fp3h,fp4h,fp5h,fp6h,fp7h,fp8h,fp9h,fp10h,fp11h,fp12h=[~sg8h1,~sg8h2,~sg8h3,~sg8h4,~sg8h5,~sg8h6,~sg8h7,~sg8h8,~sg8h9,~sg8h10,~sg8h11,~sg8h12];
4589
4590                         ~setgroup1.value = 0;
4591                         ~setgroup2.value = 0;
4592                         ~setgroup3.value = 0;
4593                         ~setgroup4.value = 0;
4594                         ~setgroup5.value = 0;
4595                         ~setgroup6.value = 0;
4596                         ~setgroup7.value = 0;
4597
4598                         ~setgroupval = 8;
4599                 });
4600         });
4601
4602
4603         //if setgroup values are nil
4604
4605         if(~setgroupval == nil, {~setgroup1.value = 1;});
4606         if(~setgroupval == 1, {~setgroup1.value = 1;});
4607         if(~setgroupval == 2, {~setgroup2.value = 1;});
4608         if(~setgroupval == 3, {~setgroup3.value = 1;});
4609         if(~setgroupval == 4, {~setgroup4.value = 1;});
4610         if(~setgroupval == 5, {~setgroup5.value = 1;});
4611         if(~setgroupval == 6, {~setgroup6.value = 1;});
4612         if(~setgroupval == 7, {~setgroup7.value = 1;});
4613         if(~setgroupval == 8, {~setgroup8.value = 1;});
4614
4615
4616         //save chord notes buttons, s1-s8
4617
4618         n1 = Button.new(w,Rect(Window.screenBounds.width-(Window.screenBounds.width/2)-(60*2),Window.screenBounds.height-88,60,60/1.6180339887499)).states_([["s1",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button; if(button.value == 0, {~r1=fp1;~r2=fp2;~r3=fp3;~r4=fp4;~r5=fp5;~r6=fp6;~r7=fp7;~r8=fp8;~r9=fp9;~r10=fp10;~r11=fp11;~r12=fp12; #fp1,fp2,fp3,fp4,fp5,fp6,fp7,fp8,fp9,fp10,fp11,fp12/*,fp13,fp14,fp15,fp16,fp17,fp18,fp19,fp20,fp21,fp22,fp23,fp24*/ = [ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ]; "s"++"\n"++[ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ].asString.postString; ~u1=~f1;~u2=~f2;~u3=~f3;~u4=~f4;~u5=~f5;~u6=~f6;~u7=~f7;~u8=~f8;~u9=~f9;~u10=~f10;~u11=~f11;~u12=~f12; ~si1aset.value;~si1bset.value;
4619
4620                 if(~setgroup1.value == 1, {12.do(x = 0; {("sg1a"++(x=x+1)).asSymbol.envirPut([fp1,fp2,fp3,fp4,fp5,fp6,fp7,fp8,fp9,fp10,fp11,fp12].at(x-1))});});
4621                 if(~setgroup2.value == 1, {12.do(x = 0; {("sg2a"++(x=x+1)).asSymbol.envirPut([fp1,fp2,fp3,fp4,fp5,fp6,fp7,fp8,fp9,fp10,fp11,fp12].at(x-1))});});
4622                 if(~setgroup3.value == 1, {12.do(x = 0; {("sg3a"++(x=x+1)).asSymbol.envirPut([fp1,fp2,fp3,fp4,fp5,fp6,fp7,fp8,fp9,fp10,fp11,fp12].at(x-1))});});
4623                 if(~setgroup4.value == 1, {12.do(x = 0; {("sg4a"++(x=x+1)).asSymbol.envirPut([fp1,fp2,fp3,fp4,fp5,fp6,fp7,fp8,fp9,fp10,fp11,fp12].at(x-1))});});
4624                 if(~setgroup5.value == 1, {12.do(x = 0; {("sg5a"++(x=x+1)).asSymbol.envirPut([fp1,fp2,fp3,fp4,fp5,fp6,fp7,fp8,fp9,fp10,fp11,fp12].at(x-1))});});
4625                 if(~setgroup6.value == 1, {12.do(x = 0; {("sg6a"++(x=x+1)).asSymbol.envirPut([fp1,fp2,fp3,fp4,fp5,fp6,fp7,fp8,fp9,fp10,fp11,fp12].at(x-1))});});
4626                 if(~setgroup7.value == 1, {12.do(x = 0; {("sg7a"++(x=x+1)).asSymbol.envirPut([fp1,fp2,fp3,fp4,fp5,fp6,fp7,fp8,fp9,fp10,fp11,fp12].at(x-1))});});
4627                 if(~setgroup8.value == 1, {12.do(x = 0; {("sg8a"++(x=x+1)).asSymbol.envirPut([fp1,fp2,fp3,fp4,fp5,fp6,fp7,fp8,fp9,fp10,fp11,fp12].at(x-1))});});
4628
4629                 n1.states_([["s1",Color.green,Color.black]]);
4630                 n2.states_([["s2",Color.white,Color.black]]);
4631                 n3.states_([["s3",Color.white,Color.black]]);
4632                 n4.states_([["s4",Color.white,Color.black]]);
4633                 n5.states_([["s5",Color.white,Color.black]]);
4634                 n6.states_([["s6",Color.white,Color.black]]);
4635                 n7.states_([["s7",Color.white,Color.black]]);
4636                 n8.states_([["s8",Color.white,Color.black]]);
4637         });});
4638
4639         n2 = Button.new(w,Rect(Window.screenBounds.width-(Window.screenBounds.width/2)-(60*1),Window.screenBounds.height-88,60,60/1.6180339887499)).states_([["s2",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button; if(button.value == 0, {~r1b=fp1b;~r2b=fp2b;~r3b=fp3b;~r4b=fp4b;~r5b=fp5b;~r6b=fp6b;~r7b=fp7b;~r8b=fp8b;~r9b=fp9b;~r10b=fp10b;~r11b=fp11b;~r12b=fp12b; #fp1b,fp2b,fp3b,fp4b,fp5b,fp6b,fp7b,fp8b,fp9b,fp10b,fp11b,fp12b/*,fp13b,fp14b,fp15b,fp16b,fp17b,fp18b,fp19b,fp20b,fp21b,fp22b,fp23b,fp24b*/ = [ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ]; "s"++"\n"++[ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ].asString.postString; ~u1b=~f1;~u2b=~f2;~u3b=~f3;~u4b=~f4;~u5b=~f5;~u6b=~f6;~u7b=~f7;~u8b=~f8;~u9b=~f9;~u10b=~f10;~u11b=~f11;~u12b=~f12; ~si2set.value;
4640
4641                 if(~setgroup1.value == 1, {12.do(x = 0; {("sg1b"++(x=x+1)).asSymbol.envirPut([fp1b,fp2b,fp3b,fp4b,fp5b,fp6b,fp7b,fp8b,fp9b,fp10b,fp11b,fp12b].at(x-1))});});
4642                 if(~setgroup2.value == 1, {12.do(x = 0; {("sg2b"++(x=x+1)).asSymbol.envirPut([fp1b,fp2b,fp3b,fp4b,fp5b,fp6b,fp7b,fp8b,fp9b,fp10b,fp11b,fp12b].at(x-1))});});
4643                 if(~setgroup3.value == 1, {12.do(x = 0; {("sg3b"++(x=x+1)).asSymbol.envirPut([fp1b,fp2b,fp3b,fp4b,fp5b,fp6b,fp7b,fp8b,fp9b,fp10b,fp11b,fp12b].at(x-1))});});
4644                 if(~setgroup4.value == 1, {12.do(x = 0; {("sg4b"++(x=x+1)).asSymbol.envirPut([fp1b,fp2b,fp3b,fp4b,fp5b,fp6b,fp7b,fp8b,fp9b,fp10b,fp11b,fp12b].at(x-1))});});
4645                 if(~setgroup5.value == 1, {12.do(x = 0; {("sg5b"++(x=x+1)).asSymbol.envirPut([fp1b,fp2b,fp3b,fp4b,fp5b,fp6b,fp7b,fp8b,fp9b,fp10b,fp11b,fp12b].at(x-1))});});
4646                 if(~setgroup6.value == 1, {12.do(x = 0; {("sg6b"++(x=x+1)).asSymbol.envirPut([fp1b,fp2b,fp3b,fp4b,fp5b,fp6b,fp7b,fp8b,fp9b,fp10b,fp11b,fp12b].at(x-1))});});
4647                 if(~setgroup7.value == 1, {12.do(x = 0; {("sg7b"++(x=x+1)).asSymbol.envirPut([fp1b,fp2b,fp3b,fp4b,fp5b,fp6b,fp7b,fp8b,fp9b,fp10b,fp11b,fp12b].at(x-1))});});
4648                 if(~setgroup8.value == 1, {12.do(x = 0; {("sg8b"++(x=x+1)).asSymbol.envirPut([fp1b,fp2b,fp3b,fp4b,fp5b,fp6b,fp7b,fp8b,fp9b,fp10b,fp11b,fp12b].at(x-1))});});
4649
4650                 n1.states_([["s1",Color.white,Color.black]]);
4651                 n2.states_([["s2",Color.green,Color.black]]);
4652                 n3.states_([["s3",Color.white,Color.black]]);
4653                 n4.states_([["s4",Color.white,Color.black]]);
4654                 n5.states_([["s5",Color.white,Color.black]]);
4655                 n6.states_([["s6",Color.white,Color.black]]);
4656                 n7.states_([["s7",Color.white,Color.black]]);
4657                 n8.states_([["s8",Color.white,Color.black]]);
4658         });});
4659         n3 = Button.new(w,Rect(Window.screenBounds.width-(Window.screenBounds.width/2)+(0),   Window.screenBounds.height-88,60,60/1.6180339887499)).states_([["s3",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button; if(button.value == 0, {~r1c=fp1c;~r2c=fp2c;~r3c=fp3c;~r4c=fp4c;~r5c=fp5c;~r6c=fp6c;~r7c=fp7c;~r8c=fp8c;~r9c=fp9c;~r10c=fp10c;~r11c=fp11c;~r12c=fp12c; #fp1c,fp2c,fp3c,fp4c,fp5c,fp6c,fp7c,fp8c,fp9c,fp10c,fp11c,fp12c/*,fp13c,fp14c,fp15c,fp16c,fp17c,fp18c,fp19c,fp20c,fp21c,fp22c,fp23c,fp24c*/ = [ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ]; "s"++"\n"++[ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ].asString.postString; ~u1c=~f1;~u2c=~f2;~u3c=~f3;~u4c=~f4;~u5c=~f5;~u6c=~f6;~u7c=~f7;~u8c=~f8;~u9c=~f9;~u10c=~f10;~u11c=~f11;~u12c=~f12; ~si3set.value;
4660
4661                 if(~setgroup1.value == 1, {12.do(x = 0; {("sg1c"++(x=x+1)).asSymbol.envirPut([fp1c,fp2c,fp3c,fp4c,fp5c,fp6c,fp7c,fp8c,fp9c,fp10c,fp11c,fp12c].at(x-1))});});
4662                 if(~setgroup2.value == 1, {12.do(x = 0; {("sg2c"++(x=x+1)).asSymbol.envirPut([fp1c,fp2c,fp3c,fp4c,fp5c,fp6c,fp7c,fp8c,fp9c,fp10c,fp11c,fp12c].at(x-1))});});
4663                 if(~setgroup3.value == 1, {12.do(x = 0; {("sg3c"++(x=x+1)).asSymbol.envirPut([fp1c,fp2c,fp3c,fp4c,fp5c,fp6c,fp7c,fp8c,fp9c,fp10c,fp11c,fp12c].at(x-1))});});
4664                 if(~setgroup4.value == 1, {12.do(x = 0; {("sg4c"++(x=x+1)).asSymbol.envirPut([fp1c,fp2c,fp3c,fp4c,fp5c,fp6c,fp7c,fp8c,fp9c,fp10c,fp11c,fp12c].at(x-1))});});
4665                 if(~setgroup5.value == 1, {12.do(x = 0; {("sg5c"++(x=x+1)).asSymbol.envirPut([fp1c,fp2c,fp3c,fp4c,fp5c,fp6c,fp7c,fp8c,fp9c,fp10c,fp11c,fp12c].at(x-1))});});
4666                 if(~setgroup6.value == 1, {12.do(x = 0; {("sg6c"++(x=x+1)).asSymbol.envirPut([fp1c,fp2c,fp3c,fp4c,fp5c,fp6c,fp7c,fp8c,fp9c,fp10c,fp11c,fp12c].at(x-1))});});
4667                 if(~setgroup7.value == 1, {12.do(x = 0; {("sg7c"++(x=x+1)).asSymbol.envirPut([fp1c,fp2c,fp3c,fp4c,fp5c,fp6c,fp7c,fp8c,fp9c,fp10c,fp11c,fp12c].at(x-1))});});
4668                 if(~setgroup8.value == 1, {12.do(x = 0; {("sg8c"++(x=x+1)).asSymbol.envirPut([fp1c,fp2c,fp3c,fp4c,fp5c,fp6c,fp7c,fp8c,fp9c,fp10c,fp11c,fp12c].at(x-1))});});
4669
4670                 n1.states_([["s1",Color.white,Color.black]]);
4671                 n2.states_([["s2",Color.white,Color.black]]);
4672                 n3.states_([["s3",Color.green,Color.black]]);
4673                 n4.states_([["s4",Color.white,Color.black]]);
4674                 n5.states_([["s5",Color.white,Color.black]]);
4675                 n6.states_([["s6",Color.white,Color.black]]);
4676                 n7.states_([["s7",Color.white,Color.black]]);
4677                 n8.states_([["s8",Color.white,Color.black]]);
4678         });});
4679         n4 = Button.new(w,Rect(Window.screenBounds.width-(Window.screenBounds.width/2)+(60*1),Window.screenBounds.height-88,60,60/1.6180339887499)).states_([["s4",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button; if(button.value == 0, {~r1d=fp1d;~r2d=fp2d;~r3d=fp3d;~r4d=fp4d;~r5d=fp5d;~r6d=fp6d;~r7d=fp7d;~r8d=fp8d;~r9d=fp9d;~r10d=fp10d;~r11d=fp11d;~r12d=fp12d; #fp1d,fp2d,fp3d,fp4d,fp5d,fp6d,fp7d,fp8d,fp9d,fp10d,fp11d,fp12d/*,fp13d,fp14d,fp15d,fp16d,fp17d,fp18d,fp19d,fp20d,fp21d,fp22d,fp23d,fp24d*/ = [ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ]; "s"++"\n"++[ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ].asString.postString; ~u1d=~f1;~u2d=~f2;~u3d=~f3;~u4d=~f4;~u5d=~f5;~u6d=~f6;~u7d=~f7;~u8d=~f8;~u9d=~f9;~u10d=~f10;~u11d=~f11;~u12d=~f12; ~si4set.value;
4680
4681                 if(~setgroup1.value == 1, {12.do(x = 0; {("sg1d"++(x=x+1)).asSymbol.envirPut([fp1d,fp2d,fp3d,fp4d,fp5d,fp6d,fp7d,fp8d,fp9d,fp10d,fp11d,fp12d].at(x-1))});});
4682                 if(~setgroup2.value == 1, {12.do(x = 0; {("sg2d"++(x=x+1)).asSymbol.envirPut([fp1d,fp2d,fp3d,fp4d,fp5d,fp6d,fp7d,fp8d,fp9d,fp10d,fp11d,fp12d].at(x-1))});});
4683                 if(~setgroup3.value == 1, {12.do(x = 0; {("sg3d"++(x=x+1)).asSymbol.envirPut([fp1d,fp2d,fp3d,fp4d,fp5d,fp6d,fp7d,fp8d,fp9d,fp10d,fp11d,fp12d].at(x-1))});});
4684                 if(~setgroup4.value == 1, {12.do(x = 0; {("sg4d"++(x=x+1)).asSymbol.envirPut([fp1d,fp2d,fp3d,fp4d,fp5d,fp6d,fp7d,fp8d,fp9d,fp10d,fp11d,fp12d].at(x-1))});});
4685                 if(~setgroup5.value == 1, {12.do(x = 0; {("sg5d"++(x=x+1)).asSymbol.envirPut([fp1d,fp2d,fp3d,fp4d,fp5d,fp6d,fp7d,fp8d,fp9d,fp10d,fp11d,fp12d].at(x-1))});});
4686                 if(~setgroup6.value == 1, {12.do(x = 0; {("sg6d"++(x=x+1)).asSymbol.envirPut([fp1d,fp2d,fp3d,fp4d,fp5d,fp6d,fp7d,fp8d,fp9d,fp10d,fp11d,fp12d].at(x-1))});});
4687                 if(~setgroup7.value == 1, {12.do(x = 0; {("sg7d"++(x=x+1)).asSymbol.envirPut([fp1d,fp2d,fp3d,fp4d,fp5d,fp6d,fp7d,fp8d,fp9d,fp10d,fp11d,fp12d].at(x-1))});});
4688                 if(~setgroup8.value == 1, {12.do(x = 0; {("sg8d"++(x=x+1)).asSymbol.envirPut([fp1d,fp2d,fp3d,fp4d,fp5d,fp6d,fp7d,fp8d,fp9d,fp10d,fp11d,fp12d].at(x-1))});});
4689
4690                 n1.states_([["s1",Color.white,Color.black]]);
4691                 n2.states_([["s2",Color.white,Color.black]]);
4692                 n3.states_([["s3",Color.white,Color.black]]);
4693                 n4.states_([["s4",Color.green,Color.black]]);
4694                 n5.states_([["s5",Color.white,Color.black]]);
4695                 n6.states_([["s6",Color.white,Color.black]]);
4696                 n7.states_([["s7",Color.white,Color.black]]);
4697                 n8.states_([["s8",Color.white,Color.black]]);
4698         });});
4699         n5 = Button.new(w,Rect(Window.screenBounds.width-(Window.screenBounds.width/2)-(60*2),Window.screenBounds.height-52,60,60/1.6180339887499)).states_([["s5",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button; if(button.value == 0, {~r1e=fp1e;~r2e=fp2e;~r3e=fp3e;~r4e=fp4e;~r5e=fp5e;~r6e=fp6e;~r7e=fp7e;~r8e=fp8e;~r9e=fp9e;~r10e=fp10e;~r11e=fp11e;~r12e=fp12e; #fp1e,fp2e,fp3e,fp4e,fp5e,fp6e,fp7e,fp8e,fp9e,fp10e,fp11e,fp12e/*,fp13e,fp14e,fp15e,fp16e,fp17e,fp18e,fp19e,fp20e,fp21e,fp22e,fp23e,fp24e*/ = [ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ]; "s"++"\n"++[ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ].asString.postString; ~u1e=~f1;~u2e=~f2;~u3e=~f3;~u4e=~f4;~u5e=~f5;~u6e=~f6;~u7e=~f7;~u8e=~f8;~u9e=~f9;~u10e=~f10;~u11e=~f11;~u12e=~f12; ~si5set.value;
4700
4701                 if(~setgroup1.value == 1, {12.do(x = 0; {("sg1e"++(x=x+1)).asSymbol.envirPut([fp1e,fp2e,fp3e,fp4e,fp5e,fp6e,fp7e,fp8e,fp9e,fp10e,fp11e,fp12e].at(x-1))});});
4702                 if(~setgroup2.value == 1, {12.do(x = 0; {("sg2e"++(x=x+1)).asSymbol.envirPut([fp1e,fp2e,fp3e,fp4e,fp5e,fp6e,fp7e,fp8e,fp9e,fp10e,fp11e,fp12e].at(x-1))});});
4703                 if(~setgroup3.value == 1, {12.do(x = 0; {("sg3e"++(x=x+1)).asSymbol.envirPut([fp1e,fp2e,fp3e,fp4e,fp5e,fp6e,fp7e,fp8e,fp9e,fp10e,fp11e,fp12e].at(x-1))});});
4704                 if(~setgroup4.value == 1, {12.do(x = 0; {("sg4e"++(x=x+1)).asSymbol.envirPut([fp1e,fp2e,fp3e,fp4e,fp5e,fp6e,fp7e,fp8e,fp9e,fp10e,fp11e,fp12e].at(x-1))});});
4705                 if(~setgroup5.value == 1, {12.do(x = 0; {("sg5e"++(x=x+1)).asSymbol.envirPut([fp1e,fp2e,fp3e,fp4e,fp5e,fp6e,fp7e,fp8e,fp9e,fp10e,fp11e,fp12e].at(x-1))});});
4706                 if(~setgroup6.value == 1, {12.do(x = 0; {("sg6e"++(x=x+1)).asSymbol.envirPut([fp1e,fp2e,fp3e,fp4e,fp5e,fp6e,fp7e,fp8e,fp9e,fp10e,fp11e,fp12e].at(x-1))});});
4707                 if(~setgroup7.value == 1, {12.do(x = 0; {("sg7e"++(x=x+1)).asSymbol.envirPut([fp1e,fp2e,fp3e,fp4e,fp5e,fp6e,fp7e,fp8e,fp9e,fp10e,fp11e,fp12e].at(x-1))});});
4708                 if(~setgroup8.value == 1, {12.do(x = 0; {("sg8e"++(x=x+1)).asSymbol.envirPut([fp1e,fp2e,fp3e,fp4e,fp5e,fp6e,fp7e,fp8e,fp9e,fp10e,fp11e,fp12e].at(x-1))});});
4709
4710                 n1.states_([["s1",Color.white,Color.black]]);
4711                 n2.states_([["s2",Color.white,Color.black]]);
4712                 n3.states_([["s3",Color.white,Color.black]]);
4713                 n4.states_([["s4",Color.white,Color.black]]);
4714                 n5.states_([["s5",Color.green,Color.black]]);
4715                 n6.states_([["s6",Color.white,Color.black]]);
4716                 n7.states_([["s7",Color.white,Color.black]]);
4717                 n8.states_([["s8",Color.white,Color.black]]);
4718         });});
4719         n6 = Button.new(w,Rect(Window.screenBounds.width-(Window.screenBounds.width/2)-(60*1),Window.screenBounds.height-52,60,60/1.6180339887499)).states_([["s6",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button; if(button.value == 0, {~r1f=fp1f;~r2f=fp2f;~r3f=fp3f;~r4f=fp4f;~r5f=fp5f;~r6f=fp6f;~r7f=fp7f;~r8f=fp8f;~r9f=fp9f;~r10f=fp10f;~r11f=fp11f;~r12f=fp12f; #fp1f,fp2f,fp3f,fp4f,fp5f,fp6f,fp7f,fp8f,fp9f,fp10f,fp11f,fp12f/*,fp13f,fp14f,fp15f,fp16f,fp17f,fp18f,fp19f,fp20f,fp21f,fp22f,fp23f,fp24f*/ = [ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ]; "s"++"\n"++[ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ].asString.postString; ~u1f=~f1;~u2f=~f2;~u3f=~f3;~u4f=~f4;~u5f=~f5;~u6f=~f6;~u7f=~f7;~u8f=~f8;~u9f=~f9;~u10f=~f10;~u11e=~f11;~u12f=~f12; ~si6set.value;
4720
4721                 if(~setgroup1.value == 1, {12.do(x = 0; {("sg1f"++(x=x+1)).asSymbol.envirPut([fp1f,fp2f,fp3f,fp4f,fp5f,fp6f,fp7f,fp8f,fp9f,fp10f,fp11f,fp12f].at(x-1))});});
4722                 if(~setgroup2.value == 1, {12.do(x = 0; {("sg2f"++(x=x+1)).asSymbol.envirPut([fp1f,fp2f,fp3f,fp4f,fp5f,fp6f,fp7f,fp8f,fp9f,fp10f,fp11f,fp12f].at(x-1))});});
4723                 if(~setgroup3.value == 1, {12.do(x = 0; {("sg3f"++(x=x+1)).asSymbol.envirPut([fp1f,fp2f,fp3f,fp4f,fp5f,fp6f,fp7f,fp8f,fp9f,fp10f,fp11f,fp12f].at(x-1))});});
4724                 if(~setgroup4.value == 1, {12.do(x = 0; {("sg4f"++(x=x+1)).asSymbol.envirPut([fp1f,fp2f,fp3f,fp4f,fp5f,fp6f,fp7f,fp8f,fp9f,fp10f,fp11f,fp12f].at(x-1))});});
4725                 if(~setgroup5.value == 1, {12.do(x = 0; {("sg5f"++(x=x+1)).asSymbol.envirPut([fp1f,fp2f,fp3f,fp4f,fp5f,fp6f,fp7f,fp8f,fp9f,fp10f,fp11f,fp12f].at(x-1))});});
4726                 if(~setgroup6.value == 1, {12.do(x = 0; {("sg6f"++(x=x+1)).asSymbol.envirPut([fp1f,fp2f,fp3f,fp4f,fp5f,fp6f,fp7f,fp8f,fp9f,fp10f,fp11f,fp12f].at(x-1))});});
4727                 if(~setgroup7.value == 1, {12.do(x = 0; {("sg7f"++(x=x+1)).asSymbol.envirPut([fp1f,fp2f,fp3f,fp4f,fp5f,fp6f,fp7f,fp8f,fp9f,fp10f,fp11f,fp12f].at(x-1))});});
4728                 if(~setgroup8.value == 1, {12.do(x = 0; {("sg8f"++(x=x+1)).asSymbol.envirPut([fp1f,fp2f,fp3f,fp4f,fp5f,fp6f,fp7f,fp8f,fp9f,fp10f,fp11f,fp12f].at(x-1))});});
4729
4730                 n1.states_([["s1",Color.white,Color.black]]);
4731                 n2.states_([["s2",Color.white,Color.black]]);
4732                 n3.states_([["s3",Color.white,Color.black]]);
4733                 n4.states_([["s4",Color.white,Color.black]]);
4734                 n5.states_([["s5",Color.white,Color.black]]);
4735                 n6.states_([["s6",Color.green,Color.black]]);
4736                 n7.states_([["s7",Color.white,Color.black]]);
4737                 n8.states_([["s8",Color.white,Color.black]]);
4738         });});
4739         n7 = Button.new(w,Rect(Window.screenBounds.width-(Window.screenBounds.width/2)+(0),   Window.screenBounds.height-52,60,60/1.6180339887499)).states_([["s7",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button; if(button.value == 0, {~r1g=fp1g;~r2g=fp2g;~r3g=fp3g;~r4g=fp4g;~r5g=fp5g;~r6g=fp6g;~r7g=fp7g;~r8g=fp8g;~r9g=fp9g;~r10g=fp10g;~r11g=fp11g;~r12g=fp12g; #fp1g,fp2g,fp3g,fp4g,fp5g,fp6g,fp7g,fp8g,fp9g,fp10g,fp11g,fp12g/*,fp13g,fp14g,fp15g,fp16g,fp17g,fp18g,fp19g,fp20g,fp21g,fp22g,fp23g,fp24g*/ = [ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ]; "s"++"\n"++[ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ].asString.postString; ~u1g=~f1;~u2g=~f2;~u3g=~f3;~u4g=~f4;~u5g=~f5;~u6g=~f6;~u7g=~f7;~u8g=~f8;~u9g=~f9;~u10g=~f10;~u11f=~f11;~u12g=~f12; ~si7set.value;
4740
4741                 if(~setgroup1.value == 1, {12.do(x = 0; {("sg1g"++(x=x+1)).asSymbol.envirPut([fp1g,fp2g,fp3g,fp4g,fp5g,fp6g,fp7g,fp8g,fp9g,fp10g,fp11g,fp12g].at(x-1))});});
4742                 if(~setgroup2.value == 1, {12.do(x = 0; {("sg2g"++(x=x+1)).asSymbol.envirPut([fp1g,fp2g,fp3g,fp4g,fp5g,fp6g,fp7g,fp8g,fp9g,fp10g,fp11g,fp12g].at(x-1))});});
4743                 if(~setgroup3.value == 1, {12.do(x = 0; {("sg3g"++(x=x+1)).asSymbol.envirPut([fp1g,fp2g,fp3g,fp4g,fp5g,fp6g,fp7g,fp8g,fp9g,fp10g,fp11g,fp12g].at(x-1))});});
4744                 if(~setgroup4.value == 1, {12.do(x = 0; {("sg4g"++(x=x+1)).asSymbol.envirPut([fp1g,fp2g,fp3g,fp4g,fp5g,fp6g,fp7g,fp8g,fp9g,fp10g,fp11g,fp12g].at(x-1))});});
4745                 if(~setgroup5.value == 1, {12.do(x = 0; {("sg5g"++(x=x+1)).asSymbol.envirPut([fp1g,fp2g,fp3g,fp4g,fp5g,fp6g,fp7g,fp8g,fp9g,fp10g,fp11g,fp12g].at(x-1))});});
4746                 if(~setgroup6.value == 1, {12.do(x = 0; {("sg6g"++(x=x+1)).asSymbol.envirPut([fp1g,fp2g,fp3g,fp4g,fp5g,fp6g,fp7g,fp8g,fp9g,fp10g,fp11g,fp12g].at(x-1))});});
4747                 if(~setgroup7.value == 1, {12.do(x = 0; {("sg7g"++(x=x+1)).asSymbol.envirPut([fp1g,fp2g,fp3g,fp4g,fp5g,fp6g,fp7g,fp8g,fp9g,fp10g,fp11g,fp12g].at(x-1))});});
4748                 if(~setgroup8.value == 1, {12.do(x = 0; {("sg8g"++(x=x+1)).asSymbol.envirPut([fp1g,fp2g,fp3g,fp4g,fp5g,fp6g,fp7g,fp8g,fp9g,fp10g,fp11g,fp12g].at(x-1))});});
4749
4750                 n1.states_([["s1",Color.white,Color.black]]);
4751                 n2.states_([["s2",Color.white,Color.black]]);
4752                 n3.states_([["s3",Color.white,Color.black]]);
4753                 n4.states_([["s4",Color.white,Color.black]]);
4754                 n5.states_([["s5",Color.white,Color.black]]);
4755                 n6.states_([["s6",Color.white,Color.black]]);
4756                 n7.states_([["s7",Color.green,Color.black]]);
4757                 n8.states_([["s8",Color.white,Color.black]]);
4758         });});
4759         n8 = Button.new(w,Rect(Window.screenBounds.width-(Window.screenBounds.width/2)+(60*1),Window.screenBounds.height-52,60,60/1.6180339887499)).states_([["s8",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button; if(button.value == 0, {~r1h=fp1h;~r2h=fp2h;~r3h=fp3h;~r4h=fp4h;~r5h=fp5h;~r6h=fp6h;~r7h=fp7h;~r8h=fp8h;~r9h=fp9h;~r10h=fp10h;~r11h=fp11h;~r12h=fp12h; #fp1h,fp2h,fp3h,fp4h,fp5h,fp6h,fp7h,fp8h,fp9h,fp10h,fp11h,fp12h/*,fp13h,fp14h,fp15h,fp16h,fp17h,fp18h,fp19h,fp20h,fp21h,fp22h,fp23h,fp24h*/ = [ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ]; "s"++"\n"++[ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8,~f9,~f10,~f11,~f12 ].asString.postString; ~u1h=~f1;~u2h=~f2;~u3h=~f3;~u4h=~f4;~u5h=~f5;~u6h=~f6;~u7h=~f7;~u8h=~f8;~u9h=~f9;~u10h=~f10;~u11g=~f11;~u12h=~f12; ~si8set.value;
4760
4761                 if(~setgroup1.value == 1, {12.do(x = 0; {("sg1h"++(x=x+1)).asSymbol.envirPut([fp1h,fp2h,fp3h,fp4h,fp5h,fp6h,fp7h,fp8h,fp9h,fp10h,fp11h,fp12h].at(x-1))});});
4762                 if(~setgroup2.value == 1, {12.do(x = 0; {("sg2h"++(x=x+1)).asSymbol.envirPut([fp1h,fp2h,fp3h,fp4h,fp5h,fp6h,fp7h,fp8h,fp9h,fp10h,fp11h,fp12h].at(x-1))});});
4763                 if(~setgroup3.value == 1, {12.do(x = 0; {("sg3h"++(x=x+1)).asSymbol.envirPut([fp1h,fp2h,fp3h,fp4h,fp5h,fp6h,fp7h,fp8h,fp9h,fp10h,fp11h,fp12h].at(x-1))});});
4764                 if(~setgroup4.value == 1, {12.do(x = 0; {("sg4h"++(x=x+1)).asSymbol.envirPut([fp1h,fp2h,fp3h,fp4h,fp5h,fp6h,fp7h,fp8h,fp9h,fp10h,fp11h,fp12h].at(x-1))});});
4765                 if(~setgroup5.value == 1, {12.do(x = 0; {("sg5h"++(x=x+1)).asSymbol.envirPut([fp1h,fp2h,fp3h,fp4h,fp5h,fp6h,fp7h,fp8h,fp9h,fp10h,fp11h,fp12h].at(x-1))});});
4766                 if(~setgroup6.value == 1, {12.do(x = 0; {("sg6h"++(x=x+1)).asSymbol.envirPut([fp1h,fp2h,fp3h,fp4h,fp5h,fp6h,fp7h,fp8h,fp9h,fp10h,fp11h,fp12h].at(x-1))});});
4767                 if(~setgroup7.value == 1, {12.do(x = 0; {("sg7h"++(x=x+1)).asSymbol.envirPut([fp1h,fp2h,fp3h,fp4h,fp5h,fp6h,fp7h,fp8h,fp9h,fp10h,fp11h,fp12h].at(x-1))});});
4768                 if(~setgroup8.value == 1, {12.do(x = 0; {("sg8h"++(x=x+1)).asSymbol.envirPut([fp1h,fp2h,fp3h,fp4h,fp5h,fp6h,fp7h,fp8h,fp9h,fp10h,fp11h,fp12h].at(x-1))});});
4769
4770                 n1.states_([["s1",Color.white,Color.black]]);
4771                 n2.states_([["s2",Color.white,Color.black]]);
4772                 n3.states_([["s3",Color.white,Color.black]]);
4773                 n4.states_([["s4",Color.white,Color.black]]);
4774                 n5.states_([["s5",Color.white,Color.black]]);
4775                 n6.states_([["s6",Color.white,Color.black]]);
4776                 n7.states_([["s7",Color.white,Color.black]]);
4777                 n8.states_([["s8",Color.green,Color.black]]);
4778         });});
4779
4780
4781         //undo saved chord pop-up menu
4782
4783         ~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;});
4784
4785
4786         //set button for undo pop-up menu
4787
4788         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;
4789                 case
4790                 {~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;}
4791                 {~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;}
4792                 {~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;}
4793                 {~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;}
4794                 {~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;}
4795                 {~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;}
4796                 {~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;}
4797                 {~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;}
4798                 {~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;};
4799         });
4800
4801
4802         //gsine pop-up menu
4803
4804         if(~gsine == nil, {~gsine = ~gsine1});
4805
4806         ~gsinemenu = PopUpMenu(w, Rect(20+60*2+16+120,Window.screenBounds.height-88+(30/1.6180339887499*0),60,60/1.6180339887499)).items_(["gs","1","2"]).background_(Color.black).stringColor_(Color.white).action_({arg button;
4807
4808                 if(~gsinemenu.value == 1, {~gsine = ~gsine1});
4809                 if(~gsinemenu.value == 2, {~gsine = ~gsine2});
4810
4811         });
4812
4813         case
4814         {~gsine == nil}{~gsinemenu.value = 0;}
4815         {~gsine == ~gsine1}{~gsinemenu.value = 0;}
4816         {~gsine == ~gsine2}{~gsinemenu.value = 1;};
4817
4818
4819         //start record button
4820
4821         ~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});});
4822
4823
4824         //pause record button
4825
4826         ~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});});
4827
4828
4829         //stop record button
4830
4831         ~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;});
4832
4833
4834         //minimize GUI window button
4835
4836         ~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;});
4837
4838
4839         //close GUI window button
4840
4841         ~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;
4842
4843                 if(~closemessage != nil, {~closemessage.close}, {nil});
4844                 ~closemessage = View(w, Rect(Window.screenBounds.width-(340+46),Window.screenBounds.height-(340+46/1.6180339887499)-110,340+46,340+46/1.6180339887499)).background_(Color.black).front;
4845                 ~closemessagestring = StaticText(~closemessage, Rect(0,0,340+46,340+46/1.6180339887499)).background_(Color.black);
4846                 ~closemessagestring.align = \center;
4847                 ~closemessagestring.string ="Close Timewave Synth?";
4848                 ~closemessagestring.stringColor = Color.white;
4849                 ~closemessagebutton1 = Button.new(~closemessage,Rect(120-46+40,340/1.6180339887499-30,46,46/1.6180339887499)).states_([["Yes",Color.white,Color.black]]).action_({AppClock.sched(0, {w.close; if(~l1a.isRunning == true or: ~l1a1.isRunning == true, {~synthfree.value; ~numsynths.stop; s.freeAll;}, {nil});});});
4850                 ~closemessagebutton2 = Button.new(~closemessage,Rect(320+46-130,340/1.6180339887499-30,46,46/1.6180339887499)).states_([["No",Color.white,Color.black]]).action_({AppClock.sched(0, {~closemessage.close;});});
4851                 ~closemessage.front;
4852
4853         });
4854
4855
4856         w.front; w.fullScreen;
4857
4858         //Developed by Ken Brant (ken_brant@ymail.com)
4859
4860 }.value);
4861 );
4862 );
4863
4864 //Interpreted King Wen Sequence
4865
4866 /*
4867
4868 (#a,b,c,d,e,f = /*[ 128.43436842029,128.43436842029,128.43436842029,128.43436842029,128.43436842029,128.43436842029  ]*/
4869 [ ~basefreq,~basefreq,~basefreq,~basefreq,~basefreq,~basefreq  ];
4870 ~a = a; ~b = b; ~c =c; ~d = d; ~e = e;~f=f;);
4871
4872 ~fth = 1.4142135623729;
4873
4874 /*1*/   #a,b,c,d,e,f=[ ~a,~b,~c,~d,~e,~f  ],
4875 /*2*/   [ a = a/~fth, b = b/~fth, c = c/~fth, d = d/~fth, e = e/~fth, f = f/~fth ],
4876 /*3*/   [ a = a,      b = b*~fth, c = c,      d = d,      e = e,      f = f*~fth ],
4877 /*4*/   [ a = a*~fth, b = b/~fth, c = c,      d = d,      e = e*~fth, f = f/~fth ],
4878 /*5*/   [ a = a/~fth, b = b*~fth, c = c,      d = d*~fth, e = e,      f = f*~fth ],
4879 /*6*/   [ a = a*~fth, b = b,      c = c*~fth, d = d/~fth, e = e,      f = f/~fth ],
4880 /*7*/   [ a = a/~fth, b = b/~fth, c = c/~fth, d = d,      e = e,      f = f      ],
4881 /*8*/   [ a = a,      b = b*~fth, c = c,      d = d,      e = e/~fth, f = f      ],
4882 /*9*/   [ a = a*~fth, b = b,      c = c,      d = d*~fth, e = e*~fth, f = f*~fth ],
4883 /*10*/  [ a = a,      b = b,      c = c*~fth, d = d/~fth, e = e,      f = f      ],
4884 /*11*/  [ a = a/~fth, b = b/~fth, c = c/~fth, d = d*~fth, e = e,      f = f      ],
4885 /*12*/  [ a = a*~fth, b = b*~fth, c = c*~fth, d = d/~fth, e = e/~fth, f = f/~fth ],
4886 /*13*/  [ a = a,      b = b,      c = c,      d = d*~fth, e = e,      f = f*~fth ],
4887 /*14*/  [ a = a,      b = b/~fth, c = c,      d = d,      e = e*~fth, f = f      ],
4888 /*15*/  [ a = a/~fth, b = b,      c = c/~fth, d = d,      e = e/~fth, f = f/~fth ],
4889 /*16*/  [ a = a,      b = b,      c = c*~fth, d = d/~fth, e = e,      f = f      ],
4890 /*17*/  [ a = a,      b = b*~fth, c = c,      d = d,      e = e,      f = f*~fth ],
4891 /*18*/  [ a = a*~fth, b = b/~fth, c = c/~fth, d = d*~fth, e = e*~fth, f = f/~fth ],
4892 /*19*/  [ a = a/~fth, b = b,      c = c,      d = d/~fth, e = e,      f = f*~fth ],
4893 /*20*/  [ a = a*~fth, b = b*~fth, c = c,      d = d,      e = e/~fth, f = f/~fth ],
4894 /*21*/  [ a = a,      b = b/~fth, c = c*~fth, d = d,      e = e,      f = f*~fth ],
4895 /*22*/  [ a = a,      b = b,      c = c/~fth, d = d*~fth, e = e,      f = f      ],
4896 /*23*/  [ a = a,      b = b,      c = c,      d = d/~fth, e = e,      f = f/~fth ],
4897 /*24*/  [ a = a/~fth, b = b,      c = c,      d = d,      e = e,      f = f*~fth ],
4898 /*25*/  [ a = a*~fth, b = b*~fth, c = c*~fth, d = d,      e = e,      f = f      ],
4899 /*26*/  [ a = a,      b = b/~fth, c = c/~fth, d = d*~fth, e = e*~fth, f = f      ],
4900 /*27*/  [ a = a,      b = b,      c = c,      d = d/~fth, e = e/~fth, f = f      ],
4901 /*28*/  [ a = a/~fth, b = b*~fth, c = c*~fth, d = d*~fth, e = e*~fth, f = f/~fth ],
4902 /*29*/  [ a = a,      b = b,      c = c/~fth, d = d/~fth, e = e,      f = f      ],
4903 /*30*/  [ a = a*~fth, b = b/~fth, c = c*~fth, d = d*~fth, e = e/~fth, f = f*~fth ],
4904 /*31*/  [ a = a/~fth, b = b*~fth, c = c,      d = d,      e = e,      f = f/~fth ],
4905 /*32*/  [ a = a,      b = b/~fth, c = c,      d = d,      e = e*~fth, f = f      ],
4906 /*33*/  [ a = a*~fth, b = b*~fth, c = c,      d = d,      e = e/~fth, f = f      ],
4907 /*34*/  [ a = a/~fth, b = b/~fth, c = c,      d = d,      e = e*~fth, f = f*~fth ],
4908 /*35*/  [ a = a*~fth, b = b,      c = c,      d = d/~fth, e = e/~fth, f = f/~fth ],
4909 /*36*/  [ a = a/~fth, b = b,      c = c/~fth, d = d*~fth, e = e,      f = f*~fth ],
4910 /*37*/  [ a = a*~fth, b = b*~fth, c = c,      d = d,      e = e,      f = f      ],
4911 /*38*/  [ a = a,      b = b/~fth, c = c*~fth, d = d/~fth, e = e*~fth, f = f      ],
4912 /*39*/  [ a = a/~fth, b = b*~fth, c = c/~fth, d = d*~fth, e = e/~fth, f = f/~fth ],
4913 /*40*/  [ a = a,      b = b/~fth, c = c*~fth, d = d/~fth, e = e*~fth, f = f      ],
4914 /*41*/  [ a = a*~fth, b = b,      c = c/~fth, d = d,      e = e,      f = f*~fth ],
4915 /*42*/  [ a = a,      b = b*~fth, c = c,      d = d,      e = e/~fth, f = f      ],
4916 /*43*/  [ a = a/~fth, b = b,      c = c*~fth, d = d*~fth, e = e*~fth, f = f      ],
4917 /*44*/  [ a = a*~fth, b = b,      c = c,      d = d,      e = e,      f = f/~fth ],
4918 /*45*/  [ a = a/~fth, b = b,      c = c,      d = d/~fth, e = e/~fth, f = f      ],
4919 /*46*/  [ a = a,      b = b/~fth, c = c/~fth, d = d*~fth, e = e*~fth, f = f      ],
4920 /*47*/  [ a = a,      b = b*~fth, c = c*~fth, d = d/~fth, e = e,      f = f      ],
4921 /*48*/  [ a = a,      b = b,      c = c/~fth, d = d*~fth, e = e,      f = f      ],
4922 /*49*/  [ a = a,      b = b,      c = c*~fth, d = d,      e = e/~fth, f = f*~fth ],
4923 /*50*/  [ a = a*~fth, b = b/~fth, c = c,      d = d,      e = e*~fth, f = f/~fth ],
4924 /*51*/  [ a = a/~fth, b = b,      c = c,      d = d/~fth, e = e/~fth, f = f*~fth ],
4925 /*52*/  [ a = a*~fth, b = b,      c = c/~fth, d = d*~fth, e = e,      f = f/~fth ],
4926 /*53*/  [ a = a,      b = b*~fth, c = c,      d = d,      e = e,      f = f      ],
4927 /*54*/  [ a = a/~fth, b = b/~fth, c = c*~fth, d = d/~fth, e = e*~fth, f = f*~fth ],
4928 /*55*/  [ a = a,      b = b,      c = c,      d = d*~fth, e = e/~fth, f = f      ],
4929 /*56*/  [ a = a*~fth, b = b,      c = c,      d = d,      e = e,      f = f/~fth ],
4930 /*57*/  [ a = a,      b = b*~fth, c = c/~fth, d = d,      e = e*~fth, f = f      ],
4931 /*58*/  [ a = a/~fth, b = b,      c = c*~fth, d = d/~fth, e = e,      f = f*~fth ],
4932 /*59*/  [ a = a*~fth, b = b,      c = c/~fth, d = d,      e = e,      f = f/~fth ],
4933 /*60*/  [ a = a/~fth, b = b,      c = c,      d = d,      e = e,      f = f*~fth ],
4934 /*61*/  [ a = a*~fth, b = b,      c = c,      d = d,      e = e,      f = f      ],
4935 /*62*/  [ a = a/~fth, b = b/~fth, c = c*~fth, d = d*~fth, e = e/~fth, f = f/~fth ],
4936 /*63*/  [ a = a,      b = b*~fth, c = c/~fth, d = d,      e = e,      f = f*~fth ],
4937 /*64*/  [ a = a*~fth, b = b/~fth, c = c*~fth, d = d/~fth, e = e*~fth, f = f/~fth ]
4938
4939 /*1*/   [ a = a*n1,      b = b*n1*~fth, c = c*n1,      d = d*n1*~fth, e = e*n1,      f = f*n1*~fth ],...
4940
4941 OR
4942
4943 /*1*/   #a,b,c,d,e,f=[ ~a,~b,~c,~d,~e,~f  ],
4944 /*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 ],
4945 /*3*/   [ a = a,         b = b*~fth,    c = c,         d = d,         e = e,         f = f*~fth    ],
4946 /*4*/   [ a = a*~fth,    b = b/~fth,    c = c,         d = d,         e = e*~fth,    f = f/~fth    ],
4947 /*5*/   [ a = a/~fth,    b = b*~fth,    c = c,         d = d*~fth,    e = e,         f = f*~fth    ],
4948 /*6*/   [ a = a*~fth,    b = b,         c = c*~fth,    d = d/~fth,    e = e,         f = f/~fth    ],
4949 /*7*/   [ a = a/~fth,    b = b/~fth,    c = c/~fth,    d = d,         e = e,         f = f         ],
4950 /*8*/   [ a = a,         b = b*~fth,    c = c,         d = d,         e = e/~fth,    f = f         ],
4951 /*9*/   [ a = a*~fth,    b = b,         c = c,         d = d*~fth,    e = e*~fth,    f = f*~fth    ],
4952 /*10*/  [ a = a,         b = b,         c = c*~fth,    d = d/~fth,    e = e,         f = f         ],
4953 /*11*/  [ a = a/~fth,    b = b/~fth,    c = c/~fth,    d = d*~fth,    e = e,         f = f         ],
4954 /*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 ],
4955 /*13*/  [ a = a,         b = b,         c = c,         d = d*~fth,    e = e,         f = f*~fth    ],
4956 /*14*/  [ a = a,         b = b/~fth,    c = c,         d = d,         e = e*~fth,    f = f         ],
4957 /*15*/  [ a = a/~fth,    b = b,         c = c/~fth,    d = d,         e = e/~fth,    f = f/~fth    ],
4958 /*16*/  [ a = a,         b = b,         c = c*~fth,    d = d/~fth,    e = e,         f = f         ],
4959 /*17*/  [ a = a,         b = b*~fth,    c = c,         d = d,         e = e,         f = f*~fth    ],
4960 /*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 ],
4961 /*19*/  [ a = a/~fth,    b = b,         c = c,         d = d/~fth,    e = e,         f = f*~fth    ],
4962 /*20*/  [ a = a*~fth,    b = b*~fth,    c = c,         d = d,         e = e/~fth,    f = f/~fth    ],
4963 /*21*/  [ a = a,         b = b/~fth,    c = c*~fth,    d = d,         e = e,         f = f*~fth    ],
4964 /*22*/  [ a = a,         b = b,         c = c/~fth,    d = d*~fth,    e = e,         f = f         ],
4965 /*23*/  [ a = a,         b = b,         c = c,         d = d/~fth,    e = e,         f = f/~fth    ],
4966 /*24*/  [ a = a/~fth,    b = b,         c = c,         d = d,         e = e,         f = f*~fth    ],
4967 /*25*/  [ a = a*~fth,    b = b*~fth,    c = c*~fth,    d = d,         e = e,         f = f         ],
4968 /*26*/  [ a = a,         b = b/~fth,    c = c/~fth,    d = d*~fth,    e = e*~fth,    f = f         ],
4969 /*27*/  [ a = a,         b = b,         c = c,         d = d/~fth,    e = e/~fth,    f = f         ],
4970 /*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 ],
4971 /*29*/  [ a = a,         b = b,         c = c/~fth,    d = d/~fth,    e = e,         f = f         ],
4972 /*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 ],
4973 /*31*/  [ a = a/~fth,    b = b*~fth,    c = c,         d = d,         e = e,         f = f/~fth    ],
4974 /*32*/  [ a = a,         b = b/~fth,    c = c,         d = d,         e = e*~fth,    f = f         ],
4975 /*33*/  [ a = a*~fth,    b = b*~fth,    c = c,         d = d,         e = e/~fth,    f = f         ],
4976 /*34*/  [ a = a/~fth,    b = b/~fth,    c = c,         d = d,         e = e*~fth,    f = f*~fth    ],
4977 /*35*/  [ a = a*~fth,    b = b,         c = c,         d = d/~fth,    e = e/~fth,    f = f/~fth    ],
4978 /*36*/  [ a = a/~fth,    b = b,         c = c/~fth,    d = d*~fth,    e = e,         f = f*~fth    ],
4979 /*37*/  [ a = a*~fth,    b = b*~fth,    c = c,         d = d,         e = e,         f = f         ],
4980 /*38*/  [ a = a,         b = b/~fth,    c = c*~fth,    d = d/~fth,    e = e*~fth,    f = f         ],
4981 /*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 ],
4982 /*40*/  [ a = a,         b = b/~fth,    c = c*~fth,    d = d/~fth,    e = e*~fth,    f = f         ],
4983 /*41*/  [ a = a*~fth,    b = b,         c = c/~fth,    d = d,         e = e,         f = f*~fth    ],
4984 /*42*/  [ a = a,         b = b*~fth,    c = c,         d = d,         e = e/~fth,    f = f         ],
4985 /*43*/  [ a = a/~fth,    b = b,         c = c*~fth,    d = d*~fth,    e = e*~fth,    f = f         ],
4986 /*44*/  [ a = a*~fth,    b = b,         c = c,         d = d,         e = e,         f = f/~fth    ],
4987 /*45*/  [ a = a/~fth,    b = b,         c = c,         d = d/~fth,    e = e/~fth,    f = f         ],
4988 /*46*/  [ a = a,         b = b/~fth,    c = c/~fth,    d = d*~fth,    e = e*~fth,    f = f         ],
4989 /*47*/  [ a = a,         b = b*~fth,    c = c*~fth,    d = d/~fth,    e = e,         f = f         ],
4990 /*48*/  [ a = a,         b = b,         c = c/~fth,    d = d*~fth,    e = e,         f = f         ],
4991 /*49*/  [ a = a,         b = b,         c = c*~fth,    d = d,         e = e/~fth,    f = f*~fth    ],
4992 /*50*/  [ a = a*~fth,    b = b/~fth,    c = c,         d = d,         e = e*~fth,    f = f/~fth    ],
4993 /*51*/  [ a = a/~fth,    b = b,         c = c,         d = d/~fth,    e = e/~fth,    f = f*~fth    ],
4994 /*52*/  [ a = a*~fth,    b = b,         c = c/~fth,    d = d*~fth,    e = e,         f = f/~fth    ],
4995 /*53*/  [ a = a,         b = b*~fth,    c = c,         d = d,         e = e,         f = f         ],
4996 /*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 ],
4997 /*55*/  [ a = a,         b = b,         c = c,         d = d*~fth,    e = e/~fth,    f = f         ],
4998 /*56*/  [ a = a*~fth,    b = b,         c = c,         d = d,         e = e,         f = f/~fth    ],
4999 /*57*/  [ a = a,         b = b*~fth,    c = c/~fth,    d = d,         e = e*~fth,    f = f         ],
5000 /*58*/  [ a = a/~fth,    b = b,         c = c*~fth,    d = d/~fth,    e = e,         f = f*~fth    ],
5001 /*59*/  [ a = a*~fth,    b = b,         c = c/~fth,    d = d,         e = e,         f = f/~fth    ],
5002 /*60*/  [ a = a/~fth,    b = b,         c = c,         d = d,         e = e,         f = f*~fth    ],
5003 /*61*/  [ a = a*~fth,    b = b,         c = c,         d = d,         e = e,         f = f         ],
5004 /*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 ],
5005 /*63*/  [ a = a,         b = b*~fth,    c = c/~fth,    d = d,         e = e,         f = f*~fth    ],
5006 /*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 ],
5007
5008 /*1*/   [ a = a,         b = b*~fth,    c = c,         d = d*~fth,    e = e,         f = f*~fth    ],...
5009
5010 */