Repository Public
1# Console Usage23The console is a command line for the live rig. Type a line, press Return, and it acts on the decks, the mixer and the effects at once. It accepts two kinds of input: ORIX Script, and a small set of console commands.45## Script lines67Any statement that is valid inside an automation can be typed in the console.89```console10> deck.B.volume = -8dB11OK12> deck.B.play()13OK14> fx.echo.enable()15OK16> fx.echo.disable()17OK18```1920`OK` means the line was compiled and executed completely, without printing anything.2122### Reading values2324A line that is only an expression prints its value. This is the quickest way to look at the state of the rig.2526```console27> deck.B.volume28-8 dB29> master.bpm3012831> deck.A.playing32true33> deck.A.remaining34240 s35> master.deck36A37> 4 bars + 2 beats3818 beats39> min(3, 4) + 140441> toSeconds(8 bars)421543```4445A call to a builtin or to a value function typed alone prints its result, like any other expression.4647`print(…)` works too and can show several values:4849```console50> print("A:", deck.A.bpm, "B:", deck.B.bpm)51A: 128 B: 12852```5354### Lines that take time5556A line may contain timing statements. If it is not finished at once, the console answers `Automation scheduled` with a run number, and the line carries on as a running automation named `console`.5758```console59> over 4 bars { deck.A.filter.highpass -> 2kHz }60Automation scheduled (run 3)61> wait nextBar; deck.B.play()62Automation scheduled (run 4)63> at nextBar { deck.A.filter.highpass = 20Hz }64Automation scheduled (run 5)65```6667Several statements can be written on one line separated by semicolons, and blocks can be written on one line with braces.6869```console70> deck.B.sync(true); deck.B.volume = -60dB; deck.B.play()71OK72> repeat 4 { deck.A.eq.high = -26dB; wait 1/2beat; deck.A.eq.high = 0dB; wait 1/2beat }73Automation scheduled (run 6)74> if deck.B.playing { print("B is playing") } else { print("B is paused") }75B is playing76```7778### What is different from a script file7980- **Each line is its own automation.** A variable declared on one line does not exist on the next. Put everything that belongs together on one line, or save a script.81- **No quantizing.** A console line starts immediately. Use `wait nextBar` or `at nextBar { … }` to land on the grid.82- **`fn` and `automation` cannot be usefully typed in the console.** Write them in a script and start it with `run`.83- **Some words are commands first.** A line that begins with one of the command words below is taken as that command, not as script. In particular `stop` typed alone is the console command that stops running automations, and `fx` typed alone lists the racks. A script line that starts with `fx.` (for example `fx.echo.enable()`) is still script, because the word is followed by a dot.8485### Errors8687A line with a mistake is refused and nothing runs. The console shows the message and the code.8889For example, typing `deck.Z.play()` and then `deck.A.volume = 20Hz` gives:9091```text92Unknown deck 'Z'. Decks are A, B, C and D. [E-DECK]93'deck.A.volume' expects gain, not frequency. Write a gain such as -6dB. [E-TYPE]94```9596An error that occurs while the line runs is shown the same way:9798```console99> deck.A.eject()100Deck A is playing; pause it before ejecting. [E-ACTION]101```102103Warnings produced while the line runs are shown as information lines.104105## Console commands106107| Command | What it does |108| --- | --- |109| `help` | Lists the console commands. |110| `help <path>` | Shows the reference entry for a path, an action, an event, an effect or a builtin function. |111| `list` | Lists the saved automations, then the bundled presets. |112| `run "Name"` | Compiles and starts a saved automation or a preset. |113| `stop` | Stops every running automation. |114| `stop all` | The same. |115| `stop "Name"` | Stops the running automations with that name. |116| `pause` | Freezes every running automation. |117| `pause "Name"` | Freezes the running automations with that name. |118| `resume`, `resume "Name"` | Resumes paused automations. |119| `status` | Shows the master clock and the running automations. |120| `decks` | Shows the state of every deck. |121| `fx` | Shows the effects in every rack. |122| `trigger <n>` | Fires automation trigger n (1 to 16). |123| `panic` | Emergency stop: stops every automation and bypasses every effect. |124| `clear` | Clears the console. |125| `version` | Shows the ORIX Script version. |126127Command words are not case-sensitive. The quotes around a name are optional.128129### `help`130131```console132> help deck.A.volume133deck.A.volume: gain134Channel fader. -60 dB is silence. A plain number or percentage is taken as a linear fader position.135Range: -60 dB … 0 dB136Default: 0 dB137> help deck.A.loop138deck.A.loop(length: duration)139Starts a loop of the given length at the playhead.140 length: Loop length, e.g. 4beats.141> help fx.delay142Delay: Clean beat-synchronised stereo delay.143Parameters: time, feedback, pingpong, mix, enabled144Actions: enable(), disable(), toggle()145> help lerp146lerp(a, b, t: number) -> same type147Linear interpolation between a and b.148```149150A topic that is not in the reference gives an error line:151152```console153> help deck.A.wobble154No reference entry for 'deck.A.wobble'. Try a path such as deck.A.volume or fx.delay.155```156157### `list` and `run`158159```console160> list161My Bass Swap162Eight Bar Transition163Bass Swap164Harmonic Transition165> run "My Bass Swap"166Automation scheduled (run 7)167```168169`list` shows your saved automations first, then the presets that you have not replaced by a script of the same name (the transcript above is shortened).170171`run` compiles the script before starting it. If it does not compile, nothing runs and the first errors are shown with their line:172173```text174line 4: Unknown deck parameter 'volum' in 'deck.A.volum'. Did you mean 'volume'? [E-PATH]175```176177If the saved script contains several automations, `run "Name"` starts the automation of that name when there is one, and otherwise the first automation of the file. An unknown name gives:178179```console180> run "No Such Thing"181No saved automation named "No Such Thing". Type 'list' to see them.182```183184An automation started with `run` respects its own `quantize` setting.185186### `status`187188```console189> status190Clock: beat 412.25, 128.00 BPM, master deck A191#7 "My Bass Swap" running, beat 6.2 of 32, 1 pending, 1 ramps192> stop "My Bass Swap"193Stopped 1 automation194> status195Clock: beat 431.50, 128.00 BPM, master deck A196No automation is running.197```198199For each automation: its run number, name and state (running or paused), its position in beats (and its total length when the compiler could determine it), the number of pending tasks and the number of active ramps. When no deck drives the clock, the first line ends with `master free-running`.200201### `decks` and `fx`202203```console204> decks205Deck A: playing "Night Drive" 62.4 s / 301.0 s, 128.00 BPM, master206Deck B: paused "Solar Wind" 0.0 s / 284.6 s, 126.00 BPM, sync207Deck C: empty208Deck D: empty209> fx210Master: echo → reverb (on)211Deck A: gate212```213214`fx` lists each rack that contains effects, in chain order, with `(on)` after those that are switched on. With nothing in any rack it prints `Every rack is empty.`215216### `trigger`217218```console219> trigger 1220Trigger 1 fired221```222223This is the same as hitting a pad mapped to "Automation trigger 1". Every running automation that has an `on trigger(1)` handler runs it. If no automation is listening, nothing happens. See [MIDI Integration](midi.md).224225### `pause`, `resume`, `stop`226227```console228> pause229Paused230> resume231Resumed232> stop233Stopped 2 automations234```235236Stopping does not put controls back. See [Automation Scheduling](scheduling.md).237238### `panic`239240```console241> panic242Emergency stop: automations stopped, effects bypassed243```244245Every automation stops and every effect in every rack is bypassed. Decks keep playing; faders, EQ and filters are not touched.246247## Recipes248249Check that a transition can start:250251```console252> print(deck.A.playing, deck.B.loaded, deck.B.playing, deck.B.trackBpm)253true true false 126254```255256A one-line fade-out on the next bar:257258```console259> wait nextBar; over 4 bars { deck.A.volume -> -60dB }; deck.A.pause(); deck.A.volume = 0dB260Automation scheduled (run 8)261```262263A quick echo throw:264265```console266> fx.echo.mix = 0.7; fx.echo.enable(); wait 1 beat; fx.echo.mix = 0; wait 2 bars; fx.echo.disable()267Automation scheduled (run 9)268```269270Put a channel back after an interrupted script:271272```console273> deck.A.volume = 0dB; deck.A.eq.low = 0dB; deck.A.eq.mid = 0dB; deck.A.eq.high = 0dB; deck.A.filter.highpass = 20Hz; deck.A.filter.lowpass = 20kHz274OK275```276277How many bars are left on deck A:278279```console280> print(floor(toBeats(deck.A.remaining) / 4))281112282```283284## Related285286- [Quick Start](quickstart.md)287- [Automation Scheduling](scheduling.md)288- [Debugging](debugger.md)289- [Error Handling](errors.md)290- [MIDI Integration](midi.md)291- [Complete API Reference](api-reference.md)292