AppleScript & Scripting
CueStudio 2 is scriptable via AppleScript and exposes a command-based API for integration with other applications and show-control systems.
#Basic verbs
- go: fire the currently armed cue (equivalent to pressing GO).
- stop: stop playback on every cue list.
- pause: pause playback on every cue list (same as the transport bar's Pause).
- resume: resume paused playback on every cue list.
- panic: the same PANIC as Escape: everything fades out over the Show Settings panic time, then stops. Send panic again during the fade to stop immediately.
- goto cue "5": select and load (arm) cue 5 without firing it; the next go fires it.
#Cue-specific verbs
- fire cue "5": fire cue 5 without moving the playhead or changing the selection.
- stop cue "5": stop a specific playing cue.
- arm cue "5": enable a cue.
- disarm cue "5": disable a cue (go skips it).
#Reading and writing cue properties
- get cue property "5" key "name": returns the name of cue 5.
- set cue property "5" key "volume" to 0.5: sets cue 5 to half level (about −6 dB).
- set cue property "5" key "fadeIn" to 2: sets cue 5's fade-in to 2 seconds.
- cue numbers: returns a list of every cue number in the active list.
Volume is LINEAR gain, the same everywhere in scripting: 1.0 is unity (0 dB), 0.5 is about −6 dB, 0 is silent, and the maximum is 3.16 (+10 dB). Values outside that range are clamped. Pan runs from −1 (left) to 1 (right).
#Object graph access
You can also reference cues as objects: tell application "CueStudio" set c to cue "5" set the volume of c to 0.5 set fade in of c to 2 end tell
Object properties: name, number, cue type, notes, hotkey, disabled, volume, pan, fade in, fade out, pre wait, post wait, loop count, file name. (Write "the volume", with "the", when setting it: a bare "set volume" is AppleScript's own command for the Mac's speaker volume.)
#Property keys for get / set cue property
name, notes, hotkey, volume, pan, fadeIn, fadeOut, preWait, postWait, loopCount, startPoint, endPoint, playbackRate, pitchCents, isDisabled, videoBrightness, videoContrast, videoSaturation, videoHue, videoBlur, stopTarget, fadeTarget, fadeDuration, fadeTargetVolume, gotoTarget, loadTarget, armDisarmTarget, armDisarmAction, devampTarget, commandText. Read-only: number, type, fileName, videoFileName, imageFileName. An unknown key is rejected (set returns false, get returns an empty string), so a typo never silently does nothing.
#Shell scripts
Use Script cues to run shell commands during a show, for example, to launch another application, write to a file, or call a web API. Set the cue type to "Shell" in the Script cue's inspector.