Post-pitch hooks
A post-pitch hook receives the generated F0 contour after pitch inference and before acoustic rendering. It may apply vibrato, smoothing, compression, or another musically justified pitch adjustment.
.hooks({ stage: "post_pitch", postPitch(ctx) { return ctx.f0; },})Contract
Section titled “Contract”ctx.f0 is a Float32Array of F0 values in hertz at the render frame rate.
Zero denotes an unvoiced frame. A hook must return a finite contour of the same
length and preserve unvoiced frames unless it explicitly declares otherwise.
Use method syntax when accessing this.params. If the neutral parameter state
applies no effect, return the current contour unchanged. Test the installed
package by baking voiced, unvoiced, and note-boundary material.
Hooks at the same stage execute from lower order to higher order. Choose an
order only after identifying the required interaction with other processors,
and state that interaction in the package documentation.
For parameter declaration and numerical helpers, see the Plugin API.