SPB Git

Repository Public

end-of-set-fade.md 2.8 KB 67 lines markdown

1# End Of Set Fade23Ends a set: over sixteen bars the master volume falls to silence while a large reverb grows, then every playing deck is paused, the reverb is removed and the master volume is put back, so that the next thing you play is heard normally. It shows the master volume, a loop over the four decks, and why the restore happens only after the decks have stopped.45## The script67```orixdj8automation "End Of Set Fade" quantize bar {9    let length = 16 bars10    let before = mixer.master.volume1112    fx.reverb.size = 0.913    fx.reverb.mix = 014    fx.reverb.enable()1516    // Bars 1-16: the room grows while the level falls.17    over length curve easeIn {18        mixer.master.volume -> -60dB19        fx.reverb.mix -> 0.520    }2122    // Bar 17: everything is silent; stop the decks and put the master back.23    for d in [deck.A, deck.B, deck.C, deck.D] {24        if d.playing { d.pause() }25    }26    fx.reverb.mix = 027    fx.reverb.disable()28    mixer.master.volume = before29}30```3132## What happens, bar by bar3334| Position | What happens |35| --- | --- |36| Before bar 1 | The automation waits for the next bar line. |37| Bar 1, beat 1 | The master volume is remembered. The master reverb is set to a large room, mix 0, and switched on. |38| Bars 1 to 16 | With the `easeIn` curve, the master volume falls to -60 dB and the reverb mix rises to 0.5. The fade is gentle for the first half and steeper at the end. |39| Bar 17, beat 1 | Each of the four decks is paused if it is playing. The reverb mix is set to 0 and the reverb switched off. The master volume returns to its previous value. The automation finishes. |4041## When to use it4243At the very end of a set, or before handing over to another DJ on other equipment. Not for transitions: it silences everything.4445## Check before running it live4647- You really want silence: every deck that is playing will be paused.48- The master reverb is free to be reconfigured.49- Nothing else is automating the master volume.50- If you stop the automation halfway, the master volume stays down. Type `mixer.master.volume = 0dB` in the console, or move the control.5152## Notes and variations5354The order at bar 17 matters: the decks are paused *before* the master volume is restored. The other way round, the music would come back at full level for an instant.5556`for d in [deck.A, deck.B, deck.C, deck.D]` loops over deck values; inside the loop `d.playing` and `d.pause()` address each deck in turn. An empty deck is not playing, so it is skipped.5758This script changes the master volume, one of the things worth looking for when you read a script you did not write; see [Security Model](../security.md).5960## Related6162- [Mixer Commands](../mixer-api.md)63- [Loops](../loops.md)64- [Security Model](../security.md)65- [Automation Scheduling](../scheduling.md)66- [Examples](README.md)67
Files main
Menu

Theme