From 51b8a919c9317f0de473b318ff84e37208c91930 Mon Sep 17 00:00:00 2001 From: Pete Shadbolt Date: Sun, 11 Jul 2021 09:59:32 -0700 Subject: [PATCH 1/4] Kitchen install V1 This is the version that was installed when I first set up in the kitchen. It is very droney, has the slightly faster transients but not enough noise. Also has a small optimization to reduce CPU load - only compute every 1/10s --- radio.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/radio.py b/radio.py index 79bfdb0..31b8448 100644 --- a/radio.py +++ b/radio.py @@ -70,8 +70,8 @@ def analyze(frame, osc): if __name__ == '__main__': - camera = cv2.VideoCapture("/dev/video2") - # camera = cv2.VideoCapture(0) + # camera = cv2.VideoCapture("/dev/video2") + camera = cv2.VideoCapture(0) osc = udp_client.SimpleUDPClient("0.0.0.0", 5005) while True: From d6e27e8f3cf6e401acfc85265dea71a724bc1ce1 Mon Sep 17 00:00:00 2001 From: Pete Shadbolt Date: Sun, 11 Jul 2021 10:09:17 -0700 Subject: [PATCH 2/4] Move the GUI version --- radio.py => stuff/radio.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename radio.py => stuff/radio.py (100%) diff --git a/radio.py b/stuff/radio.py similarity index 100% rename from radio.py rename to stuff/radio.py From 9e546a30f4f20ebdf559412f2cbbad3eff46bb18 Mon Sep 17 00:00:00 2001 From: Pete Shadbolt Date: Sun, 11 Jul 2021 10:09:31 -0700 Subject: [PATCH 3/4] Rename --- stuff/{radio.py => gui.py} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename stuff/{radio.py => gui.py} (100%) diff --git a/stuff/radio.py b/stuff/gui.py similarity index 100% rename from stuff/radio.py rename to stuff/gui.py From bd4b9756421dae2ef122eb593e7758aafff7e1fe Mon Sep 17 00:00:00 2001 From: Pete Shadbolt Date: Sat, 7 May 2022 15:38:51 -0700 Subject: [PATCH 4/4] Sweetcorn fritters Got rid of the big LFO type effect, made it quite a bit higher added triangles --- audio.scd | 36 ++++++++++++++++++++++++++++-------- 1 file changed, 28 insertions(+), 8 deletions(-) diff --git a/audio.scd b/audio.scd index 76fc2b4..1b512a7 100644 --- a/audio.scd +++ b/audio.scd @@ -18,23 +18,25 @@ s.waitForBoot { lagtime = 100 / (2**octave); // Oscillator/filter frequency - frequency = notefreq * (1 + (hue*0.01)); + // frequency = notefreq * (1 + (hue*0.1)); + frequency = notefreq * (1 + (hue*5)) * (2**(octave-2)); //frequency = (130 + (hue * 130)) * (2 ** octave); //frequency = 130 * Scale.major.ratios[(hue * 12).asInteger]; //frequency = (130 * frequency) * (2**octave); - frequency = Lag.kr(frequency, lagtime/100); + frequency = Lag.kr(frequency, lagtime/10); // Filtered saw oscillator - oscillator = Mix.ar([SawDPW.ar(frequency), SawDPW.ar(frequency/2+0.5)]); + // oscillator = Mix.ar([SawDPW.ar(frequency), SawDPW.ar(frequency/2+0.5)]); + oscillator = Mix.ar([DPW3Tri.ar(frequency), DPW3Tri.ar(frequency/2+0.5)]); filter = DFM1.ar(oscillator, frequency, saturation/2, 1.0, 0.0, 0.0006); // Noise - qfactor = Lag.kr((1 - saturation)**4, lagtime); - noise = Crackle.ar(1.99, 1.0); + qfactor = Lag.kr((1 - saturation)**2, lagtime); + noise = Crackle.ar(1.9, 1.0); noise = BPF.ar(noise, frequency, qfactor); // Mix noise and saw - mixer = Mix.ar([filter * saturation.sqrt(), 0.5 * noise*(1-saturation)]); + mixer = Mix.ar([filter * saturation.sqrt(), 3* noise*(1-saturation)]); // Apply pan panner = LinPan2.ar(mixer, pan); @@ -46,8 +48,11 @@ s.waitForBoot { // Compress output = Compander.ar(output, output, 0.5, 0.3, 0.3, 0.1, lagtime); + // Fade in on boot + output = output * Lag.kr(gain, lagtime); + // Crank everything down - output = output * 0.1; + output = output * 0.3; Out.ar(0, output); }); @@ -63,11 +68,26 @@ s.waitForBoot { octave = (2 - (index / 4).floor); "Module %: Pan %, octave %\n".postf(index, pan.round(1e-1), octave.round(1e-1)); Synth.new(\module, - [\hue, 0.5, \saturation, 0.1, \value, 0.5, \pan, pan, \gain, 0.9, \octave, octave, \notefreq, Scale.major.degreeToFreq(index, 48.midicps, octave)] + [\hue, 0.5, \saturation, 0.1, \value, 0.5, \pan, pan, \gain, 0.0, \octave, octave, \notefreq, Scale.major.degreeToFreq(index, 48.midicps, octave)] ) } ); + // Turn up gain after some time + SystemClock.schedAbs(8, {modules[0].set(\gain, 1)}); + SystemClock.schedAbs(8, {modules[1].set(\gain, 1)}); + SystemClock.schedAbs(8, {modules[2].set(\gain, 1)}); + SystemClock.schedAbs(8, {modules[3].set(\gain, 1)}); + SystemClock.schedAbs(16, {modules[4].set(\gain, 1)}); + SystemClock.schedAbs(16, {modules[5].set(\gain, 1)}); + SystemClock.schedAbs(16, {modules[6].set(\gain, 1)}); + SystemClock.schedAbs(16, {modules[7].set(\gain, 1)}); + SystemClock.schedAbs(32, {modules[8].set(\gain, 1)}); + SystemClock.schedAbs(32, {modules[9].set(\gain, 1)}); + SystemClock.schedAbs(32, {modules[10].set(\gain, 1)}); + SystemClock.schedAbs(32, {modules[11].set(\gain, 1)}); + SystemClock.schedAbs(32, {modules[12].set(\gain, 1)}); + // Hook up OSC f = { |msg, time, addr| if(msg[0] == '/radio') {