SPB Git

Repository Public

sidechain-pump.md 2.6 KB

# Sidechain Pump

Imitates the pumping of a sidechain compressor with the channel fader: on every beat the level of deck A drops by 9 dB and recovers over three quarters of a beat. It shows every with a ramp in its body, gain arithmetic, and bars(…) to build a duration from a number.

# The script

orixdj
automation "Sidechain Pump" quantize bar {
    let depth = -9dB          // how far the level ducks on each beat
    let barCount = 8          // how long the pump lasts

    let rest = deck.A.volume  // the level to come back to
    every 1 beat for bars(barCount) {
        deck.A.volume = max(rest + depth, -60dB)
        over 3/4beat curve easeOut { deck.A.volume -> rest }
    }
    deck.A.volume = rest
}

# What happens, bar by bar

Position What happens
Before bar 1 The automation waits for the next bar line.
Bar 1, beat 1 The current fader level of deck A is remembered as the level to return to.
Every beat, for eight bars The fader drops to 9 dB below that level, then rises back with an easeOut curve over three quarters of a beat, and rests for the last quarter.
Bar 9, beat 1 The fader is set to the remembered level. The automation finishes.

# When to use it

On a sustained layer (pads, an acapella, a long breakdown) to give it movement in time with the kick of another deck. On a track with its own kick it weakens every beat, which is rarely what you want.

# Check before running it live

  • The deck to pump is playing; change deck.A to the deck that carries the layer.
  • Its fader is where you want the top of the pump to be.
  • The master clock is driven by the track that has the kick, so that the ducks fall on the beats.
  • Nothing else is moving that fader.

# Notes and variations

rest + depth adds two gains: with the fader at 0 dB and a depth of -9 dB the duck goes to -9 dB. max(…, -60dB) keeps the result inside the fader's range when the fader is already low.

The body of every takes three quarters of a beat, less than the period of one beat, so each turn starts exactly on the grid. If the ramp were as long as the period or longer, turns would start late; see Loops.

Each beat costs one write and one ramp: 32 writes in eight bars. Ramp updates are not counted in the command limit.

For a deeper or shallower pump change depth; for a longer recovery use 7/8beat; for a pump on the off-beat, add wait 1/2beat before the every loop.

Files main
Menu

Theme