Xtract#
- class ansys.sound.core.xtract.Xtract(input_signal=None, parameters_denoiser=None, parameters_tonal=None, parameters_transient=None)#
Extract signal components using the Xtract algorithm.
This algorithm chains a denoising step, a tonal extraction step, and a transient extraction step. It allows separating the noise, tonal, transient, and remainder components of a signal. The Xtract algorithm is the same as that which is implemented in Ansys Sound Analysis and Specification (SAS).
See also
XtractDenoiser,XtractDenoiserParameters,XtractTonal,XtractTonalParameters,XtractTransient,XtractTransientParametersExamples
Extract and display the different signal components using the Xtract algorithm.
>>> from ansys.sound.core import Xtract >>> xtract = Xtract( ... input_signal=my_signal, ... parameters_denoiser=my_denoiser_params, ... parameters_tonal=my_tonal_params, ... parameters_transient=my_transient_params, ... ) >>> xtract.process() >>> noise_signal, tonal_signal, transient_signal, remainder_signal = xtract.get_output() >>> xtract.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_signal
Field, default:None Input signal on which to apply the Xtract processing as a DPF field.
- parameters_denoiser
XtractDenoiserParameters, default:None Structure that contains the parameters of the denoising step:
Noise PSD (Field) is the power spectral density (PSD) of the noise.
This structure is of the
XtractDenoiserParameterstype. For more information, see this class.- parameters_tonal
XtractTonalParameters, default:None Structure that contains the parameters of the tonal extraction step:
NFFT (int) is the number of points used for the FFT computation.
Regularity setting (float) in percent.
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
XtractTonalParameterstype. For more information, see this class.- parameters_transient
XtractTransientParameters, default:None Structure that contains the parameters of the transient extraction step:
Lower threshold (float), which is between 0 and 100 percent.
Upper threshold (float), which is between 0 and 100 percent.
This structure is of the
XtractTransientParameterstype. For more information, see this class.
- input_signal
Methods
Get the output of the Xtract algorithm in a tuple of DPF fields.
Get the output of the Xtract algorithm in a tuple as NumPy arrays.
Plot the Xtract algorithm results.
Process the Xtract algorithm.
Attributes
Input signal on which to apply the Xtract processing as a DPF field.
Noise signal as a DPF field.
Remainder signal as a DPF field.
Tonal signal as a DPF field.
Transient signal as a DPF field.
Parameters of the denoiser step.
Parameters of the tonal extraction step.
Parameters of the transient extraction step.