feat: per-channel meters, ceiling lamp, and pre-gain drive
Stage 6 begins. Add lock-free Meters (atomics shared audio->GUI) with a peak-with-decay ballistic, published once per block and gated on the editor being open. Editor draws a per-channel level + gain-reduction meter panel and a ceiling lamp fed by the output limiter. Compressor/Limiter expose gain_reduction_db() for this. Also add a smoothed per-channel pre-gain applied before each compressor (and before the All compressor), driving the signal into compression and on into the limiter for a compressed semi-distortion. Pairs with makeup for full per-channel input/output gain-staging. Compressor DSP untouched; 16 tests pass. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -55,6 +55,11 @@ pub struct Codename206Params {
|
||||
|
||||
#[derive(Params)]
|
||||
pub struct CompressorParams {
|
||||
/// Drive into the compressor: scales the signal **before** detection, so it both pushes the
|
||||
/// channel further into compression and feeds the downstream sum/limiter harder. Combined with
|
||||
/// makeup (post-comp), this gives full per-channel input/output gain-staging.
|
||||
#[id = "pregain"]
|
||||
pub pre_gain_db: FloatParam,
|
||||
#[id = "detect"]
|
||||
pub detection: EnumParam<DetectionMode>,
|
||||
#[id = "thresh"]
|
||||
@@ -129,6 +134,15 @@ impl Default for Codename206Params {
|
||||
impl Default for CompressorParams {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
pre_gain_db: FloatParam::new(
|
||||
"Pre-gain",
|
||||
0.0,
|
||||
FloatRange::Linear { min: -24.0, max: 36.0 },
|
||||
)
|
||||
.with_smoother(SmoothingStyle::Linear(20.0))
|
||||
.with_unit(" dB")
|
||||
.with_value_to_string(formatters::v2s_f32_rounded(1)),
|
||||
|
||||
detection: EnumParam::new("Detection", DetectionMode::Peak),
|
||||
|
||||
threshold_db: FloatParam::new(
|
||||
|
||||
Reference in New Issue
Block a user