Hello,
I’m trying to write the code with the following ideas, but I’m stuck:
How can I write a code using Pbind to create a progression of sounds transitioning from very short to long sustains (or releases) within a 5-minute duration? Additionally, how can I code it to revert back to very short sounds once it reaches the longest sustain?
Can you do the same with any sampler?
Thank you so much for your help.
(
SynthDef(\pluck, {
|amp=0.4, note=60, decay=4, coef=0.1, pan=0|
var env, sig, pluck, delay;
env = EnvGen.kr(Env.linen(0, decay, 0), doneAction:2);
sig = WhiteNoise.ar(amp);
delay = note.midicps.reciprocal;
sig = Pluck.ar(in:sig, delaytime:delay, decaytime:decay, coef:coef);
Out.ar(0, Pan2.ar(sig * 0.5, pan));
}).add;
)
(
var base, dur, step, times;
base = 60;
dur = 0.2;
step = 1;
times = 6;
Pbind(\instrument, \pluck,
\note, Pseq([Pseries(base,step,times), Pseries(base,step.neg,times)], inf),
\dur, dur,
\amp, 0.5,
).play
)