pytimbre.timbre_features.metrics.harmonic.HarmonicMetrics¶
- class pytimbre.timbre_features.metrics.harmonic.HarmonicMetrics(s: Spectrum)¶
Bases:
objectThis class encapsulates the ability of the spectrum to determine harmonic values and return relevant features based on the fundamental frequency.
Methods
__init__(s)get_features()Attributes
frequenciesfundamental_frequencyThis is the energy within the signal that is explained by the harmonic partial frequencies and amplitudes.
This measures the deviation of the amplitudes of the partials from the harmonics from the global or smoothed spectral envelope.
This is a measure of the deviation of the partial frequencies from the purely harmonic frequency.
This is the energy of the signal not represented by the harmonic frequencies.
This is the ratio of the noise energy to the total energy.
In musical instruments, certain signals contain mostly even (trumpet) or odd (clarinet) harmonics.
pressures_pascalsspectrumThis is a set of values that were first introduced by H.
- property harmonic_energy¶
This is the energy within the signal that is explained by the harmonic partial frequencies and amplitudes. It is the square of all the amplitudes determined for the harmonic frequencies.
- property harmonic_spectral_deviation¶
This measures the deviation of the amplitudes of the partials from the harmonics from the global or smoothed spectral envelope.
- property inharmonicity¶
This is a measure of the deviation of the partial frequencies from the purely harmonic frequency.
- property noise_energy¶
This is the energy of the signal not represented by the harmonic frequencies. It is simply the difference between the total energy and the energy explained by the harmonics.
- property noisiness¶
This is the ratio of the noise energy to the total energy. The higher the noisiness, the more noise-like the signal must be.
- property odd_even_ratio¶
In musical instruments, certain signals contain mostly even (trumpet) or odd (clarinet) harmonics. This ratio determines where the system is mostly odd or even.
- property tri_stimulus¶
This is a set of values that were first introduced by H. Pollard (Pollard, H. and Jansson, E. (1982) “A tristimulus method for the specification of musical timbre,” Acustica 51, 162-171) as a timbral equivalent to visual color attributes. It is three different energy ratios based on the description of the fundamental frequency.