2020-03-15 16:21:56 +01:00
|
|
|
( // synthdef /////////
|
|
|
|
SynthDef(\fm_grainer, {
|
2020-03-27 19:14:21 +01:00
|
|
|
arg out = 0, modfreq = rrand(10,1000), carfreq = 100, amp=0.5 ;
|
2020-03-15 16:21:56 +01:00
|
|
|
var signal;
|
|
|
|
|
|
|
|
signal = GrainFM.ar(
|
|
|
|
numChannels:2,
|
|
|
|
trigger: Impulse.kr(LFTri.kr(0.1, -1)+1*10),
|
|
|
|
dur: 0.05,
|
|
|
|
carfreq: carfreq,
|
|
|
|
modfreq: modfreq,
|
|
|
|
// index: LFNoise1.kr.range(1, 90),
|
|
|
|
index: SinOsc.kr(0.05)*0.2,// LFNoise1.kr.range(1, 90),
|
2020-03-27 19:14:21 +01:00
|
|
|
pan: 0,
|
2020-03-15 16:21:56 +01:00
|
|
|
envbufnum: -1
|
|
|
|
) * 0.2;
|
|
|
|
|
2020-03-27 19:14:21 +01:00
|
|
|
signal = signal * EnvGen.kr(Env.linen(1,60,10,0.4,\lin),doneAction:Done.freeSelf) * amp;
|
2020-03-15 16:21:56 +01:00
|
|
|
|
2020-03-27 19:14:21 +01:00
|
|
|
Out.ar(out, signal);
|
2020-03-15 16:21:56 +01:00
|
|
|
}).add;
|
|
|
|
);
|