Every tunable of the stateful stages. More...
#include <loudness_compensation.hpp>
Public Attributes | |
| double | time_constant_seconds = 3.0 |
| Time constant of the material spectrum, seconds. | |
| double | prior_seconds = 0.5 |
| How long the prior keeps a say once material is heard: its weight falls linearly from 1 to 0 over this much audible material, so the estimate starts AT the prior and is the material's own after it. | |
| double | gate_lufs = -60.0 |
| Frames below this K-weighted loudness (LUFS-equivalent over the frame, channels summed as BS.1770 sums them) are not material: the estimate holds through them. | |
| double | fast_time_constant_seconds = 0.4 |
| Time constant of the FAST estimate, seconds: the change detector's, and what the slow estimate restarts from when the material changes. | |
| double | level_drop_db = 10.0 |
| Level-drop rule: when no audible frame in the last level_drop_window_seconds came within level_drop_db of the slow estimate's level, the estimates' LEVEL is rescaled to the recent one so quieter material is not outweighed by the louder past. | |
| double | level_drop_window_seconds = 4.0 |
| double | dry_level_drop_window_seconds = 0.6 |
| The same for the live (dry) leg, which has no change detector. | |
| double | local_level_seconds = 2.0 |
| Frames are weighted by their power relative to a running average of frame power over this long (see LongTermSpectrum's frame_): energy weighting within a groove, not across a swell or a fade. | |
| double | level_weight_exponent = 1.0 |
| double | alternating_time_constant_seconds = 8.0 |
| Time constant of the slow estimate while the material alternates between two remembered states (see LongTermSpectrum::merge_with_previous). | |
| double | memory_seconds = 12.0 |
| How long the material before the last change is remembered. | |
| double | material_slew_db_per_second = 6.0 |
| Slowest rate the material moves the make-up target, dB/s (<= 0: no limit) – and the proportional speed-up for a far target (see MakeupTarget::follow). | |
| double | material_slew_rate_per_second = 6.0 |
| double | material_slew_max_db_per_second = 80.0 |
| double | material_slew_knee_db = 0.0 |
| The proportional speed-up counts only the distance beyond this, so a groove's wobble around the target stays on the slow floor. | |
| double | change_threshold_db = 4.0 |
| Change detector (MaterialChangeDetector): the fast and slow estimates' make-up for the current shape disagree by more than this for this many audible frames. | |
| double | change_seconds = 1.0 |
| double | change_huge_db = 12.0 |
| double | change_huge_seconds = 0.5 |
| double | change_drop_threshold_db = 0.0 |
| Quieter after louder (MaterialChangeDetector::drop_threshold_db): a gap above change_drop_threshold_db counts while the level is at least change_drop_level_db below its slow average, for material whose level does not fall faster than change_max_decay_db_per_second. | |
| double | change_drop_level_db = 3.0 |
| double | change_max_decay_db_per_second = 6.0 |
| double | change_drop_min_loud_seconds = 3.0 |
| float | max_cut_db = 24.0f |
| Make-up range. | |
| float | max_boost_db = 24.0f |
| bool | weight_by_material = true |
| false: every bin weighs the same (ignores the material and K). | |
| bool | track_dry_leg = false |
| true: push() takes a dry leg too, and the estimator keeps Pdd and Pwd. | |
| double | frame_seconds = 0.08 |
| Analysis frame length, seconds; the FFT size is the next power of two at or above it (4096 at 44.1/48 kHz). | |
| int | fft_size = 0 |
Every tunable of the stateful stages.
| double pulp::signal::LoudnessCompensationConfig::alternating_time_constant_seconds = 8.0 |
Time constant of the slow estimate while the material alternates between two remembered states (see LongTermSpectrum::merge_with_previous).
| double pulp::signal::LoudnessCompensationConfig::change_drop_level_db = 3.0 |
| double pulp::signal::LoudnessCompensationConfig::change_drop_min_loud_seconds = 3.0 |
| double pulp::signal::LoudnessCompensationConfig::change_drop_threshold_db = 0.0 |
Quieter after louder (MaterialChangeDetector::drop_threshold_db): a gap above change_drop_threshold_db counts while the level is at least change_drop_level_db below its slow average, for material whose level does not fall faster than change_max_decay_db_per_second.
<= 0: off.
| double pulp::signal::LoudnessCompensationConfig::change_huge_db = 12.0 |
| double pulp::signal::LoudnessCompensationConfig::change_huge_seconds = 0.5 |
| double pulp::signal::LoudnessCompensationConfig::change_max_decay_db_per_second = 6.0 |
| double pulp::signal::LoudnessCompensationConfig::change_seconds = 1.0 |
| double pulp::signal::LoudnessCompensationConfig::change_threshold_db = 4.0 |
Change detector (MaterialChangeDetector): the fast and slow estimates' make-up for the current shape disagree by more than this for this many audible frames.
| double pulp::signal::LoudnessCompensationConfig::dry_level_drop_window_seconds = 0.6 |
The same for the live (dry) leg, which has no change detector.
| double pulp::signal::LoudnessCompensationConfig::fast_time_constant_seconds = 0.4 |
Time constant of the FAST estimate, seconds: the change detector's, and what the slow estimate restarts from when the material changes.
| int pulp::signal::LoudnessCompensationConfig::fft_size = 0 |
0: use exactly this FFT size instead (a power of two), so the estimate shares a bin grid with a response sampled on it.
| double pulp::signal::LoudnessCompensationConfig::frame_seconds = 0.08 |
Analysis frame length, seconds; the FFT size is the next power of two at or above it (4096 at 44.1/48 kHz).
Hop is half a frame.
| double pulp::signal::LoudnessCompensationConfig::gate_lufs = -60.0 |
Frames below this K-weighted loudness (LUFS-equivalent over the frame, channels summed as BS.1770 sums them) are not material: the estimate holds through them.
| double pulp::signal::LoudnessCompensationConfig::level_drop_db = 10.0 |
Level-drop rule: when no audible frame in the last level_drop_window_seconds came within level_drop_db of the slow estimate's level, the estimates' LEVEL is rescaled to the recent one so quieter material is not outweighed by the louder past.
It never restarts the spectrum (a decay is not a change of material). <= 0: off.
| double pulp::signal::LoudnessCompensationConfig::level_drop_window_seconds = 4.0 |
| double pulp::signal::LoudnessCompensationConfig::level_weight_exponent = 1.0 |
| double pulp::signal::LoudnessCompensationConfig::local_level_seconds = 2.0 |
Frames are weighted by their power relative to a running average of frame power over this long (see LongTermSpectrum's frame_): energy weighting within a groove, not across a swell or a fade.
<= 0: each frame weighs the same.
| double pulp::signal::LoudnessCompensationConfig::material_slew_db_per_second = 6.0 |
Slowest rate the material moves the make-up target, dB/s (<= 0: no limit) – and the proportional speed-up for a far target (see MakeupTarget::follow).
| double pulp::signal::LoudnessCompensationConfig::material_slew_knee_db = 0.0 |
The proportional speed-up counts only the distance beyond this, so a groove's wobble around the target stays on the slow floor.
| double pulp::signal::LoudnessCompensationConfig::material_slew_max_db_per_second = 80.0 |
| double pulp::signal::LoudnessCompensationConfig::material_slew_rate_per_second = 6.0 |
| float pulp::signal::LoudnessCompensationConfig::max_boost_db = 24.0f |
| float pulp::signal::LoudnessCompensationConfig::max_cut_db = 24.0f |
Make-up range.
| double pulp::signal::LoudnessCompensationConfig::memory_seconds = 12.0 |
How long the material before the last change is remembered.
| double pulp::signal::LoudnessCompensationConfig::prior_seconds = 0.5 |
How long the prior keeps a say once material is heard: its weight falls linearly from 1 to 0 over this much audible material, so the estimate starts AT the prior and is the material's own after it.
Short and finite on purpose: a prior with energy where the material has none dominates any boost there for as long as any of it lingers (an exponential fade left 20 dB of error for seconds).
| double pulp::signal::LoudnessCompensationConfig::time_constant_seconds = 3.0 |
Time constant of the material spectrum, seconds.
<= 0: no smoothing (each frame replaces the estimate).
| bool pulp::signal::LoudnessCompensationConfig::track_dry_leg = false |
true: push() takes a dry leg too, and the estimator keeps Pdd and Pwd.
| bool pulp::signal::LoudnessCompensationConfig::weight_by_material = true |
false: every bin weighs the same (ignores the material and K).
Exists as a measurable negative control, not as a mode.