Skip to content

Fix knob sync: use AMY reset defaults for all knobs#698

Merged
bwhitman merged 1 commit intomainfrom
claude/trusting-nightingale
Mar 3, 2026
Merged

Fix knob sync: use AMY reset defaults for all knobs#698
bwhitman merged 1 commit intomainfrom
claude/trusting-nightingale

Conversation

@bwhitman
Copy link
Copy Markdown
Collaborator

@bwhitman bwhitman commented Mar 3, 2026

Summary

  • Add amy_default field to every knob definition matching AMY's reset_osc() defaults
  • Initialize set_knobs_from_events() working variables from AMY defaults instead of null/0, so knobs omitted by EVENT_FROM_OSC_ARRAY (because they match reset state) still display correctly
  • Sync knobs from AMY state on first page load (no editor_state.json) and on Clear Patch, instead of using hardcoded knob resets
  • Fix event.Freq typo (capital F) that prevented LFO freq from syncing
  • Fix event.wave && falsy-zero check that skipped SINE wave detection
  • Pin amy submodule to include osc reset before patch load (amy#572)

Test plan

  • Clear site data, reload amyboardweb — all knobs should show correct values for patch 257
  • Click Clear — knobs should update to match patch 257 state from AMY
  • Verify Osc A level shows 1.0 (not 0) after Clear
  • Verify Osc A wave shows SAW (from K257) not SINE after load
  • Verify VCF, ADSR, LFO, and effects knobs all reflect correct state

🤖 Generated with Claude Code

@bwhitman bwhitman force-pushed the claude/trusting-nightingale branch from c99d3e7 to 237919d Compare March 3, 2026 22:30
Initialize all UI knobs to AMY's true reset_osc defaults so that
values omitted by EVENT_FROM_OSC_ARRAY (because they match the
reset state) still display correctly. Adds amy_default field to
every knob definition and initializes set_knobs_from_events()
working variables from those defaults instead of null/0.

Also fixes:
- sync knobs from AMY state on first page load (no editor_state)
- replace hardcoded knob reset in Clear with sync from AMY
- fix event.Freq typo (capital F) preventing LFO freq sync
- fix event.wave falsy-zero check skipping SINE wave
- pin amy submodule to include osc reset before patch load (#572)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@bwhitman bwhitman force-pushed the claude/trusting-nightingale branch from 237919d to 9fea1c7 Compare March 3, 2026 22:35
@bwhitman bwhitman merged commit 15aacdf into main Mar 3, 2026
1 check passed
@bwhitman bwhitman deleted the claude/trusting-nightingale branch March 3, 2026 22:39
@dpwe
Copy link
Copy Markdown
Collaborator

dpwe commented Mar 4, 2026 via email

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.

2 participants