Automatic start of a midi file

Check this out
SwitchPart.gig (24.9 KB)

Load the gig
Switch to SetList Mode
The 1st Song Part should be selected
Press Global Play
And when you press the widget then the next part is selected by the next 1st beat.

And this is the script used:

//$<AutoDeclare>
// DO NOT EDIT THIS SECTION MANUALLY
Var
   NPART : Widget
   SwitchPart : Boolean
//$</AutoDeclare>

initialization
 SwitchPart = false
end

// Called when a single widget value has changed
On WidgetValueChanged(newValue : double) from NPART
 if newValue == 1.0 then
   SwitchPart = true
 end  
End

// Called when beat changes
// Only beat number is valid for now
On BeatChanged(bar : integer, beat : integer)
 if beat == 1 and SwitchPart == true then
    SongNextPart()
    SwitchPart = false
 end   
end