This chapter is generated from the language schema (swift run orix-dj-bench docs). Do not edit it by hand.
# Complete API reference
Generated from the language schema of ORIX Script 1.0. Every path listed here is accepted by the compiler; nothing else is.
# Decks
# Deck parameters and properties
Decks are deck.A, deck.B, deck.C and deck.D. A variable of type deck can be used in place of deck.X.
| Path |
Type |
Range |
Default |
Access |
Description |
deck.X.volume |
gain |
-60 dB … 0 dB |
0dB |
read, write, ramp |
Channel fader. -60 dB is silence. A plain number or percentage is taken as a linear fader position. |
deck.X.gain |
gain |
-24 dB … 12 dB |
0dB |
read, write, ramp |
Input trim before the EQ. |
deck.X.eq.low |
gain |
-26 dB … 6 dB |
0dB |
read, write, ramp |
Low band of the channel EQ (-26 dB is a full kill). |
deck.X.eq.mid |
gain |
-26 dB … 6 dB |
0dB |
read, write, ramp |
Mid band of the channel EQ. |
deck.X.eq.high |
gain |
-26 dB … 6 dB |
0dB |
read, write, ramp |
High band of the channel EQ. |
deck.X.filter |
number |
-1 … 1 |
0 |
read, write, ramp |
Bipolar filter knob: negative closes a low-pass, positive opens a high-pass, 0 is off. |
deck.X.filter.highpass |
frequency |
20 Hz … 20000 Hz |
20Hz |
read, write, ramp |
Channel high-pass corner. 20 Hz is off. |
deck.X.filter.lowpass |
frequency |
20 Hz … 20000 Hz |
20kHz |
read, write, ramp |
Channel low-pass corner. 20 kHz is off. |
deck.X.filter.resonance |
number |
0.5 … 10 |
0.9 |
read, write, ramp |
Resonance (Q) of the channel filters. |
deck.X.rate |
number |
0.5 … 2 |
1 |
read, write, ramp |
Playback speed factor (1 = original tempo). |
deck.X.bpm |
number |
20 … 400 BPM |
120 |
read, write, ramp |
Effective tempo of the deck. Writing it changes the playback rate; needs an analysed track. |
deck.X.keyShift |
number |
-12 … 12 st |
0 |
read, write, ramp |
Pitch shift in semitones, independent of tempo. |
deck.X.keylock |
bool |
true / false |
false |
read, write |
Keeps the musical key when the tempo changes (time stretching). |
deck.X.sync |
bool |
true / false |
false |
read, write |
Follows the tempo and beat phase of the master deck. |
deck.X.quantize |
bool |
true / false |
true |
read, write |
Snaps cues, loops and jumps to the beat grid. |
deck.X.reverse |
bool |
true / false |
false |
read, write |
Plays the track backwards. |
deck.X.cue |
bool |
true / false |
false |
read, write |
Sends the channel to the headphone cue bus. |
deck.X.trackBpm |
number |
– |
– |
read |
Analysed tempo of the loaded track at original speed (0 when unknown). |
deck.X.position |
duration |
– |
– |
read |
Playhead position. |
deck.X.remaining |
duration |
– |
– |
read |
Time left until the end of the track. |
deck.X.duration |
duration |
– |
– |
read |
Length of the loaded track. |
deck.X.beat |
number |
– |
– |
read |
Fractional beat index of the playhead on the track's beat grid. |
deck.X.playing |
bool |
– |
– |
read |
True while the deck is playing. |
deck.X.loaded |
bool |
– |
– |
read |
True when a track is loaded. |
deck.X.looping |
bool |
– |
– |
read |
True while a loop is active. |
deck.X.level |
gain |
-60 dB … 6 dB |
– |
read |
Post-fader peak level of the channel. |
deck.X.key |
string |
– |
– |
read |
Estimated musical key of the loaded track ("8A" notation), empty when unknown. |
deck.X.title |
string |
– |
– |
read |
Title of the loaded track. |
# Deck actions
| Action |
Arguments |
Description |
deck.X.play() |
– |
Starts playback (on the next beat of the master clock when quantize and sync are on). |
deck.X.pause() |
– |
Pauses playback. |
deck.X.toggle() |
– |
Plays when paused, pauses when playing. |
deck.X.stop() |
– |
Pauses and returns to the start of the track. |
deck.X.cue() |
– |
Jumps to the cue point and pauses. |
deck.X.setCue() |
– |
Stores the current position as the cue point. |
deck.X.seek(position: duration) |
position: duration. Beats count from the first beat of the grid, seconds from the start of the file. |
Moves the playhead. |
deck.X.jump(amount: duration) |
amount: duration. Signed distance, e.g. 4beats or -1bar. |
Beat jump relative to the playhead. |
deck.X.loop(length: duration) |
length: duration. Loop length, e.g. 4beats. |
Starts a loop of the given length at the playhead. |
deck.X.loopIn() |
– |
Marks the loop start at the playhead. |
deck.X.loopOut() |
– |
Marks the loop end at the playhead and starts looping. |
deck.X.loopExit() |
– |
Leaves the active loop. |
deck.X.reloop() |
– |
Re-enters the last loop. |
deck.X.loopHalve() |
– |
Halves the active loop length. |
deck.X.loopDouble() |
– |
Doubles the active loop length. |
deck.X.hotcue(index: number) |
index: number. 1 to 8. |
Jumps to a hot cue and plays. |
deck.X.setHotcue(index: number) |
index: number. 1 to 8. |
Stores the playhead in a hot cue. |
deck.X.clearHotcue(index: number) |
index: number. 1 to 8. |
Deletes a hot cue. |
deck.X.sync(on: bool?) |
on: bool (optional). Defaults to true. |
Turns tempo and phase sync on or off. |
deck.X.brake(length: duration?) |
length: duration (optional). Time to stop, default 1beat. |
Tape-stop: slows the deck to a halt, then pauses. |
deck.X.load(title: string) |
title: string. Title, or part of it, of a library track. |
Loads the best matching library track. |
deck.X.loadNext() |
– |
Loads the next track of the Auto DJ queue. |
deck.X.eject() |
– |
Unloads the track (only while paused). |
# Deck events
| Event |
Fires when |
on deck.X.trackEnd { … } |
The playhead reached the end of the track. |
on deck.X.play { … } |
The deck started playing. |
on deck.X.pause { … } |
The deck paused. |
on deck.X.loaded { … } |
A track finished loading. |
on deck.X.beat { … } |
The playhead crossed a beat of the track's grid. |
# Mixer and master clock
# Mixer parameters
| Path |
Type |
Range |
Default |
Access |
Description |
mixer.crossfader |
number |
0 … 1 |
0.5 |
read, write, ramp |
Crossfader position: 0 is the A side, 1 is the B side. |
mixer.curve |
string |
"smooth" / "linear" / "cut" |
"smooth" |
read, write |
Crossfader curve. |
mixer.master.volume |
gain |
-60 dB … 6 dB |
0dB |
read, write, ramp |
Master output level. |
mixer.master.limiter |
bool |
true / false |
true |
read, write |
Master peak limiter. |
mixer.master.level |
gain |
-60 dB … 6 dB |
– |
read |
Master output peak level. |
mixer.cue.mix |
number |
0 … 1 |
0 |
read, write, ramp |
Headphone blend: 0 is cue only, 1 is master only. |
mixer.cue.volume |
gain |
-60 dB … 6 dB |
0dB |
read, write, ramp |
Headphone level. |
# Channel aliases
mixer.channel.X.<name> addresses the same parameter as the deck path.
| Alias |
Same as |
mixer.channel.X.cue |
deck.X.cue |
mixer.channel.X.eq.high |
deck.X.eq.high |
mixer.channel.X.eq.low |
deck.X.eq.low |
mixer.channel.X.eq.mid |
deck.X.eq.mid |
mixer.channel.X.filter |
deck.X.filter |
mixer.channel.X.gain |
deck.X.gain |
mixer.channel.X.level |
deck.X.level |
mixer.channel.X.volume |
deck.X.volume |
# Master clock
| Path |
Type |
Range |
Default |
Access |
Description |
master.bpm |
number |
20 … 400 BPM |
120 |
read, write |
Tempo of the master clock. It follows the master deck while one is playing; writing it sets the free-running tempo. |
master.beat |
number |
– |
– |
read |
Beat counter of the master clock. |
master.bar |
number |
– |
– |
read |
Bar counter of the master clock (4 beats per bar). |
master.deck |
string |
– |
– |
read |
Letter of the deck currently driving the master clock, empty when free-running. |
# Global events
| Event |
Fires when |
on beat { … } |
Every beat of the master clock. |
on bar { … } |
Every bar of the master clock. |
on trigger(n) { … } |
Automation trigger n (1 to 16) fired from a MIDI mapping, the keyboard or the console. |
# Effects
# Racks
fx.<effect> addresses the master rack. deck.X.fx.<effect> addresses the rack of a channel. A rack holds at most one unit of each effect and eight units in total. Writing a parameter of an effect that is not in the rack adds it, switched off.
# Actions
| Action |
Arguments |
Description |
fx.<effect>.enable() |
– |
Adds the effect to the rack when needed and switches it on. |
fx.<effect>.disable() |
– |
Switches the effect off (it stays in the rack). |
fx.<effect>.toggle() |
– |
Switches the effect on or off. |
# Reverb — fx.reverb
Algorithmic room reverb (feedback comb and all-pass network).
| Path |
Type |
Range |
Default |
Access |
Description |
fx.reverb.size |
number |
0 … 1 |
0.55 |
read, write, ramp |
Room size: longer decay as it grows. |
fx.reverb.damping |
number |
0 … 1 |
0.45 |
read, write, ramp |
High-frequency absorption inside the tail. |
fx.reverb.predelay |
duration |
0 … 200 ms |
15ms |
read, write |
Gap before the first reflections. |
fx.reverb.width |
number |
0 … 1 |
1 |
read, write, ramp |
Stereo spread of the tail. |
fx.reverb.mix |
number |
0 … 1 |
0.3 |
read, write, ramp |
Wet/dry balance: 0 is dry, 1 is fully wet. |
fx.reverb.enabled |
bool |
true / false |
false |
read, write |
True while the effect is switched on. |
# Delay — fx.delay
Clean beat-synchronised stereo delay.
| Path |
Type |
Range |
Default |
Access |
Description |
fx.delay.time |
duration |
0.062 … 4 beats |
0.5beats |
read, write |
Delay length in beats. Seconds are converted with the current tempo. |
fx.delay.feedback |
number |
0 … 0.95 |
0.35 |
read, write, ramp |
Amount of the delayed signal fed back. |
fx.delay.pingpong |
bool |
true / false |
false |
read, write |
Alternate repeats between left and right. |
fx.delay.mix |
number |
0 … 1 |
0.25 |
read, write, ramp |
Wet/dry balance: 0 is dry, 1 is fully wet. |
fx.delay.enabled |
bool |
true / false |
false |
read, write |
True while the effect is switched on. |
# Echo — fx.echo
Tape-style echo: repeats get darker through a low-pass in the feedback path.
| Path |
Type |
Range |
Default |
Access |
Description |
fx.echo.time |
duration |
0.062 … 4 beats |
0.75beats |
read, write |
Echo length in beats. Seconds are converted with the current tempo. |
fx.echo.feedback |
number |
0 … 0.95 |
0.5 |
read, write, ramp |
Amount of each repeat fed back. |
fx.echo.tone |
frequency |
200 Hz … 12000 Hz |
4kHz |
read, write, ramp |
Low-pass applied to every repeat. |
fx.echo.mix |
number |
0 … 1 |
0.35 |
read, write, ramp |
Wet/dry balance: 0 is dry, 1 is fully wet. |
fx.echo.enabled |
bool |
true / false |
false |
read, write |
True while the effect is switched on. |
# Flanger — fx.flanger
Short modulated delay with feedback (jet sweep).
| Path |
Type |
Range |
Default |
Access |
Description |
fx.flanger.rate |
frequency |
0.02 Hz … 5 Hz |
0.25Hz |
read, write, ramp |
Sweep speed. |
fx.flanger.depth |
number |
0 … 1 |
0.7 |
read, write, ramp |
Sweep range. |
fx.flanger.feedback |
number |
-0.95 … 0.95 |
0.5 |
read, write, ramp |
Resonance of the comb; negative inverts it. |
fx.flanger.mix |
number |
0 … 1 |
0.5 |
read, write, ramp |
Wet/dry balance: 0 is dry, 1 is fully wet. |
fx.flanger.enabled |
bool |
true / false |
false |
read, write |
True while the effect is switched on. |
# Phaser — fx.phaser
Six-stage all-pass phaser.
| Path |
Type |
Range |
Default |
Access |
Description |
fx.phaser.rate |
frequency |
0.02 Hz … 5 Hz |
0.4Hz |
read, write, ramp |
Sweep speed. |
fx.phaser.depth |
number |
0 … 1 |
0.8 |
read, write, ramp |
Sweep range. |
fx.phaser.feedback |
number |
0 … 0.9 |
0.5 |
read, write, ramp |
Notch resonance. |
fx.phaser.mix |
number |
0 … 1 |
0.5 |
read, write, ramp |
Wet/dry balance: 0 is dry, 1 is fully wet. |
fx.phaser.enabled |
bool |
true / false |
false |
read, write |
True while the effect is switched on. |
# Chorus — fx.chorus
Three-voice stereo chorus.
| Path |
Type |
Range |
Default |
Access |
Description |
fx.chorus.rate |
frequency |
0.05 Hz … 5 Hz |
0.8Hz |
read, write, ramp |
Modulation speed. |
fx.chorus.depth |
number |
0 … 1 |
0.5 |
read, write, ramp |
Pitch modulation amount. |
fx.chorus.mix |
number |
0 … 1 |
0.5 |
read, write, ramp |
Wet/dry balance: 0 is dry, 1 is fully wet. |
fx.chorus.enabled |
bool |
true / false |
false |
read, write |
True while the effect is switched on. |
# Distortion — fx.distortion
Soft-clipping overdrive with tone control and level compensation.
| Path |
Type |
Range |
Default |
Access |
Description |
fx.distortion.drive |
gain |
0 dB … 36 dB |
12dB |
read, write, ramp |
Gain into the clipper. |
fx.distortion.tone |
frequency |
500 Hz … 16000 Hz |
8kHz |
read, write, ramp |
Low-pass after the clipper. |
fx.distortion.mix |
number |
0 … 1 |
1 |
read, write, ramp |
Wet/dry balance: 0 is dry, 1 is fully wet. |
fx.distortion.enabled |
bool |
true / false |
false |
read, write |
True while the effect is switched on. |
# Bitcrusher — fx.bitcrusher
Bit-depth and sample-rate reduction.
| Path |
Type |
Range |
Default |
Access |
Description |
fx.bitcrusher.bits |
number |
2 … 16 |
8 |
read, write, ramp |
Quantisation depth. |
fx.bitcrusher.downsample |
number |
1 … 40 |
4 |
read, write, ramp |
Sample-and-hold factor. |
fx.bitcrusher.mix |
number |
0 … 1 |
1 |
read, write, ramp |
Wet/dry balance: 0 is dry, 1 is fully wet. |
fx.bitcrusher.enabled |
bool |
true / false |
false |
read, write |
True while the effect is switched on. |
# High-pass — fx.highpass
Resonant 12 dB/octave high-pass filter.
| Path |
Type |
Range |
Default |
Access |
Description |
fx.highpass.cutoff |
frequency |
20 Hz … 20000 Hz |
200Hz |
read, write, ramp |
Corner frequency. |
fx.highpass.resonance |
number |
0.5 … 10 |
0.707 |
read, write, ramp |
Filter Q. |
fx.highpass.mix |
number |
0 … 1 |
1 |
read, write, ramp |
Wet/dry balance: 0 is dry, 1 is fully wet. |
fx.highpass.enabled |
bool |
true / false |
false |
read, write |
True while the effect is switched on. |
# Low-pass — fx.lowpass
Resonant 12 dB/octave low-pass filter.
| Path |
Type |
Range |
Default |
Access |
Description |
fx.lowpass.cutoff |
frequency |
20 Hz … 20000 Hz |
8kHz |
read, write, ramp |
Corner frequency. |
fx.lowpass.resonance |
number |
0.5 … 10 |
0.707 |
read, write, ramp |
Filter Q. |
fx.lowpass.mix |
number |
0 … 1 |
1 |
read, write, ramp |
Wet/dry balance: 0 is dry, 1 is fully wet. |
fx.lowpass.enabled |
bool |
true / false |
false |
read, write |
True while the effect is switched on. |
# Band-pass — fx.bandpass
Resonant band-pass filter.
| Path |
Type |
Range |
Default |
Access |
Description |
fx.bandpass.cutoff |
frequency |
20 Hz … 20000 Hz |
1kHz |
read, write, ramp |
Centre frequency. |
fx.bandpass.resonance |
number |
0.5 … 10 |
1.2 |
read, write, ramp |
Filter Q (narrower as it grows). |
fx.bandpass.mix |
number |
0 … 1 |
1 |
read, write, ramp |
Wet/dry balance: 0 is dry, 1 is fully wet. |
fx.bandpass.enabled |
bool |
true / false |
false |
read, write |
True while the effect is switched on. |
# Tremolo — fx.tremolo
Beat-locked amplitude modulation.
| Path |
Type |
Range |
Default |
Access |
Description |
fx.tremolo.rate |
duration |
0.031 … 4 beats |
0.25beats |
read, write |
Length of one cycle in beats. Seconds are converted with the current tempo. |
fx.tremolo.depth |
number |
0 … 1 |
0.8 |
read, write, ramp |
Modulation depth. |
fx.tremolo.shape |
number |
0 … 1 |
0 |
read, write, ramp |
0 = sine, 1 = square. |
fx.tremolo.mix |
number |
0 … 1 |
1 |
read, write, ramp |
Wet/dry balance: 0 is dry, 1 is fully wet. |
fx.tremolo.enabled |
bool |
true / false |
false |
read, write |
True while the effect is switched on. |
# Auto-pan — fx.autopan
Beat-locked left/right panning.
| Path |
Type |
Range |
Default |
Access |
Description |
fx.autopan.rate |
duration |
0.031 … 8 beats |
1beat |
read, write |
Length of one cycle in beats. Seconds are converted with the current tempo. |
fx.autopan.depth |
number |
0 … 1 |
1 |
read, write, ramp |
Pan range. |
fx.autopan.mix |
number |
0 … 1 |
1 |
read, write, ramp |
Wet/dry balance: 0 is dry, 1 is fully wet. |
fx.autopan.enabled |
bool |
true / false |
false |
read, write |
True while the effect is switched on. |
# Beat Gate — fx.gate
Rhythmic gate locked to the beat grid.
| Path |
Type |
Range |
Default |
Access |
Description |
fx.gate.rate |
duration |
0.031 … 4 beats |
0.25beats |
read, write |
Length of one gate cycle in beats. Seconds are converted with the current tempo. |
fx.gate.duty |
number |
0.05 … 0.95 |
0.5 |
read, write, ramp |
Open fraction of each cycle. |
fx.gate.depth |
number |
0 … 1 |
1 |
read, write, ramp |
Attenuation while closed. |
fx.gate.mix |
number |
0 … 1 |
1 |
read, write, ramp |
Wet/dry balance: 0 is dry, 1 is fully wet. |
fx.gate.enabled |
bool |
true / false |
false |
read, write |
True while the effect is switched on. |
# Compressor — fx.compressor
Feed-forward stereo-linked compressor.
| Path |
Type |
Range |
Default |
Access |
Description |
fx.compressor.threshold |
gain |
-60 dB … 0 dB |
-18dB |
read, write, ramp |
Level above which gain reduction starts. |
fx.compressor.ratio |
number |
1 … 20 |
4 |
read, write, ramp |
Compression ratio n:1. |
fx.compressor.attack |
duration |
0.1 … 200 ms |
10ms |
read, write |
Attack time. |
fx.compressor.release |
duration |
10 … 2000 ms |
150ms |
read, write |
Release time. |
fx.compressor.makeup |
gain |
0 dB … 24 dB |
0dB |
read, write, ramp |
Gain applied after compression. |
fx.compressor.mix |
number |
0 … 1 |
1 |
read, write, ramp |
Wet/dry balance: 0 is dry, 1 is fully wet. |
fx.compressor.enabled |
bool |
true / false |
false |
read, write |
True while the effect is switched on. |
# Limiter — fx.limiter
Look-ahead peak limiter.
| Path |
Type |
Range |
Default |
Access |
Description |
fx.limiter.ceiling |
gain |
-24 dB … 0 dB |
-1dB |
read, write, ramp |
Maximum output peak. |
fx.limiter.release |
duration |
10 … 1000 ms |
100ms |
read, write |
Recovery time. |
fx.limiter.mix |
number |
0 … 1 |
1 |
read, write, ramp |
Wet/dry balance: 0 is dry, 1 is fully wet. |
fx.limiter.enabled |
bool |
true / false |
false |
read, write |
True while the effect is switched on. |
# Beat Repeat — fx.beatrepeat
Captures the last slice and repeats it while enabled.
| Path |
Type |
Range |
Default |
Access |
Description |
fx.beatrepeat.length |
duration |
0.031 … 4 beats |
0.25beats |
read, write |
Slice length in beats. Seconds are converted with the current tempo. |
fx.beatrepeat.mix |
number |
0 … 1 |
1 |
read, write, ramp |
Wet/dry balance: 0 is dry, 1 is fully wet. |
fx.beatrepeat.enabled |
bool |
true / false |
false |
read, write |
True while the effect is switched on. |
# Noise Sweep — fx.noise
Filtered white noise added to the signal, for risers and sweeps.
| Path |
Type |
Range |
Default |
Access |
Description |
fx.noise.level |
gain |
-60 dB … 0 dB |
-18dB |
read, write, ramp |
Noise level. |
fx.noise.cutoff |
frequency |
100 Hz … 16000 Hz |
1kHz |
read, write, ramp |
Band-pass centre of the noise. |
fx.noise.resonance |
number |
0.5 … 10 |
2 |
read, write, ramp |
Sharpness of the noise band. |
fx.noise.mix |
number |
0 … 1 |
1 |
read, write, ramp |
Wet/dry balance: 0 is dry, 1 is fully wet. |
fx.noise.enabled |
bool |
true / false |
false |
read, write |
True while the effect is switched on. |
# Builtin functions
| Function |
Description |
min(a, b) -> same type |
Smaller of two values of the same type. |
max(a, b) -> same type |
Larger of two values of the same type. |
clamp(x, low, high) -> same type |
Limits x to the range low…high. |
abs(x: number) -> number |
Absolute value. |
round(x: number) -> number |
Nearest integer. |
floor(x: number) -> number |
Largest integer not above x. |
ceil(x: number) -> number |
Smallest integer not below x. |
lerp(a, b, t: number) -> same type |
Linear interpolation between a and b. |
random() -> number |
Pseudo-random number in 0…1. The sequence is the same on every run of an automation. |
len(a: array) -> number |
Number of elements of an array. |
db(x: number) -> gain |
Makes a gain from a number of decibels. |
hz(x: number) -> frequency |
Makes a frequency from a number of hertz. |
beats(x: number) -> duration |
Makes a musical duration from a number of beats. |
bars(x: number) -> duration |
Makes a musical duration from a number of bars. |
seconds(x: number) -> duration |
Makes an absolute duration from a number of seconds. |
toBeats(d: duration) -> number |
Length of a duration in beats at the current tempo. |
toSeconds(d: duration) -> number |
Length of a duration in seconds at the current tempo. |
| `toNumber(x: gain |
frequency) -> number` |
print(values…) |
Writes the values to the automation console. |
# Limits
| Limit |
Value |
| Script size |
256 KB |
| Statements per script |
20000 |
| Iterations of one loop |
10000 |
| Array length |
256 |
Shortest every period |
1/64 beat |
| Event handlers per automation |
32 |
| Operations without a wait |
20000 |
| Operations over the life of an automation |
5000000 |
| Scheduled blocks at once |
256 |
| Ramps at once |
128 |
| Commands per beat (ramps excluded) |
512 |
| Longest wait or ramp |
100000 beats |
| Function call depth |
16 |