SoundComposer#
- class ansys.sound.core.sound_composer.SoundComposer(project_path='')#
Sound Composer project class.
This class creates a Sound Composer project. A project is made of several tracks (
Track), each containing a source, to generate the sound, and an optional filter, to model the transfer between the source and the receiver.See also
Examples
Load a Sound Composer project created in Ansys Sound SAS, and plot the generated signal.
>>> from ansys.sound.core.sound_composer import SoundComposer >>> sound_composer = SoundComposer(project_path="path/to/project.scn") >>> sound_composer.process(sampling_frequency=48000.0) >>> sound_composer.plot()
See also
- Use an existing Sound Composer project file
Example demonstrating how to load and work with an existing Sound Composer project.
- Create a Sound Composer project
Example demonstrating how to create a Sound Composer project from scratch.
Class instantiation takes the following parameter.
- Parameters:
- project_path
str, default: “” Path to the Sound Composer project file to load (.scn).
- project_path
Methods
SoundComposer.add_track(track)Add a track to the project.
Get the generated signal of the Sound Composer project as a DPF field.
Get the generated signal of the Sound Composer project as a NumPy array.
SoundComposer.load(project_path)Load a Sound Composer project.
Plot the generated signal of the Sound Composer project.
SoundComposer.process([sampling_frequency])Generate the signal of the current Sound Composer project.
SoundComposer.save(project_path)Save the Sound Composer project.
Attributes
Name of the Sound Composer project.
List of tracks.