disguise developers

Designer Plugins

Plugins for Disguise Designer software.

Audio in Disguise

This guide provides an overview of how to use the Disguise Python API to manage and interact with audio.


Audio Track

An AudioTrack is a resource that represents an audio file in the timeline.

TaskPython
Get audio fileaudio_file = audio_track.audioFile
Returns an AudioFile object.
Get audio headerheader = audio_track.header
Returns an AudioInfo object.

Audio File

An AudioFile resource contains information about a specific audio file.

TaskPython
Get audio headerheader = audio_file.header
Returns an AudioInfo object with details like sample rate and bit depth.

Audio Analyser

The AudioAnalyser is a device that provides real-time analysis of an audio signal.

TaskPython
Get audio lineslines = audio_analyser.lines
Returns a list of AudioLine objects.

Controlling Volume

Volume for sequenceable objects like layers is controlled via keyframes. To set a static value, you typically set the value of the first keyframe.

Set volume on an Audio Layer

audio_layer = next((l for l in guisystem.track.layers if l.name == "MyAudioLayer"), None)
if audio_layer:
    vol_seq = audio_layer.findSequence("volume")
    if vol_seq:
        vol_seq.disableSequencing = False
        key_seq = vol_seq.sequence
        if key_seq:
            # Set a keyframe at time 0.0 seconds
            key_seq.setFloat(0.0, 0.5)

Set master transport volume

transport = guisystem.currentTransportManager
transport.volume = 0.8

Control master volume (local layer)

t_vol_layer = next((l for l in guisystem.track.layers if l.name == "TransportVolumeLocal"), None)
if t_vol_layer:
    vol_seq = t_vol_layer.findSequence("volume")
    if vol_seq:
        vol_seq.disableSequencing = False
        key_seq = vol_seq.sequence
        if key_seq:
            # Set a keyframe at time 0.0 seconds
            key_seq.setFloat(0.0, 1.0)

Keyframing Audio Properties

You can animate audio properties, such as the volume of an Audio layer, using keyframes. This follows the same pattern as other sequenceable properties in Disguise (see Track and Sequencing).


Audio Line

An AudioLine represents a single line of audio analysis data. This is often used for frequency analysis (e.g., getting bass, mid, treble levels).

TaskPython
Example Expressionaudioline:name.c[range]
This is used in expressions to get frequency data. For example, audioline:my-audio.c[0] might give you the bass level.

System-level Audio Management

You can access audio-related components from the main system object.

TaskPython
Get audio output device mapaudio_out_map = system.audioOut
Returns an AudioOutDeviceMap2 object for managing audio outputs.
Get all audio trackstracks = system.audioTracks
Returns a list of all AudioTrack objects in the project.
Check if video has audiohas_audio = video_clip.hasAudio
Returns True if a VideoClip resource has an embedded audio track.
Reset audio systemsystem.resetAudio()
Resets the audio engine.

Map an audio device

# Find the logical device to map by iterating and checking its description
logical_device = next((d for d in system.audioOut.outputs if d.description == "L-Acoustics P1"), None)
if logical_device:
    # Find the physical machine output to map to
    machine_output = next((o for o in system.machines[0].audio.outputs if o.description == "Dante PCIe RX (machine-name)"), None)
    if machine_output:
        patch = logical_device.patch
        patch.device = machine_output
        patch.channel = 0  # e.g., Left channel

Maps the named logical device to a named physical output.