parse: add 'zY' transfer-layer command to start/stop the sequencer#761
Conversation
🎛️ AMYboard HW CIDispatched this PR's |
AMY ignores incoming MIDI Start/Stop (0xFA/0xFC) unless external MIDI clock sync is enabled (external_midi_sync) -- correct, so a DAW can't hijack the board, but it broke the AMYboard Online editor's Start/Stop buttons, which drove the sequencer with raw 0xFA/0xFC. Route the buttons through sequencer.start()/stop(), which now send the new AMY 'sequencer_run' wire command (shorepine/amy#761). That calls sequencer_midi_start/stop() directly, regardless of sync state, and -- being a wire message -- works on both firmware (control mode, over the zP sysex path) and the wasm build (simulate mode, via amy.send in the in-browser MicroPython). No tulip C binding needed, so this also drops the firmware-only approach from the previous revision. - amy: bump pin to the sequencer_run commit (PR #761). - tulip/shared/py/sequencer.py: start()/stop() -> amy.send(sequencer_run=). - tulip/amyboardweb/static/spss.js: control_sequencer_start/stop branch on amyboard_mode like the tempo control, instead of sending raw MIDI. Depends on shorepine/amy#761; the pin will move to the merged amy commit before this merges. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
amy.send(sequencer_run=1) starts the sequencer; sequencer_run=0 stops it, by calling sequencer_midi_start()/sequencer_midi_stop() directly. This lets a host (e.g. the AMYboard Online editor) drive the sequencer transport without sending MIDI Start/Stop, which AMY only honors when external MIDI clock sync is enabled (external_midi_sync). Handled in the 'z' transfer-layer command namespace (zY1/zY0), alongside the other host/control commands (zT/zF/zS/zO/zD/zA/zP), rather than spending a top-level wire letter. sequencer_midi_start/stop() are already used in parse.c (file-transfer pause), so no new declarations needed. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
c95f3f6 to
81114a1
Compare
AMY ignores incoming MIDI Start/Stop (0xFA/0xFC) unless external MIDI clock sync is enabled (external_midi_sync) -- correct, so a DAW can't hijack the board, but it broke the AMYboard Online editor's Start/Stop buttons, which drove the sequencer with raw 0xFA/0xFC. Route the buttons through sequencer.start()/stop(), which now send the new AMY 'sequencer_run' wire command (shorepine/amy#761). That calls sequencer_midi_start/stop() directly, regardless of sync state, and -- being a wire message -- works on both firmware (control mode, over the zP sysex path) and the wasm build (simulate mode, via amy.send in the in-browser MicroPython). No tulip C binding needed, so this also drops the firmware-only approach from the previous revision. - amy: bump pin to the sequencer_run commit (PR #761). - tulip/shared/py/sequencer.py: start()/stop() -> amy.send(sequencer_run=). - tulip/amyboardweb/static/spss.js: control_sequencer_start/stop branch on amyboard_mode like the tempo control, instead of sending raw MIDI. Depends on shorepine/amy#761; the pin will move to the merged amy commit before this merges. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
🎛️ HW CI (physical bench)Built from this AMY PR, pinned into the tulipcc AMYboard (USB-MIDI + AMY Tulip (TULIP4_R11; serial-REPL audio + WiFi screenshot): ✅ PASS — flashed this PR’s firmware; all checks matched the references. ⬇️ Artifacts: recordings · screenshot · serial logs · run logs Self-hosted bench. Audio spectral-compared to |
What
Adds a
z-layer command to start/stop the sequencer transport directly:amy.send(sequencer_run=1)→zY1→sequencer_midi_start()amy.send(sequencer_run=0)→zY0→sequencer_midi_stop()Lives in the
ztransfer/control-command namespace (next tozT/zF/zS/zO/zD/zA/zP) rather than spending a top-level wire letter —Ystays "still available".sequencer_midi_start/stop()are already called in parse.c (file-transfer pause), so no new declarations.Why
A host that wants to drive sequencer playback (e.g. the AMYboard Online editor's Start/Stop buttons) otherwise has to send MIDI Start/Stop (0xFA/0xFC). After the external-sync gating change, AMY ignores those unless the user enabled external MIDI clock sync (
external_midi_sync) — correct for not letting a DAW hijack transport, but it leaves no un-gated way to start/stop the sequencer from a wire message. This adds one. It's also the only lever available to the wasm build, where AMY runs as a separate module reachable only viaamy_add_message.Changes
src/parse.c:zYhandler inamy_parse_transfer_layer_message(mirrorszO).amy/__init__.py: mapsequencer_run→zYI.Testing
make test→ 99 tests pass (additive). End-to-end verified via the companion tulipcc change (AMYboard editor Start/Stop in control and simulate modes).sequencer_runis a new publicamy.send()param name — happy to rename if you prefer.