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:
+5
-2
@@ -237,6 +237,7 @@ impl Plugin for Codename206 {
|
||||
band_in[b][ch] *= pre;
|
||||
}
|
||||
band_set[b].makeup_db = band_params[b].makeup_db.smoothed.next();
|
||||
band_set[b].mix = band_params[b].mix.smoothed.next();
|
||||
self.comps[b].process(&band_in[b][..n], &mut band_out[b][..n], &band_set[b]);
|
||||
for ch in 0..n {
|
||||
summed[ch] += band_out[b][ch];
|
||||
@@ -245,7 +246,8 @@ impl Plugin for Codename206 {
|
||||
let in_mono = band_in[b][0].abs().max(band_in[b][r].abs());
|
||||
let out_l = band_out[b][0].abs();
|
||||
let out_r = band_out[b][r].abs();
|
||||
let g = if band_set[b].bypass { 0.0 } else { self.comps[b].gain_reduction_db() };
|
||||
// Wet gain reduction (what the comp computes), independent of the mix.
|
||||
let g = self.comps[b].gain_reduction_db();
|
||||
lvl_l[b] = lvl_l[b].max(out_l);
|
||||
lvl_r[b] = lvl_r[b].max(out_r);
|
||||
gr[b] = gr[b].max(g);
|
||||
@@ -263,6 +265,7 @@ impl Plugin for Codename206 {
|
||||
summed[ch] *= all_pre;
|
||||
}
|
||||
all_set.makeup_db = self.params.all.makeup_db.smoothed.next();
|
||||
all_set.mix = self.params.all.mix.smoothed.next();
|
||||
self.comps[ALL].process(&summed[..n], &mut out_frame[..n], &all_set);
|
||||
|
||||
// Output brickwall limiter.
|
||||
@@ -272,7 +275,7 @@ impl Plugin for Codename206 {
|
||||
let in_mono = summed[0].abs().max(summed[r].abs());
|
||||
let out_l = out_frame[0].abs();
|
||||
let out_r = out_frame[r].abs();
|
||||
let g = if all_set.bypass { 0.0 } else { self.comps[ALL].gain_reduction_db() };
|
||||
let g = self.comps[ALL].gain_reduction_db();
|
||||
lvl_l[ALL] = lvl_l[ALL].max(out_l);
|
||||
lvl_r[ALL] = lvl_r[ALL].max(out_r);
|
||||
gr[ALL] = gr[ALL].max(g);
|
||||
|
||||
Reference in New Issue
Block a user