feat: per-channel dry/wet mix (parallel compression) replacing bypass

Replace the per-channel bypass toggle with a smoothed dry/wet `mix` (0..100%,
default 100%). The blend is applied at the compressor output:
  out = delayed_input * ((1 - mix) + mix * wet_gain)
Dry and wet share the same delayed input, so it's phase-aligned (parallel
compression, no comb filtering). mix=0 is bit-identical to the old bypass.

The detector now runs even at mix 0, so the GR meter shows the wet gain
reduction regardless of mix, while the level/plot out trace reads the mixed
output. "Bands at 0% = simple full-band comp via All" still holds.

Update README + parameter docs (bypass -> mix).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Mikkeli Matlock
2026-06-24 19:25:38 +09:00
parent eee94379bc
commit 42c5f7dcd2
5 changed files with 46 additions and 38 deletions
+8 -4
View File
@@ -74,8 +74,9 @@ pub struct CompressorParams {
pub release_ms: FloatParam,
#[id = "makeup"]
pub makeup_db: FloatParam,
#[id = "bypass"]
pub bypass: BoolParam,
/// Dry/wet mix (parallel compression). 100% = fully processed, 0% = dry (a clean bypass).
#[id = "mix"]
pub mix: FloatParam,
}
impl Default for Codename206Params {
@@ -188,7 +189,10 @@ impl Default for CompressorParams {
.with_unit(" dB")
.with_value_to_string(formatters::v2s_f32_rounded(1)),
bypass: BoolParam::new("Bypass", false),
mix: FloatParam::new("Mix", 1.0, FloatRange::Linear { min: 0.0, max: 1.0 })
.with_smoother(SmoothingStyle::Linear(20.0))
.with_value_to_string(formatters::v2s_f32_percentage(0))
.with_string_to_value(formatters::s2v_f32_percentage()),
}
}
}
@@ -208,6 +212,6 @@ pub fn build_settings(
makeup_db: 0.0,
lookahead_samples: lookahead,
use_rms: p.detection.value() == DetectionMode::Rms,
bypass: p.bypass.value(),
mix: p.mix.value(),
}
}