@maruaudio/dsp/voices/stiff-string-piano is a reduced piano recipe with one, two or three strings per key, chosen by a per-key physical scale. Each string is either a modal bank (independent, or coupled through a shared load) or a dispersive digital waveguide, struck through a nonlinear felt-hammer contact. It adds reduced pedal, duplex and body resonances, continuous damper loss, seeded mechanical noise and a sympathetic field over 88 keys. The synth voices guide calls it a feed-forward approximation with authored gains, not a measured bridge model, built for the Tricorda prototype.
Parameters
There are no setters. A PianoRecipe (tuning, register curves, stiffness, hammer, decay and loss, position, pedal, body, width, velocity response, coupling, duplex, noise and more) is passed to every strike and tick; the module owns its ranges.
| Recipe field | Coded meaning |
|---|---|
algorithm | 0 independent modal strings, 1 modal strings coupled through a shared load, 2 waveguide |
contactModel | Waveguide only: 0 force impulse, 1 contact waveguide, 2 contact whose hammer reads the strings' incoming velocity and may recontact |
pedal | Sets the release exponent (1 − pedal)² for released keys |
Modal partials at or above 0.45 × fs are omitted; a waveguide note below 22 Hz or at or above 0.4 × fs is refused.
Lifecycle
createStiffStringPiano() allocates eight voices × three strings of modal banks (up to 128 partials per string in 16-mode banks), waveguides, hammers and resonances → prepareStiffStringPiano(state, rate) prepares every bank and resets → strikeStiffStringPiano(state, note, velocity, recipe) returns whether a voice started → releaseStiffStringPiano(state, note) → stiffStringPianoTick(state, recipe) per frame leaves the pair in left / right → resetStiffStringPiano clears voices, banks, hammers and resonances.
When to use it
Experimental piano models comparing string algorithms, contact laws and pedal behavior, as in Tricorda.
Limits
- Stereo, sample tick, eight voices of up to three strings.
createStiffStringPianousesArray.from; call it at preparation only.