SourceAudio#
- class ansys.sound.core.sound_composer.SourceAudio(file='')#
Sound Composer’s audio source class.
This class creates an audio source for the Sound Composer. An audio source is simply made of a sound signal, that is, sound samples over time, in Pa, that is meant to be played, as is (unless resampling is necessary), along with other Sound Composer sources. The audio source can be loaded from a WAV file or a text file.
Class instantiation takes the following parameters.
- Parameters:
- file
str
, default: “” Path to the audio file (WAV format or text format with header AnsysSound_SoundSamples).
- 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.
Check if the source control is valid.
Load the audio source data from a text file.
Load the audio source data from a WAV file.
Plot the generated sound in a figure.
Plot the source control(s) in a figure.
SourceAudio.process
([sampling_frequency])Generate the sound of the audio source.
Attributes
Audio source data, as a DPF field.