1
0
Fork 0

Add 'LorenzPattern.scd'

main
Luka Prinčič 2020-03-12 12:30:57 +01:00
parent 26e376e694
commit dfcce59d53
1 changed files with 35 additions and 0 deletions

35
LorenzPattern.scd Normal file
View File

@ -0,0 +1,35 @@
( // basic synth SynthDef
SynthDef(\blipo, { | out, freq = 440, amp = 0.1, nharms = 10, pan = 0, gate = 1, sustain |
var audio = Blip.ar(freq * (SinOsc.kr(3).range(1,1.01)), nharms, amp);
var env = Linen.kr(gate, releaseTime: sustain, doneAction: Done.freeSelf);
OffsetOut.ar(out, Pan2.ar(audio, pan, env) );
}).add;
// reverb effect SynthDef
SynthDef("reverbo", { arg outBus = 0, inBus, wet = 0.1;
var input = In.ar(inBus,2);
var rev = JPverb.ar(input * wet, t60:6, damp:0.5);
Out.ar(outBus, input + (rev));
}).add;
)
// create a 'private' 2-chan audio bus
~revbus = Bus.audio(s,2);
(
// start reverb effect on the private bus
~fxRev = Synth("reverbo", [\inBus, ~revbus, \wet, 0.6]);
Pbind(
\instrument, \blipo,
\dur, Pflatten(1, Plorenz() * 0.8),
\degree, (Pflatten(1, Plorenz()) * 18).asInteger,
\mtranspose, Prand([Pn(0,24),Pn(2,24),Pn(4,24)], inf),
\detune, Prand([0,1,2,0.5,1.5], inf),
\nharms, Prand((2..10),300),
\octave, 3,
\legato, Prand((4..7),inf) * 0.2,
\pan, Prand((-10..10),inf) * 0.1,
\out, ~revbus
).play;
)