Performance Pads
One automation that stays alive for the whole set and gives three pads a job. Pad 1 throws a beat into the echo. Pad 2 plays a one-bar loop roll starting on the next beat. Pad 16 tidies up and ends the automation. It shows trigger handlers, a busy flag, and getting onto the grid from an unquantized event.
The script
automation "Performance Pads" {
var rolling = false
// Pad 1: echo throw of one beat on the master.
on trigger(1) {
fx.echo.time = 1/2beat
fx.echo.feedback = 0.65
fx.echo.mix = 0.75
fx.echo.enable()
wait 1 beat
fx.echo.mix = 0
wait 2 bars
fx.echo.disable()
}
// Pad 2: loop roll on deck A, starting on the next beat, for one bar.
on trigger(2) {
if not rolling {
rolling = true
wait nextBeat
deck.A.loop(1 beat)
wait 2 beats
deck.A.loopHalve()
wait 1 beat
deck.A.loopHalve()
wait 1 beat
deck.A.loopExit()
rolling = false
}
}
// Pad 16: tidy up and quit.
on trigger(16) {
fx.echo.disable()
if deck.A.looping { deck.A.loopExit() }
stop
}
}What happens, bar by bar
| Position | What happens |
|---|---|
| Start | Three handlers are registered. The automation waits. |
| Trigger 1 | At once: the master echo is set to half a beat with feedback 0.65 and mix 0.75, and switched on. One beat later the mix returns to 0 so that nothing new enters the echo; the repeats die away for two bars; the echo is switched off. |
| Trigger 2 | If no roll is in progress: wait for the next beat, start a one-beat loop on deck A, halve it after two beats and again after one more, leave the loop one beat later. The roll occupies four beats. |
| Trigger 2 during a roll | Ignored, because rolling is true. |
| Trigger 16 | The echo is switched off, a loop on deck A is released if there is one, and the automation stops. |
When to use it
For live performance with a pad controller: start it at the beginning of the set and play the pads. It is also a template: replace the bodies of the handlers with your own moves.
Check before running it live
- Three controls are mapped to the targets
automation.trigger.1,automation.trigger.2andautomation.trigger.16(or usetrigger 1in the console to rehearse). - Deck A is the deck you want to roll, it is playing, and its track has a beat grid.
- The master echo is free to be reconfigured.
- The automation is running before you hit the pads: triggers fired earlier are lost.
Notes and variations
A trigger is handled a few milliseconds after the press, wherever that falls in the bar. The echo throw is meant to be played by ear, so it acts at once. The loop roll must be on the grid, so it starts with wait nextBeat.
Hitting pad 1 again while the echo of a previous throw is still decaying starts a second run of the handler. Both runs write the same controls; the earlier run switches the echo off two bars after its throw, which may cut the later one short. Add a busy flag, as for pad 2, if that bothers you.
After a loop roll the track continues from the loop, so it ends up some beats behind where it would have been.
The automation never ends by itself. Pad 16, stop "Performance Pads" or the emergency stop end it.