db()¶
- audmath.db(x, *, bottom=-120)[source]¶
Convert value to decibels.
The decibel of a value is given by
where is provided by the argument of same name.
- Parameters
- Return type
- Returns
input value(s) in dB
Examples
>>> db(1) np.float64(0.0) >>> db(0) np.float64(-120.0) >>> db(2) np.float64(6.020599913279624) >>> db([0, 1]) array([-120., 0.])