disguise developers

Designer Plugins

Plugins for Disguise Designer software.

Transports in Disguise

This guide provides an overview of how to use the Disguise Python API to manage and interact with transports. Transports are the systems that allow Disguise to be controlled by external signals like timecode, MIDI, and OSC.


Transport Manager

The TransportManager is the central hub for managing all transport-related activities in a Disguise project. There is one main transport manager that can be accessed from the guisystem object.

TaskPython
Get the main Transport Managertransport_manager = guisystem.currentTransportManager
Get the current trackcurrent_track = transport_manager.track
Get the current play modeplay_mode = transport_manager.play_mode
Get the timecode transporttimecode_transport = transport_manager.timecode
Get local event transportslocal_transports = transport_manager.local_transports
Returns a list of EventTransport objects for local signals.
Get remote event transportsremote_transports = transport_manager.remote_transports
Returns a list of EventTransport objects for remote signals.

Timecode Transport

The TimecodeTransport object provides information about the current timecode signal.

TaskPython
Get the current timecode receivercurrent_timecode = timecode_transport.timecode
Get the timecode statusstatus = timecode_transport.statusString
Get the timecode frame ratefps = timecode_transport.SMPTE_clock_type NOTE only works with SMPTE (LTC) timecode type

Event Transports

Event transports handle signals from protocols like OSC and MIDI. You can iterate through the local_transports and remote_transports lists to find the specific transport you need.

OSC Transport Example

This example shows how to find an OSC transport and get its properties.

TaskPython
Find an OSC transportosc_transport = next((t for t in transport_manager.remote_transports if isinstance(t, EventTransportOSC)), None)
Get the OSC transport’s play stringplay = osc_transport.play
Note: This assumes you have found an OSC transport.
if osc_transport:
    for output in osc_transport.outputs:
        print("Address: {}, Expression: {}".format(output.address, output.expr.expression))

Triggering Transport Events

The following static methods are available on the TransportCommand class to trigger transport actions programmatically:

In each case, the transport_manager is the target transport manager the command is sent to, and source should always be set to d3 (the global Designer application object).

TaskPython Example
Jump to a specific frameTransportCommand.makeJumpToFrame(source, transport_manager, tFrame)
Jump to a specific time (seconds)TransportCommand.makeJumpToTime(source, transport_manager, tSec)
Jump to a specific beatTransportCommand.makeJumpToBeat(source, transport_manager, tBeat)

Jump to a MIDI note

TransportCommand.makeJumpToMidiNote(source, transport_manager, search_channel_1, search_channel_2, note, cue_mode)

Jumps to the given MIDI note. Returns None if the note is not found as a valid trigger.

Jump to a cue

TransportCommand.makeJumpToCue(source, transport_manager, xx, yy, zz, cue_mode)

Jumps to the given cue. Returns None if the cue is not found.