1
0
Fork 0
Rhizosphere/lib/fmGrains.scd

22 lines
532 B
Plaintext

( // synthdef /////////
SynthDef(\fm_grainer, {
arg out = 0, modfreq = rrand(10,1000), carfreq = 100, amp=0.5 ;
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),
pan: 0,
envbufnum: -1
) * 0.2;
signal = signal * EnvGen.kr(Env.linen(1,60,10,0.4,\lin),doneAction:Done.freeSelf) * amp;
Out.ar(out, signal);
}).add;
);