SPB Git

Repository Public

build-and-drop-swap.md 3.8 KB

# Build And Drop Swap

A complete drop swap: deck A builds for eight bars with a rising high-pass and a noise riser, tightens into a loop roll in the last two bars, goes silent for one beat, and deck B takes the drop. It is the example to study for at: four blocks are scheduled first and fire while one long ramp runs.

# The script

orixdj
automation "Build And Drop Swap" quantize bar {
    if not deck.B.loaded or deck.B.playing {
        print("Deck B must be loaded, paused and cued on its drop.")
        stop
    }

    deck.B.sync(true)
    deck.B.volume = 0dB

    fx.noise.level = -60dB
    fx.noise.cutoff = 500Hz
    fx.noise.enable()

    // Scheduled first, so that they overlap the ramp below.
    at bar 7 { deck.A.loop(1 beat) }               // bar 7: one-beat roll
    at bar 8 { deck.A.loopHalve() }                // bar 8: half-beat roll
    at beat 31 { deck.A.loopHalve() }              // last two beats: quarter-beat roll
    at beat 32 { deck.A.volume = -60dB }           // last beat: silence before the drop

    // Bars 1-8: the build.
    over 8 bars curve exp {
        deck.A.filter.highpass -> 1200Hz
        fx.noise.level -> -12dB
        fx.noise.cutoff -> 10kHz
    }

    // Bar 9: the drop belongs to deck B.
    deck.B.play()
    fx.noise.disable()
    deck.A.pause()
    deck.A.loopExit()
    deck.A.filter.highpass = 20Hz
    deck.A.volume = 0dB
}

# What happens, bar by bar

Position What happens
Before bar 1 The automation waits for the next bar line. If deck B is empty or already playing it prints a message and stops.
Bar 1, beat 1 Deck B is synced and its fader opened, but it is not started. The noise effect of the master rack is switched on, silent. Four blocks are scheduled. The eight-bar ramp starts.
Bars 1 to 8 With the exp curve, slow for a long time and very fast at the end: deck A's high-pass rises towards 1.2 kHz, the noise rises towards -12 dB and its band moves from 500 Hz towards 10 kHz.
Bar 7, beat 1 Deck A starts a one-beat loop.
Bar 8, beat 1 The loop is halved: half a beat.
Bar 8, beat 3 Halved again: a quarter beat.
Bar 8, beat 4 Deck A's fader closes. The noise riser plays alone for the last beat.
Bar 9, beat 1 Deck B starts on its drop. The noise is switched off. Deck A is paused, its loop released, its high-pass and fader restored. The automation finishes.

# When to use it

To move from one track to another at a drop rather than through a blend. Start it eight bars before the point where the drop should hit.

# Check before running it live

  • Deck A is playing, with a beat grid, and no loop you want to keep.
  • Deck B is loaded, paused, and cued exactly on the first beat of its drop.
  • Both tracks have an analysed tempo.
  • Deck A's high-pass is at 20 Hz; the ramp starts from wherever it is.
  • The master noise effect is free to be reconfigured, and the master rack has room for it.

# Notes and variations

The four at statements are written before the over block on purpose. at does not move the cursor, so all of them are read at the start, and the ramp then begins at the start too. Written after the ramp, they would all be in the past and run at once on bar 9.

Positions count from 1: at bar 7 is 24 beats in, at beat 31 is the third beat of bar 8, at beat 32 is the last beat before the drop.

Everything after the over block happens on the same beat, in the order written: deck B starts first, then deck A is cleaned up. Because deck A's fader was closed one beat earlier, restoring its controls after pause() is inaudible.

Deck B starts in phase with the master clock because it is synced and its quantize is on.

Files main
Menu

Theme