Permalink
Browse files

adding delay classes based on mtm2.ck example, still needs work

  • Loading branch information...
1 parent 22bb526 commit c6b2ca4e59594ca3ac6eebe3a3cf558368bf2498 @heuermh committed Aug 15, 2012
Showing with 675 additions and 0 deletions.
  1. +88 −0 FeedbackMachine.ck
  2. +35 −0 MonoDelay.ck
  3. +35 −0 MonoDelayA.ck
  4. +35 −0 MonoDelayL.ck
  5. +44 −0 StereoDelay.ck
  6. +44 −0 StereoDelayA.ck
  7. +44 −0 StereoDelayL.ck
  8. +146 −0 StereoFeedbackMachine.ck
  9. +83 −0 examples/feedbackMachineExample.ck
  10. +50 −0 examples/monoDelayExample.ck
  11. +57 −0 examples/stereoDelayExample.ck
  12. +14 −0 import.ck
View
88 FeedbackMachine.ck
@@ -0,0 +1,88 @@
+/*
+
+ LiCK Library for ChucK.
+ Copyright (c) 2007-2012 held jointly by the individual authors.
+
+ This file is part of LiCK.
+
+ LiCK is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ LiCK is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LiCK. If not, see <http://www.gnu.org/licenses/>.
+
+*/
+
+public class FeedbackMachine
+{
+ Gain input;
+ Gain dry;
+ Gain wet;
+
+ Gain route1to2;
+ Gain route1to3;
+ Gain route1to4;
+ Gain route2to1;
+ Gain route2to3;
+ Gain route2to4;
+ Gain route3to1;
+ Gain route3to2;
+ Gain route3to4;
+ Gain route4to1;
+ Gain route4to2;
+ Gain route4to3;
+
+ MonoDelay delay1;
+ MonoDelay delay2;
+ MonoDelay delay3;
+ MonoDelay delay4;
+
+ {
+ 0.0 => route1to2.gain;
+ 0.0 => route1to3.gain;
+ 0.0 => route1to4.gain;
+ 0.0 => route2to1.gain;
+ 0.0 => route2to3.gain;
+ 0.0 => route2to4.gain;
+ 0.0 => route3to1.gain;
+ 0.0 => route3to2.gain;
+ 0.0 => route3to4.gain;
+ 0.0 => route4to1.gain;
+ 0.0 => route4to2.gain;
+ 0.0 => route4to3.gain;
+
+ input => delay1.input;
+ input => delay2.input;
+ input => delay3.input;
+ input => delay4.input;
+
+ delay1.delay => route1to2 => delay2.input;
+ delay1.delay => route1to3 => delay3.input;
+ delay1.delay => route1to4 => delay4.input;
+
+ delay2.delay => route2to1 => delay1.input;
+ delay2.delay => route2to3 => delay3.input;
+ delay2.delay => route2to4 => delay4.input;
+
+ delay3.delay => route3to1 => delay1.input;
+ delay3.delay => route3to2 => delay2.input;
+ delay3.delay => route3to4 => delay4.input;
+
+ delay4.delay => route4to1 => delay1.input;
+ delay4.delay => route4to2 => delay2.input;
+ delay4.delay => route4to3 => delay3.input;
+
+ input => dry;
+ delay1.output => wet;
+ delay2.output => wet;
+ delay3.output => wet;
+ delay4.output => wet;
+ }
+}
View
35 MonoDelay.ck
@@ -0,0 +1,35 @@
+/*
+
+ LiCK Library for ChucK.
+ Copyright (c) 2007-2012 held jointly by the individual authors.
+
+ This file is part of LiCK.
+
+ LiCK is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ LiCK is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LiCK. If not, see <http://www.gnu.org/licenses/>.
+
+*/
+
+public class MonoDelay
+{
+ Delay delay;
+ Gain input;
+ Gain feedback;
+ Gain output;
+
+ {
+ input => delay;
+ delay => feedback => input;
+ delay => output;
+ }
+}
View
35 MonoDelayA.ck
@@ -0,0 +1,35 @@
+/*
+
+ LiCK Library for ChucK.
+ Copyright (c) 2007-2012 held jointly by the individual authors.
+
+ This file is part of LiCK.
+
+ LiCK is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ LiCK is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LiCK. If not, see <http://www.gnu.org/licenses/>.
+
+*/
+
+public class MonoDelayA
+{
+ DelayA delay;
+ Gain input;
+ Gain feedback;
+ Gain output;
+
+ {
+ input => delay;
+ delay => feedback => input;
+ delay => output;
+ }
+}
View
35 MonoDelayL.ck
@@ -0,0 +1,35 @@
+/*
+
+ LiCK Library for ChucK.
+ Copyright (c) 2007-2012 held jointly by the individual authors.
+
+ This file is part of LiCK.
+
+ LiCK is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ LiCK is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LiCK. If not, see <http://www.gnu.org/licenses/>.
+
+*/
+
+public class MonoDelayL
+{
+ DelayL delay;
+ Gain input;
+ Gain feedback;
+ Gain output;
+
+ {
+ input => delay;
+ delay => feedback => input;
+ delay => output;
+ }
+}
View
44 StereoDelay.ck
@@ -0,0 +1,44 @@
+/*
+
+ LiCK Library for ChucK.
+ Copyright (c) 2007-2012 held jointly by the individual authors.
+
+ This file is part of LiCK.
+
+ LiCK is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ LiCK is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LiCK. If not, see <http://www.gnu.org/licenses/>.
+
+*/
+
+public class StereoDelay
+{
+ Delay delayL;
+ Gain inputL;
+ Gain feedbackL;
+ Gain outputL;
+
+ Delay delayR;
+ Gain inputR;
+ Gain feedbackR;
+ Gain outputR;
+
+ {
+ inputL => delayL;
+ delayL => feedbackL => inputL;
+ delayL => outputL;
+
+ inputR => delayR;
+ delayR => feedbackR => inputR;
+ delayR => outputR;
+ }
+}
View
44 StereoDelayA.ck
@@ -0,0 +1,44 @@
+/*
+
+ LiCK Library for ChucK.
+ Copyright (c) 2007-2012 held jointly by the individual authors.
+
+ This file is part of LiCK.
+
+ LiCK is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ LiCK is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LiCK. If not, see <http://www.gnu.org/licenses/>.
+
+*/
+
+public class StereoDelayA
+{
+ DelayA delayL;
+ Gain inputL;
+ Gain feedbackL;
+ Gain outputL;
+
+ DelayA delayR;
+ Gain inputR;
+ Gain feedbackR;
+ Gain outputR;
+
+ {
+ inputL => delayL;
+ delayL => feedbackL => inputL;
+ delayL => outputL;
+
+ inputR => delayR;
+ delayR => feedbackR => inputR;
+ delayR => outputR;
+ }
+}
View
44 StereoDelayL.ck
@@ -0,0 +1,44 @@
+/*
+
+ LiCK Library for ChucK.
+ Copyright (c) 2007-2012 held jointly by the individual authors.
+
+ This file is part of LiCK.
+
+ LiCK is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ LiCK is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LiCK. If not, see <http://www.gnu.org/licenses/>.
+
+*/
+
+public class StereoDelayL
+{
+ DelayL delayL;
+ Gain inputL;
+ Gain feedbackL;
+ Gain outputL;
+
+ DelayL delayR;
+ Gain inputR;
+ Gain feedbackR;
+ Gain outputR;
+
+ {
+ inputL => delayL;
+ delayL => feedbackL => inputL;
+ delayL => outputL;
+
+ inputR => delayR;
+ delayR => feedbackR => inputR;
+ delayR => outputR;
+ }
+}
View
146 StereoFeedbackMachine.ck
@@ -0,0 +1,146 @@
+/*
+
+ LiCK Library for ChucK.
+ Copyright (c) 2007-2012 held jointly by the individual authors.
+
+ This file is part of LiCK.
+
+ LiCK is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ LiCK is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LiCK. If not, see <http://www.gnu.org/licenses/>.
+
+*/
+
+public class StereoFeedbackMachine
+{
+ Gain inputL;
+ Gain inputR;
+ Gain dryL;
+ Gain dryR;
+ Gain wetL;
+ Gain wetR;
+
+ Gain route1Lto2L;
+ Gain route1Lto3L;
+ Gain route1Lto4L;
+ Gain route2Lto1L;
+ Gain route2Lto3L;
+ Gain route2Lto4L;
+ Gain route3Lto1L;
+ Gain route3Lto2L;
+ Gain route3Lto4L;
+ Gain route4Lto1L;
+ Gain route4Lto2L;
+ Gain route4Lto3L;
+
+ Gain route1Rto2R;
+ Gain route1Rto3R;
+ Gain route1Rto4R;
+ Gain route2Rto1R;
+ Gain route2Rto3R;
+ Gain route2Rto4R;
+ Gain route3Rto1R;
+ Gain route3Rto2R;
+ Gain route3Rto4R;
+ Gain route4Rto1R;
+ Gain route4Rto2R;
+ Gain route4Rto3R;
+
+ StereoDelay delay1;
+ StereoDelay delay2;
+ StereoDelay delay3;
+ StereoDelay delay4;
+
+ {
+ // setup left channel
+ 0.0 => route1Lto2L.gain;
+ 0.0 => route1Lto3L.gain;
+ 0.0 => route1Lto4L.gain;
+ 0.0 => route2Lto1L.gain;
+ 0.0 => route2Lto3L.gain;
+ 0.0 => route2Lto4L.gain;
+ 0.0 => route3Lto1L.gain;
+ 0.0 => route3Lto2L.gain;
+ 0.0 => route3Lto4L.gain;
+ 0.0 => route4Lto1L.gain;
+ 0.0 => route4Lto2L.gain;
+ 0.0 => route4Lto3L.gain;
+
+ inputL => delay1.inputL;
+ inputL => delay2.inputL;
+ inputL => delay3.inputL;
+ inputL => delay4.inputL;
+
+ delay1.delayL => route1Lto2L => delay2.inputL;
+ delay1.delayL => route1Lto3L => delay3.inputL;
+ delay1.delayL => route1Lto4L => delay4.inputL;
+
+ delay2.delayL => route2Lto1L => delay1.inputL;
+ delay2.delayL => route2Lto3L => delay3.inputL;
+ delay2.delayL => route2Lto4L => delay4.inputL;
+
+ delay3.delayL => route3Lto1L => delay1.inputL;
+ delay3.delayL => route3Lto2L => delay2.inputL;
+ delay3.delayL => route3Lto4L => delay4.inputL;
+
+ delay4.delayL => route4Lto1L => delay1.inputL;
+ delay4.delayL => route4Lto2L => delay2.inputL;
+ delay4.delayL => route4Lto3L => delay3.inputL;
+
+ inputL => dryL;
+ delay1.outputL => wetL;
+ delay2.outputL => wetL;
+ delay3.outputL => wetL;
+ delay4.outputL => wetL;
+
+ // setup right channel
+ 0.0 => route1Rto2R.gain;
+ 0.0 => route1Rto3R.gain;
+ 0.0 => route1Rto4R.gain;
+ 0.0 => route2Rto1R.gain;
+ 0.0 => route2Rto3R.gain;
+ 0.0 => route2Rto4R.gain;
+ 0.0 => route3Rto1R.gain;
+ 0.0 => route3Rto2R.gain;
+ 0.0 => route3Rto4R.gain;
+ 0.0 => route4Rto1R.gain;
+ 0.0 => route4Rto2R.gain;
+ 0.0 => route4Rto3R.gain;
+
+ inputR => delay1.inputR;
+ inputR => delay2.inputR;
+ inputR => delay3.inputR;
+ inputR => delay4.inputR;
+
+ delay1.delayR => route1Rto2R => delay2.inputR;
+ delay1.delayR => route1Rto3R => delay3.inputR;
+ delay1.delayR => route1Rto4R => delay4.inputR;
+
+ delay2.delayR => route2Rto1R => delay1.inputR;
+ delay2.delayR => route2Rto3R => delay3.inputR;
+ delay2.delayR => route2Rto4R => delay4.inputR;
+
+ delay3.delayR => route3Rto1R => delay1.inputR;
+ delay3.delayR => route3Rto2R => delay2.inputR;
+ delay3.delayR => route3Rto4R => delay4.inputR;
+
+ delay4.delayR => route4Rto1R => delay1.inputR;
+ delay4.delayR => route4Rto2R => delay2.inputR;
+ delay4.delayR => route4Rto3R => delay3.inputR;
+
+ inputR => dryR;
+ delay1.outputR => wetR;
+ delay2.outputR => wetR;
+ delay3.outputR => wetR;
+ delay4.outputR => wetR;
+ }
+}
View
83 examples/feedbackMachineExample.ck
@@ -0,0 +1,83 @@
+/*
+
+ LiCK Library for ChucK.
+ Copyright (c) 2007-2012 held jointly by the individual authors.
+
+ This file is part of LiCK.
+
+ LiCK is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ LiCK is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LiCK. If not, see <http://www.gnu.org/licenses/>.
+
+*/
+
+FeedbackMachine fm;
+
+1200::ms => fm.delay1.max;
+1200::ms => fm.delay1.delay;
+0.40 => fm.feedback1.gain;
+0.80 => fm.output1.gain;
+
+1600::ms => fm.delay2.max;
+1600::ms => fm.delay2.delay;
+0.40 => fm.feedback2.gain;
+0.80 => fm.output2.gain;
+
+200::ms => fm.delay3.max;
+200::ms => fm.delay3.delay;
+0.90 => fm.feedback3.gain;
+0.80 => fm.output3.gain;
+
+300::ms => fm.delay4.max;
+300::ms => fm.delay4.delay;
+0.90 => fm.feedback4.gain;
+0.80 => fm.output4.gain;
+
+0.1 => fm.route1to2.gain;
+0.0 => fm.route1to3.gain;
+0.3 => fm.route1to4.gain;
+0.0 => fm.route2to1.gain;
+0.1 => fm.route2to3.gain;
+0.0 => fm.route2to4.gain;
+0.0 => fm.route3to1.gain;
+0.2 => fm.route3to2.gain;
+0.1 => fm.route3to4.gain;
+0.0 => fm.route4to1.gain;
+0.3 => fm.route4to2.gain;
+0.0 => fm.route4to3.gain;
+
+
+BeeThree bt;
+bt.noteOff(1.0);
+
+bt => fm.input;
+
+0.1 => fm.dry.gain;
+0.9 => fm.wet.gain;
+
+fm.dry => dac;
+fm.wet => dac;
+
+
+500::ms => now;
+for (0 => int i; i < 10; i++)
+{
+ <<<i>>>;
+ bt.noteOn(1.0);
+ 800::ms => now;
+ bt.noteOff(1.0);
+ 800::ms => now;
+}
+
+8::second => now;
+
+<<<"done">>>;
View
50 examples/monoDelayExample.ck
@@ -0,0 +1,50 @@
+/*
+
+ LiCK Library for ChucK.
+ Copyright (c) 2007-2012 held jointly by the individual authors.
+
+ This file is part of LiCK.
+
+ LiCK is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ LiCK is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LiCK. If not, see <http://www.gnu.org/licenses/>.
+
+*/
+
+MonoDelay d;
+
+200::ms => d.delay.max;
+200::ms => d.delay.delay;
+0.95 => d.feedback.gain;
+0.80 => d.output.gain;
+
+
+BeeThree bt;
+bt.noteOff(1.0);
+
+bt => d.input;
+d.output => dac;
+
+
+500::ms => now;
+for (0 => int i; i < 10; i++)
+{
+ <<<i>>>;
+ bt.noteOn(1.0);
+ 800::ms => now;
+ bt.noteOff(1.0);
+ 800::ms => now;
+}
+
+8::second => now;
+
+<<<"done">>>;
View
57 examples/stereoDelayExample.ck
@@ -0,0 +1,57 @@
+/*
+
+ LiCK Library for ChucK.
+ Copyright (c) 2007-2012 held jointly by the individual authors.
+
+ This file is part of LiCK.
+
+ LiCK is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ LiCK is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LiCK. If not, see <http://www.gnu.org/licenses/>.
+
+*/
+
+StereoDelay d;
+
+200::ms => d.delayL.max;
+200::ms => d.delayL.delay;
+0.95 => d.feedbackL.gain;
+0.80 => d.outputL.gain;
+
+400::ms => d.delayR.max;
+400::ms => d.delayR.delay;
+0.95 => d.feedbackR.gain;
+0.80 => d.outputR.gain;
+
+
+BeeThree bt;
+bt.noteOff(1.0);
+
+bt => d.inputL;
+bt => d.inputR;
+d.outputL => dac.left;
+d.outputR => dac.right;
+
+
+500::ms => now;
+for (0 => int i; i < 10; i++)
+{
+ <<<i>>>;
+ bt.noteOn(1.0);
+ 800::ms => now;
+ bt.noteOff(1.0);
+ 800::ms => now;
+}
+
+8::second => now;
+
+<<<"done">>>;
View
14 import.ck
@@ -237,4 +237,18 @@ Machine.add("RolandTr808.ck");
Machine.add("RolandTr909.ck");
Machine.add("BigMono.ck");
+// delay stuff
+Machine.add("MonoDelay.ck");
+Machine.add("MonoDelayA.ck");
+Machine.add("MonoDelayL.ck");
+Machine.add("StereoDelay.ck");
+Machine.add("StereoDelayA.ck");
+Machine.add("StereoDelayL.ck");
+Machine.add("FeedbackMachine.ck");
+Machine.add("FeedbackMachineA.ck");
+Machine.add("FeedbackMachineL.ck");
+Machine.add("StereoFeedbackMachine.ck");
+Machine.add("StereoFeedbackMachineA.ck");
+Machine.add("StereoFeedbackMachineL.ck");
+
<<<"LiCK imported.">>>;

0 comments on commit c6b2ca4

Please sign in to comment.