Skip to content

hwci: record generative sketches clean; fix cross-sketch audio contamination#1100

Merged
bwhitman merged 1 commit into
mainfrom
hwci-world-suite-fixes
Jul 7, 2026
Merged

hwci: record generative sketches clean; fix cross-sketch audio contamination#1100
bwhitman merged 1 commit into
mainfrom
hwci-world-suite-fixes

Conversation

@bwhitman

@bwhitman bwhitman commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

Fixes the two audio-contamination bugs behind today's flaky World-suite scores, and changes the stimulus per review-by-ear:

  1. Cross-sketch bleed: the previous sketch's loop() keeps running during the next sketch's SysEx transfer and re-arms sequencer events after amy.reset() — house_generator was audibly playing under the woodpiano recording. load_world_sketch now stops the transport (zY0Z), kills the sketch (amyboard.stop_sketch()) and clears notes before transferring. woodpiano's ref was never stale — with the bleed fixed it scores 1.0000 against the unchanged checked-in ref.
  2. Saved-sketch contamination of hwci_basic: the board boots into its saved sketch, which also answers the basic test's MIDI notes (0.9997 → 0.6456 on warm runs when woodpiano was saved). The same silencing now runs before the basic test — this likely also explains the chronic ~0.87 hwci_basic scores in CI runs.
  3. Generative sketches recorded clean: acid/house no longer get the A-minor arpeggio over them; the MIDI pattern only drives non-generative patch sketches (woodpiano), which still proves the USB-MIDI note path. acid/house refs re-captured on the bench (approved by ear; old refs had the arpeggio baked in and predate the Gamma9001 kit switch).

Bench verification against current main firmware (amy 145e3d8):

check similarity min
hwci_basic 0.9997 0.90 PASS
acid_generator 0.9698 0.80 PASS
house_generator 0.9476 0.80 PASS
woodpiano 0.9999 0.85 PASS

🤖 Generated with Claude Code

…ination

Two contamination bugs made World-suite scores unstable and misleading:

- The previous sketch's loop() keeps executing while the next sketch's
  SysEx transfer streams in, re-arming sequencer events after our
  amy.reset() — so e.g. house_generator kept playing underneath the
  woodpiano recording (its 0.44-0.74 'failures' were never a bad ref:
  with the bleed fixed woodpiano scores 1.0000 against the UNCHANGED
  ref). load_world_sketch now stops the sequencer transport (zY0Z),
  kills the running sketch (amyboard.stop_sketch()) and clears held
  notes before resetting and transferring.
- The board boots into its SAVED sketch, which also answers MIDI and
  contaminated the built-in-tones recording on warm (--no-flash) runs
  (hwci_basic 0.9997 -> 0.6456 when woodpiano was the saved sketch).
  The same silencing now runs before the basic test.

Also per review-by-ear: generative sketches (acid/house) are recorded
as-is, without the A-minor MIDI arpeggio on top — the pattern now only
drives non-generative patch sketches (woodpiano), which still proves
the USB-MIDI note path. acid/house references re-captured from the
bench accordingly (their old refs had the arpeggio baked in; they also
predate the Gamma9001 kit switch to patch 384).

Verified on the bench against current main firmware:
  hwci_basic 0.9997 / acid 0.9698 / house 0.9476 / woodpiano 0.9999

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@bwhitman bwhitman merged commit 7e5b52a into main Jul 7, 2026
2 checks passed
bwhitman added a commit that referenced this pull request Jul 7, 2026
Comment-only change to re-trigger the preview -> HW CI chain now that
main has the amy#804 revert, the Tulip SysEx-ring SPIRAM fix (amy#820),
and the harness contamination fixes + new refs (#1100).

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

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown

🔌 AMYboard PR preview

Editor + flasher: https://amyboard-pr-1100.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!

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