OSDN Git Service

Fixed bugs, and others
[timewavesynth/Timewave_Synthesizer.git] / timewavesynth3script.scd
1 /*Order of execution to run script and record:
2 1. Hit "Ctrl/Cmd - Enter" anywhere inside the "LOAD SYNTH FUNCTIONS" parenthesis on line 44,
3 2. Click on the same line as "START RECORDING" on line 41 and hit "Ctrl/Cmd - Enter",
4 3. Hit "Ctrl/Cmd - Enter" anywhere inside the "TASK" parenthesis on line 12...
5 The record file location will be found in the post window...
6 Leave out #2 to run the script without recording...
7 Important Note: You must load the appropriate Timewave Synthesizer program and run the synth by pressing the "synth0" button at least once before this script can run.
8 Press "Ctrl/Cmd - Period" to stop synth/free the sever.
9
10 You can compose a piece, and find guides for doing so, inside the "//3 - TASK" function. */
11
12 ((//3 - TASK
13         t = Task({/*trace*/ ~st = 0; ~trace = {("event-"++(~st = ~st + 1).asString).postln;}; 3.do(x = 0; {("vol"++(x=x+1)).asSymbol.envirPut(/*volume*/ ~vol)});
14                 1.do({
15
16                         //duration of each chord
17                         a = 12;
18
19                         //copy and paste "saved" chords from the "copy" button inside the synthesizer program here:
20                         //choose to change each duration individually by changing the "a" variable in the code below this line, as well as "synthopen/synthflow"
21                         [~f1=525.7244292648,~f2=646.87931910571,~f3=882.91913643716,~f4=1181.3955692862,~f5=706.55967076687,~f6=711.25161146077,~f7=977.22674582697,~f8=1325.0082712923]; ~synthopen.value; ~trace.value; (a).wait;
22                         [~f1=654.05453931384,~f2=879.03193048766,~f3=941.25430167146,~f4=1100.8670554563,~f5=1316.2675385788,~f6=1316.2675385788,~f7=1316.2675385788,~f8=1316.2675385788]; ~synthflow.value; ~trace.value; (a).wait;
23                         [~f1=654.05453931384,~f2=879.03193048766,~f3=941.25430167146,~f4=1100.8670554563,~f5=1316.2675385788,~f6=1051.0271787501,~f7=1051.0271787501,~f8=1051.0271787501]; ~synthflow.value; ~trace.value; (a).wait;
24                         [~f1=654.05453931384,~f2=879.03193048766,~f3=941.25430167146,~f4=1100.8670554563,~f5=1316.2675385788,~f6=937.1102649523,~f7=937.1102649523,~f8=937.1102649523]; ~synthflow.value; ~trace.value; (a).wait;
25                         [~f1=654.05453931384,~f2=879.03193048766,~f3=941.25430167146,~f4=1100.8670554563,~f5=1316.2675385788,~f6=824.55305817848,~f7=824.55305817848,~f8=822.73593638317]; ~synthflow.value; ~trace.value; (a).wait;
26                         [~f1=654.05453931384,~f2=879.03193048766,~f3=941.25430167146,~f4=1100.8670554563,~f5=1316.2675385788,~f6=824.55305817848,~f7=1037.2062139187,~f8=1037.2062139187]; ~synthflow.value; ~trace.value; (a).wait;
27                         [~f1=654.05453931384,~f2=879.03193048766,~f3=941.25430167146,~f4=1100.8670554563,~f5=1316.2675385788,~f6=554.31101031015,~f7=554.31101031015,~f8=554.31101031015]; ~synthflow.value; ~trace.value; (a).wait;
28                         [~f1=654.05453931384,~f2=879.03193048766,~f3=941.25430167146,~f4=521.10543213641,~f5=521.10543213641,~f6=521.10543213641,~f7=521.10543213641,~f8=521.10543213641]; ~synthflow.value; ~trace.value; (a).wait;
29
30                         //fade out function
31                         100.do({3.do(x = 0; {("vol"++(x=x+1)).asSymbol.envirPut(("vol"++x).asSymbol.envirGet - (~vol/100))}); ~synthflow.value; 0.1.wait;});
32
33                         //stop everything
34                         ~synthfree.value; 2.wait; s.stopRecording;
35                         3.do(x = 0; {("vol"++(x=x+1)).asSymbol.envirPut(~vol)});
36
37 });}););
38 t.play;
39 );
40
41 s.record; //2 - START RECORDING
42 s.stopRecording; // STOP RECORDING
43
44 (//1 - LOAD SYNTH FUNCTIONS
45 ~synthopen = {
46         case
47         {((~l1a.isRunning == false) and: (~l1a1.isRunning == false)) or: ~l1a1.isRunning == true}{
48                 if(~l1a1.isRunning == true, {
49                         (1.do({var vol1,vol2,vol3,s1,s2,s3,s4,s5,s6,f1,f2,f3;
50                                 #vol1,vol2,vol3 = [~vol1,~vol2,~vol3];
51                                 #f1,f2,f3 = [ 0,0,0 ];
52                                 s.makeBundle(0, {
53                                         ~l1a1.set(\dur, f1,     \vol, vol1);  ~l1b1.set(\dur, f1,  \vol, vol1);
54                                         ~l1c1.set(\dur, f1/~icd3,       \vol, vol1);  ~l1d1.set(\dur, f1/~icd3,  \vol, vol1);
55                                         ~l1e1.set(\dur, f1/~icd6,       \vol, vol1);  ~l1f1.set(\dur, f1/~icd6,  \vol, vol1);
56                                         ~l2a1.set(\dur, f2,     \vol, vol2);          ~l2b1.set(\dur, f2,  \vol, vol2);
57                                         ~l2c1.set(\dur, f2/~icd3,       \vol, vol2);  ~l2d1.set(\dur, f2/~icd3,  \vol, vol2);
58                                         ~l2e1.set(\dur, f2/~icd6,       \vol, vol2);  ~l2f1.set(\dur, f2/~icd6,  \vol, vol2);
59                                         ~l3a1.set(\dur, f3,     \vol, vol3);          ~l3b1.set(\dur, f3,  \vol, vol3);
60                                         ~l3c1.set(\dur, f3/~icd3,       \vol, vol3);  ~l3d1.set(\dur, f3/~icd3,  \vol, vol3);
61                                         ~l3e1.set(\dur, f3/~icd6,       \vol, vol3);  ~l3f1.set(\dur, f3/~icd6,  \vol, vol3);
62                                 });
63                         }););
64                 });
65
66                 (
67                         1.do({var vol1,vol2,vol3,s1,s2,s3,s4,s5,s6,s1_1,s1_2,s1_3;
68                                 #vol1,vol2,vol3 = [~vol1,~vol2,~vol3];
69                                 #s1,s2,s3,s4,s5,s6 = [\gsineicfld6, \gsineicrld6, \gsineicfld2, \gsineicrld2, \gsineicfld1, \gsineicrld1];
70                                 case
71                                 {~sendreplysynthdef_on == 0}{#s1_1,s1_2,s1_3 = \gsineicfld6!3;}
72                                 {~sendreplysynthdef_on == 1}{#s1_1,s1_2,s1_3 =
73                                         [\gsineicfld6_f1, \gsineicfld6_f2, \gsineicfld6_f3]; ~sendreply_oscfunc_array.value;};
74                                 s.makeBundle(0, {
75                                         ~l1a = Synth(s1_1, [\dur, ~f1,    \vol, vol1]).register;    ~l1b = Synth(s2, [\dur, ~f1,    \vol, vol1]);
76                                         ~l1c = Synth(s3, [\dur, ~f1/~icd3,  \vol, vol1]);   ~l1d = Synth(s4, [\dur, ~f1/~icd3,  \vol, vol1]);
77                                         ~l1e = Synth(s5, [\dur, ~f1/~icd6,  \vol, vol1]);   ~l1f = Synth(s6, [\dur, ~f1/~icd6,  \vol, vol1]);
78                                         ~l2a = Synth(s1_2, [\dur, ~f2,    \vol, vol2]);        ~l2b = Synth(s2, [\dur, ~f2,    \vol, vol2]);
79                                         ~l2c = Synth(s3, [\dur, ~f2/~icd3,  \vol, vol2]);   ~l2d = Synth(s4, [\dur, ~f2/~icd3,  \vol, vol2]);
80                                         ~l2e = Synth(s5, [\dur, ~f2/~icd6,  \vol, vol2]);   ~l2f = Synth(s6, [\dur, ~f2/~icd6,  \vol, vol2]);
81                                         ~l3a = Synth(s1_3, [\dur, ~f3,    \vol, vol3]);        ~l3b = Synth(s2, [\dur, ~f3,   \vol, vol3]);
82                                         ~l3c = Synth(s3, [\dur, ~f3/~icd3,  \vol, vol3]);   ~l3d = Synth(s4, [\dur, ~f3/~icd3, \vol, vol3]);
83                                         ~l3e = Synth(s5, [\dur, ~f3/~icd6,  \vol, vol3]);   ~l3f = Synth(s6, [\dur, ~f3/~icd6, \vol, vol3]);
84                                 });
85                         });
86                 );
87                 if(~l1a1.isRunning == true, {
88                         AppClock.sched(0.161803398875,{
89                                 ([~l1a1,~l1b1,~l1c1,~l1d1,~l1e1,~l1f1,~l2a1,~l2b1,~l2c1,~l2d1,~l2e1,~l2f1,~l3a1,~l3b1,~l3c1,~l3d1,~l3e1,~l3f1 ].do(_.free)); ~slideroutine.stop;
90                         });
91                 });
92         }
93         {~l1a.isRunning == true}{
94                 (1.do({var vol1,vol2,vol3,s1,s2,s3,s4,s5,s6,f1,f2,f3;
95                         #vol1,vol2,vol3 = [~vol1,~vol2,~vol3];
96                         #f1,f2,f3 = [ 0,0,0 ];
97                         s.makeBundle(0, {
98                                 ~l1a.set(\dur, f1,     \vol, vol1);  ~l1b.set(\dur, f1,  \vol, vol1);
99                                 ~l1c.set(\dur, f1/~icd3,       \vol, vol1);  ~l1d.set(\dur, f1/~icd3,  \vol, vol1);
100                                 ~l1e.set(\dur, f1/~icd6,       \vol, vol1);  ~l1f.set(\dur, f1/~icd6,  \vol, vol1);
101                                 ~l2a.set(\dur, f2,     \vol, vol2);          ~l2b.set(\dur, f2,  \vol, vol2);
102                                 ~l2c.set(\dur, f2/~icd3,       \vol, vol2);  ~l2d.set(\dur, f2/~icd3,  \vol, vol2);
103                                 ~l2e.set(\dur, f2/~icd6,       \vol, vol2);  ~l2f.set(\dur, f2/~icd6,  \vol, vol2);
104                                 ~l3a.set(\dur, f3,     \vol, vol3);          ~l3b.set(\dur, f3,  \vol, vol3);
105                                 ~l3c.set(\dur, f3/~icd3,       \vol, vol3);  ~l3d.set(\dur, f3/~icd3,  \vol, vol3);
106                                 ~l3e.set(\dur, f3/~icd6,       \vol, vol3);  ~l3f.set(\dur, f3/~icd6,  \vol, vol3);
107                         });
108                 }););
109
110                 (
111                         1.do({var vol1,vol2,vol3,s1,s2,s3,s4,s5,s6,s1_1,s1_2,s1_3;
112                                 #vol1,vol2,vol3 = [~vol1,~vol2,~vol3];
113                                 #s1,s2,s3,s4,s5,s6 = [\gsineicfld6, \gsineicrld6, \gsineicfld2, \gsineicrld2, \gsineicfld1, \gsineicrld1];
114                                 case
115                                 {~sendreplysynthdef_on == 0}{#s1_1,s1_2,s1_3 = \gsineicfld6!3;}
116                                 {~sendreplysynthdef_on == 1}{#s1_1,s1_2,s1_3 =
117                                         [\gsineicfld6_f1, \gsineicfld6_f2, \gsineicfld6_f3]; ~sendreply_oscfunc_array.value;};
118                                 s.makeBundle(0, {
119                                         ~l1a1 = Synth(s1_1, [\dur, ~f1,    \vol, vol1]).register;    ~l1b1 = Synth(s2, [\dur, ~f1,    \vol, vol1]);
120                                         ~l1c1 = Synth(s3, [\dur, ~f1/~icd3,  \vol, vol1]);   ~l1d1 = Synth(s4, [\dur, ~f1/~icd3,  \vol, vol1]);
121                                         ~l1e1 = Synth(s5, [\dur, ~f1/~icd6,  \vol, vol1]);   ~l1f1 = Synth(s6, [\dur, ~f1/~icd6,  \vol, vol1]);
122                                         ~l2a1 = Synth(s1_2, [\dur, ~f2,    \vol, vol2]);        ~l2b1 = Synth(s2, [\dur, ~f2,    \vol, vol2]);
123                                         ~l2c1 = Synth(s3, [\dur, ~f2/~icd3,  \vol, vol2]);   ~l2d1 = Synth(s4, [\dur, ~f2/~icd3,  \vol, vol2]);
124                                         ~l2e1 = Synth(s5, [\dur, ~f2/~icd6,  \vol, vol2]);   ~l2f1 = Synth(s6, [\dur, ~f2/~icd6,  \vol, vol2]);
125                                         ~l3a1 = Synth(s1_3, [\dur, ~f3,    \vol, vol3]);        ~l3b1 = Synth(s2, [\dur, ~f3,   \vol, vol3]);
126                                         ~l3c1 = Synth(s3, [\dur, ~f3/~icd3,  \vol, vol3]);   ~l3d1 = Synth(s4, [\dur, ~f3/~icd3, \vol, vol3]);
127                                         ~l3e1 = Synth(s5, [\dur, ~f3/~icd6,  \vol, vol3]);   ~l3f1 = Synth(s6, [\dur, ~f3/~icd6, \vol, vol3]);
128                                 });
129                         });
130                 );
131                 AppClock.sched(0.161803398875,{
132                         ([~l1a,~l1b,~l1c,~l1d,~l1e,~l1f,~l2a,~l2b,~l2c,~l2d,~l2e,~l2f,~l3a,~l3b,~l3c,~l3d,~l3e,~l3f].do(_.free)); ~slideroutine.stop;
133                 });
134         };
135 };
136
137 ~synthflow = {
138         case
139         {~l1a1.isRunning == true}{
140                 (1.do({var vol1,vol2,vol3,s1,s2,s3,s4,s5,s6;
141                         #vol1,vol2,vol3 = [~vol1,~vol2,~vol3];
142                         s.makeBundle(0, {
143                                 ~l1a1.set(\dur, ~f1,     \vol, vol1);  ~l1b1.set(\dur, ~f1,  \vol, vol1);
144                                 ~l1c1.set(\dur, ~f1/~icd3,       \vol, vol1);  ~l1d1.set(\dur, ~f1/~icd3,  \vol, vol1);
145                                 ~l1e1.set(\dur, ~f1/~icd6,       \vol, vol1);  ~l1f1.set(\dur, ~f1/~icd6,  \vol, vol1);
146                                 ~l2a1.set(\dur, ~f2,     \vol, vol2);          ~l2b1.set(\dur, ~f2,  \vol, vol2);
147                                 ~l2c1.set(\dur, ~f2/~icd3,       \vol, vol2);  ~l2d1.set(\dur, ~f2/~icd3,  \vol, vol2);
148                                 ~l2e1.set(\dur, ~f2/~icd6,       \vol, vol2);  ~l2f1.set(\dur, ~f2/~icd6,  \vol, vol2);
149                                 ~l3a1.set(\dur, ~f3,     \vol, vol3);          ~l3b1.set(\dur, ~f3,  \vol, vol3);
150                                 ~l3c1.set(\dur, ~f3/~icd3,       \vol, vol3);  ~l3d1.set(\dur, ~f3/~icd3,  \vol, vol3);
151                                 ~l3e1.set(\dur, ~f3/~icd6,       \vol, vol3);  ~l3f1.set(\dur, ~f3/~icd6,  \vol, vol3);
152                         });
153                 }););
154         }
155         {~l1a.isRunning == true} {
156                 (1.do({var vol1,vol2,vol3,s1,s2,s3,s4,s5,s6;
157                         #vol1,vol2,vol3 = [~vol1,~vol2,~vol3];
158                         s.makeBundle(0, {
159                                 ~l1a.set(\dur, ~f1,     \vol, vol1);  ~l1b.set(\dur, ~f1,  \vol, vol1);
160                                 ~l1c.set(\dur, ~f1/~icd3,       \vol, vol1);  ~l1d.set(\dur, ~f1/~icd3,  \vol, vol1);
161                                 ~l1e.set(\dur, ~f1/~icd6,       \vol, vol1);  ~l1f.set(\dur, ~f1/~icd6,  \vol, vol1);
162                                 ~l2a.set(\dur, ~f2,     \vol, vol2);          ~l2b.set(\dur, ~f2,  \vol, vol2);
163                                 ~l2c.set(\dur, ~f2/~icd3,       \vol, vol2);  ~l2d.set(\dur, ~f2/~icd3,  \vol, vol2);
164                                 ~l2e.set(\dur, ~f2/~icd6,       \vol, vol2);  ~l2f.set(\dur, ~f2/~icd6,  \vol, vol2);
165                                 ~l3a.set(\dur, ~f3,     \vol, vol3);          ~l3b.set(\dur, ~f3,  \vol, vol3);
166                                 ~l3c.set(\dur, ~f3/~icd3,       \vol, vol3);  ~l3d.set(\dur, ~f3/~icd3,  \vol, vol3);
167                                 ~l3e.set(\dur, ~f3/~icd6,       \vol, vol3);  ~l3f.set(\dur, ~f3/~icd6,  \vol, vol3);
168                         });
169                 }););
170         };
171 };
172
173 ~synthslide = {case{~l1a1.isRunning == true}{(
174         ~slideroutine = Routine({
175                 1.do({var vol1,vol2,vol3,s1,s2,s3,s4,s5,s6;
176                         #vol1,vol2,vol3= [~vol1,~vol2,~vol3];
177                         #g,h,i = (([ s,t,u ]-[ ~f1,~f2,~f3 ])*(-1)/~slidedo);
178                         ~slidedo.do({([ s=s+g,t=t+h,u=u+i ];
179                                 s.makeBundle(0, {
180                                         ~l1a1.set(\dur, s, \vol, vol1);
181                                         ~l1b1.set(\dur, s, \vol, vol1);
182                                         ~l1c1.set(\dur, s/~icd3, \vol, vol1);
183                                         ~l1d1.set(\dur, s/~icd3, \vol, vol1);
184                                         ~l1e1.set(\dur, s/~icd6, \vol, vol1);
185                                         ~l1f1.set(\dur, s/~icd6, \vol, vol1);
186                                         ~l2a1.set(\dur, t, \vol, vol2);
187                                         ~l2b1.set(\dur, t, \vol, vol2);
188                                         ~l2c1.set(\dur, t/~icd3, \vol, vol2);
189                                         ~l2d1.set(\dur, t/~icd3, \vol, vol2);
190                                         ~l2e1.set(\dur, t/~icd6, \vol, vol2);
191                                         ~l2f1.set(\dur, t/~icd6, \vol, vol2);
192                                         ~l3a1.set(\dur, u, \vol, vol3);
193                                         ~l3b1.set(\dur, u, \vol, vol3);
194                                         ~l3c1.set(\dur, u/~icd3, \vol, vol3);
195                                         ~l3d1.set(\dur, u/~icd3, \vol, vol3);
196                                         ~l3e1.set(\dur, u/~icd6, \vol, vol3);
197                                         ~l3f1.set(\dur, u/~icd6, \vol, vol3);
198                                 });
199                         );
200                         (~slidetime/~slidedo).wait;
201 });});}).play;);}{~l1a.isRunning == true} {(
202         ~slideroutine = Routine({1.do({var vol1,vol2,vol3,s1,s2,s3,s4,s5,s6;
203                 #vol1,vol2,vol3= [~vol1,~vol2,~vol3];
204                 #g,h,i = (([ s,t,u ]-[ ~f1,~f2,~f3 ])*(-1)/~slidedo);
205                 ~slidedo.do({([ s=s+g,t=t+h,u=u+i ];
206                         s.makeBundle(0, {
207                                 ~l1a.set(\dur, s, \vol, vol1);
208                                 ~l1b.set(\dur, s, \vol, vol1);
209                                 ~l1c.set(\dur, s/~icd3, \vol, vol1);
210                                 ~l1d.set(\dur, s/~icd3, \vol, vol1);
211                                 ~l1e.set(\dur, s/~icd6, \vol, vol1);
212                                 ~l1f.set(\dur, s/~icd6, \vol, vol1);
213                                 ~l2a.set(\dur, t, \vol, vol2);
214                                 ~l2b.set(\dur, t, \vol, vol2);
215                                 ~l2c.set(\dur, t/~icd3, \vol, vol2);
216                                 ~l2d.set(\dur, t/~icd3, \vol, vol2);
217                                 ~l2e.set(\dur, t/~icd6, \vol, vol2);
218                                 ~l2f.set(\dur, t/~icd6, \vol, vol2);
219                                 ~l3a.set(\dur, u, \vol, vol3);
220                                 ~l3b.set(\dur, u, \vol, vol3);
221                                 ~l3c.set(\dur, u/~icd3, \vol, vol3);
222                                 ~l3d.set(\dur, u/~icd3, \vol, vol3);
223                                 ~l3e.set(\dur, u/~icd6, \vol, vol3);
224                                 ~l3f.set(\dur, u/~icd6, \vol, vol3);
225                         });
226                 );
227                 (~slidetime/~slidedo).wait;});});
228 }).play;);};};
229
230
231 ~synthpause = {(
232         case
233         {~l1a1.isRunning == true}{
234                 (1.do({var vol1,vol2,vol3,s1,s2,s3,s4,s5,s6,f1,f2,f3;
235                         #vol1,vol2,vol3 = [~vol1,~vol2,~vol3];
236                         #f1,f2,f3 = [ 0,0,0 ];
237                         s.makeBundle(0, {
238                                 ~l1a1.set(\dur, f1,     \vol, vol1);          ~l1b1.set(\dur, f1,  \vol, vol1);
239                                 ~l1c1.set(\dur, f1/~icd3,       \vol, vol1);  ~l1d1.set(\dur, f1/~icd3,  \vol, vol1);
240                                 ~l1e1.set(\dur, f1/~icd6,       \vol, vol1);  ~l1f1.set(\dur, f1/~icd6,  \vol, vol1);
241                                 ~l2a1.set(\dur, f2,     \vol, vol2);          ~l2b1.set(\dur, f2,  \vol, vol2);
242                                 ~l2c1.set(\dur, f2/~icd3,       \vol, vol2);  ~l2d1.set(\dur, f2/~icd3,  \vol, vol2);
243                                 ~l2e1.set(\dur, f2/~icd6,       \vol, vol2);  ~l2f1.set(\dur, f2/~icd6,  \vol, vol2);
244                                 ~l3a1.set(\dur, f3,     \vol, vol3);          ~l3b1.set(\dur, f3,  \vol, vol3);
245                                 ~l3c1.set(\dur, f3/~icd3,       \vol, vol3);  ~l3d1.set(\dur, f3/~icd3,  \vol, vol3);
246                                 ~l3e1.set(\dur, f3/~icd6,       \vol, vol3);  ~l3f1.set(\dur, f3/~icd6,  \vol, vol3);
247                         });
248                 }););
249         }
250         {~l1a.isRunning == true} {
251                 (1.do({var vol1,vol2,vol3,s1,s2,s3,s4,s5,s6,f1,f2,f3;
252                         #vol1,vol2,vol3 = [~vol1,~vol2,~vol3];
253                         #f1,f2,f3 = [ 0,0,0 ];
254                         s.makeBundle(0, {
255                                 ~l1a.set(\dur, f1,     \vol, vol1);  ~l1b.set(\dur, f1,  \vol, vol1);
256                                 ~l1c.set(\dur, f1/~icd3,       \vol, vol1);  ~l1d.set(\dur, f1/~icd3,  \vol, vol1);
257                                 ~l1e.set(\dur, f1/~icd6,       \vol, vol1);  ~l1f.set(\dur, f1/~icd6,  \vol, vol1);
258                                 ~l2a.set(\dur, f2,     \vol, vol2);          ~l2b.set(\dur, f2,  \vol, vol2);
259                                 ~l2c.set(\dur, f2/~icd3,       \vol, vol2);  ~l2d.set(\dur, f2/~icd3,  \vol, vol2);
260                                 ~l2e.set(\dur, f2/~icd6,       \vol, vol2);  ~l2f.set(\dur, f2/~icd6,  \vol, vol2);
261                                 ~l3a.set(\dur, f3,     \vol, vol3);          ~l3b.set(\dur, f3,  \vol, vol3);
262                                 ~l3c.set(\dur, f3/~icd3,       \vol, vol3);  ~l3d.set(\dur, f3/~icd3,  \vol, vol3);
263                                 ~l3e.set(\dur, f3/~icd6,       \vol, vol3);  ~l3f.set(\dur, f3/~icd6,  \vol, vol3);
264                         });
265                 }););
266         };
267 );
268 };
269
270 ~synthfree = {
271         (
272                 case
273                 {~l1a1.isRunning == true}{
274                         (1.do({var vol1,vol2,vol3,s1,s2,s3,s4,s5,s6,f1,f2,f3;
275                                 #vol1,vol2,vol3 = [~vol1,~vol2,~vol3];
276                                 #f1,f2,f3 = [ 0,0,0 ];
277                                 s.makeBundle(0, {
278                                         ~l1a1.set(\dur, f1,     \vol, vol1);  ~l1b1.set(\dur, f1,  \vol, vol1);
279                                         ~l1c1.set(\dur, f1/~icd3,       \vol, vol1);  ~l1d1.set(\dur, f1/~icd3,  \vol, vol1);
280                                         ~l1e1.set(\dur, f1/~icd6,       \vol, vol1);  ~l1f1.set(\dur, f1/~icd6,  \vol, vol1);
281                                         ~l2a1.set(\dur, f2,     \vol, vol2);          ~l2b1.set(\dur, f2,  \vol, vol2);
282                                         ~l2c1.set(\dur, f2/~icd3,       \vol, vol2);  ~l2d1.set(\dur, f2/~icd3,  \vol, vol2);
283                                         ~l2e1.set(\dur, f2/~icd6,       \vol, vol2);  ~l2f1.set(\dur, f2/~icd6,  \vol, vol2);
284                                         ~l3a1.set(\dur, f3,     \vol, vol3);          ~l3b1.set(\dur, f3,  \vol, vol3);
285                                         ~l3c1.set(\dur, f3/~icd3,       \vol, vol3);  ~l3d1.set(\dur, f3/~icd3,  \vol, vol3);
286                                         ~l3e1.set(\dur, f3/~icd6,       \vol, vol3);  ~l3f1.set(\dur, f3/~icd6,  \vol, vol3);
287                                 });
288                         }););
289                         AppClock.sched(0.161803398875,{
290                                 ([~l1a1,~l1b1,~l1c1,~l1d1,~l1e1,~l1f1,~l2a1,~l2b1,~l2c1,~l2d1,~l2e1,~l2f1,~l3a1,~l3b1,~l3c1,~l3d1,~l3e1,~l3f1 ].do(_.free)); ~slideroutine.stop;
291                         });
292                 }
293                 {~l1a.isRunning == true}{
294                         (1.do({var vol1,vol2,vol3,s1,s2,s3,s4,s5,s6,f1,f2,f3;
295                                 #vol1,vol2,vol3 = [~vol1,~vol2,~vol3];
296                                 #f1,f2,f3 = [ 0,0,0 ];
297                                 s.makeBundle(0, {
298                                         ~l1a.set(\dur, f1,     \vol, vol1);  ~l1b.set(\dur, f1,  \vol, vol1);
299                                         ~l1c.set(\dur, f1/~icd3,       \vol, vol1);  ~l1d.set(\dur, f1/~icd3,  \vol, vol1);
300                                         ~l1e.set(\dur, f1/~icd6,       \vol, vol1);  ~l1f.set(\dur, f1/~icd6,  \vol, vol1);
301                                         ~l2a.set(\dur, f2,     \vol, vol2);          ~l2b.set(\dur, f2,  \vol, vol2);
302                                         ~l2c.set(\dur, f2/~icd3,       \vol, vol2);  ~l2d.set(\dur, f2/~icd3,  \vol, vol2);
303                                         ~l2e.set(\dur, f2/~icd6,       \vol, vol2);  ~l2f.set(\dur, f2/~icd6,  \vol, vol2);
304                                         ~l3a.set(\dur, f3,     \vol, vol3);          ~l3b.set(\dur, f3,  \vol, vol3);
305                                         ~l3c.set(\dur, f3/~icd3,       \vol, vol3);  ~l3d.set(\dur, f3/~icd3,  \vol, vol3);
306                                         ~l3e.set(\dur, f3/~icd6,       \vol, vol3);  ~l3f.set(\dur, f3/~icd6,  \vol, vol3);
307                                 });
308                         }););
309                         AppClock.sched(0.161803398875,{
310                                 ([~l1a,~l1b,~l1c,~l1d,~l1e,~l1f,~l2a,~l2b,~l2c,~l2d,~l2e,~l2f,~l3a,~l3b,~l3c,~l3d,~l3e,~l3f].do(_.free)); ~slideroutine.stop;
311                         });
312                 };
313         );
314 };
315 );
316
317 /* e-mail: ken_brant@ymail.com */