SourceHarmonics#
- class ansys.sound.core.sound_composer.SourceHarmonics(file='', source_control=None)#
Sound Composer’s harmonics source class.
This class creates a harmonics source for the Sound Composer. A harmonics source is used to generate a sound signal from a given harmonics source data and its source control. The harmonics source data consists of a series of orders whose levels depend on RPM. The source control contains the RPM values over time.
Class instantiation takes the following parameters.
- Parameters:
- file
str
, default: “” Path to the harmonics source data file. Supported files are the same XML and text (with the header AnsysSound_Orders) formats as supported by Ansys Sound SAS.
- source_control
SourceControlTime
, default:None
Source control, consisting of the control parameter values over time, to use when generating the sound from this source.
- file
Methods
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.
Load the harmonics source data from a file.
Plot the resulting signal in a figure.
Plot the source control(s) in a figure.
SourceHarmonics.process
([sampling_frequency])Generate the sound of the harmonics source.
Attributes
Harmonics source control.
Harmonics source data, as a DPF fields container.