From 6c50d3b97f663d67c937e55594f13d07fa7ed273 Mon Sep 17 00:00:00 2001 From: Pete Shadbolt Date: Wed, 31 Dec 2014 21:36:14 +0000 Subject: [PATCH] Making progress --- main.ck | 33 +++++++++++++++++++++------------ main.py | 2 +- scratch.ck | 23 ++++------------------- 3 files changed, 26 insertions(+), 32 deletions(-) diff --git a/main.ck b/main.ck index 47d1872..8cc2b99 100644 --- a/main.ck +++ b/main.ck @@ -1,15 +1,21 @@ // Effects chain -Gain mixer => dac; // Main mixer -adc => Gain adcThru => mixer; // Monitor the input -adc => Gain feedback => DelayL delay => feedback; // Delay line -delay => Gain delaySend => mixer; // Connect delay to mixer +Gain mixer => dac; // Main mixer +adc => Gain adcThru => mixer; // Monitor the input +adc => LiSa sample => mixer; // Sampler +// TODO: turn off adcThru when recording -// Delay parameters -10::second => delay.max; -5::second => delay.delay; -0 => adc.gain; -1 => feedback.gain; -.5 => delaySend.gain; +//Times +10::second => sample.duration; +0::second => sample.recPos; +1::second => sample.playPos => sample.loopEnd => sample.loopEndRec; + +// Start recording and playing in a loop +1 => sample.loop => sample.record => sample.play; + +// Levels +//0 => adc.gain; +1 => sample.feedback; +.5 => sample.gain; .5 => adcThru.gain; // OSC listener class @@ -36,8 +42,11 @@ class InputListener extends OSCListener { class DelayListener extends OSCListener { fun void handle(OscEvent oe){ - oe.getFloat()::second => delay.delay; - oe.getFloat() => feedback.gain; + //TODO: this doesn't work + // oe.getFloat()::second => sample.recPos => sample.loopEnd => sample.loopEndRec; + //oe.getFloat()::second => sample.playPos => sample.loopEnd => sample.loopEndRec; + oe.getFloat(); + oe.getFloat() => sample.feedback; <<< "Edit delay" >>>; } } diff --git a/main.py b/main.py index 15aaa62..16c8793 100644 --- a/main.py +++ b/main.py @@ -55,7 +55,7 @@ class InputPanel(wx.Panel): sizer.Add(self.thru, 1, wx.ALL, 5) self.mute = wx.ToggleButton(self, 1, "Mute") - self.mute.SetValue(1) + #self.mute.SetValue(1) sizer.Add(self.mute, 0) self.SetSizerAndFit(sizer) diff --git a/scratch.ck b/scratch.ck index 595e904..c4fc268 100644 --- a/scratch.ck +++ b/scratch.ck @@ -9,12 +9,13 @@ adc => dac; //monitor the input //start recording input 1 => saveme.loop; 0::second => saveme.playPos; -1::second => saveme.loopEnd; +2::second => saveme.recPos; +2::second => saveme.loopEnd; // Start recording, wait one second, then start playing -saveme.record(1); -1::second => now; +1 => saveme.record; 1 => saveme.play; +1 => saveme.feedback; while(true) { @@ -26,19 +27,3 @@ while(true) - -/* -// Effects chain -adc => LiSa s => dac; -1::second => s.duration; -0::second => s.recPos; -1::second => s.playPos; -s.loop(1); -s.loopRec(1); -s.play(1); - - -while (true){ - 1::second => now; -} -*/