Repository Public
1# Deck commands23> This chapter is generated from the language schema (`swift run orix-dj-bench docs`). Do not edit it by hand.45## Deck parameters and properties67Decks are `deck.A`, `deck.B`, `deck.C` and `deck.D`. A variable of type `deck` can be used in place of `deck.X`.89| Path | Type | Range | Default | Access | Description |10| --- | --- | --- | --- | --- | --- |11| `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. |12| `deck.X.gain` | gain | -24 dB … 12 dB | `0dB` | read, write, ramp | Input trim before the EQ. |13| `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). |14| `deck.X.eq.mid` | gain | -26 dB … 6 dB | `0dB` | read, write, ramp | Mid band of the channel EQ. |15| `deck.X.eq.high` | gain | -26 dB … 6 dB | `0dB` | read, write, ramp | High band of the channel EQ. |16| `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. |17| `deck.X.filter.highpass` | frequency | 20 Hz … 20000 Hz | `20Hz` | read, write, ramp | Channel high-pass corner. 20 Hz is off. |18| `deck.X.filter.lowpass` | frequency | 20 Hz … 20000 Hz | `20kHz` | read, write, ramp | Channel low-pass corner. 20 kHz is off. |19| `deck.X.filter.resonance` | number | 0.5 … 10 | `0.9` | read, write, ramp | Resonance (Q) of the channel filters. |20| `deck.X.rate` | number | 0.5 … 2 | `1` | read, write, ramp | Playback speed factor (1 = original tempo). |21| `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. |22| `deck.X.keyShift` | number | -12 … 12 st | `0` | read, write, ramp | Pitch shift in semitones, independent of tempo. |23| `deck.X.keylock` | bool | true / false | `false` | read, write | Keeps the musical key when the tempo changes (time stretching). |24| `deck.X.sync` | bool | true / false | `false` | read, write | Follows the tempo and beat phase of the master deck. |25| `deck.X.quantize` | bool | true / false | `true` | read, write | Snaps cues, loops and jumps to the beat grid. |26| `deck.X.reverse` | bool | true / false | `false` | read, write | Plays the track backwards. |27| `deck.X.cue` | bool | true / false | `false` | read, write | Sends the channel to the headphone cue bus. |28| `deck.X.trackBpm` | number | – | – | read | Analysed tempo of the loaded track at original speed (0 when unknown). |29| `deck.X.position` | duration | – | – | read | Playhead position. |30| `deck.X.remaining` | duration | – | – | read | Time left until the end of the track. |31| `deck.X.duration` | duration | – | – | read | Length of the loaded track. |32| `deck.X.beat` | number | – | – | read | Fractional beat index of the playhead on the track's beat grid. |33| `deck.X.playing` | bool | – | – | read | True while the deck is playing. |34| `deck.X.loaded` | bool | – | – | read | True when a track is loaded. |35| `deck.X.looping` | bool | – | – | read | True while a loop is active. |36| `deck.X.level` | gain | -60 dB … 6 dB | – | read | Post-fader peak level of the channel. |37| `deck.X.key` | string | – | – | read | Estimated musical key of the loaded track ("8A" notation), empty when unknown. |38| `deck.X.title` | string | – | – | read | Title of the loaded track. |3940## Deck actions4142| Action | Arguments | Description |43| --- | --- | --- |44| `deck.X.play()` | – | Starts playback (on the next beat of the master clock when quantize and sync are on). |45| `deck.X.pause()` | – | Pauses playback. |46| `deck.X.toggle()` | – | Plays when paused, pauses when playing. |47| `deck.X.stop()` | – | Pauses and returns to the start of the track. |48| `deck.X.cue()` | – | Jumps to the cue point and pauses. |49| `deck.X.setCue()` | – | Stores the current position as the cue point. |50| `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. |51| `deck.X.jump(amount: duration)` | `amount`: duration. Signed distance, e.g. 4beats or -1bar. | Beat jump relative to the playhead. |52| `deck.X.loop(length: duration)` | `length`: duration. Loop length, e.g. 4beats. | Starts a loop of the given length at the playhead. |53| `deck.X.loopIn()` | – | Marks the loop start at the playhead. |54| `deck.X.loopOut()` | – | Marks the loop end at the playhead and starts looping. |55| `deck.X.loopExit()` | – | Leaves the active loop. |56| `deck.X.reloop()` | – | Re-enters the last loop. |57| `deck.X.loopHalve()` | – | Halves the active loop length. |58| `deck.X.loopDouble()` | – | Doubles the active loop length. |59| `deck.X.hotcue(index: number)` | `index`: number. 1 to 8. | Jumps to a hot cue and plays. |60| `deck.X.setHotcue(index: number)` | `index`: number. 1 to 8. | Stores the playhead in a hot cue. |61| `deck.X.clearHotcue(index: number)` | `index`: number. 1 to 8. | Deletes a hot cue. |62| `deck.X.sync(on: bool?)` | `on`: bool (optional). Defaults to true. | Turns tempo and phase sync on or off. |63| `deck.X.brake(length: duration?)` | `length`: duration (optional). Time to stop, default 1beat. | Tape-stop: slows the deck to a halt, then pauses. |64| `deck.X.load(title: string)` | `title`: string. Title, or part of it, of a library track. | Loads the best matching library track. |65| `deck.X.loadNext()` | – | Loads the next track of the Auto DJ queue. |66| `deck.X.eject()` | – | Unloads the track (only while paused). |6768## Deck events6970| Event | Fires when |71| --- | --- |72| `on deck.X.trackEnd { … }` | The playhead reached the end of the track. |73| `on deck.X.play { … }` | The deck started playing. |74| `on deck.X.pause { … }` | The deck paused. |75| `on deck.X.loaded { … }` | A track finished loading. |76| `on deck.X.beat { … }` | The playhead crossed a beat of the track's grid. |77