Canonical gain-reduction meter value. More...
#include <dynamics_contract.hpp>
Public Member Functions | |
| GainReduction () noexcept=default | |
| double | db () const noexcept |
| Non-negative attenuation magnitude in decibels. | |
| double | signed_db () const noexcept |
| The equivalent gain value for addition in the dB domain. | |
| double | linear_gain () const noexcept |
| The equivalent linear amplitude multiplier in [0, 1]; infinite attenuation maps to zero. | |
Static Public Member Functions | |
| static GainReduction | from_signed_db (double signed_db) noexcept |
| Adapt a signed gain value, where attenuation is negative dB. | |
| static GainReduction | from_magnitude_db (double magnitude_db) noexcept |
| Adapt an attenuation magnitude, where reduction is positive dB. | |
Canonical gain-reduction meter value.
db() is always a non-negative magnitude: zero means unity gain and a larger value means more attenuation. This deliberately does not replace legacy gain_reduction_db() accessors whose signs are part of their public contracts. Dynamics processors expose this type through gain_reduction() so meters can consume every lineage without knowing its internal sign.
RT contract: construction and inspection are pure scalar arithmetic over a scalar value. They allocate no memory, lock nothing, and perform no I/O.
|
defaultnoexcept |
|
inlinenoexcept |
Non-negative attenuation magnitude in decibels.
|
inlinestaticnoexcept |
Adapt an attenuation magnitude, where reduction is positive dB.
|
inlinestaticnoexcept |
Adapt a signed gain value, where attenuation is negative dB.
|
inlinenoexcept |
The equivalent linear amplitude multiplier in [0, 1]; infinite attenuation maps to zero.
|
inlinenoexcept |
The equivalent gain value for addition in the dB domain.