Skip to content

Issue #720: Rework zero-amp termination - now only in release. Skip …#750

Merged
dpwe merged 1 commit into
mainfrom
720_cautious_termination
Jun 22, 2026
Merged

Issue #720: Rework zero-amp termination - now only in release. Skip …#750
dpwe merged 1 commit into
mainfrom
720_cautious_termination

Conversation

@dpwe

@dpwe dpwe commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

…oscs where amp[0] == 0. Change last_amp.

Issue #720 responded to a couple of instances where voices with very slow attacks were never being started because of some logic that rapidly terminates new oscs that don't appear to be emitting sound, in order to avoid wasted computation on Juno patches. Instead, we now skip rendering oscs whose amp[CONST]==0 (we already skipped them if their msynth.amp and msynth.last_amp were zero, but this is more aggressive and avoids running hold_and_modify).

In testing this, I noticed that some AM envelopes were very noisy because we had msynth.last_amp logic that failed to linearly interpolate rising AM envelopes. I forget why I put this in, I think it was to do with voice-stealing clicks, but anyway I simplified it and most tests were unchanged. I listened to all the changed tests (with the new make playfailed) and they all sounded OK.

@bwhitman

Copy link
Copy Markdown
Collaborator

🎛️ AMYboard HW CI

Dispatched this PR's amy SHA to the tulipcc bench — it builds the AMYboard firmware with your change and runs it on the physical board (audio spectral-compared to a committed reference). Results post here in a few minutes.

@dpwe

dpwe commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator Author

I tested this build against the previous version for the number of simultaneous Juno 1 voices that can be rendered on an RP2350 (4), and it's surely no worse than it was before.

@bwhitman

Copy link
Copy Markdown
Collaborator

🎛️ HW CI (physical bench)

Built from this AMY PR, pinned into the tulipcc amy submodule.

AMYboard (USB-MIDI + AMY zP → audio): ✅ 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 + 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.

@dpwe dpwe merged commit 5897bb2 into main Jun 22, 2026
9 checks passed
@dpwe dpwe deleted the 720_cautious_termination branch June 22, 2026 03:09
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