Repository navigation
Beat Tempo TimeLine
The system functions to handle global events related to tempo changes are
BeatChanged
TempoChanged
Timeline
| Event | Type of Message | GiG | Global | Current | Scriptlet | Song |
|---|---|---|---|---|---|---|
| TempoChanged | SystemEvent | N | N | Y | N | N |
| BeatChanged | SystemEvent | Y | Y | Y | N | Y |
| Timeline | SystemEvent | Y | Y | Y | N | Y |
TempoChanged
Raise an event when the BPM has changed
/******************************************************
//
// Rackspace Script
//
******************************************************/
//Allowed in rackspace script only
On TempoChanged(newBPM : double )
Print ("Rack TempoChanged BPM -> " + newBPM)
End
BeatChanged
This is a simple callback that is triggered on every beat.
it is useful for simple operations such as doing something on every bar or on every 4th bar etc.
While this callback has historically been used to create more sophisticated timeline events, we now recommend the new On Timeline
callback which is much more efficient for tying events to particular bar/beat pair and
does not require any testing to see determine the current bar or beat.
******************************************************
//
// Global Script
//
******************************************************/
Var
wBar : Widget
wBeat: widget
//Call every time the beat is changed
On BeatChanged(barNumber : Integer , BeatNumber : Integer)
Print ("Global BeatChanged Bar -> " + barNumber)
Print ("Global BeatChanged BeatNumber -> " + BeatNumber)
// Update widgets caption label
SetWidgetLabel(wBar, barNumber)
SetWidgetLabel(wBeat, BeatNumber)
End

TimeLine
This callback should generally be used instead of the On BeatChanged callback,
particularly if you want to construct a long timeline as, rather than having to use
IF THEN tests to determine the current bar (and actions),
this callback is optimized so that the appropriate actions will be called
in constant time without the need for user tests.
/******************************************************
//
// Rackspace Script
//
******************************************************/
// This callback should generally be used instead of the On BeatChanged callback,
On Timeline
Prolog
Print("Prolog :This optional code gets executed before the code for the specific beat is triggered")
End
1:1
Print("Timeline Playhead just started")
2:2
Print("Timeline We are at bar 2 beat 2")
3:4
Print("We Are at Bar 4 Beat 4 ")
Epilog
Print("Epilog :This optional code gets executed after the code for the specific beat is triggered")
End
End
