note_output: don't send notes from a patch being stored - #1195
Conversation
patches_store_patch parses a patch string into the patch's own delta list, and a segment such as "i1n60l1" names a synth and a note, so it went down patches_event_has_voices and note_output sent a real note-on out of the MIDI port (or raised a CV gate) at the moment the patch was saved. A stored "i1l0" likewise ran ALL NOTES OFF, dropping a gate that a played note was holding up. note_output_handle_event now takes `live` (the event is headed for amy_global.delta_queue). A stored note is still claimed, so a voiceless note-output synth skips the voice path as before, but nothing is sent and the held-note stack is untouched. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PykXkeeWw2aRpC6PLfpqTQ
🎛️ AMY HW CI (AMYboard bench)Flashed this PR's AMY (LoadTestChord: 6-voice Juno ✅ PASS — the bench ran the test to completion.
Full chord settled render μs: 2627 (was 2619, Δ +0.3%) (peak 2632, 39 samples) ⬇️ Artifacts: serial log · load trace · report Self-hosted bench (amyboardci). FAIL means only that the test could not run — the load values are informational, with no threshold and no audio compare. See |
⛓️ tulipcc integration PR openedThis merge was pinned into tulipcc for full-system CI: shorepine/tulipcc#1380 Test it there and merge that PR to move tulipcc onto this AMY. |
Follow-up noted in #1191 and #1194.
The bug.
patches_store_patchparses a patch string into the patch's own delta list. A segment likei1n60l1names a synth and a note, so it goes downpatches_event_has_voices, andnote_outputacted on it. As a result, storing a patch:i1l0, ran ALL NOTES OFF, dropping a gate that a note being played was holding up.Reproduction on
main:The fix.
note_output_handle_event(e, live), wherelivemeansqueue == &amy_global.delta_queue, the same test #1194 uses formidi_cc_output. For a stored event:Tests.
test_note_output.cgainstest_storing_a_patch_sends_nothing, which covers:4 of its 6 checks fail on
mainand all pass with the fix.make ctestpasses;make testis unchanged (90 / 43 at ~-99 dB, same asmainhere).This and #1194 both touch
patches.c, but in different places (yield_synth_commandsthere,patches_event_has_voiceshere), so either can merge first.🤖 Generated with Claude Code
https://claude.ai/code/session_01PykXkeeWw2aRpC6PLfpqTQ
Generated by Claude Code