
' ----------------------------------------------
'  Commands to Theremino_MidiPlayer
' ----------------------------------------------

Variable Numeric Slot_Commands = 80
Variable Numeric Slot_Responses = 81

Button 1 Label "Start"
Button 2 Label "Stop"
Button 3 Label Continue

Button 5 Label SyncMode ON
Button 6 Label SyncMode OFF

Stop


' =============================================================
'  SEND COMMAND (default timeout = 0.5 Sec)
' =============================================================
Label SendCommand
	Variable Numeric SC1       '<-- Parameter Destinat.-Slot
	Variable String  SC2       '<-- Parameter Command-String
	Variable Numeric SC3 = 0.5 '<-- The timeout in seconds
	Variable Numeric SC4
	SlotText SC1 = SC2
	For SC4 = 0.1 To SC3 Step 0.1
		If SlotText(SC1) = ""
			Exit
		EndIf
		Wait Seconds 0.1
	Next
Return

Label Start
	SendCommand(Slot_Commands)("Start")
Return
Label Stop
	SendCommand(Slot_Commands)("Stop")
Return
Label Continue
	SendCommand(Slot_Commands)("Continue")
Return

Label SyncMode ON
	SendCommand(Slot_Commands)("SyncModeON")
Return
Label SyncMode OFF
	SendCommand(Slot_Commands)("SyncModeOFF")
Return


'BOOKMARKS 

'EDITEDLINES -1 8 -1 2 -1 2 -1 2 -1 3 -1 5 -1 5 -1 6 -1 7 -1 8 -1 9 -1 10 

