Skip to content

Remove AMYboard patch-file support#1128

Merged
bwhitman merged 7 commits into
mainfrom
claude/amy-get-synth-commands-usage-518166
Jul 10, 2026
Merged

Remove AMYboard patch-file support#1128
bwhitman merged 7 commits into
mainfrom
claude/amy-get-synth-commands-usage-518166

Conversation

@bwhitman

@bwhitman bwhitman commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

Patch files (.patch wire-command dumps saved/loaded on device) are no longer used, so this removes the whole feature — and bumps the amy pin to latest main so the amy#858 changes can be tested together with it.

What's removed

  • tulip/shared/amyboard-py/amyboard.py: load_patch_file(), save_patch_file(), and the PatchSelector class + patch_selector() rotary-encoder app (~190 lines). save_patch_file() was the last caller of amy.get_synth_commands() in tulipcc, so this also resolves the compatibility question from amy #858 — the remaining yield_synth_commands consumers (modtulip.c wrapper, web-editor knob sync) use the unchanged C API and already parse the new iv/in/y wirecodes via AMY_KW_MAP.
  • tulip/amyboardweb/static/spss.js: dead num_oscs_from_patch_file_content() and write_channel_dirty_patch_file() helpers (no callers), plus stale comments referencing the long-removed restore_patch_state_from_files.
  • tulip/server/amyboardworld_db_api.py: patch_selector/PatchSelector dropped from the display/encoder hardware-tag regexes; matching check removed from test_hardware_tags.py.
  • docs/amyboard/accessories.md: patch_selector() mention and example.

Left alone: migrate_amyboard_sketches.py (one-time ops script for converting legacy World uploads) and the upload endpoint, which already rejects .patch files.

AMY pin bump

amy is pinned to 315d9a5 (1.2.45), which includes the amy#858 bus / get_synth_commands() output changes. Verified 315d9a5 contains the #858 merge commit. tulip/server/refdocs/amy/ re-synced via sync_amy_docs.py — doc content unchanged, only the _VENDORED_FROM.txt stamp moved.

Testing

  • python3 -m py_compile on all touched Python files
  • node --check on spss.js
  • tulip/server/test_hardware_tags.py passes ("all ok")
  • Repo-wide sweep confirms no remaining patch-file references (leftover .patch hits are unrelated: editor CSS classes, AMY patch numbers, HTTP @app.patch)
  • PR preview + HW CI will build with the new pin for end-to-end testing before merge

🤖 Generated with Claude Code

bwhitman and others added 5 commits July 10, 2026 12:27
Patch files (.patch wire-command dumps) are no longer used. Removes:

- amyboard.py: load_patch_file(), save_patch_file() (the last caller of
  amy.get_synth_commands() in tulipcc), and the PatchSelector encoder app
- spss.js: dead num_oscs_from_patch_file_content() and
  write_channel_dirty_patch_file() helpers, stale comments referencing
  restore_patch_state_from_files
- server: patch_selector/PatchSelector from the display/encoder
  hardware-tag regexes and the matching test_hardware_tags check
- docs: patch_selector() mention and example in accessories.md

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…hanges)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Reads back every AMY synth (0..31) via amy_get_synth_commands and appends
the state as amy.send_raw() commands to the bottom of the given file
(default: your boot.py). Each command is prefixed with i<synth> so replay
targets the right synth. Re-saving replaces the previously saved block
instead of stacking copies. Not available on web builds, where the C
binding is compiled out.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
modtulip.c's amy_get_synth_commands is compiled out on web (micropython
doesn't link AMY there), so bridge it the same way as amy.override_send /
tulip.amy_ticks_ms: register the JS get_synth_commands as an MP module and
install a tulip.amy_get_synth_commands shim at boot that splits its
newline-joined string back into a command list. save_synth_state() now
just uses whichever binding is present and only reports unavailable when
neither exists (e.g. AMYboard web). Also relaxes the JS bridge's synth
range from 1..16 to 0..63 (AMY's default max_synths; the C side bounds-
checks) so all 0..31 synths can be read back.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

🔌 AMYboard PR preview

Editor + flasher: https://amyboard-pr-1128.vercel.app/editor/

This preview bundles this PR's firmware — its flasher only flashes this build (not the release). Rebuilt on every push; removed when the PR closes.

The hardware CI has been kicked off and should return within a few minutes, stand by!

@github-actions

Copy link
Copy Markdown

🌷 Tulip Web PR preview

Tulip Web: https://tulip-pr-1128.vercel.app/run/

Flash a Tulip to this build: on-device run tulip.upgrade(pr=1128).

Rebuilt on every push; removed when the PR closes.

@github-actions

Copy link
Copy Markdown

🎛️ HW CI (physical bench)

AMYboard (USB-MIDI + AMY zP → audio; built-in tones + AMYboard World sketches acid/house/woodpiano over the SysEx control API): ✅ PASS — flashed this PR’s firmware; all checks matched the references.

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 ref/hwci_basic.wav, the AMYboard World sketch refs (ref/{acid_generator,house_generator,woodpiano}.wav) + ref/tulip_basic.wav; Tulip screenshot pixel-compared to ref/tulip_screenshot.png. Both analog outs share one capture card, so the tests run sequentially.

bwhitman and others added 2 commits July 10, 2026 13:31
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@bwhitman bwhitman merged commit cd7aff0 into main Jul 10, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant