This class contains some helpful static methods for dealing with decibel values. More...
Static Public Member Functions | |
| template<typename Type > | |
| static Type | decibelsToGain (const Type decibels, const Type minusInfinityDb=(Type) defaultMinusInfinitydB) |
| Converts a dBFS value to its equivalent gain level. | |
| template<typename Type > | |
| static Type | gainToDecibels (const Type gain, const Type minusInfinityDb=(Type) defaultMinusInfinitydB) |
| Converts a gain level into a dBFS value. | |
| template<typename Type > | |
| static String | toString (const Type decibels, const int decimalPlaces=2, const Type minusInfinityDb=(Type) defaultMinusInfinitydB) |
| Converts a decibel reading to a string, with the 'dB' suffix. | |
This class contains some helpful static methods for dealing with decibel values.
| static Type Decibels::decibelsToGain | ( | const Type | decibels, |
| const Type | minusInfinityDb = (Type) defaultMinusInfinitydB |
||
| ) | [static] |
Converts a dBFS value to its equivalent gain level.
A gain of 1.0 = 0 dB, and lower gains map onto negative decibel values. Any decibel value lower than minusInfinityDb will return a gain of 0.
| static Type Decibels::gainToDecibels | ( | const Type | gain, |
| const Type | minusInfinityDb = (Type) defaultMinusInfinitydB |
||
| ) | [static] |
Converts a gain level into a dBFS value.
A gain of 1.0 = 0 dB, and lower gains map onto negative decibel values. If the gain is 0 (or negative), then the method will return the value provided as minusInfinityDb.
References jmax().
| static String Decibels::toString | ( | const Type | decibels, |
| const int | decimalPlaces = 2, |
||
| const Type | minusInfinityDb = (Type) defaultMinusInfinitydB |
||
| ) | [static] |
Converts a decibel reading to a string, with the 'dB' suffix.
If the decibel value is lower than minusInfinityDb, the return value will be "-INF dB".