With "Mode" and "Loop" as two fields, One-shot plus Loop ran until
Stop was pressed: letting go of the key did nothing. The two fields
are now one, "Play", with four entries that each say what happens
while the note is held and when it is let go.
- Gate and One-shot play the sound once, as before. Loop repeats it
and fades out with the note.
- "Loop, then release" is new: the sampler's sustain loop. Let go,
it finishes the round it is in and plays what comes after "Loop
end" to the end of the sound.
- A buffer source stops looping and plays on by itself. The pitch
worklet gets a "leave" message. The phase vocoder then lets the
round finish that its newest frame has read into, so nothing read
already changes under the frames still sounding.
- Samples saved with "Mode" and "Loop" are turned into "Play" on
load. Gate and One-shot stay, either with Loop becomes Loop, since
playing until stopped is gone.
- The keys of the Instrument tab stay half lit while a note let go
is still heard. Esc on the keys stops everything, like Stop.
- Striking a ringing key again plays a new note beside it rather
than stopping the old one, so a drum can be hit quickly. This
differs from what was proposed in the issue discussion.
Tests:
- instrument + pitch-player + sound-library + node-catalog:
477 tests, green (12 new).
- e2e 34 (melektaus-atx): ALL PASSED, 45 checks (+1). Let go after
a loop of 0.05 s, the note played out for 0.31 s on the audio
clock, the key half lit meanwhile.
- Counter-check: a release that does not leave the loop fails the
2 new player tests.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>