| 
    eDSP
    0.0.1
    
   A cross-platform DSP library written in C++. 
   | 
 
Functions | |
| template<typename ForwardIt > | |
| constexpr auto | loudness (ForwardIt first, ForwardIt last) | 
| Computes the loudness of the elements in the range [first, last)  More... | |
| constexpr auto edsp::feature::perceptual::loudness | ( | ForwardIt | first, | 
| ForwardIt | last | ||
| ) | 
Computes the loudness of the elements in the range [first, last)
The loudness is estimated with the Steven's Power Law. S.S. Stevens proposed a new law to relate sensation magnitude to stimulus intensity.
\[ S = k I^{\alpha} \]
where:
To compute the loudness, we consider the energy of the signal as the stimulus intensity and \( \alpha = 0.67 \) (sound pressure of 3000-Hz tone).
| first | Forward iterator defining the begin of the range to examine. | 
| last | Forward iterator defining the end of the range to examine. | 
 1.8.13