tools: AMYboard World recorder (capture + beep-sync + stitch) + SysEx control API doc#1070
Merged
Merged
Conversation
New self-contained tool `tools/amyworld_recorder/` to audition and record every
AMYboard World sketch for a video:
- Pulls each sketch from the World API and pushes it to a USB-connected AMYboard
over the same MIDI SysEx "write to sketch" flow the web editor uses
(amyboard_link.py — a reusable client).
- Interactive session: transfer, play random arp+chord patterns, mark
good/not-interesting/not-working, denylist, per-sketch clean audio.
- Clean audio capture via sounddevice/PortAudio (ffmpeg's avfoundation audio
input slips samples against the device clock and clicks on signal; PortAudio
follows it exactly). Extracts a specific channel pair (e.g. Model 16 13/14).
- Watchdog: detects a sketch that hangs the board (immediately or mid-audition),
recovers via zB reboot, and denylists it — with correct attribution.
- OLED reset to the boot logo between sketches; optional amy volume boost.
- Two capture modes:
* on-Mac Continuity/iPhone video, muxed per clip, then `stitch`.
* external-video: phone films the whole session (fixes OLED-vs-shutter
flicker); a sync beep at each sketch lets `stitch sync` locate each one in
the phone video(s) and mux the clean audio. Supports multiple videos
across resumed runs.
- Stitch to a montage with title/username/description overlays; gapless audio
(PCM segments, single AAC encode).
Also adds docs/amyboard/control_api.md documenting the AMYboard MIDI SysEx
control protocol (file transfer both ways, state dump, run python, reboot,
error frames) for anyone writing their own tools, linked from the AMYboard docs
index.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
A self-contained tool,
tools/amyworld_recorder/, to audition and record every AMYboard World sketch for a video, plus a new doc for the AMYboard MIDI SysEx control protocol.The recorder
For each World sketch: pull it from the World API → push it to a USB-connected AMYboard over the same SysEx write-to-sketch flow the web editor uses → audition it (random arp+chord patterns) → mark good / not interesting / not working / denylist → record clean audio → stitch the good ones into a captioned montage.
Highlights, most of them learned the hard way on real hardware:
amyboard_link.py— a reusable Python client for the AMYboard SysEx protocol (transfer, run-python, reboot, error frames, notes).zBreboot, and denylists it, with correct attribution (a delayed hang is blamed on the sketch that caused it, not the next one).amy.send(volume=…)boost.Two capture modes
stitch plan/stitch render.--external-video) — the phone films the whole session (works around an iPhone shutter/exposure flicker on the OLED that can't be fixed through ffmpeg). A two-pulse sync beep plays at each sketch;stitch syncdetects the beeps in the phone video(s), locates each sketch, and muxes in the clean Model 16 audio. Supports multiple videos across resumed runs.Doc
docs/amyboard/control_api.md— documents the AMYboard MIDI SysEx control protocol (file transfer both directions, state dump, run-python, reboot, ACK/error/version frames) for anyone writing their own tools. Linked from the AMYboard docs index.Notes
tools/; no changes to firmware or build. Setup is a venv +requirements.txt(README included). Not wired into CI..gitignorekeeps the venv, per-userconfig.json,session_out/, and media out of git;config.example.jsonis the template.🤖 Generated with Claude Code