dkmayer
December 26, 2019, 11:53pm
4
Update: a similar question here, with a little helper function with Pseg a quite short syntax for fading is easy to do - I haven’t thought about that possibility so far and it works with type \note and \set (Pmono-like)
I’d do this with Pbind of type set, then you can take all benefits of Pbindef. E.g.:
Pdef.removeAll
// start silently first
x = Synth(\default, [amp: 0]);
Pbindef(\a,
\type, \set,
\id, x.nodeID,
\midinote, Pshuf((60..90), inf),
\dur, 0.2,
\amp, 0.1,
\pan, 0
).play
// helper function for fading with Pseg
~f = { |start, end, time, curve = 0| Pseg(Pseq([start, Pn(end)], time, curve)) }
Pbindef(\a, \amp, ~f.(0.1, 0.5, 10))
Pbindef(\a, \pan, ~f.(0, -1, 5))
Pbindef(\a, \pan, ~f.(-1, 1, …
Note that there’s a typo corrected in
Oops, bracket error, should be:
~f = { |start, end, time, curve = 0| Pseg(Pseq([start, Pn(end)]), time, curve) }
Additional good news is that with the correct version durs can be set in the same way !