From 360e3157ea588879f828494f76fe1d92cc3dd3c5 Mon Sep 17 00:00:00 2001 From: Eugene Petkevich Date: Sat, 13 Jan 2024 13:22:39 +0100 Subject: [PATCH] some experimentation --- library/template.scd | 69 +++++++++++++++++++++++++++++++++++++------- startup.scd | 14 ++++++--- 2 files changed, 69 insertions(+), 14 deletions(-) diff --git a/library/template.scd b/library/template.scd index cb50d5d..ea84008 100644 --- a/library/template.scd +++ b/library/template.scd @@ -24,18 +24,20 @@ ServerTree.add(~createGroupsBusses); s.plotTree }; ServerBoot.removeAll; -ServerBoot.add(~drawWindows); +//ServerBoot.add(~drawWindows); ) // recording ( -~r = Recorder(s); s.recorder.filePrefix = "test_main_"; -~r.filePrefix = "test_master_"; s.record(bus: ~mainBus); + +~r = Recorder(s); +~r.filePrefix = "test_master_"; ~r.record(bus: a.h); ) + ( s.stopRecording; ~r.stopRecording; @@ -51,13 +53,17 @@ SynthDef(\fagi, { arg pan=0, t_trig=1, gate=1, - freq=440, doneAction=2, cut=800, rez=0.8, - modFreqMin=7, modFreqMax=12, modAmp=0.01, release=1.0 + freq=440, + freqStart=440, + freqEnd=440,doneAction=2, cut=800, rez=0.8, + modFreq=3, modAmp=0.01, release=1.0 ; var sig = 0; var panDelay = 0.005; - var modFreq = SinOsc.kr(Rand(modFreqMin, modFreqMax), 0, modAmp, 1); - sig = sig + Pulse.ar(freq * modFreq); + var modFreqMul = SinOsc.kr(modFreq, 0, modAmp, 1); + var curFreq = EnvGen.ar(Env([freqStart, freq, freqEnd], [0.01, release], \exp, 1), gate); + sig = sig + Pulse.ar(curFreq * modFreqMul); + //sig = (sig*11.2).fold(-1, 1); sig = RLPF.ar(sig, cut, rez); sig = sig * EnvGen.ar(Env.asr(releaseTime: release), gate, doneAction: doneAction); sig = Pan2.ar(sig, pan); @@ -69,15 +75,58 @@ SynthDef(\fagi, { arg // pdefs ( -Pdef(\fagi, Pbind(*[ +Pdef(\baseight, Pmono(\qoba, *[ + trig: 1, + accent: 0.5, + freq: Pexprand(40, 80), + tone: 0.5, + decay: 0.9, + attackfm: 0.3, + selffm: 0.75, + dur: 1, + db: 60, + out: ~mainBus, +])).quant_(4).play; +) + +( +Pdef(\fagi1, Pbind(*[ + group: ~fagiGroup, + out: ~mainBus, + instrument: \fagi, + db: 40, + pan: 0, + trig: 1, + dur: Pseq([3, 3, 4, 2, 2, 1, 1].split(2)/4, inf), + legato: 0.2, + release: TempoClock.tempo.reciprocal/2, + octave: Prand((3..4), inf), + note: Pseq([0, 5, 0, 7, 2, 7, 6], inf), + freqStart: Pkey(\freq)/Prand([2, 4], inf), + freqEnd: Pkey(\freq)/Prand([1/2, 1/4, 2, 4], inf), +])).quant_(4); +) + +( +Pdef(\fagi2, Pbind(*[ group: ~fagiGroup, out: ~mainBus, instrument: \fagi, db: 40, pan: 0, trig: 1, + dur: Pseq([3, 3, 4, 2, 2, 1, 1].split(2)/4, inf), + legato: 0.2, + release: TempoClock.tempo.reciprocal/2, + octave: Prand((5..7), inf), + note: Pseq([0, 5, 0, 7, 2, 7, 6], inf), + freqStart: Pkey(\freq)/Prand([2, 4], inf), + freqEnd: Pkey(\freq)/Prand([1/2, 1/4, 2, 4], inf), ])).quant_(4); ) -Pdef(\fagi).play; -Pdef(\fagi).stop; \ No newline at end of file +TempoClock.tempo = 1.5; +Pdef(\fagi1).play; +Pdef(\fagi2).play; +Pdef(\fagi1).stop; +Pdef(\fagi2).stop; \ No newline at end of file diff --git a/startup.scd b/startup.scd index f5d44b3..1384998 100644 --- a/startup.scd +++ b/startup.scd @@ -31,10 +31,16 @@ c = ( "./library/superclean.scd".loadRelative; // synths -"./library/mixer.scd".loadRelative; -"./library/controls.scd".loadRelative; -"./library/instruments.scd".loadRelative; -"./library/effects.scd".loadRelative; +~filesToLoad = [ + "./library/mixer.scd", + "./library/controls.scd", + "./library/instruments.scd", + "./library/effects.scd" +].collect(_.resolveRelative); +~filesToLoad.do(_.load); +ServerBoot.add{ + ~filesToLoad.do(_.load); +}; // recording -- 2.17.1