SourceControlTime#
- class ansys.sound.core.sound_composer.SourceControlTime(file_str='')#
Sound Composer’s time source control class.
This class stores the source control (that is, the control parameter values over time) used by the Sound Composer to generate a sound from sources of types broadband noise and harmonics (with one or two control parameters).
See also
SourceBroadbandNoise,SourceBroadbandNoiseTwoParameters,SourceHarmonics,SourceHarmonicsTwoParametersExamples
Create a time source control by loading the control data from a text file.
>>> from ansys.sound.core.sound_composer import SourceControlTime >>> source_control = SourceControlTime(file_str="path/to/control/file.txt") >>> source_control.description = "Source control data from text file."
See also
- Create a Sound Composer project
Example demonstrating how to create a Sound Composer project from scratch.
Class instantiation takes the following parameters.
- Parameters:
- file_str
str, default: “” Path to the control data file. Supported files are WAV files and and text files with the header AnsysSound_SoundSamples.
- file_str
Methods
Get output.
Get output as a NumPy array.
SourceControlTime.load_from_text_file(file_str)Load control data from a text file.
SourceControlTime.load_from_wave_file(file_str)Load control data from a WAV file.
Plot the control profile.
Process inputs.
Attributes
Control profile (control parameter values over time).
Description of the control profile.