Roughness#

class ansys.sound.core.psychoacoustics.Roughness(signal=None)#

Computes the roughness and the roughness over time of a sound.

Reference: Daniel and Weber, “Psychoacoustical roughness: implementation of an optimized model.” Acta Acustica united with Acustica, 83, pp. 113-123 (1997).

Examples

Compute the roughness of a signal, and display the specific roughness and roughness over time.

>>> from ansys.sound.core.psychoacoustics import Roughness
>>> roughness = Roughness(signal=my_signal)
>>> roughness.process()
>>> roughness_value = roughness.get_roughness()
>>> roughness.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 roughness.

Methods

Roughness.get_bark_band_frequencies()

Get Bark band frequencies.

Roughness.get_bark_band_indexes()

Get Bark band indexes.

Roughness.get_output()

Get roughness data.

Roughness.get_output_as_nparray()

Get roughness data in a tuple of NumPy arrays.

Roughness.get_roughness()

Get the overall roughness in asper.

Roughness.get_roughness_over_time()

Get the roughness over time in asper.

Roughness.get_specific_roughness()

Get the specific roughness in asper/Bark.

Roughness.get_time_scale()

Get the time scale of the roughness over time, in s.

Roughness.plot()

Plot the specific roughness and the roughness over time.

Roughness.process()

Compute the roughness.

Attributes

Roughness.signal

Input signal in Pa.