pub fn render_phrase(
tree: &PatchTree,
spec: &PhraseSpec,
) -> Result<RenderedPhrase, PatchError>Expand description
Compile tree and render it playing the phrase.
Chord notes (crate::phrase::Note::chord) are rendered by additional
compiled voices summed into the same buffer with no attenuation: two
voices sounding at once being louder and denser than one is exactly the
polyphonic-stacking information the stimulus exists to capture, whole-
phrase loudness is normalized downstream, and the vet ceiling scales with
crate::phrase::PhraseSpec::max_voices. Chord voices tick from their
note’s onset (cold start, like live voice allocation), share the note’s
gate, and after release keep ticking until their output parks on silence
so a long tail is never truncated into a click. Tick order per sample is
fixed (main voice, then chord voices in pitch order), which keeps the
thread-local RNG draw sequence — and therefore the render — deterministic.