Skip to content

fix(eg-bias): follow the DX7 — AMS-gated hold-down (M2DX #163) - #22

Merged
hakaru merged 2 commits into
mainfrom
fix/eg-bias-ams-163
Oct 2, 2026
Merged

hakaru merged 2 commits into
mainfrom
fix/eg-bias-ams-163

Conversation

@hakaru

@hakaru hakaru commented Oct 2, 2026 •

Copy link
Copy Markdown
Owner

Summary

Replaces the #97 EG-bias boost with DX7 semantics (hakaru/M2DX#163).

  • EG bias acts only on operators with AMS, weighted by AMS, through the LFO amplitude-modulation path.
  • Per controller with range > 0: attenuation = range/99 × (1 − controller). Range 0 = off; controller max = programmed level. Several EG-bias controllers: their shares add (capped), so each must open (review follow-up 37eafb5; taking the least attenuation let the smallest range win at rest).
  • Removes the per-operator egBiasOL boost.

Why

The #97 boost raised all six operators, so a fast breath rise brightened modulators too — a sharp tongue attack on wind sounds such as SAX[BC1] (reported on hakaru/M2DX#145). DX7/DX100 manuals: range 0 = off, 99 = greatest variation; AMS 3 is a complete override, AMS 1–2 partial.

Reference (Dexed 1.0.1 AU, Mark I)

AMS 0 unaffected; AMS 3 silent at breath 0 and within 1 dB of open at 127; modulator AMS darkens at rest; no CC smoothing. Dexed's range mapping (range 0 → silent, range 13 near silent at full breath) contradicts the manuals, so range follows the manuals.

Compatibility

With every EG-bias range at 0 (the default) output is bit-identical. Sounds/routings that use EG bias now respond as on the DX7 and can sound different.

Tests

EGBiasTests rewritten for Modern and Mark I (8 cases incl. controller shares and LFO AMD composition). 355 tests / 63 suites pass in Debug and Release.

Review notes kept as-is

  • Range mapping follows the DX7/DX100 manuals, not Dexed (Dexed silences AMS operators at range 0).
  • Detached (MIDI 2.0 per-note managed) voices skip controller EG bias, like the existing controller amp path.
  • Controller depths are engine-wide, like the existing pitch/amp destinations.

🤖 Generated with Claude Code

…operator boost (M2DX #163)

The #97 EG-bias destination raised the output level of all six operators
by range × controller. On the DX7, EG bias acts only on operators with
AMS: the range holds them down at the controller's minimum and the
controller releases them to their programmed level (DX7/DX100 manuals:
range 0 = EG bias off, 99 = greatest variation; AMS 3 is a complete
override, AMS 1-2 partial). With the boost, a fast breath rise also
brightened the modulators, which gave wind sounds such as SAX[BC1] a
sharp tongue attack (M2DX #163).

EG bias now computes an attenuation range/99 × (1 − controller) per
controller with range > 0 (the most open controller wins, as in Dexed)
and joins the LFO amplitude-modulation path (max with LFO AMD), so AMS
selects the operators and weights the depth. The per-operator OL-boost
plumbing (egBiasOL) is removed. No smoothing is added; Dexed also applies
CC2 per block.

Reference measurements (Dexed 1.0.1 AU, Mark I): AMS 0 unaffected; AMS 3
silent at breath 0, -1 dB of open at breath 127; modulator AMS darkens at
rest and brightens with breath; no CC smoothing. Dexed silences AMS
operators at range 0 and keeps range 13 near silent at full breath,
which contradicts the manuals, so range follows the manuals.

Tests: EGBiasTests rewritten for both engines — range 0 bit-identical at
any breath value, AMS 0 untouched, full breath bit-identical to no bias,
range sets the hold-down depth (13 moderate, 99 > 50 dB), monotonic
breath, AMS weighting, most open controller wins. 354 tests / 63 suites
pass in Debug and Release.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-02T18:58:45.604267Z 4693f24 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

…uation (M2DX #163)

Review follow-up. Taking the minimum attenuation across EG-bias
controllers let the smallest range win at rest: wheel range 10 plus
breath range 99 played nearly open without breath. Each controller's
share range/99 × (1 − controller) now adds (capped at a full hold-down),
so every EG-bias controller must open. The comment no longer claims to
follow Dexed for this or for the range mapping (the manuals are used).

Tests: controllerSharesAdd (an open breath adds nothing while aftertouch
keeps its share; both at rest stay held down) and combinesWithLFOAmd
(LFO AMD cannot lift an operator EG bias holds down). 355 tests / 63
suites pass in Debug and Release.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@hakaru
hakaru merged commit 5af2c69 into main Oct 2, 2026
1 check passed
@hakaru
hakaru deleted the fix/eg-bias-ams-163 branch October 2, 2026 19:03
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