2020-03-15 16:21:56 +01:00
|
|
|
(
|
|
|
|
SynthDef(\markovS1, {
|
2020-03-25 18:34:35 +01:00
|
|
|
arg out, freq, tsize, amp = 0.8, clip=1, gate = 1, fadeTime = 1;
|
|
|
|
var snd, env;
|
2020-03-15 16:21:56 +01:00
|
|
|
|
2020-03-25 18:34:35 +01:00
|
|
|
env = EnvGen.kr(Env([0, 1, 0], [fadeTime, fadeTime], \sin, 1), gate, doneAction: Done.freeSelf);
|
2020-03-15 16:21:56 +01:00
|
|
|
snd = MarkovSynth.ar(SinOsc.ar(freq), 1, 0, tsize);
|
|
|
|
snd = snd.clip2(clip);
|
2020-03-25 18:34:35 +01:00
|
|
|
snd = snd * env * amp;
|
2020-03-15 16:21:56 +01:00
|
|
|
|
2020-03-25 18:34:35 +01:00
|
|
|
Out.ar(out, snd);
|
2020-03-15 16:21:56 +01:00
|
|
|
}).add;
|
|
|
|
|
|
|
|
)
|