SourceHarmonicsTwoParameters#

class ansys.sound.core.sound_composer.SourceHarmonicsTwoParameters(file='', source_control_rpm=None, source_control2=None)#

Sound Composer’s harmonics source with two parameters class.

This class creates a harmonics source with two parameters for the Sound Composer. A harmonics source with two parameters is used to generate a sound signal from a given harmonics source data and its two source controls. The harmonics source data consists of a series of orders whose levels depend on the values of two parameters, the first of which is always RPM. The source controls contain each a control parameter’s values over time.

Class instantiation takes the following parameters.

Parameters:
filestr, default: “”

Path to the harmonics source with two parameters file. Supported files are text files with the header AnsysSound_Orders_MultipleParameters.

source_control_rpmSourceControlTime, default: None

First Source control, consisting of the RPM values over time, to use when generating the sound from this source.

source_control2SourceControlTime, default: None

Second source control, consisting of the control parameter values over time, to use when generating the sound from this source.

Methods

SourceHarmonicsTwoParameters.convert_fields_container_to_np_array(fc)

Convert a DPF fields container to a NumPy array.

SourceHarmonicsTwoParameters.get_output()

Get the generated sound as a DPF field.

SourceHarmonicsTwoParameters.get_output_as_nparray()

Get the generated sound as a NumPy array.

SourceHarmonicsTwoParameters.is_source_control_valid()

Source control verification function.

SourceHarmonicsTwoParameters.load_source_harmonics_two_parameters(file)

Load the harmonics source with two parameters data from a file.

SourceHarmonicsTwoParameters.plot()

Plot the resulting signal in a figure.

SourceHarmonicsTwoParameters.plot_control()

Plot the source control(s) in a figure.

SourceHarmonicsTwoParameters.process([...])

Generate the sound of the harmonics source with two parameters.

Attributes

SourceHarmonicsTwoParameters.source_control2

Second source control for harmonics source with two parameters.

SourceHarmonicsTwoParameters.source_control_rpm

First source control, that is, RPM, for harmonics source with two parameters.

SourceHarmonicsTwoParameters.source_harmonics_two_parameters

Source data for harmonics source with two parameters.