When the Attack Time of an AD Envelope is cached in a Value (Float) node, the output of the envelope instantly hits 1.0, waits for the duration of the attack time, and then starts decaying - instead of interpolating towards 1.0 over the attack time.
It Init Value of the Value node is set to a non-zero value, it works as it should.
Sorry for the delayed response. It looks to me like this is current bug. I’ll work on getting a fix for 5.8 and will post it here so you can incorporate it if you are building from source.
Without code changes the only workarounds I can think of are:
1. Set Init Value to match Target Value (best option)
Set the Value node’s Init Value to the same value as your Target Value. The bug only triggers when Init Value is 0, so a non-zero Init Value (even a tiny one like
0.001) prevents it. Setting it to your actual intended attack time means the envelope behaves correctly whether or not the Value node has been triggered yet.
2. Don’t use a Value node
If the attack time doesn’t need to change at runtime, just set it directly as a literal on the AD Envelope’s Attack Time pin. No Value node, no problem.
3. Delay the envelope trigger
Ensure the Value node is triggered (and its output has propagated) in a block before the AD Envelope trigger fires — e.g., by gating the envelope trigger through a
small Delay node. This is fragile and awkward, so option 1 is much better.