1
0
Fork 0

added new/old one using pattern routine

main
Luka Prinčič 2020-11-06 08:47:23 +01:00
parent acb4a32214
commit 566786d090
1 changed files with 30 additions and 0 deletions

View File

@ -0,0 +1,30 @@
(
SynthDef(\param, { arg freq = 100, sustain, amp;
var sig;
sig = LFPar.ar(freq: freq,
mul: EnvGen.kr(Env.perc(0, sustain, 0.5), doneAction:2) * amp);
sig = Splay.ar(sig);
Out.ar(0, sig);
}).add;
e = Pbind(
\midinote, Prout({
var tone0, tone1, tone2, interval, freq0, delta;
loop {
tone0 = rrand(0,11);
interval = rrand(2,4);
tone1 = Scale.minor(\pythagorean).at(tone0) + [0,12,24].choose + 0.07;
tone2 = Scale.minor(\pythagorean).at(tone0 + interval) + [0,12,24].choose;
freq0 = [tone1,tone2]+48;
postln(freq0);
freq0.yield;
}
}),
\dur, Prand([1,2,4,8,12,16,4,6,8], inf),
\instrument, \param,
\amp, 0.5,
\sustain, 2,
).play(quant:1); // returns an EventStream
TempoClock.default.tempo = 1200/60;
)