//and pressing "ctrl - enter" or "cmd - return", before each server boot. Rebooting the interpreter is not needed to
//evaluate the code below if the server is booted.
-//You can program/make a song by using the "timewavesynth8 script" file
+//You can program/make a song by using the "timewavesynth8 script.scd" file
//This synth is compatible with the Korg NanoKontrol 2
//base frequency for synth inst
- ~base_frequency = ~freqmap.at(21); //default 21
- ~synthdefnum = 9; //default 9
+ ~base_frequency = ~freqmap.at(37); //default 37
+ ~synthdefnum = 7; //default 7
//volume
#f1,f2,f3,f4,f5,f6,f7,f8/*,f9,f10,f11,f12*//*,f13,f14,f15,f16,f17,f18,f19,f20,f21,f22,f23,f24*/ =
/*[432/1.6180339887499/1.6180339887499/1.6180339887499, 432/1.6180339887499, 432*1.6180339887499, 432, 432*1.6180339887499*1.6180339887499 , 432/1.6180339887499/1.6180339887499,432*1.6180339887499*1.6180339887499*1.6180339887499 ]*/
- [432,432,432,432,432,432,432,432];
+ [432,457.68805676322,484.90360486965,513.73747368118,544.28589355459,576.65081700145,610.94025894518,647.26865721073];
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))});});
//gui
- w = Window("ic gui", Rect(0,0,Window.screenBounds.width,Window.screenBounds.height), border:true);
+ w = Window("Timewave Synth", Rect(0,0,Window.screenBounds.width,Window.screenBounds.height), border:true);
~bplaceo1 = Button.new(w,Rect(~bp01l,~bp01t,~bp01h,~bp01w)).states_([["o1",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
+ [~f1=fp1,~f2=fp2,~f3=fp3,~f4=fp4,~f5=fp5,~f6=fp6,~f7=fp7,~f8=fp8];
+
+ ~synthopen.value;
+ ~currentsynth = "o1"; ~synthmonitorfunc.value;
+
if(~ts.value == 1,
{if(~tst == nil, {nil}, {~tst.close;});
~timevals.value;
~time1o =
~time1o+0.01; ~slot = "o1_"+~time1o.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
{nil});
-
- [~f1=fp1,~f2=fp2,~f3=fp3,~f4=fp4,~f5=fp5,~f6=fp6,~f7=fp7,~f8=fp8];
-
- ~synthopen.value;
- ~currentsynth = "o1"; ~synthmonitorfunc.value;
});
~bplaceo2 = Button.new(w,Rect(~bp02l,~bp02t,~bp02h,~bp02w)).states_([["o2",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
+ [~f1=fp1b,~f2=fp2b,~f3=fp3b,~f4=fp4b,~f5=fp5b,~f6=fp6b,~f7=fp7b,~f8=fp8b];
+
+ ~synthopen.value;
+ ~currentsynth = "o2"; ~synthmonitorfunc.value;
+
if(~ts.value == 1,
{if(~tst == nil, {nil}, {~tst.close;});
~timevals.value;
~time2o =
~time2o+0.01; ~slot = "o2_"+~time2o.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
{nil});
+ });
+ ~bplaceo3 = Button.new(w,Rect(~bp03l,~bp03t,~bp03h,~bp03w)).states_([["o3",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
- [~f1=fp1b,~f2=fp2b,~f3=fp3b,~f4=fp4b,~f5=fp5b,~f6=fp6b,~f7=fp7b,~f8=fp8b];
+ [~f1=fp1c,~f2=fp2c,~f3=fp3c,~f4=fp4c,~f5=fp5c,~f6=fp6c,~f7=fp7c,~f8=fp8c];
~synthopen.value;
- ~currentsynth = "o2"; ~synthmonitorfunc.value;
- });
- ~bplaceo3 = Button.new(w,Rect(~bp03l,~bp03t,~bp03h,~bp03w)).states_([["o3",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
+ ~currentsynth = "o3"; ~synthmonitorfunc.value;
if(~ts.value == 1,
{if(~tst == nil, {nil}, {~tst.close;});
~time3o =
~time3o+0.01; ~slot = "o3_"+~time3o.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
{nil});
+ });
+ ~bplaceo4 = Button.new(w,Rect(~bp04l,~bp04t,~bp04h,~bp04w)).states_([["o4",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
- [~f1=fp1c,~f2=fp2c,~f3=fp3c,~f4=fp4c,~f5=fp5c,~f6=fp6c,~f7=fp7c,~f8=fp8c];
+ [~f1=fp1d,~f2=fp2d,~f3=fp3d,~f4=fp4d,~f5=fp5d,~f6=fp6d,~f7=fp7d,~f8=fp8d];
~synthopen.value;
- ~currentsynth = "o3"; ~synthmonitorfunc.value;
- });
- ~bplaceo4 = Button.new(w,Rect(~bp04l,~bp04t,~bp04h,~bp04w)).states_([["o4",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
+ ~currentsynth = "o4"; ~synthmonitorfunc.value;
if(~ts.value == 1,
{if(~tst == nil, {nil}, {~tst.close;});
~time4o+0.01; ~slot = "o4_"+~time4o.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
{nil});
- [~f1=fp1d,~f2=fp2d,~f3=fp3d,~f4=fp4d,~f5=fp5d,~f6=fp6d,~f7=fp7d,~f8=fp8d];
-
- ~synthopen.value;
- ~currentsynth = "o4"; ~synthmonitorfunc.value;
});
~bplaceo5 = Button.new(w,Rect(~bp05l,~bp05t,~bp05h,~bp05w)).states_([["o5",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
+ [~f1=fp1e,~f2=fp2e,~f3=fp3e,~f4=fp4e,~f5=fp5e,~f6=fp6e,~f7=fp7e,~f8=fp8e];
+
+ ~synthopen.value;
+ ~currentsynth = "o5"; ~synthmonitorfunc.value;
+
if(~ts.value == 1,
{if(~tst == nil, {nil}, {~tst.close;});
~timevals.value;
~time5o+0.01; ~slot = "o5_"+~time5o.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
{nil});
- [~f1=fp1e,~f2=fp2e,~f3=fp3e,~f4=fp4e,~f5=fp5e,~f6=fp6e,~f7=fp7e,~f8=fp8e];
-
- ~synthopen.value;
- ~currentsynth = "o5"; ~synthmonitorfunc.value;
});
~bplaceo6 = Button.new(w,Rect(~bp06l,~bp06t,~bp06h,~bp06w)).states_([["o6",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
+ [~f1=fp1f,~f2=fp2f,~f3=fp3f,~f4=fp4f,~f5=fp5f,~f6=fp6f,~f7=fp7f,~f8=fp8f];
+
+ ~synthopen.value;
+ ~currentsynth = "o6"; ~synthmonitorfunc.value;
+
if(~ts.value == 1,
{if(~tst == nil, {nil}, {~tst.close;});
~timevals.value;
~time6o =
~time6o+0.01; ~slot = "o6_"+~time6o.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
{nil});
+ });
+ ~bplaceo7 = Button.new(w,Rect(~bp07l,~bp07t,~bp07h,~bp07w)).states_([["o7",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
- [~f1=fp1f,~f2=fp2f,~f3=fp3f,~f4=fp4f,~f5=fp5f,~f6=fp6f,~f7=fp7f,~f8=fp8f];
+ [~f1=fp1g,~f2=fp2g,~f3=fp3g,~f4=fp4g,~f5=fp5g,~f6=fp6g,~f7=fp7g,~f8=fp8g];
~synthopen.value;
- ~currentsynth = "o6"; ~synthmonitorfunc.value;
- });
- ~bplaceo7 = Button.new(w,Rect(~bp07l,~bp07t,~bp07h,~bp07w)).states_([["o7",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
+ ~currentsynth = "o7"; ~synthmonitorfunc.value;
if(~ts.value == 1,
{if(~tst == nil, {nil}, {~tst.close;});
~time7o =
~time7o+0.01; ~slot = "o7_"+~time7o.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
{nil});
+ });
+ ~bplaceo8 = Button.new(w,Rect(~bp08l,~bp08t,~bp08h,~bp08w)).states_([["o8",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
- [~f1=fp1g,~f2=fp2g,~f3=fp3g,~f4=fp4g,~f5=fp5g,~f6=fp6g,~f7=fp7g,~f8=fp8g];
+ [~f1=fp1h,~f2=fp2h,~f3=fp3h,~f4=fp4h,~f5=fp5h,~f6=fp6h,~f7=fp7h,~f8=fp8h];
~synthopen.value;
- ~currentsynth = "o7"; ~synthmonitorfunc.value;
- });
- ~bplaceo8 = Button.new(w,Rect(~bp08l,~bp08t,~bp08h,~bp08w)).states_([["o8",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
+ ~currentsynth = "o8"; ~synthmonitorfunc.value;
if(~ts.value == 1,
{if(~tst == nil, {nil}, {~tst.close;});
~time8o =
~time8o+0.01; ~slot = "o8_"+~time8o.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
{nil});
-
- [~f1=fp1h,~f2=fp2h,~f3=fp3h,~f4=fp4h,~f5=fp5h,~f6=fp6h,~f7=fp7h,~f8=fp8h];
-
- ~synthopen.value;
- ~currentsynth = "o8"; ~synthmonitorfunc.value;
});
~bplacef1 = Button.new(w,Rect(~bpf1l,~bpf1t,~bpf1h,~bpf1w)).states_([["f1",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
+ [~f1=fp1,~f2=fp2,~f3=fp3,~f4=fp4,~f5=fp5,~f6=fp6,~f7=fp7,~f8=fp8];
+
+ ~synthflow.value;
+ ~currentsynth = "f1"; ~synthmonitorfunc.value;
+
if(~ts.value == 1,
{if(~tst == nil, {nil}, {~tst.close;});
~timevals.value;
~time1f =
~time1f+0.01; ~slot = "f1_"+~time1f.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
{nil});
+ });
+ ~bplacef2 = Button.new(w,Rect(~bpf2l,~bpf2t,~bpf2h,~bpf2w)).states_([["f2",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
- [~f1=fp1,~f2=fp2,~f3=fp3,~f4=fp4,~f5=fp5,~f6=fp6,~f7=fp7,~f8=fp8];
+ [~f1=fp1b,~f2=fp2b,~f3=fp3b,~f4=fp4b,~f5=fp5b,~f6=fp6b,~f7=fp7b,~f8=fp8b];
~synthflow.value;
- ~currentsynth = "f1"; ~synthmonitorfunc.value;
- });
- ~bplacef2 = Button.new(w,Rect(~bpf2l,~bpf2t,~bpf2h,~bpf2w)).states_([["f2",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
+ ~currentsynth = "f2"; ~synthmonitorfunc.value;
if(~ts.value == 1,
{if(~tst == nil, {nil}, {~tst.close;});
~time2f =
~time2f+0.01; ~slot = "f2_"+~time2f.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
{nil});
-
- [~f1=fp1b,~f2=fp2b,~f3=fp3b,~f4=fp4b,~f5=fp5b,~f6=fp6b,~f7=fp7b,~f8=fp8b];
-
- ~synthflow.value;
- ~currentsynth = "f2"; ~synthmonitorfunc.value;
});
~bplacef3 = Button.new(w,Rect(~bpf3l,~bpf3t,~bpf3h,~bpf3w)).states_([["f3",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
+ [~f1=fp1c,~f2=fp2c,~f3=fp3c,~f4=fp4c,~f5=fp5c,~f6=fp6c,~f7=fp7c,~f8=fp8c];
+
+ ~synthflow.value;
+ ~currentsynth = "f3"; ~synthmonitorfunc.value;
+
if(~ts.value == 1,
{if(~tst == nil, {nil}, {~tst.close;});
~timevals.value;
~time3f =
~time3f+0.01; ~slot = "f3_"+~time3f.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
{nil});
+ });
+ ~bplacef4 = Button.new(w,Rect(~bpf4l,~bpf4t,~bpf4h,~bpf4w)).states_([["f4",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
- [~f1=fp1c,~f2=fp2c,~f3=fp3c,~f4=fp4c,~f5=fp5c,~f6=fp6c,~f7=fp7c,~f8=fp8c];
+ [~f1=fp1d,~f2=fp2d,~f3=fp3d,~f4=fp4d,~f5=fp5d,~f6=fp6d,~f7=fp7d,~f8=fp8d];
~synthflow.value;
- ~currentsynth = "f3"; ~synthmonitorfunc.value;
- });
- ~bplacef4 = Button.new(w,Rect(~bpf4l,~bpf4t,~bpf4h,~bpf4w)).states_([["f4",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
+ ~currentsynth = "f4"; ~synthmonitorfunc.value;
if(~ts.value == 1,
{if(~tst == nil, {nil}, {~tst.close;});
~time4f =
~time4f+0.01; ~slot = "f4_"+~time4f.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
{nil});
-
- [~f1=fp1d,~f2=fp2d,~f3=fp3d,~f4=fp4d,~f5=fp5d,~f6=fp6d,~f7=fp7d,~f8=fp8d];
-
- ~synthflow.value;
- ~currentsynth = "f4"; ~synthmonitorfunc.value;
});
~bplacef5 = Button.new(w,Rect(~bpf5l,~bpf5t,~bpf5h,~bpf5w)).states_([["f5",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
+ [~f1=fp1e,~f2=fp2e,~f3=fp3e,~f4=fp4e,~f5=fp5e,~f6=fp6e,~f7=fp7e,~f8=fp8e];
+
+ ~synthflow.value;
+ ~currentsynth = "f5"; ~synthmonitorfunc.value;
+
if(~ts.value == 1,
{if(~tst == nil, {nil}, {~tst.close;});
~timevals.value;
~time5f =
~time5f+0.01; ~slot = "f5_"+~time5f.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
{nil});
-
- [~f1=fp1e,~f2=fp2e,~f3=fp3e,~f4=fp4e,~f5=fp5e,~f6=fp6e,~f7=fp7e,~f8=fp8e];
-
- ~synthflow.value;
- ~currentsynth = "f5"; ~synthmonitorfunc.value;
});
~bplacef6 = Button.new(w,Rect(~bpf6l,~bpf6t,~bpf6h,~bpf6w)).states_([["f6",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
+ [~f1=fp1f,~f2=fp2f,~f3=fp3f,~f4=fp4f,~f5=fp5f,~f6=fp6f,~f7=fp7f,~f8=fp8f];
+
+ ~synthflow.value;
+ ~currentsynth = "f6"; ~synthmonitorfunc.value;
+
if(~ts.value == 1,
{if(~tst == nil, {nil}, {~tst.close;});
~timevals.value;
~time6f =
~time6f+0.01; ~slot = "f6_"+~time6f.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
{nil});
-
- [~f1=fp1f,~f2=fp2f,~f3=fp3f,~f4=fp4f,~f5=fp5f,~f6=fp6f,~f7=fp7f,~f8=fp8f];
-
- ~synthflow.value;
- ~currentsynth = "f6"; ~synthmonitorfunc.value;
});
~bplacef7 = Button.new(w,Rect(~bpf7l,~bpf7t,~bpf7h,~bpf7w)).states_([["f7",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
+ [~f1=fp1g,~f2=fp2g,~f3=fp3g,~f4=fp4g,~f5=fp5g,~f6=fp6g,~f7=fp7g,~f8=fp8g];
+
+ ~synthflow.value;
+ ~currentsynth = "f7"; ~synthmonitorfunc.value;
+
if(~ts.value == 1,
{if(~tst == nil, {nil}, {~tst.close;});
~timevals.value;
~time7f =
~time7f+0.01; ~slot = "f7_"+~time7f.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
{nil});
+ });
+ ~bplacef8 = Button.new(w,Rect(~bpf8l,~bpf8t,~bpf8h,~bpf8w)).states_([["f8",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
- [~f1=fp1g,~f2=fp2g,~f3=fp3g,~f4=fp4g,~f5=fp5g,~f6=fp6g,~f7=fp7g,~f8=fp8g];
+ [~f1=fp1h,~f2=fp2h,~f3=fp3h,~f4=fp4h,~f5=fp5h,~f6=fp6h,~f7=fp7h,~f8=fp8h];
~synthflow.value;
- ~currentsynth = "f7"; ~synthmonitorfunc.value;
- });
- ~bplacef8 = Button.new(w,Rect(~bpf8l,~bpf8t,~bpf8h,~bpf8w)).states_([["f8",Color.white,Color.black]]).action_({arg button; button.value.postln}).action_({arg button;
+ ~currentsynth = "f8"; ~synthmonitorfunc.value;
if(~ts.value == 1,
{if(~tst == nil, {nil}, {~tst.close;});
~time8f =
~time8f+0.01; ~slot = "f8_"+~time8f.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
{nil});
-
- [~f1=fp1h,~f2=fp2h,~f3=fp3h,~f4=fp4h,~f5=fp5h,~f6=fp6h,~f7=fp7h,~f8=fp8h];
-
- ~synthflow.value;
- ~currentsynth = "f8"; ~synthmonitorfunc.value;
});
~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;
- if(~ts.value == 1,
- {if(~tst == nil, {nil}, {~tst.close;});
- ~timevals.value;
- ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time1s = 0;
- ~timer = Routine({inf.do({
- ~time1s =
- ~time1s+0.01; ~slot = "s1_"+~time1s.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
- {nil});
-
if(~slidetime1 == nil, {~slidetime1 = 4}); if(~slidedo1 == nil, {~slidedo1 = 2000;}); ~slidecount = ~slidedo1;
#g,h,i,j,k,l,m,n,o,p,q,r = (([ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8 ]-
[ fp1,fp2,fp3,fp4,fp5,fp6,fp7,fp8 ])*(-1)/~slidedo1);
~synthslide.value;
~currentsynth = "s1"; ~synthmonitorfunc.value;
- });
- ~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;
-
if(~ts.value == 1,
{if(~tst == nil, {nil}, {~tst.close;});
~timevals.value;
- ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time2s = 0;
+ ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time1s = 0;
~timer = Routine({inf.do({
- ~time2s =
- ~time2s+0.01; ~slot = "s2_"+~time2s.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
+ ~time1s =
+ ~time1s+0.01; ~slot = "s1_"+~time1s.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
{nil});
+ });
+ ~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;
if(~slidetime2 == nil, {~slidetime2 = 4}); if(~slidedo2 == nil, {~slidedo2 = 2000;}); ~slidecount = ~slidedo2;
#g,h,i,j,k,l,m,n,o,p,q,r = (([ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8 ]-
~synthslide.value;
~currentsynth = "s2"; ~synthmonitorfunc.value;
- });
- ~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;
-
if(~ts.value == 1,
{if(~tst == nil, {nil}, {~tst.close;});
~timevals.value;
- ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time3s = 0;
+ ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time2s = 0;
~timer = Routine({inf.do({
- ~time3s =
- ~time3s+0.01; ~slot = "s3_"+~time3s.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
+ ~time2s =
+ ~time2s+0.01; ~slot = "s2_"+~time2s.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
{nil});
+ });
+ ~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;
if(~slidetime3 == nil, {~slidetime3 = 4}); if(~slidedo3 == nil, {~slidedo3 = 2000;}); ~slidecount = ~slidedo3;
#g,h,i,j,k,l,m,n,o,p,q,r = (([ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8 ]-
~synthslide.value;
~currentsynth = "s3"; ~synthmonitorfunc.value;
- });
- ~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;
-
if(~ts.value == 1,
{if(~tst == nil, {nil}, {~tst.close;});
~timevals.value;
- ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time4s = 0;
+ ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time3s = 0;
~timer = Routine({inf.do({
- ~time4s =
- ~time4s+0.01; ~slot = "s4_"+~time4s.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
+ ~time3s =
+ ~time3s+0.01; ~slot = "s3_"+~time3s.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
{nil});
+ });
+ ~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;
if(~slidetime4 == nil, {~slidetime4 = 4}); if(~slidedo4 == nil, {~slidedo4 = 2000;}); ~slidecount = ~slidedo4;
#g,h,i,j,k,l,m,n,o,p,q,r = (([ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8 ]-
~synthslide.value;
~currentsynth = "s4"; ~synthmonitorfunc.value;
- });
- ~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;
-
if(~ts.value == 1,
{if(~tst == nil, {nil}, {~tst.close;});
~timevals.value;
- ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time5s = 0;
+ ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time4s = 0;
~timer = Routine({inf.do({
- ~time5s =
- ~time5s+0.01; ~slot = "s5_"+~time5s.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
+ ~time4s =
+ ~time4s+0.01; ~slot = "s4_"+~time4s.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
{nil});
-
+ });
+ ~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;
if(~slidetime5 == nil, {~slidetime5 = 4}); if(~slidedo5 == nil, {~slidedo5 = 2000;}); ~slidecount = ~slidedo5;
#g,h,i,j,k,l,m,n,o,p,q,r = (([ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8 ]-
~synthslide.value;
~currentsynth = "s5"; ~synthmonitorfunc.value;
- });
- ~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;
-
if(~ts.value == 1,
{if(~tst == nil, {nil}, {~tst.close;});
~timevals.value;
- ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time6s = 0;
+ ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time5s = 0;
~timer = Routine({inf.do({
- ~time6s =
- ~time6s+0.01; ~slot = "s6_"+~time6s.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
+ ~time5s =
+ ~time5s+0.01; ~slot = "s5_"+~time5s.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
{nil});
+ });
+ ~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;
if(~slidetime6 == nil, {~slidetime6 = 4}); if(~slidedo6 == nil, {~slidedo6 = 2000;}); ~slidecount = ~slidedo6;
#g,h,i,j,k,l,m,n,o,p,q,r = (([ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8 ]-
~synthslide.value;
~currentsynth = "s6"; ~synthmonitorfunc.value;
- });
- ~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;
-
if(~ts.value == 1,
{if(~tst == nil, {nil}, {~tst.close;});
~timevals.value;
- ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time7s = 0;
+ ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time6s = 0;
~timer = Routine({inf.do({
- ~time7s =
- ~time7s+0.01; ~slot = "s7_"+~time7s.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
+ ~time6s =
+ ~time6s+0.01; ~slot = "s6_"+~time6s.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
{nil});
+ });
+ ~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;
if(~slidetime7 == nil, {~slidetime7 = 4}); if(~slidedo7 == nil, {~slidedo7 = 2000;}); ~slidecount = ~slidedo7;
#g,h,i,j,k,l,m,n,o,p,q,r = (([ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8 ]-
~synthslide.value;
~currentsynth = "s7"; ~synthmonitorfunc.value;
- });
- ~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;
-
if(~ts.value == 1,
{if(~tst == nil, {nil}, {~tst.close;});
~timevals.value;
- ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time8s = 0;
+ ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time7s = 0;
~timer = Routine({inf.do({
- ~time8s =
- ~time8s+0.01; ~slot = "s8_"+~time8s.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
+ ~time7s =
+ ~time7s+0.01; ~slot = "s7_"+~time7s.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
{nil});
+ });
+ ~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;
if(~slidetime8 == nil, {~slidetime8 = 4}); if(~slidedo8 == nil, {~slidedo8 = 2000;}); ~slidecount = ~slidedo8;
#g,h,i,j,k,l,m,n,o,p,q,r = (([ ~f1,~f2,~f3,~f4,~f5,~f6,~f7,~f8 ]-
~synthslide.value;
~currentsynth = "s8"; ~synthmonitorfunc.value;
+
+ if(~ts.value == 1,
+ {if(~tst == nil, {nil}, {~tst.close;});
+ ~timevals.value;
+ ~timer.stop; ~systemclock.stop; ~systemclock.clear; ~time8s = 0;
+ ~timer = Routine({inf.do({
+ ~time8s =
+ ~time8s+0.01; ~slot = "s8_"+~time8s.asString; 0.01.wait;});}); ~systemclock = SystemClock.play(~timer);},
+ {nil});
});
if(~slidetimeall == nil, {~slidetimeall = 1});
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_({
- ~st = StaticText(w, Rect(20+60*2+16+250,Window.screenBounds.height-40, 62, 20)).background_(Color.black);
+ ~st = StaticText(w, Rect(20+60*2+16+190,Window.screenBounds.height-40, 62, 20)).background_(Color.black);
~st.stringColor = Color.white;
~st.string = "loading...";
AppClock.sched(0.2,{
~hb = TextView(w, Rect(0,0, Window.screenBounds.width, Window.screenBounds.height-200)).background_(Color.black);
(~hb.string =
"(scroll down to see more)"++"\n"++"\n"++"\n"++
+ "ctrl/cmd-period: stop synth"++"\n"++"\n"++"\n"++
"GUI Buttons"++"\n"++"\n"++"\n"++
"synth0/synth1: start/stop synth set"++"\n"++"\n"++
"pause0/pause1: pause/unpause synth set"++"\n"++"\n"++
+ "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"++
"copy: copy frequency/note info"++"\n"++"\n"++
"kws/inst: change number of kw(King Wen) sequences per time wave instance. press set to load"++"\n"++"\n"++
"steps/kws: change number of interval steps which occur in each kw sequence. press set to load"++"\n"++"\n"++
"o1-o8: play set/saved note positions by opening a new synth set"++"\n"++"\n"++
"f1-f8: flow transition to set/saved note positions"++"\n"++"\n"++
"s1-s8: slide transition to set/saved note positions"++"\n"++"\n"++
- "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"++
+ "g1-g8: groups of saved note positions"++"\n"++"\n"++
+ "uc1-uc8: revert to former saved note positions"++"\n"++"\n"++
"rc: start recording"++"\n"++"\n"++
"prc: pause recording"++"\n"++"\n"++
"/rc: stop recording"++"\n"++"\n"++
});*/
~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;});
- ~close = Button.new(w,Rect(Window.screenBounds.width-20,~bpt+69+5,20,20/1.6180339887499)).states_([["c",Color.white,Color.black]]).action_({arg button; w.close; ~numsynths.stop;});
+ ~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;
+
+ if(~closemessage != nil, {~closemessage.close}, {nil});
+ ~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;
+ ~closemessagestring = StaticText(~closemessage, Rect(0,0,340+46,340+46/1.6180339887499)).background_(Color.black);
+ ~closemessagestring.align = \center;
+ ~closemessagestring.string ="Close Timewave Synth?";
+ ~closemessagestring.stringColor = Color.white;
+ ~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});});});
+ ~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;});});
+ ~closemessage.front;
+ });
w.front; w.fullScreen;