Dynamic envelopes without killing voices
-
Is there a way to switch (bypass/unbypass) 2 AHDSR envelopes without killing currently playing voices? Or can this be achieved with a ScriptNode based envelope?
-
@d-healey Can you post a minimal example?
-
Definitely a task for a scriptnode envelope.
Use a soft bypass template and two AHDSR nodes, then plug one of those between their gate output and the voice manager node.
More relevant stuff in the docs:
https://docs.hise.dev/tutorials/scriptnode/index.html#scriptnode-voice-management
https://docs.hise.dev/scriptnode/list/envelope/voice_manager.html -
Actually, use a split node as the soft bypass will stop processing the one that is not active. Also use the logic_op instead of the input toggle so that the voice is kept alive as long as the longest release time
HiseSnippet 1762.3oc6Z8zaaaCEmxNzINMcscXEaCXG7gcnEnHHNsqa.8fc9aavpiMhyRWOEvJQGyEIRCI5j3MrK6ztryC819Lza6VA1ocaeCZ+HzuAcOJJYKZ63XKj+g1j.jXx2ij+d++QIWyWXSCBD9Hq7a2oEEYMGtdGtr4JMILNZiUQVeBtBIPR8KnmZ4NsHAATGjkU1GqlvJ+TnvedWokItDtMs2THzNBlM8oLOlr2r0J+8LW20INzsYdI39Ak2vVvWQ3JZC3IKdATKh89j8naRTrkAirxslCSJ7qKIRZ.vyxBmN0aJNjq4eGV.6EtT0fhn5vFomFsRSlqSsXYM.grv05I4Y0R9mgqvbXcmumF3lgDJzaEI0AVYFEjJNAPxJAjlRCoagqa6yZI6QQgmqg2fCFjFDPUmDJZdQVuFuh.XfKm2irOcceXP2EbmGtvB2q.7m69nFs41RlfWPv2THoU424ty9Kyle1ec1B8SpQigRScL9BWWp+PIqrt9iZg2g216ET+6U3.haaZWFAw2Tmla7zo1ZoNAiB9FblrZKZz30EtNJck5yCZAPQpM3S+vFqRjDkQIZNfuVTeISAGqUoG.d0ZSTd7pzf8khVfe8.1OvyQ3z1kHMcmTwMQD.8ggMTYn3ALYmjwUSfO1BizGabg3sv0XR6lCGiYFBFAM0YAFihLuNdsFMn1xd.bJ75+XZCCG+i+15i+Z3mQNfFlVL7vuc33FBeuBOlxo9JcWwQjX7+F2DisF6D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