Classic Computer Magazine Archive PROGRAM LISTING: 83-11/TOOT.LGO


TO TOOTS
MAKE "X JOY 0
IF :X = 6 [MAKE "POINTER CHANGE :POINTER -1 0 7]
IF :X = 2 [MAKE "POINTER CHANGE :POINTER 1 0 7]
SHOWPOINTER
IF OR :X = 6 :X = 2 [TOOTS]
IF :POINTER = 0 [SETENV0]
IF :POINTER = 1 [SETFRE0]
IF :POINTER = 2 [SETVOL0]
IF :POINTER = 3 [SETDUR0]
IF :POINTER = 4 [SETENV1]
IF :POINTER = 5 [SETFRE1]
IF :POINTER = 6 [SETVOL1]
IF :POINTER = 7 [SETDUR1]
TOOTS
END

TO START
CT
SETCURSOR [3 5] PR [SET __TOOT 0___ SET __TOOT 1___]
SETCURSOR [3 6] PR [ENV FRE VOL DUR ENV FRE VOL DUR]
MAKE "ENV0 0 MAKE "ENV1 0
MAKE "FRE0 20 MAKE "FRE1 20
MAKE "VOL0 10 MAKE "VOL1 10
MAKE "DUR0 30 MAKE "DUR1 30
MAKE "POINTER 0 MAKE "X 0
SETCURSOR [0 8]
( PR [\ \ ] :ENV0 [\ ] :FRE0 [] :VOL0 [] :DUR0 [] :ENV1 [\ ] :FRE1 [] :VOL1 [] :DUR1 )
SETCURSOR [9 14]
( PR CHAR 28 CHAR 29 [CHANGES VALUES] )
( PR [\ ] [�� HOLD BUTTON FOR FAST CHANGE ��] )
SETCURSOR [8 17]
( PR CHAR 30 CHAR 31 [TO CHANGE FUNCTION] )
TOOTS
END

TO SETENV0
MAKE "X JOY 0
IF OR :X = 2 :X = 6 [TOOTS]
IF :X = 0 [MAKE "ENV0 CHANGE :ENV0 -1 0 10]
IF :X = 4 [MAKE "ENV0 CHANGE :ENV0 1 0 10]
SETENV 0 :ENV0
SAYVALUES
TOOTER
SETENV0
END

TO SETFRE0
MAKE "X JOY 0
IF OR :X = 2 :X = 6 [TOOTS]
IF AND NOT JOYB 0 :X = 0 [MAKE "FRE0 CHANGE :FRE0 -10 15 9000]
IF AND JOYB 0 :X = 0 [MAKE "FRE0 CHANGE :FRE0 -100 15 9000]
IF AND NOT JOYB 0 :X = 4 [MAKE "FRE0 CHANGE :FRE0 10 15 9000]
IF AND JOYB 0 :X = 4 [MAKE "FRE0 CHANGE :FRE0 100 15 9000]
SAYVALUES
TOOTER
SETFRE0
END

TO SETVOL0
MAKE "X JOY 0
IF OR :X = 2 :X = 6 [TOOTS]
IF :X = 0 [MAKE "VOL0 CHANGE :VOL0 -1 0 15]
IF :X = 4 [MAKE "VOL0 CHANGE :VOL0 1 0 15]
SAYVALUES
TOOTER
SETVOL0
END

TO SETDUR0
MAKE "X JOY 0
IF OR :X = 2 :X = 6 [TOOTS]
IF AND NOT JOYB 0 :X = 0 [MAKE "DUR0 CHANGE :DUR0 -1 0 255]
IF AND NOT JOYB 0 :X = 4 [MAKE "DUR0 CHANGE :DUR0 1 0 255]
IF AND JOYB 0 :X = 0 [MAKE "DUR0 CHANGE :DUR0 -10 0 255]
IF AND JOYB 0 :X = 4 [MAKE "DUR0 CHANGE :DUR0 10 0 255]
SAYVALUES
TOOTER
SETDUR0
END

TO TOOTER
TOOT 0 :FRE0 :VOL0 :DUR0
TOOT 1 :FRE1 :VOL1 :DUR1
END

TO SAYVALUES
SETCURSOR [3 8] PR :ENV0
SETCURSOR [7 8] PR :FRE0
SETCURSOR [11 8] PR :VOL0
SETCURSOR [15 8] PR :DUR0
SETCURSOR [19 8] PR :ENV1
SETCURSOR [23 8] PR :FRE1
SETCURSOR [27 8] PR :VOL1
SETCURSOR [31 8] PR :DUR1
END

TO SETDUR1
MAKE "X JOY 0
IF OR :X = 2 :X = 6 [TOOTS]
IF AND NOT JOYB 0 :X = 0 [MAKE "DUR1 CHANGE :DUR1 -1 0 255]
IF AND NOT JOYB 0 :X = 4 [MAKE "DUR1 CHANGE :DUR1 1 0 255]
IF AND JOYB 0 :X = 0 [MAKE "DUR1 CHANGE :DUR1 -10 0 255]
IF AND JOYB 0 :X = 4 [MAKE "DUR1 CHANGE :DUR1 10 0 255]
SAYVALUES
TOOTER
SETDUR1
END

TO SETVOL1
MAKE "X JOY 0
IF OR :X = 2 :X = 6 [TOOTS]
IF :X = 0 [MAKE "VOL1 CHANGE :VOL1 -1 0 15]
IF :X = 4 [MAKE "VOL1 CHANGE :VOL1 1 0 15]
SAYVALUES
TOOTER
SETVOL1
END

TO SETFRE1
MAKE "X JOY 0
IF OR :X = 2 :X = 6 [TOOTS]
IF AND NOT JOYB 0 :X = 0 [MAKE "FRE1 CHANGE :FRE1 -10 15 9000]
IF AND JOYB 0 :X = 0 [MAKE "FRE1 CHANGE :FRE1 -100 15 9000]
IF AND NOT JOYB 0 :X = 4 [MAKE "FRE1 CHANGE :FRE1 10 15 9000]
IF AND JOYB 0 :X = 4 [MAKE "FRE1 CHANGE :FRE1 100 15 9000]
SAYVALUES
TOOTER
SETFRE1
END

TO SETENV1
MAKE "X JOY 0
IF OR :X = 2 :X = 6 [TOOTS]
IF :X = 0 [MAKE "ENV1 CHANGE :ENV1 -1 0 10]
IF :X = 4 [MAKE "ENV1 CHANGE :ENV1 1 0 10]
SETENV 1 :ENV1
SAYVALUES
TOOTER
SETENV1
END

TO SHOWPOINTER
SETCURSOR [3 9]
PR [\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ]
IF :POINTER = 0 [SETCURSOR [3 9]]
IF :POINTER = 1 [SETCURSOR [7 9]]
IF :POINTER = 2 [SETCURSOR [11 9]]
IF :POINTER = 3 [SETCURSOR [15 9]]
IF :POINTER = 4 [SETCURSOR [19 9]]
IF :POINTER = 5 [SETCURSOR [23 9]]
IF :POINTER = 6 [SETCURSOR [27 9]]
IF :POINTER = 7 [SETCURSOR [31 9]]
PR [���]
END

TO CHANGE :VAL :CHG :MIN :MAX
MAKE "V :VAL + :CHG
IF :V < :MIN [MAKE "V :MAX]
IF :V > :MAX [MAKE "V :MIN]
OUTPUT :V
END



Back to previous page