RoughnessECMA418_2#

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

Computes ECMA-418-2 roughness.

Computes the roughness, specific roughness, and roughness over time of a sound according to the ECMA-418-2 standard (4th edition, 2025).

Examples

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

>>> from ansys.sound.core.psychoacoustics import RoughnessECMA418_2
>>> roughness = RoughnessECMA418_2(signal=my_signal, field_type="Free")
>>> roughness.process()
>>> roughness_value = roughness.get_roughness()
>>> roughness.plot()

See also

Calculate psychoacoustic indicators

Example demonstrating how to compute various psychoacoustic indicators.

Added in DPF Sound plugin version 2027.1.0.

Class instantiation takes the following parameters.

Parameters:
signalField, default: None

Signal in Pa on which to compute roughness.

field_typestr, default: “Free”

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

Methods

RoughnessECMA418_2.get_bark_band_frequencies()

Get Bark band frequencies.

RoughnessECMA418_2.get_bark_band_indexes()

Get Bark band indexes.

RoughnessECMA418_2.get_output()

Get roughness data.

RoughnessECMA418_2.get_output_as_nparray()

Get roughness data in a tuple of NumPy arrays.

RoughnessECMA418_2.get_roughness()

Get the overall roughness in asper.

RoughnessECMA418_2.get_roughness_over_time()

Get the roughness over time in asper.

RoughnessECMA418_2.get_specific_roughness()

Get the specific roughness in asperHMS/Bark.

RoughnessECMA418_2.get_time_scale()

Get the time scale.

RoughnessECMA418_2.plot()

Plot the specific roughness and the roughness over time.

RoughnessECMA418_2.process()

Compute the roughness.

Attributes

RoughnessECMA418_2.field_type

Sound field type.

RoughnessECMA418_2.signal

Input signal in Pa.