Skip to content

SoundFont envelope truncation: staccato click fix (playout 12.5.3)

Choose a tag to compare

Fixes the confirmed audible click on staccato SoundFont notes with long-decay patches (piano, strings).

@waveform-playlist/playout 12.5.3

SoundFontToneTrack scheduled the full AHD volume envelope and stepped to sustain at note-off. For staccato notes, the decay ramp's endpoint sorted after note-off in the automation timeline and never governed — the gain held at peak for the entire note, then stepped peak→sustain in a single sample (0.576 measured at velocity 0.8 via Chromium OfflineAudioContext gain-curve capture): a hard click on any sustained patch played staccato.

The envelope is now truncated at note-off: since the note duration is known at schedule time, each AHD phase is clipped and the schedule ends with a partial ramp to the analytically-computed envelope value at note-off. The partial ramp lies on the same decay line, so notes that outlive the decay are scheduled identically to before. Cross-browser (no cancelAndHoldAtTime).

Browser-verified: max gain-curve sample step 0.576 → 0.000026 (the ramp's own slope) across staccato, long-note, mid-attack, and hold-phase cases.

Pin-refresh cascade (no code changes)

ui-components@13.1.4, recording@13.0.2, browser@15.3.2, annotations@12.0.5 — republished so their exact workspace pins resolve to the new playout.