XtractTonalParameters#
- class ansys.sound.core.xtract.XtractTonalParameters(regularity=1.0, maximum_slope=750.0, minimum_duration=1.0, intertonal_gap=20.0, local_emergence=15.0, fft_size=8192)#
Store tonal parameters for Xtract tonal extraction.
See also
Examples
Create a set of Xtract tonal extraction parameters.
>>> from ansys.sound.core.xtract import XtractTonalParameters >>> tonal_parameters = XtractTonalParameters( ... regularity=0.8, ... maximum_slope=500.0, ... minimum_duration=0.5, ... intertonal_gap=30.0, ... local_emergence=2.0, ... fft_size=4096, ... )
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:
- regularity
float, default: 1.0 Regularity parameter. Values are between 0 and 1. This parameter is designed to reject tonal components with too much frequency variation. You should start with the default value (
1.0) and then lower it to remove detected tonals whose frequency evolutions are too erratic.- maximum_slope
float, default: 750.0 Maximum slope in Hz/s for each tonal component. Values are between 0 and 15000 Hz/s. A higher value enables finding tonal components with a greater frequency slope over time.
- minimum_duration
float, default: 1.0 Minimum duration in seconds for each tonal component. Values are between 0 and 5.
- intertonal_gap
float, default: 20.0 Minimum gap in Hz between two tonal components. Values are between 10 and 200.
- local_emergence
float, default: 15.0 Emergence of the tonal components compared to the background noise in dB. Values are between 0 and 100.
- fft_size
int, default: 8192 Number of samples for the FFT computation. The value must be greater than 0.
- regularity
Methods
Get output.
Get output as a NumPy array.
XtractTonalParameters.get_parameters_as_generic_data_container()Get the parameters as a generic data container.
Plot the output.
Process inputs.
Attributes
Number of FFT points.
Intertonal gap in Hz.
Local emergence in dB.
Maximum slope in Hz/s.
Minimum duration in s.
Regularity parameter.