You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
OpenStudio currently provides a Lua scripting engine through the legacy s13.* namespace for compatibility. Scripts can be edited and run from the Script Editor (View > Script Editor).
Track Operations
Function
Arguments
Returns
Description
s13.getTrackCount()
none
number
Returns total number of tracks
s13.addTrack(name)
name: string
trackId: string
Creates a new audio track
s13.removeTrack(trackId)
trackId: string
boolean
Removes a track
s13.setTrackVolume(trackId, dB)
trackId: string, dB: number
none
Set track volume (-60 to +12 dB)
s13.setTrackPan(trackId, pan)
trackId: string, pan: number
none
Set track pan (-1.0 L to +1.0 R)
s13.setTrackMute(trackId, muted)
trackId: string, muted: boolean
none
Set track mute state
s13.setTrackSolo(trackId, soloed)
trackId: string, soloed: boolean
none
Set track solo state
s13.setTrackArm(trackId, armed)
trackId: string, armed: boolean
none
Set track record arm
s13.reorderTrack(fromIdx, toIdx)
from: number, to: number
none
Move track position
Transport
Function
Arguments
Returns
Description
s13.play()
none
none
Start playback
s13.stop()
none
none
Stop playback
s13.record()
none
none
Start recording (arms must be set)
s13.isPlaying()
none
boolean
Check if transport is playing
s13.isRecording()
none
boolean
Check if transport is recording
s13.getPlayhead()
none
number
Get playhead position in seconds
s13.setPlayhead(time)
time: number
none
Set playhead position in seconds
s13.getTempo()
none
number
Get current BPM
s13.setTempo(bpm)
bpm: number
none
Set tempo (20-999 BPM)
s13.getTimeSignature()
none
num, den
Get time signature (two return values)
s13.setTimeSignature(num, den)
num: number, den: number
none
Set time signature
s13.setLoop(enabled, start, end)
enabled: boolean, start: number, end: number
none
Set loop region
FX Chain
Function
Arguments
Returns
Description
s13.getTrackFX(trackId)
trackId: string
table
Get list of track FX plugins
s13.getTrackInputFX(trackId)
trackId: string
table
Get list of input FX plugins
s13.addTrackFX(trackId, pluginId)
trackId: string, pluginId: string
boolean
Add FX plugin to track
s13.removeTrackFX(trackId, index)
trackId: string, index: number
boolean
Remove FX at index
s13.bypassTrackFX(trackId, index, bypassed)
trackId: string, index: number, bypassed: boolean
none
Toggle FX bypass
s13.addTrackS13FX(trackId, effectName)
trackId: string, name: string
boolean
Add a built-in OpenStudio effect (legacy S13 names still work)