SourceControlSpectrum#

class ansys.sound.core.sound_composer.SourceControlSpectrum(duration=0.0, method=1)#

Sound Composer’s spectrum source’s control class.

This class stores the control parameters used by the Sound Composer for a spectrum source, namely its duration in seconds and the sound generation method to be used.

Class instantiation takes the following parameters.

Parameters:
durationfloat, default: 0.0

Duration of the sound generated from the spectrum source, in seconds.

methodint, default: 1

Sound generation method to be used. 1 for IFFT, 2 for Hybrid.

Methods

SourceControlSpectrum.convert_fields_container_to_np_array(fc)

Convert a DPF fields container to a NumPy array.

SourceControlSpectrum.get_method_name()

Get the sound generation method name.

SourceControlSpectrum.get_output()

Get output.

SourceControlSpectrum.get_output_as_nparray()

Get output as a NumPy array.

SourceControlSpectrum.plot()

Plot the output.

SourceControlSpectrum.process()

Process inputs.

Attributes

SourceControlSpectrum.duration

Duration of the generated sound, in seconds.

SourceControlSpectrum.method

Sound generation method to be used.