SharpnessOverTime#

class ansys.sound.core.psychoacoustics.SharpnessOverTime(signal=None, field_type='Free')#

Computes the sharpness of a signal according to Zwicker & Fastl’s model, over time.

Note

The calculation of this indicator is based on the loudness model for time-varying sounds defined in the standard ISO 532-1. It is the loudness model of the class LoudnessISO532_1_TimeVarying.

Examples

Compute and display the sharpness of a signal according to Zwicker & Fastl’s model, over time.

>>> from ansys.sound.core.psychoacoustics import SharpnessOverTime
>>> sharpness = SharpnessOverTime(signal=my_signal)
>>> sharpness.process()
>>> max_sharpness_value = sharpness.get_max_sharpness()
>>> sharpness.plot()

See also

Calculate psychoacoustic indicators

Example demonstrating how to compute various psychoacoustic indicators.

Class instantiation takes the following parameters.

Parameters:
signalField, default: None

Signal in Pa on which to compute sharpness over time.

field_typestr, default: “Free”

Sound field type. Available options are “Free” and “Diffuse”.

Methods

SharpnessOverTime.get_max_sharpness()

Get the maximum value of the sharpness over time.

SharpnessOverTime.get_output()

Get the sharpness over time data in a tuple.

SharpnessOverTime.get_output_as_nparray()

Get the sharpness over time data in a tuple of NumPy arrays.

SharpnessOverTime.get_sharpness_over_time()

Get the sharpness over time.

SharpnessOverTime.get_time_scale()

Get the time scale of the sharpness over time.

SharpnessOverTime.plot()

Plot the sharpness over time.

SharpnessOverTime.process()

Compute the sharpness over time.

Attributes

SharpnessOverTime.field_type

Sound field type.

SharpnessOverTime.signal

Input signal in Pa.