1
0
Fork 0

added code and samples

main
Luka Prinčič 2021-04-05 13:21:27 +02:00
parent c63c6219c4
commit 35a4bb50db
3 changed files with 251 additions and 0 deletions

159
ichika.scd Normal file
View File

@ -0,0 +1,159 @@
/*
written by Luka Prinčič for 'noether' release.
heavily inspired by chords written by Ichika Nito on a track 'Arpeggio'
*/
(
Server.default.waitForBoot { fork {
~revBus.free;
~revFx.free;
~revBus = Bus.audio(s, 2);
SynthDef(\bet, { |gate = 1, freq = 234, out = 0, pan = 0, amp = 0.1, cutoff = 4000 |
var snd, env, fenv;
freq = [freq, freq * 1.01] * Rand(0.995, 1.0);
freq = freq * SinOsc.kr(5).range(0.99, 1.01);
env = EnvGen.ar(Env.asr(0, 1, 3), gate, doneAction:2);
fenv = EnvGen.ar(Env.adsr(0.05, 0.5, 0.4, 2), gate);
snd = SinOsc.ar(freq);
snd = snd + Pulse.ar(freq * 0.5, mul:5);
snd = snd + LFTri.ar(freq * [1,2].choose * 1.01, mul:1);
snd = LPF.ar(snd, cutoff * fenv + 100);
snd = snd + Decimator.ar(snd, freq*30);
snd = snd * env * amp;
snd = Balance2.ar(snd[0], snd[1], pan, 0.7);
snd = snd * 0.4;
OffsetOut.ar(out, snd);
}).add;
SynthDef(\nhat, { |gate = 1, out = 0, amp = 0.1, rls = 0.2, pan = 0|
var snd, env;
env = EnvGen.ar(Env.asr(0, 1, rls, -10), gate:gate, doneAction: Done.freeSelf);
snd = WhiteNoise.ar;
snd = snd * env;
snd = BPF.ar(snd, 9000);
snd = snd * amp;
snd = Pan2.ar(snd, pan);
Out.ar(out, snd);
}).add;
SynthDef(\kick, { |gate = 1, out = 0, amp = 0.1, release = 0.9, freq=50, pan = 0, cutoff = 500, fxout=0, hpf=0 |
var snd, env, fenv;
fenv = EnvGen.ar(Env([freq*4,freq],0.08,'cub'));
snd = SinOsc.ar(freq: [fenv,fenv*2], mul:[1,0.4] ).sum;
snd = snd * LFPulse.ar(24).range(0.7,1).lag(0.02);
snd = snd + WhiteNoise.ar(0.3);
snd = snd + SinOsc.ar(freq: [freq*2,freq*4], mul:EnvGen.ar(Env.perc(0, 0.2)) * 0.5).sum;
snd = snd + LFTri.ar(freq: freq*4, mul:EnvGen.ar(Env.perc(0, 0.5)) * 0.3);
snd = RLPF.ar(snd, cutoff, 0.7);
snd = HPF.ar(snd, hpf);
snd = snd.softclip;
snd = snd * EnvGen.ar(Env.adsr(0, 0.05, 0.4, release, curve:'sqr'), gate: gate, doneAction:Done.freeSelf);
snd = snd * amp * 5;
snd = Pan2.ar(snd, pan);
//DetectSilence.ar(snd, doneAction:Done.freeSelf);
Out.ar(fxout, snd);
Out.ar(out, snd);
}).add;
// reverb synthdef
SynthDef(\revfx, { |inBus, outBus = 0, wet = 0.3, amp = 0.2|
var snd, rev;
snd = In.ar(inBus, 2);
snd = BHiShelf.ar(snd, 5000, db:-3);
rev = GVerb.ar(snd, 100, taillevel:wet);
rev = rev * amp;
OffsetOut.ar(outBus, rev);
}).add;
s.sync;
// reverb on a reverb bus
~revFx = Synth(\revfx, [\inBus, ~revBus, \amp, 0.4, \wet, 0.5], addAction:\addAfter);
s.sync;
// PATTERNS: ////////////////////////////////////////
t = TempoClock.default.tempo = 140/120;
Pbind(*[
instrument: \kick,
freq: Prand((1..9) * 0.1 + 1 + 50,inf),
dur: Pseq([2/3,2/3,1/3,2/3,1/6,1/6,1/3],inf) + Prand([0,0,1/3,1/6,2/3],inf),
sustain: 0.1,
hpf: Pseg([300,300,0,0,3000, 3000], [60, 60, 120, 30, 30]),
amp: Pseg([0, 0, 0.1, 0.1, 0.01, 0], [60, 60, 120, 20, 10], \sqr),
release: Prand((1..9) * 0.1, inf),
cutoff: Prand((1..9) * 500, inf),
]).play(quant:1);
Pbind(*[
instrument: \nhat,
dur: Pwrand([1/3, Pn(1/6,2)], [0.9,0.1], inf),
amp: Pseg([0, 0, 0.1, 0.1, 0], [60, 60, 120, 30]),
pan: Pwhite(-0.5,0.5),
sustain: Prand([0.002, 0.01, 0.02],inf)
]).play(quant:1);
Pbind(*[
instrument: \bet,
dur: Prand([
Pseq([1/3, 3/6, 1/3, 1/3, 1/6, 2/6],4),
Pseq([3/6, 1/3, 1/3, 1/6, 2/6, 1/3],4),
Pseq([1/3, 1/3, 1/6, 2/6, 1/3, 3/6],4),
Pseq([1/3, 1/6, 2/6, 1/3, 3/6, 1/3],4),
Pseq([1/6, 2/6, 1/3, 3/6, 1/3, 1/3],4),
Pseq([2/6, 1/3, 3/6, 1/3, 1/3, 1/6],4)
],inf),
// inspired by Ichika Nito - Arpeggio //
note: Pseq([
1, 13, 15, 20, 16, Rest(), // Dbm(add9)
-1, 11, 15, 20, 16, Rest(), // EM7/B
-3, 13, 15, 20, 16, Rest(), // Dbm(add9)/A
-3, 12, 18, 23, 25, Rest(), // Gbsus4(+11)/A
-6, 6, 9, 13, 20, Rest(), // Gbm(add9)
-4, 8, 12, 18, 16, 20, // Abaug7
1, 13, 15, 20, 16, Rest(), // Dbm(add9)
-1, 11, 15, 20, 16, Rest(), // EM7/B
-3, 13, 15, 20, 16, Rest(), // Dbm(add9)/A
-3, 12, 18, 23, 16, Rest(), //
-4, 6, 11, 15, 16, Rest(), // EM9/Ab
-4, 6, 13, 16, 25, 28, // Ab7sus4(-13(
-6, 6, 9, 13, 20, Rest(), // Gbm(add9)
-6, 8, 12, 18, 20, 16, // Abaug7
], inf),
octave:
Pseq([ Pn([4,5],14*6*2),Pn([4,5,6],14*6*2),
Pseq([
Prand([[5,4],[5,6],[4,5,6]]),
Pn(Pwrand([5,6],[0.9,0.1]), 5)
], 14*2),
Pseq([ Pn([4,5,6,7],14*6*4)])]),
detune: 3, // Hz added to final freq
legato: Pseq([4, Pn(Prand((2..5)*0.2),5)],inf) * 0.1,
cutoff: Prand((1..4),inf) *
Pseg([50, 500, 1000, 1000, 50, 10], [60, 60, 120, 30, 20], \cub),
amp: Pseg([0, 0.1, 0.1, 0.01, 0], [10, 120+180, 30, 10], \cub) * 0.6,
pan: Prand((0..10)-5*0.1, inf),
out: ~revBus,
]).play(quant:1)
}}
)

