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:
@@ -89,6 +89,12 @@ impl Limiter {
|
||||
self.fixed_delay as u32
|
||||
}
|
||||
|
||||
/// Current limiter gain reduction in dB (>= 0). `gain` is linear (<= 1); expressed here as a
|
||||
/// positive dB amount for the ceiling lamp / metering.
|
||||
pub fn gain_reduction_db(&self) -> f32 {
|
||||
-20.0 * self.gain.max(1e-9).log10()
|
||||
}
|
||||
|
||||
/// Limit one frame in place: `input[ch]` -> `output[ch]`.
|
||||
///
|
||||
/// `ceiling` is linear gain (e.g. `util::db_to_gain(ceiling_db)`); `release_coef` comes from a
|
||||
|
||||
Reference in New Issue
Block a user