diff --git a/02-GrainBuf_AmyWars_Romantiq.scd b/02-GrainBuf_AmyWars_Romantiq.scd new file mode 100644 index 0000000..e802209 --- /dev/null +++ b/02-GrainBuf_AmyWars_Romantiq.scd @@ -0,0 +1,117 @@ +// #looptober 2020 02 +// by Luka Prinčič +// free to use, remix, etc under conditions of peer production licence: +// https://wiki.p2pfoundation.net/Peer_Production_License +// please support my work via https://lukaprincic.si/support + + +( // load samples +var smpPath = PathName(thisProcess.nowExecutingPath.dirname +/+ "samples"); + +// free all buffers to restart buffer count +~smpBuffers.do(_.free); + +// create Dictionary +~smpBuffers = Dictionary(); + +// load samples +"\n--- load samples: ...".postln; + +// iterate over each file in the folder +smpPath.filesDo({ |smpfile,i| + // tell me what you are loading: + postln(" " + i + smpfile.fileName ); + + // add a sample into a buffer, store object to Dictionary + ~smpBuffers.add(smpfile.fileName -> Buffer.readChannel(s, + smpfile.fullPath, channels:[0])); +}); + +// function to partially match filename for buffers +~getSmp = { |regexp| + ~smpBuffers.detect { |buf| + regexp.matchRegexp(buf.path) + } +}; + +// synthdefs: /////////////////////////////////////////////////////////////////////// +SynthDef(\bgrain, { |out = 0, gate = 1, amp = 0, bufnum, gfreq=90, rate=0.5| + var snd, pan, env, freqdev; + pan = LFNoise1.kr(0.1).range(-1, 1) * LFNoise0.kr(gfreq).range(0.2,1); + env = EnvGen.kr( + Env([0, 1, 0], [1, 1], \sin, 1), + gate, + doneAction: Done.freeSelf); + + snd = GrainBuf.ar( + numChannels:2, + trigger:Impulse.kr(LFNoise1.kr(gfreq).range(0.8,1) * gfreq), + dur: 0.2 * LFNoise0.kr(gfreq).range(1,1.2), + sndbuf: bufnum, + rate: [rate * LFNoise1.kr.range(0.99, 1), rate * LFNoise1.kr.range(0.99, 1)], + pos: LFNoise2.kr(0.05).range(0, 1) * LFNoise0.kr(gfreq).range(1,1.02), + //pos: LFTri.kr(0.25), + interp: 2, + pan: pan); + + snd = RLPF.ar(snd, freq: LFNoise2.kr(0.1).exprange(400,10000)); + snd = snd * LFTri.ar(0.073).range(0.1,1); + snd = snd * env * amp; + + Out.ar(out, snd); + +}).add; + + + +SynthDef(\verbDelayFX, { + arg inBus, out=0, revWet=0.8, dlyWet=0.8, feedback = 0.5 ; + + var snd = In.ar(inBus, 2); + var verb = JPverb.ar(snd); + var delay = Greyhole.ar(snd, feedback: feedback); + + snd = snd + (verb * revWet) + (delay * dlyWet) * 0.5; + Out.ar(out, snd); +}).add; +); + + +// ----------------------------------------------------------------- +// create a reverb/delay send bus +~reverBus = Bus.audio(s,2); + +// create processing verb/delay plugin/synth +~reverbDelay = Synth(\verbDelayFX, [\inBus, ~reverBus], addAction: \addAfter); + +// free them if necessary: +// ~reverbDelay.free +// ~reverBus.free + + +// ----------------------------------------------------------------- + +( +// granulation 1 +~amygran = Synth(\bgrain, + [\out, ~reverBus, \bufnum, ~getSmp.("amywars"), \amp, 0.5], + addAction: \addToHead); +) + +( +// granulation 2 +~romantiq = Synth(\bgrain, + [\out, ~reverBus, \bufnum, ~getSmp.("romant"), \amp, 0.05], + addAction: \addToHead); +) + +// play with arguments: +~amygran.set(\amp, 0.5) +~romantiq.set(\amp, 0.05) +~romantiq.set(\rate, 1) + +// fadeout +~amygran.release(10) +~romantiq.release(10) + +// ----------------------------------------------------------------- diff --git a/recordings/01-SC_201002_095846.mp3 b/recordings/01-SC_201002_095846.mp3 new file mode 100644 index 0000000..aae8be5 Binary files /dev/null and b/recordings/01-SC_201002_095846.mp3 differ diff --git a/recordings/02-SC_201003_151805.mp3 b/recordings/02-SC_201003_151805.mp3 new file mode 100644 index 0000000..337d331 Binary files /dev/null and b/recordings/02-SC_201003_151805.mp3 differ diff --git a/samples/amywars.wav b/samples/amywars.wav new file mode 100644 index 0000000..6016f74 Binary files /dev/null and b/samples/amywars.wav differ diff --git a/samples/romantiq.wav b/samples/romantiq.wav new file mode 100644 index 0000000..7e45744 Binary files /dev/null and b/samples/romantiq.wav differ