92
matt.scd Normal file
View File

@ -0,0 +1,92 @@
/*
matt
written by Luka Prinčič for 'noether' release.
you need the matthew_1-25.wav in a smp folder.
*/
(
Server.default.waitForBoot {
Buffer.freeAll;
// load buffers
~selfpath = PathName.new(thisProcess.nowExecutingPath).pathOnly;
~buf2 = Buffer.readChannel(s, ~selfpath +/+ "smp/matthew_1-25.wav", channels:1);
SynthDef(\granulator, {
var snd, mpos, clicks, env, glitch, nenv;
// positions
mpos = Demand.kr(Impulse.kr(1/64), 0, Dseq([
0.247, 0.295, 0.265, 0.39, 0.147, 0.275, 0.698, 0.242 ],inf));
env = EnvGen.ar(
Env([0, 0, 1, 0.5, 0.8, 0.5, 0.8, 0.5, 1, 0, 0],
[ 0, 15, 1, 15, 1, 15, 1, 15.95, 0.05, 0 ], \sqr,
releaseNode: 9, loopNode: 0),
gate:1);
snd = GrainBuf.ar(
numChannels: 2,
trigger: Impulse.ar(128 * LFNoise0.ar(128).range(1,1.4)),
dur: 0.2,
sndbuf: ~buf2,
rate: [0.5, 1],
pos: SinOsc.kr(1/64, phase:pi/2*3).range(mpos, mpos+0.01).poll(2, \pos)
* LFNoise0.ar(128).range(1, 0.999),
) * 0.3;
snd = LPF.ar(in: snd, freq: LFNoise1.ar(0.3).exprange(450,15000));
snd = Splay.ar( [ snd[0][0] * 0.5, snd[0][1] ]
+ [ snd[1][1], snd[1][0] * 0.5 ], 1) * 2 ;
snd = snd * LFPulse.kr(8).range(LFNoise1.kr([0.1,0.1]).range(
EnvGen.kr(Env([1, 1, 0.5, 0.2, 1, 1],[64, 64, 256, 64, 64])),
1),1);
snd = snd * LFPulse.kr(3).range(LFNoise1.kr([0.1,0.1]).range(
EnvGen.kr(Env([1, 1, 0.8, 0.6, 1, 1],[64, 64, 256, 64, 64])),
1),1);
clicks = HPF.ar(LFSaw.ar(8, 1, mul:LFNoise0.kr(2).range(0.02,0.05)), 1000);
clicks = LPF.ar(in: clicks, freq: LFNoise1.ar(0.3).exprange(450,9000))
* LFSaw.kr(1/16, iphase:1).range(0,1);
clicks = clicks + LPF.ar(
HPF.ar(
LFSaw.ar(1, 0, mul:LFNoise0.kr(2).range(0.005,0.04)),
LFNoise1.kr(1/8).range(500,4000)),
7000);
clicks = clicks * EnvGen.kr(Env([0,0,1,1,0,0],[128,32,256,32,64]));
glitch = GbmanN.ar(LFNoise0.kr(LFNoise0.kr(4).range(1,20)).exprange(240, SampleRate.ir));
glitch = glitch * EnvGen.ar(Env(
[0, 0, 0, 1, 1, 0, 0],
[ 0, 16+15.75, 0, 0.25, 0, 0 ],
\lin, 5, 0));
glitch = BPF.ar(glitch, 1000) * LFNoise0.kr(1/16).range(0.005, 0.02);
glitch = glitch * EnvGen.kr(Env([0,0,1,1,1,0],[256,128,64,64]));
glitch = GVerb.ar(glitch, 100, 5, 0.8, 0.5, 30, 1, 0, 0.8);
nenv = EnvGen.ar(Env([0,0,1,0,0], [0,32,0,0], 20, 3, 0));
snd = snd * env * EnvGen.kr(Env([1,1,0],[512,0.1]));
snd = Decimator.ar(snd, LFNoise1.kr(1/16).range(5000,22050), mul:-18.dbamp, add:snd);
snd = CombL.ar(BPF.ar(snd, 1000), 1, [0.5,2/3], 8, add:snd);
snd = snd + clicks;
snd = snd + glitch;
snd = snd +
(PinkNoise.ar
* nenv
* LFNoise0.kr(1/16).range(0.005, 0.05)
* EnvGen.kr(Env([0,0,1,1,0,0],[128,256,64,64]))
);
snd = snd * EnvGen.kr(Env([0, 1, 1, 0],[32, 512-32, 32], \sqr), doneAction:2);
Out.ar(0,Limiter.ar(snd, 0.95));
}).play;
}
)

BIN
smp/matthew_1-25.wav Normal file

Binary file not shown.