Fix GM drum examples: use patch=258 instead of the old wave=amy.PCM recipe#1067
Merged
Conversation
….PCM recipe
The old way to get GM/808 drums on channel 10 —
amy.send(synth=10, num_voices=N, oscs_per_voice=1, synth_flags=3, wave=amy.PCM, amp=5)
no longer makes sound on current AMY. Two AMY changes broke it:
* synth_flags bit 1 used to be a built-in GM-drum note map; it was removed
(moved into patch 258) and later repurposed as SYNTH_FLAGS_NOTES_VIA_MIDI,
so note numbers alone no longer select a drum sample.
* a bare wave=amy.PCM osc with no preset is silent (pcm_note_on requires a
preset), and note=36 does not select one.
The drum-kit note->sample mapping now lives in AMY patch 258, so the fix is:
amy.send(synth=10, num_voices=N, synth_flags=3, patch=258)
Updates the two affected sketches (acid_generator, house_generator) plus the
docs that showed the old recipe: AMY_AGENTS.md, docs/amyboard/python.md,
docs/music.md.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
🔌 AMYboard PR previewEditor + flasher: https://amyboard-pr-1067.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! |
Collaborator
Author
|
I also updated all the broken ABW sketches (there were 38) by grepping |
This was referenced Jul 1, 2026
bwhitman
added a commit
that referenced
this pull request
Jul 2, 2026
) Expand the AMYboard HW CI beyond the built-in reference tones: after the tones, download real AMYboard World sketches (shorepine's acid_generator, house_generator, universal_hair, woodpiano), push each onto the board over the SysEx "write to sketch" flow (docs/amyboard/control_api.md), drive it with a simple MIDI arpeggio, record it, and spectral-compare to a committed reference. This covers far more of AMY than the tones — the drum-heavy generators exercise the path PR #1067's drums regression broke, which the tone-only test missed. The World sketches are fetched with stdlib urllib (the Pi CI venv has no requests) and transferred with proper AK flow control — a stdbuf -oL `amidi -d` reader on the Pi / mido input callback on mac, one frame in flight. Without it the larger sketches' chunked transfers overflow the board's SysEx ring buffer and corrupt sketch.py, which self-heals to the silent default; the generative sketches recorded as silence until this was added. The random *_generator sketches still reproduce at ~0.98 spectral similarity run-to-run (timbre is stable even when the notes aren't), so they compare with the existing timing/phase-invariant avg-spectrum metric. References captured on the bench against the rolling amyboard release and listened-to before commit. Disable the suite with --no-flash's sibling --no-world. 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
The old recipe for GM/808 drums on channel 10 —
no longer makes any sound on current AMY. This updates the examples and docs that still show it to the working form:
Why it broke
Two AMY changes:
synth_flagsbit 1 used to be a built-in GM-drum note→sample map (SYNTH_FLAGS_MIDI_DRUMS). That machinery was removed (moved into patch 258) and the bit was later repurposed asSYNTH_FLAGS_NOTES_VIA_MIDI. So GM note numbers alone no longer select a drum sample.wave=amy.PCMosc with nopresetis silent —pcm_note_on()requires a preset, andnote=36doesn't select one.The drum-kit note→sample mapping now lives in AMY patch 258 (the same kit
amy_default_synths()loads on channel 10). Verified by building the AMY Python module and rendering: the old recipe → silence (peak 0.0),patch=258→ kick (peak 0.36) with the full kit mapped across GM notes.Changes
tulip/amyboardweb/sketches/acid_generator.py— synth 10 drum setup →patch=258tulip/amyboardweb/sketches/house_generator.py— synth 10 drum setup →patch=258AMY_AGENTS.md— fixed the four-on-the-floor example + added a note explaining the changedocs/amyboard/python.md— fixed the default-sketch drum line; named patch 258 as the GM kitdocs/music.md— clarified that channel 10 is the GM drum kit (patch=258)The other
wave=amy.PCMsketches (wavfile.py,sampler.py) already pass an explicitpreset=, so they still work and are untouched.Note on
_auto_generated_knobsacid_generator.py's machine-generated_auto_generated_knobsblock still contains the old-style synth-10 wirecodes (i10...w7p1...). I left it alone since it's marked "Do not edit — set automatically by the knobs." It's harmless here:run_sketch()applies the knob block before importing the sketch, so the top-levelpatch=258call runs last and wins. Regenerating it through the AMYboard Online knob UI would clear the stale lines if desired.🤖 Generated with Claude Code