Repository Public
1# Quick Start23This chapter gets you from nothing to a working automation in a few minutes. It assumes a track is playing on deck A and another one is loaded on deck B.45## 1. Try one line in the console67The console runs ORIX Script one line at a time. Type a parameter path to read it, or an assignment to change it.89```console10> deck.A.volume110 dB12> deck.A.volume = -8dB13OK14> deck.A.volume15-8 dB16> deck.A.volume = 0dB17OK18```1920A path is the address of a control. `deck.A.volume` is the channel fader of deck A; `mixer.crossfader` is the crossfader; `fx.echo.mix` is the wet/dry knob of the echo in the master rack.2122Actions are written with parentheses:2324```console25> deck.B.play()26OK27> deck.B.pause()28OK29```3031Ask the console about any path:3233```console34> help deck.A.filter.highpass35deck.A.filter.highpass: frequency36Channel high-pass corner. 20 Hz is off.37Range: 20 Hz … 20000 Hz38Default: 20 Hz39```4041## 2. Write a script4243A script puts statements inside an automation. The name in quotes is how you start it later.4445```orixdj46automation "My First Fade" {47 over 4 bars {48 deck.A.volume -> -60dB49 }50 deck.A.pause()51 deck.A.volume = 0dB52}53```5455Three ideas are enough to read it:5657| You write | It means |58| --- | --- |59| `path = value` | Set the control now. |60| `path -> value` inside `over` | Move the control smoothly to the value during the `over` time. |61| `path()` | Do the action now. |6263Statements run in order. `over 4 bars { … }` takes four bars, so `deck.A.pause()` happens four bars after the start.6465## 3. Start on the bar6667Add `quantize bar` after the name and the automation waits for the next bar line of the master clock before it does anything. You can then start it a little early and it still lands on the one.6869```orixdj70automation "Fade On The Bar" quantize bar {71 over 4 bars { deck.A.volume -> -60dB }72 deck.A.pause()73 deck.A.volume = 0dB74}75```7677## 4. Wait7879`wait` lets time pass. Durations are written the way you would say them.8081```orixdj82deck.A.eq.low = -26dB83wait 2 bars84deck.A.eq.low = 0dB85```8687| Duration | Meaning |88| --- | --- |89| `1beat`, `4 beats` | Beats of the master clock. |90| `1bar`, `8 bars` | Bars; one bar is 4 beats. |91| `1/2beat`, `3/4beat` | A fraction of a beat. |92| `500ms`, `2s`, `1min` | Clock time; converted to beats with the current tempo. |9394## 5. Use an effect9596Effects in the master rack are `fx.<name>`; effects on a channel are `deck.X.fx.<name>`. Set the parameters, switch the effect on with `enable()`, and switch it off with `disable()` when you are done.9798```orixdj99fx.echo.time = 3/4beat100fx.echo.feedback = 0.5101fx.echo.mix = 0.4102fx.echo.enable()103wait 2 bars104fx.echo.disable()105```106107## 6. Run it108109- From the console, `run "My First Fade"` starts a saved automation (or a preset) by name.110- `status` shows what is running; `stop` stops everything that is running.111- `panic` is the emergency stop: every automation stops and every effect is bypassed. The decks keep playing.112113```console114> run "Filter Sweep"115Automation scheduled (run 1)116> stop117Stopped 1 automation118```119120## 7. When something is wrong121122The compiler refuses a script that contains a mistake, and tells you where and why.123124```orixdj-error125deck.A.volum = -6dB126```127128```text129Unknown deck parameter 'volum' in 'deck.A.volum'. Did you mean 'volume'? [E-PATH]130```131132Nothing has run at that point. Correct the line and try again. Every code is explained in [Error Handling](errors.md).133134## Cheat sheet135136```orixdj137automation "Cheat Sheet" quantize bar {138 // set, read, act139 deck.B.volume = -6dB140 let tempo = master.bpm141 deck.B.play()142143 // wait and ramp144 wait 1 bar145 over 2 bars curve smooth { mixer.crossfader -> 1 }146147 // decide148 if deck.A.playing {149 deck.A.pause()150 }151152 // repeat153 repeat 4 {154 deck.B.eq.high = -12dB155 wait 1/2beat156 deck.B.eq.high = 0dB157 wait 1/2beat158 }159160 // schedule at a position, counted from the start of the automation161 at bar 6 { mixer.crossfader = 0.5 }162163 print("tempo was", tempo)164}165```166167## Related168169- [First Automation](first-automation.md)170- [Timing](timing.md)171- [Console Usage](console.md)172- [Deck Commands](deck-api.md)173- [Effects Commands](effects-api.md)174- [Examples](examples/README.md)175