Check out the Demand
UGen, and the rest of the demand rate UGens - these are even based, and can be driven by audio-rate triggers. This might be a solution for what you’re describing.
See SynthDef:wrap
, which is probably the best-supported way of composing functions together into a single SynthDef
. FWIW a compiled SynthDef
(e.g. what you get when you do SynthDef(\foo, {})
loses some high-level information about its overall structure - this makes it not ideal / impossible to properly compose inside another SynthDef
. The best thing to is write and store SynthDef
“components” as functions and call them via wrap
or e.g. ~filterModule.value(input, freq)
.
This is possible now. Envelope passing for Synths and Patterns