Hello !
How do I make an envelope that will go from 0 to 1 in 100ms and will stay at 1 until the next trigger ?
My code is as follows :
(
{
var trig, tempo, drone, note;
note = 41; // fa
tempo = 70/60;
trig = TDuty.kr(Dseq([Dwrand([1/3, 2/3], [0.9, 0.1], 1), 1/3, 1/3, 1],inf) / tempo +Dwhite(-0.01, 0.01,inf));
drone = Splay.ar( (1..10).collect({ |i|
Saw.ar(
freq: note.midicps * i,
mul: 1/i
)
}));
drone = drone * EnvGen.ar(
envelope: Env.asr(0.1, 1.0, 0.1), // this is obviously not the right enveloppe
gate: trig
);
drone
}.play
)
Any clue ?
Thanks in advance
Geoffroy