I am pretty sure sustain
sends an absolute value, regardless of the note length.
for example, in SuperCollider:
(
SynthDef (\drip) {
arg out = 0, sustain = 1, freq = 440, pan = 0, amp = 0.2;
var env, sig;
env = Env.perc (0.02, sustain - 0.02);
env = EnvGen.kr (env, doneAction: 2);
sig = SinOsc.ar (freq * (2 ** (1 - env)), 0, env);
sig = Pan2.ar (sig, pan, amp);
OffsetOut.ar (out, sig);
}.add;
)
^ the synth's audible duration is sustain seconds
in Tidal:
setcps (120 / 60 / 4)
d1 $ n "0!1" # s "drip"
# sustain "1"
evaluating this pattern at this tempo should make it clear that the sustain value being sent to the synth is 1, regardless of the actual length of the note event. In the above example, the note last for 2 seconds (the whole cycle), but the synth only lasts for 1 second.
similarly, with this pattern:
d1 $ n "0!4" # s "drip"
# sustain "1"
here we can see that the note event has a length of 0.5 seconds, but the synth's audible duration is 1 second still, causing the sounds to overlap each other.
I was wondering how to access the relative note length, ie. the length of the note event after all manipulations / subdivisions have been applied, and how this could be made visible to a custom synthesiser in SuperCollider?