pytimbre.timbre_features.metrics.sound_quality.SoundQualityMetrics¶
- class pytimbre.timbre_features.metrics.sound_quality.SoundQualityMetrics¶
Bases:
object- __init__()¶
Methods
__init__()from_spectrum(spectra)from_waveform(wfm)This will collect the different features and return a new dictionary :return: The features available :rtype: dict
integrated_loudness(wfm)As part of the determination of various values used in the Timbral_models the meter object from pyloudnorm is used to determine the integrated loudness.
normalize_waveform_loudness(wfm[, ...])This function will normalize the data within the waveform to a specific loudness
specific_loudness(waveform)This function originates with the timbral_models package.
Attributes
boominessloudnessroughnesssharpnesswaveform- get_features()¶
This will collect the different features and return a new dictionary :return: The features available :rtype: dict
- static integrated_loudness(wfm: Waveform)¶
As part of the determination of various values used in the Timbral_models the meter object from pyloudnorm is used to determine the integrated loudness. This function will replicate the signal function calculation without the majority of the error checking for the mono channel data within the waveform.
Taken from pyloudnorm.meter.
- Return type:
Integrated loudness with filters for head and auditory system applied
- static normalize_waveform_loudness(wfm, target_loudness: float = -24.0, inplace: bool = True)¶
This function will normalize the data within the waveform to a specific loudness
:param : The targeted loudness that we are normalizing this audio data to :type : param target_loudness: :param : Boolean flag to determine whether the current object is modified, or a new object is retured :type : param inplace:
- static specific_loudness(waveform: Waveform)¶
This function originates with the timbral_models package. This is the specific_loudness function from the timbral_utils.py. This function calculates loudness in one-third-octave bands based on ISO 532 B / DIN 45631 source: BASIC code in Journal of Acoustical Society of Japan (E) 12, 1 (1991). This code always calculates the value for a free-field
- Returns:
n_entire = entire loudness[sone]
n_single = partial loudness[sone / Bark]
Original Matlab code by Claire Churchill Jun. 2004
Transcoded by Andy Pearce 2018
Refactored by Frank Mobley 2023