TonalityDIN45681#

class ansys.sound.core.psychoacoustics.TonalityDIN45681(signal=None, window_length=3.0, overlap=0.0)#

Computes DIN 45681 tonality.

This class is used to compute the tonality (mean difference) and tonal adjustment of a signal following the DIN 45681 standard.

Create a TonalityDIN45681 object.

Parameters:
signal: Field, default: None

Signal in Pa on which to calculate the tonality, as a DPF field.

window_length: float, default: 3.0

Length, in s, of each slice of the signal used to calculate an average spectrum.

overlap: float, default: 0.0

Overlap, in %, between two successive slices of the signal.

For more information about the parameters, please refer to Ansys Sound SAS’ user guide.

Methods

TonalityDIN45681.convert_fields_container_to_np_array(fc)

Convert a DPF fields container to a NumPy array.

TonalityDIN45681.get_decisive_difference_over_time()

Get the DIN 45681 decisive difference DLj, in dB over time.

TonalityDIN45681.get_decisive_frequency_over_time()

Get the DIN 45681 decisive frequency, in Hz over time.

TonalityDIN45681.get_mean_difference()

Get the DIN 45681 tonality (mean difference DL), in dB.

TonalityDIN45681.get_output()

Get the DIN 45681 tonality data, in a tuple containing data of various types.

TonalityDIN45681.get_output_as_nparray()

Get the DIN 45681 tonality data, in a tuple of NumPy arrays.

TonalityDIN45681.get_spectrum_details([...])

Get the spectrum data for a specific spectrum.

TonalityDIN45681.get_spectrum_number()

Get the number of spectra.

TonalityDIN45681.get_time_scale()

Get the DIN 45681 time scale, in s.

TonalityDIN45681.get_tonal_adjustment()

Get the DIN 45681 tonal adjustment, in dB.

TonalityDIN45681.get_tonal_adjustment_over_time()

Get the DIN 45681 tonal adjustment Kt, in dB over time.

TonalityDIN45681.get_tone_details([...])

Get the tone data, for a specific spectrum.

TonalityDIN45681.get_tone_number([...])

Get the number of tones for a specific spectrum.

TonalityDIN45681.get_uncertainty()

Get the DIN 45681 uncertainty, in dB.

TonalityDIN45681.get_uncertainty_over_time()

Get the DIN 45681 decisive difference uncertainty, in dB over time.

TonalityDIN45681.plot()

Plot the DIN 45681's decisive difference and frequency, and tonal adjustment, over time.

TonalityDIN45681.process()

Compute the DIN 45681 tonality.

Attributes

TonalityDIN45681.overlap

Overlap, in %, between two consecutive slices of the signal.

TonalityDIN45681.signal

Signal in Pa, as a DPF field.

TonalityDIN45681.window_length

Length, in s, of a slice of the signal used to compute each spectrum.