XtractTonal#

class ansys.sound.core.xtract.XtractTonal(input_signal=None, input_parameters=None)#

Performs signal tonal analysis using the Xtract algorithm.

Class instantiation takes the following parameters.

Parameters:
input_signalFieldsContainer | Field, default: None

One or more signals to extract tonal components from as a DPF field or fields container. When inputting a fields container, each signal (each field of the fields container) is processed individually.

input_parametersXtractTonalParameters, default: None

Structure that contains the parameters of the algorithm:

  • NFFT (int) is the number of points used for the FFT computation.

  • Regularity setting (float) between 0 and 1.

  • Maximum slope (float) in dB/Hz.

  • Minimum duration (float) in seconds.

  • Intertonal gap (float) in Hz.

  • Local emergence (float) in dB.

This structure is of the XtractTonalParameters type. For more information, see this class.

Methods

XtractTonal.convert_fields_container_to_np_array(fc)

Convert a DPF fields container to a NumPy array.

XtractTonal.get_output()

Get the output of the tonal analysis.

XtractTonal.get_output_as_nparray()

Get the output of the tonal analysis as NumPy arrays.

XtractTonal.plot()

Plot the output of the tonal analysis.

XtractTonal.process()

Process the tonal analysis.

Attributes

XtractTonal.input_parameters

Input parameters.

XtractTonal.input_signal

Input signal.

XtractTonal.output_non_tonal_signals

Output non-tonal signals.

XtractTonal.output_tonal_signals

Output tonal signals.