Designer Plugins
Plugins for Disguise Designer software.
Plugins for Disguise Designer software.
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.
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.
| Task | Python |
|---|---|
| Get the main Transport Manager | transport_manager = guisystem.currentTransportManager |
| Get the current track | current_track = transport_manager.track |
| Get the current play mode | play_mode = transport_manager.play_mode |
| Get the timecode transport | timecode_transport = transport_manager.timecode |
| Get local event transports | local_transports = transport_manager.local_transportsReturns a list of EventTransport objects for local signals. |
| Get remote event transports | remote_transports = transport_manager.remote_transportsReturns a list of EventTransport objects for remote signals. |
The TimecodeTransport object provides information about the current timecode signal.
| Task | Python |
|---|---|
| Get the current timecode receiver | current_timecode = timecode_transport.timecode |
| Get the timecode status | status = timecode_transport.statusString |
| Get the timecode frame rate | fps = timecode_transport.SMPTE_clock_type NOTE only works with SMPTE (LTC) timecode type |
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.
This example shows how to find an OSC transport and get its properties.
| Task | Python |
|---|---|
| Find an OSC transport | osc_transport = next((t for t in transport_manager.remote_transports if isinstance(t, EventTransportOSC)), None) |
| Get the OSC transport’s play string | play = osc_transport.playNote: 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))
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).
| Task | Python Example |
|---|---|
| Jump to a specific frame | TransportCommand.makeJumpToFrame(source, transport_manager, tFrame) |
| Jump to a specific time (seconds) | TransportCommand.makeJumpToTime(source, transport_manager, tSec) |
| Jump to a specific beat | TransportCommand.makeJumpToBeat(source, transport_manager, tBeat) |
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.
TransportCommand.makeJumpToCue(source, transport_manager, xx, yy, zz, cue_mode)
Jumps to the given cue. Returns None if the cue is not found.