XtractTransient#

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

Extracts the transient components of a signal using the Xtract algorithm.

Examples

Extract transient components from a signal, and display the transient and non-transient components.

>>> from ansys.sound.core.xtract import XtractTransient
>>> xtract_transient = XtractTransient(
...     input_signal=my_signal_field,
...     input_parameters=my_parameters
... )
>>> xtract_transient.process()
>>> transient_signals, non_transient_signals = xtract_transient.get_output()
>>> xtract_transient.plot()

See also

Extract tonal, transient, and noise components (Xtract)

Example demonstrating how to use Xtract to extract the various components of a signal.

Class instantiation takes the following parameters.

Parameters:
input_signalFieldsContainer | Field, default: None

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

input_parametersXtractTransientParameters, default: None

Structure that contains the parameters of the algorithm:

  • Lower threshold (float), which is between 0 and 100.

  • Upper threshold (float), which is between 0 and 100.

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

Methods

XtractTransient.get_output()

Get the output of the transient extraction.

XtractTransient.get_output_as_nparray()

Get the output of the transient extraction as NumPy arrays.

XtractTransient.plot()

Plot signals.

XtractTransient.process()

Process the transient extraction.

Attributes