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:
- file
str
, default: “” Path to the harmonics source with two parameters file. Supported files are text files with the header AnsysSound_Orders_MultipleParameters.
- source_control_rpm
SourceControlTime
, default:None
First Source control, consisting of the RPM values over time, to use when generating the sound from this source.
- source_control2
SourceControlTime
, default:None
Second source control, consisting of the control parameter values over time, to use when generating the sound from this source.
- file
Methods
SourceHarmonicsTwoParameters.convert_fields_container_to_np_array
(fc)Convert a DPF fields container to a NumPy array.
Get the generated sound as a DPF field.
Get the generated sound as a NumPy array.
Source control verification function.
SourceHarmonicsTwoParameters.load_source_harmonics_two_parameters
(file)Load the harmonics source with two parameters data from a file.
Plot the resulting signal in a figure.
Plot the source control(s) in a figure.
Generate the sound of the harmonics source with two parameters.
Attributes
Second source control for harmonics source with two parameters.
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.