pytimbre.timbre_features.metrics.harmonic.HarmonicMetrics

class pytimbre.timbre_features.metrics.harmonic.HarmonicMetrics(s: Spectrum)

Bases: object

This class encapsulates the ability of the spectrum to determine harmonic values and return relevant features based on the fundamental frequency.

__init__(s: Spectrum)

Methods

__init__(s)

get_features()

Attributes

frequencies

fundamental_frequency

harmonic_energy

This is the energy within the signal that is explained by the harmonic partial frequencies and amplitudes.

harmonic_spectral_deviation

This measures the deviation of the amplitudes of the partials from the harmonics from the global or smoothed spectral envelope.

inharmonicity

This is a measure of the deviation of the partial frequencies from the purely harmonic frequency.

noise_energy

This is the energy of the signal not represented by the harmonic frequencies.

noisiness

This is the ratio of the noise energy to the total energy.

odd_even_ratio

In musical instruments, certain signals contain mostly even (trumpet) or odd (clarinet) harmonics.

pressures_pascals

spectrum

tri_stimulus

This 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.