Repository Public
1# Hot Cue Juggle23A classic build made with one hot cue: the script stores the position at the start of a bar, lets the bar play once, then jumps back to it on every beat, every half beat and every quarter beat, leaves a gap of silence, and releases. It uses `every` three times and shows why the hot cue is set before it is used.45## The script67```orixdj8automation "Hot Cue Juggle" quantize bar {9 let pad = 8 // hot cue used by this routine (it is overwritten)1011 // Bar 1, beat 1: remember this spot.12 deck.A.setHotcue(pad)1314 // Bar 1: let the phrase play once.15 wait 1 bar1617 // Bar 2: back to the spot on every beat.18 every 1 beat for 1 bar { deck.A.hotcue(pad) }1920 // Bar 3: on every half beat.21 every 1/2beat for 1 bar { deck.A.hotcue(pad) }2223 // Bar 4: on every quarter beat for two beats, then a two-beat gap of silence.24 every 1/4beat for 2 beats { deck.A.hotcue(pad) }25 deck.A.volume = -60dB26 wait 2 beats2728 // Bar 5: release from the spot, at full level.29 deck.A.volume = 0dB30 deck.A.hotcue(pad)31 deck.A.clearHotcue(pad)32}33```3435## What happens, bar by bar3637| Position | What happens |38| --- | --- |39| Before bar 1 | The automation waits for the next bar line. |40| Bar 1, beat 1 | Hot cue 8 is stored at the playhead. |41| Bar 1 | The track plays normally. |42| Bar 2 | On every beat, the playhead jumps back to the hot cue: the first beat of the phrase repeats four times. |43| Bar 3 | The same on every half beat: eight repeats. |44| Bar 4, beats 1 and 2 | The same on every quarter beat: eight repeats in two beats. |45| Bar 4, beats 3 and 4 | The fader of deck A is closed: two beats of silence. |46| Bar 5, beat 1 | The fader opens, the track restarts from the hot cue, and hot cue 8 is cleared. The automation finishes. |4748## When to use it4950As a build into a drop or a phrase change when the track itself has none. Start it one bar before a strong, recognisable beat, typically a kick with a vocal stab: that beat is what gets repeated.5152## Check before running it live5354- Deck A is playing and audible with its fader at 0 dB (the script sets it to 0 dB at the end).55- Hot cue 8 holds nothing you need: it is overwritten and then cleared.56- `deck.A.quantize` is on, so the stored position snaps to the beat.57- The track continues from the hot cue afterwards, four bars behind where it would have been. If deck A is the master deck, the clock keeps counting forward.5859## Notes and variations6061`deck.A.hotcue(pad)` fails with `E-ACTION` if the hot cue is not set. That is why the script stores it itself with `setHotcue` first, and why the number is a constant used everywhere.6263Each `every` loop makes its jumps on a fixed grid and then leaves the cursor at the end of its length, so the three sections follow each other without any arithmetic.6465To keep the hot cue for later, delete the `clearHotcue` line. To retrigger without silence, delete the two `volume` lines and the `wait 2 beats`, and lengthen the last `every` to `1 bar`.6667## Related6869- [Loops](../loops.md)70- [Deck Commands](../deck-api.md)71- [Error Handling](../errors.md)72- [Examples](README.md)73