Convert Frequency to ERB-rate Scale
ucnv_hz_to_erb.RdConverts frequency values from Hz to the ERB-rate scale (also called ERBS or Cams). The ERB-rate scale is based on the Equivalent Rectangular Bandwidth of auditory filters and provides a perceptually uniform frequency scale.
Usage
ucnv_hz_to_erb(freq, method = c("glasberg1990", "moore1983"), as_units = NULL)Arguments
- freq
Numeric vector or units object with frequency values in Hz. If a units object is provided, it will be converted to Hz.
- method
Character string specifying the conversion formula to use. Options are:
"glasberg1990"(default): Glasberg & Moore (1990) linear approximation"moore1983": Moore & Glasberg (1983) polynomial approximation
- as_units
Logical. If TRUE, returns a units object with "ERB" units. If FALSE, returns a plain numeric vector. Default is TRUE if the units package is available and input has units.
Value
If as_units = TRUE and the units package is available: a units object
with "ERB" units. Otherwise, a numeric vector of ERB-rate values.
Details
Two different approximation formulas are available:
Glasberg & Moore (1990) (default): $$ERBS(f) = 21.4 \cdot \log_{10}(1 + 0.00437 \cdot f)$$
Valid range: 100-10,000 Hz. This is the most commonly used formula.
Moore & Glasberg (1983): $$ERBS(f) = 11.17 \cdot \ln\left(\frac{f + 312}{f + 14675}\right) + 43.0$$
where f is in Hz. Valid range: 100-6500 Hz.