SPB Git

Repository Public

deck-api.md 5.9 KB

# Deck commands

This chapter is generated from the language schema (swift run orix-dj-bench docs). Do not edit it by hand.

# 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.
Files main
Menu

Theme