//a complete lightcomputer with logging. speech recognition data available
//command RESUME
//command PAUSE
//command CHANGE
//command INCREASE
//command DECREASE
//command EXIT
//VAR1 = effectcounter
VAR1 = 0
VAR2 = 1
TIMESTEP = 150
TimeStep ON
LOGFILE = "C:\lightcomputer.log"
LOADGUI "C:\fully lightcomputer.GUI"
CHANGEGUI 00 "&Lightcomputer - current speed is $timestep"
WRITELOG "<$xTIME> lightcomputer program started"
LABEL LOOPER
IF VAR1 = 0000 Then
SETION 0000000000000000
SETION 1111000000000000
SETION 1111111100000000
SETION 1111111111110000
SETION 1111111111111111
END IF
IF VAR1 = 0001 Then
SETION 0000000000000000
SETION 1000000000000000
SETION 0100000000000000
SETION 0010000000000000
SETION 0010000000000000
SETION 0001000000000000
SETION 0000100000000000
SETION 0000010000000000
SETION 0000001000000000
SETION 0000000100000000
SETION 0000000010000000
SETION 0000000001000000
SETION 0000000000100000
SETION 0000000000010000
SETION 0000000000001000
SETION 0000000000000100
SETION 0000000000000010
SETION 0000000000000001
END IF
IF VAR1 = 0002 Then
SETION 1100000000000011
SETION 1111000000001111
SETION 1111110000111111
SETION 1111111111111111
SETION 1111110000111111
SETION 1111000000001111
SETION 1100000000000011
SETION 0000000000000000
END IF
IF VAR1 = 0003 Then
SETION 1111000000000000
SETION 0000111100000000
SETION 0000000011110000
SETION 0000000000001111
END IF
GOTO LOOPER
SUB GUI_RUN
//start het programma na een stop
VAR2 = 1
CHANGEGUI 00 "&Lightcomputer - current speed is $timestep"
WRITELOG "<$xTIME> lightcomputer program running resumed"
END SUB
SUB GUI_STOPRUN
//stop het programma
CHANGEGUI 00 "&Lightcomputer - stopped"
WRITELOG "<$xTIME> lightcomputer program running paused"
VAR2 = 0
LABEL WAIT_FOR_1
IF VAR2 = 0000 Then GOTO WAIT_FOR_1
END SUB
SUB GUI_CHANGE_EFFECT
//verwissel het effect
VAR1 = VAR1 + 1
IF VAR1 = 0004 Then VAR1 = 0
WRITELOG "<$xTIME> lightcomputer effect changed"
END SUB
SUB GUI_INCREASE_SPEED
//increase speed
TIMESTEP = TIMESTEP - 25
CHANGEGUI 00 "&Lightcomputer - current speed is $timestep"
WRITELOG "<$xTIME> lightcomputer speed increased to $timestep"
END SUB
SUB GUI_DECREASE_SPEED
//decrease speed
TIMESTEP = TIMESTEP + 25
CHANGEGUI 00 "&Lightcomputer - current speed is $timestep"
WRITELOG "<$xTIME> lightcomputer speed decreased to $timestep"
END SUB
SUB GUI_STOP_LIGHTCOMPUTER
//stop the program
STOP
WRITELOG "<$xTIME> lightcomputer stopped"
END SUB