ShowScript API
Sequence
Namespace: Global
Sequences are the core building blocks of ShowScript, acting as logical units for executing specific tasks.
GetPoint
none
SetPoint
none
Constructors
This object does not use traditional constructors. Instead, create a sequence inline using the :: syntax, e.g., ::seqTest
Classes
None
Static Methods
None
Methods
void init(int amountOfFrames)
Initializes the sequence with the specified number of frames. Each sequence should be initialized at the start to allocate the necessary memory.
void setFps(int framesPerSecond)
Sets the speed of the sequence in frames per second (FPS). The minimum and default value is 1.
void setProcessorAffinity(int processorIndex)
Assigns the sequence to a dedicated processor. If not specified, it will be dynamically assigned.
void start()
Starts the sequence. First, the initializer frame (if it exists) will be executed, followed by the sequence running from frame 0. If the sequence is already running, it will be stopped first.
void stop()
Stops the sequence gracefully. The current frame will be processed until all commands are executed
void kill()
Stops (kills) the sequence abruptly. Execution will be halted immediately without completing the current frame.
void continue()
Resumes the sequence from its current frame. This function can be used after calling stop().
void goto(int frameIndex)
Jumps the sequence to a specified frame index or label.
ASIO
Namespace: Drivers
Represents an object that references a specific audio interface using the ASIO subsystem, designed for playing audio files. To create multiple ASIO objects, ensure your audio interface supports multiclient ASIO. It has a built-in 4-band equalizer that can be turned on or off for performance reasons.
SetPoint
The setpoint of this object controls the volume and takes a float value. See setVolume().
GetPoint
none
Constructors
ASIO(string deviceName, int sampleRateHz, bool eqEnabled, string audioFile)
Classes
None
Static Methods
void listDevices()
Generates a trace listing all available ASIO devices on the system.
Methods
void setPosition(int sampleIndex)
Positions the playhead at the specified location.
void tracePosition()
Prints the current playhead position to the IDE trace window.
void setVolume(float gain)
Adjusts the playback volume, ranging from 0.0f (mute) to 1.0f (maximum).
void setGlobalVolume(float gainMultiplier)
Adjusts the master playback volume of the object, acts as multiplier. Default: 1.0f.
void setPanning(float pan)
Controls the audio playback panning, from -1.0f (full left) to 0.0f (center) to 1.0f (full right)
void setChannelOffset(int offsetIndex)
Specify the initial channel for output. Note, it's a zero-based index. For example, 3 means output 4.
void setEqLow(float gain)
Sets the gain for the low-frequency band (80 Hz). Range: -30.0f to 30.0f. Default: 0.0f.
void setEqLowMid(float gain)
Sets the gain for the lower mid-frequency band (400 Hz). Range: -30.0f to 30.0f. Default: 0.0f.
void setEqHighMid(float gain)
Sets the gain for the high-mid frequency band (2 kHz). Range: -30.0f to 30.0f. Default: 0.0f.
void setEqHigh(float gain)
Sets the gain for the high frequency band (8 kHz). Range: -30.0f to 30.0f. Default: 0.0f.
void fadeToValueOverFrames(int targetValue, int amountOfFrames, InterpolationMode interpolationMode)
Creates a smooth transition (volume fade) to the target value over the specified number of frames and interpolation mode.
InterpolationModes:
- InterpolationMode.Linear
- InterpolationMode.Logarithmic
- InterpolationMode.EaseIn
- InterpolationMode.EaseOut
- InterpolationMode.EaseInOut
void start()
Starts audio playback from it's current position.
void restart()
Starts audio playblack from the beginning.
void stop()
Stops audio playback.
ASIORouter
Namespace: Drivers
Represents an object that opens a specific ASIO interface for routing, allowing dynamic routing of inputs to outputs. Note that if you intend to use this with the ASIO object for audio playback, your audio interface must support multiclient ASIO.
GetPoint
none
SetPoint
None
Constructors
ASIORouter(string deviceName, int sampleRateHz)
Classes
None
Static Methods
void listDevices()
Generates a trace listing all available ASIO devices on the system.
Methods
void setRoute(int sourceChannelIndex, int targetChannelIndex, bool enabled)
Routes the specified input channel to the output channel. Set 'enabled' to true to create the route, or set it to false to remove the route.
WASAPI
Namespace: Drivers
Represents an object that references a specific audio interface using the WASAPI subsystem, designed for playing audio files. It has a built-in 4-band equalizer that can be turned on or off for performance reasons.
SetPoint
The setpoint of this object controls the volume and takes a float value. See setVolume().
GetPoint
none
Constructors
WASAPI(string deviceName, int sampleRateHz, bool eqEnabled, string audioFile)
Classes
None
Static Methods
void listDevices()
Generates a trace listing all available WASAPI devices on the system.
Methods
void setPosition(int sampleIndex)
Positions the playhead at the specified location.
void tracePosition()
Prints the current playhead position to the IDE trace window.
void setVolume(float gain)
Adjusts the playback volume, ranging from 0.0f (mute) to 1.0f (maximum).
void setGlobalVolume(float gainMultiplier)
Adjusts the master playback volume of the object, acts as multiplier. Default: 1.0f.
void setPanning(float pan)
Controls the audio playback panning, from -1.0f (full left) to 0.0f (center) to 1.0f (full right)
void setChannelOffset(int offsetIndex)
Specify the initial channel for output. Note, it's a zero-based index. For example, 3 means output 4.
void setEqLow(float gain)
Sets the gain for the low-frequency band (80 Hz). Range: -30.0f to 30.0f. Default: 0.0f.
void setEqLowMid(float gain)
Sets the gain for the lower mid-frequency band (400 Hz). Range: -30.0f to 30.0f. Default: 0.0f.
void setEqHighMid(float gain)
Sets the gain for the high-mid frequency band (2 kHz). Range: -30.0f to 30.0f. Default: 0.0f.
void setEqHigh(float gain)
Sets the gain for the high frequency band (8 kHz). Range: -30.0f to 30.0f. Default: 0.0f.
void fadeToValueOverFrames(int targetValue, int amountOfFrames, InterpolationMode interpolationMode)
Creates a smooth transition (volume fade) to the target value over the specified number of frames and interpolation mode.
InterpolationModes:
- InterpolationMode.Linear
- InterpolationMode.Logarithmic
- InterpolationMode.EaseIn
- InterpolationMode.EaseOut
- InterpolationMode.EaseInOut
void start()
Starts audio playback from it's current position.
void restart()
Starts audio playblack from the beginning.
void stop()
Stops audio playback.
DMXOutputChannel
Represents an object that points to a specific DMX channel.
GetPoint
None
SetPoint
The setpoint value for a DMXOutputChannel object is an integer representing a DMX value (0–255).
Constructors
DMXOutputChannel(int dmxChannel)
Classes
None
Static Methods
None
Methods
void fadeToValueOverFrames(int targetValue, int amountOfFrames, InterpolationMode interpolationMode)
Creates a smooth transition (fade) to the target value over the specified number of frames and interpolation mode.
InterpolationModes:
- InterpolationMode.Linear
- InterpolationMode.Logarithmic
- InterpolationMode.EaseIn
- InterpolationMode.EaseOut
- InterpolationMode.EaseInOut
ArtNet
Namespace: Drivers
Represents an object that points to a specific Art-Net interface.
GetPoint
None
SetPoint
None
Constructors
ArtNet(string ipAddress, int universe, int transmitHz)
Classes
DMXOutputChannel
Static Methods
None
Methods
void initAllChannels()
Initializes all the DMX output channels of the universe to value 0.
API
Namespace: Drivers
Represents an object that points to a HTTP API Server.
API Endpoints
GET http://server:port/variables
POST http://server:port/evaluate
GET http://server:port/evaluate
This entry point provides a web-based GUI, allowing you to easily evaluate code from your browser or mobile device. For security reasons, never leave the API unnecessarily open. Instead, use an external firewall or other security measures to protect it properly.
GetPoint
None
SetPoint
None
Constructors
API(int port)
Classes
None
Static Methods
None
Methods
None
Video
Namespace: Drivers
Represents an object that references a specific monitor, intended for playing fullscreen video files. If no path is provided for the filename, the video file will remain in the same folder as the source code. Otherwise, specify a relative or absolute path.
SetPoint
None
GetPoint
none
Constructors
Video(string videoFile, int displayIndex)
Classes
None
Static Methods
void listAudioDevices()
Generates a trace listing all available compatible audio devices on the system.
Methods
void setPosition(int frameIndex)
Positions the playhead at the specified location.
void setVolume(int gain)
Adjusts the playback volume, ranging from 0 (mute) to 100 (maximum).
void setAudioOutput(string deviceName)
Assigns audio playback to the specified audio device.
void setRepeatEnabled(bool enabled)
If enabled, the video will loop.
void start()
Starts video playback from it's current position.
void restart()
Starts video playblack from the beginning.
void stop()
Stops video playback.