Crossfader Chop
A transformer-style cut between two decks: for two bars the crossfader jumps between the A side and the B side on a sixteenth-note pattern written as an array of 0 and 1. The crossfader position and curve are remembered and put back. It shows reading settings into let, a text parameter, and a pattern loop.
The script
automation "Crossfader Chop" quantize bar {
// 1 = deck B audible, 0 = deck A audible. Sixteen steps of a quarter beat = one bar.
let pattern = [0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1]
let home = mixer.crossfader
let homeCurve = mixer.curve
if not deck.B.loaded {
print("Load a track on deck B first.")
stop
}
if not deck.B.playing {
deck.B.sync(true)
deck.B.play()
}
mixer.curve = "cut"
repeat 2 {
for side in pattern {
mixer.crossfader = side
wait 1/4beat
}
}
mixer.crossfader = home
mixer.curve = homeCurve
}What happens, bar by bar
| Position | What happens |
|---|---|
| Before bar 1 | The automation waits for the next bar line. If deck B is empty it prints a message and stops. |
| Bar 1, beat 1 | The crossfader position and curve are remembered. If deck B is not playing, it is synced and started. The crossfader curve is set to "cut". |
| Bars 1 and 2 | Every quarter beat the crossfader goes to the side given by the pattern: 0 is the A side, 1 is the B side. The sixteen-step pattern is played twice. |
| Bar 3, beat 1 | The crossfader returns to where it was and the curve is restored. The automation finishes. |
When to use it
When two tracks are playing in sync and you want to tease the incoming one, or as a fill at the end of a phrase. It needs both decks on opposite sides of the crossfader.
Check before running it live
- Deck A is assigned to the A side of the crossfader and deck B to the B side, with both channel faders up.
- Deck B is loaded. If it is not playing, the script starts it at its current position: cue it first.
- Both tracks have an analysed tempo so that they stay in time.
- You are happy for the crossfader to end where it was at the start, typically on the A side or in the centre.
Notes and variations
With the "cut" curve, a deck is fully on or fully off at the ends of the crossfader, so the jumps are clean cuts. The previous curve is read with mixer.curve and restored at the end.
The pattern is easier to edit when written in groups of four, one group per beat. Extra spaces inside an array are ignored.
If you move the crossfader by hand during the two bars, the script overrides it at the next step.
To cut the fader of one deck instead of switching between two, see the preset "Stutter Cut".