feat: v0.3.0 hybrid dynamic multiband (upward compression + Range)#26
Merged
Conversation
Extends every band's Ratio parameter below 1:1 (0.2:1-20:1, widened from 1:1-20:1) for genuine upward compression/expansion: the same closed-form transfer curve v0.2.0 already used for downward compression now boosts signal above threshold for ratio < 1 instead of cutting it, tapering through a bit-exact ratio == 1.0 null point. Adds a new per-band Range clamp (lowRange/midRange/highRange, 0-30 dB, default 12 dB, off by default) bounding gain change - cut or boost - to a maximum dB, the reference-class safety valve that keeps an aggressive upward setting musically usable. Two factory presets (Density Glue, Parallel-Style Density) extended to showcase the new capability. Fresh v0.3.0 defaults are bit-identical to v0.2.0 (Range off everywhere, Ratio defaults unchanged); v0.2.0-shaped state/presets missing the six new parameter IDs load tolerantly. Test suite broadened from 73 to 84 cases. See docs/design-brief-v3-dynamics.md and docs/research-notes.md's v0.3.0 addendum for the sourced rationale.
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.
Summary
Upgrades Triptych from a downward-only multiband compressor to a true dynamic multiband processor, closing a real reference-class gap: v0.2.0's
KneeGainComputerhard-floored Ratio at 1:1 and forced an unconditional bypass for anyratio <= 1, so a band could only ever get quieter above threshold, never lifted. Every reference-class unit researched for v0.2.0 (Weiss DS1-MK3, FabFilter Pro-MB) documents ratio ranges that extend below 1:1 specifically to enable this.Paradigm: Hybrid à la Pro-MB (per the binding brief) - keep the existing single Ratio parameter, extend it below 1:1 for upward compression/expansion, add a per-band Range (maximum gain-change clamp), and defer downward expansion/gating rather than bolt it onto a model that doesn't cleanly fit it. Full spec, sourced defaults, and honesty section in
docs/design-brief-v3-dynamics.md; sourcing addendum indocs/research-notes.md.New parameters (per band: Low/Mid/High)
lowRatio/midRatio/highRatiolowRangeEnabled/midRangeEnabled/highRangeEnabled(new)lowRange/midRange/highRange(new)RangeEnabledis on.Key design points
ratio == 1.0is a bit-exact null, special-cased independently of Knee/Range (not just floating-point-close) - the taper the brief calls for.ratio > 0now; the(ratioInverse - 1)term flips sign, cutting forratio > 1and boosting forratio < 1. No naive inversion, no second formula.+-RangedB, applied via a defensiveunlimitedRangeDb(500 dB) sentinel when disabled that's verified to be a true no-op for this engine's own realistic parameter ranges (seeKneeGainComputer.h's doc comment for the derivation and float-overflow-safety margin).RangeEnableddefaults off everywhere, and a dedicated test proves aBandCompressordriven through the v0.3.0 API at shipped defaults produces the same measured gain reduction, on real audio, as one that never touches the Range API at all.Deferred (tracked, not implied as parity)
Test plan
ctest --test-dir build- 84/84 green locally (up from 73), including:ratio == 1.0null (Knee/Range-independent)Triptych_Standalonebuilds cleanly (Debug, arm64)BandCompressor::process()/KneeGainComputer/TriptychEngine(grepped the diff)Docs
docs/design-brief-v3-dynamics.md(new),docs/research-notes.md(v0.3.0 addendum),docs/manual.md,docs/presets.md,docs/architecture.md,CHANGELOG.mdall updated.CMakeLists.txtversion bumped to 0.3.0.Note for the next GUI batch
The M3 faceplate layout-manifest for Triptych (
.scaffold/gui-assets/faceplate-triptych-v1, outside this repo) needs to be regenerated to include the six new v0.3.0 parameter IDs before that GUI work runs.