pub fn rms_to_meter_level(rms: f32) -> f32Expand description
Convert a linear RMS value ([0, 1]) into a UI-meter level
([0, 1]) on a logarithmic dBFS scale, with 0 dBFS mapping to
1.0 and METER_FLOOR_DBFS mapping to 0.0.
Linear RMS is a useless meter input because human loudness
perception (and microphone signal) is logarithmic — speech sits
around -30 dBFS (RMS ≈ 0.03), while the linear scale would map
the same speech to ~3 % of a 10-bar meter. The dBFS-mapped output
puts conversational speech around 50 % of the bar, leaving
headroom at both ends for whispers + shouts.
Indicative outputs (for the default -60 dBFS floor):
| Input RMS | dBFS | Meter level |
|---|---|---|
| 0.0 | -∞ | 0.00 |
| 0.001 | -60 | 0.00 |
| 0.003 | -50.5 | 0.16 |
| 0.01 | -40 | 0.33 |
| 0.03 | -30.5 | 0.49 |
| 0.1 | -20 | 0.67 |
| 0.3 | -10.5 | 0.83 |
| 1.0 | 0 | 1.00 |