Track#

class ansys.sound.core.sound_composer.Track(name='', gain=0.0, source=None, filter=None)#

Sound Composer’s track class.

This class creates a track for the Sound Composer. A track is made of a source (including its source control) and a filter. A tracks allows the synthesis of the source’s sound, filtered with its associated filter.

Class instantiation takes the following parameters.

Parameters:
namestr, default: “”

Name of the track.

gainfloat, default: 0.0

Gain of the track, in dB.

sourceSourceSpectrum, SourceBroadbandNoise, SourceBroadbandNoiseTwoParameters, SourceHarmonics, SourceHarmonicsTwoParameters or SourceAudio, default: None

Source of the track.

filterFilter, default: None,

Filter of the track.

Methods

Track.convert_fields_container_to_np_array(fc)

Convert a DPF fields container to a NumPy array.

Track.get_output()

Get the generated signal as a DPF field.

Track.get_output_as_nparray()

Get the generated signal as a NumPy array.

Track.plot()

Plot the resulting signal in a figure.

Track.process([sampling_frequency])

Generate the signal of the track, using the current source and filter.

Attributes

Track.filter

Filter object of the track.

Track.gain

Track gain in dB.

Track.name

Name of the track.

Track.source

Source object associated with the track.