
Load Theremino_VideoColors.exe
Gosub MainLoop
Stop

Variable Numeric Saturation
Variable Numeric Lightness
Variable Numeric NewColor
Variable Numeric OldColor = -1
Label MainLoop
	Saturation = Slot(5)
	Lightness = Slot(6)
	NewColor = Slot(7)
	If Saturation > 128
		If Lightness > 128
			If NewColor <> OldColor Or Not MediaPlaying
				OldColor = NewColor
				Select NewColor
					Case 1 ' rosso
						Load relee.wav
					Case 2 ' arancio
					Case 3 ' giallo
					Case 4 ' verde
					Case 5 ' cyan
					Case 6 ' blu
						Load Risonatore - solo.wav
					Case 7 ' viola
						Load sky.wav
				EndSelect
			EndIf
		EndIf
	EndIf
Goto MainLoop


'WATCH v1
'EXEC DestX = 12
