home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Set of Apple II Hard Drive Images
/
eric.hdv
/
OBJTEST
/
CNTLPANL.bas
< prev
next >
Wrap
BASIC Source File
|
2020-08-13
|
6KB
|
87 lines
5 PRINT CHR$(4)"-/HARD/PROJECT/PIANO.2800": POKE 34,20: HOME
10 MSG = 9 *4096 +8 *256 +4
15 POKE MSG, ASC("I") +128
20 PRINT "INITIALIZING: PIANOSCR:"; USR(9);" INTRFACE:"; USR(16)
30 POKE MSG, ASC("Z") +128
40 PRINT "TIMER:"; USR(16);
50 POKE MSG, ASC("T") +128: POKE MSG +1,2: POKE MSG +2,0: PRINT " TEMPO:"; USR(16);
60 REM POKEMSG,ASC ("H") + 128: POKE MSG + 1,1
70 REM ? " HOOK:"; USR (16);
80 Q = 9 *4096 +7 *256 +16:QA = PEEK(Q) + PEEK(Q +1) *256: POKE QA +10,1
90 POKE MSG, ASC("P") +128: POKE MSG +1,1: PRINT " PIANO:"; USR(25)
95 PRINT : PRINT : PRINT : PRINT
100 REM CNTLPANL
105 QUIT = 0
110 GOSUB 200: REM DISPLAY PANEL
120 GOSUB 300: REM GET USER INPUT
130 GOSUB 400: REM PROCESS INPUT
140 IF NOT QUIT THEN 110
150 TEXT : HOME : END
200 POKE MSG, ASC("R") +128:X = USR(16)
210 T = PEEK(MSG +2) *256 + PEEK(MSG +3)
220 POKE MSG, ASC("R") +128:X = USR(25)
230 TR = PEEK(MSG +1):K = PEEK(MSG +2):PI = PEEK(MSG +3)
240 POKE MSG, ASC("R") +128: POKE MSG +1,C:X = USR(28)
250 P1 = PEEK(MSG +2):P2 = PEEK(MSG +3)
260 X = USR(27):V = PEEK(MSG +2):L = PEEK(MSG +3):SF = PEEK(MSG +4):SO = PEEK(MSG +5):DA = PEEK(MSG +6)
270 X = USR(31):B = PEEK(MSG +2):M = PEEK(MSG +3) = 21:R = PEEK(MSG +4):E = PEEK(MSG +5)
275 VTAB 21: CALL -958: PRINT
280 PRINT "T"; LEFT$( STR$(T) +" ",4);
282 PRINT " ";: REM NO JOYSTK
284 IF K >0 THEN PRINT "K";
285 IF K = 0 THEN PRINT " ";
286 IF L = 0 THEN PRINT "L";
287 IF L >0 THEN PRINT " ";
288 PRINT " M"M" R"R" E"E" ";
289 IF SF >0 THEN PRINT "*";
290 IF SF = 0 THEN PRINT "-";
291 IF SO >0 THEN PRINT "*";
292 IF SO = 0 THEN PRINT "-";
293 IF DA >0 THEN PRINT "*";
294 IF DA = 0 THEN PRINT "-";
295 PRINT " C"; LEFT$( STR$(C) +" ",2);" ";
296 PRINT "P"; RIGHT$("00" + STR$(P1),2); RIGHT$("00" + STR$(P2),2);
297 PRINT " B";B" V";V: IF TR = 0 THEN PRINT
298 IF TR < >0 THEN HTAB 33: PRINT "TR ";TR -(256 *(TR >127))
299 RETURN
300 PRINT "COMMAND ===>";: GET C$
310 RETURN
400 IF C$ = "A" THEN POKE MSG, ASC("A") +128:X = USR(16): RETURN
410 IF C$ = "D" THEN POKE MSG, ASC("D") +128:X = USR(16): RETURN
420 IF C$ = "C" THEN INPUT "CHANNEL:";C: IF C > = 0 AND C < = 15 THEN RETURN
425 IF C$ = "C" THEN PRINT "TRY AGAIN...";: GOTO 420
430 IF C$ = "T" THEN INPUT "TEMPO:";TM: IF TM >256 AND TM <8192 THEN POKE MSG, ASC("T") +128: POKE MSG +1, INT(TM/256): POKE MSG +2,TM - INT(TM/256) *256:X = USR(16): RETURN
435 IF C$ = "T" THEN PRINT "TRY AGAIN...";: GOTO 430
440 IF C$ = "S" THEN INPUT "TRANS:";TS: IF TS > = -128 AND TS < = 127 THEN POKE MSG, ASC("T") +128: POKE MSG +1,TS +(256 *(TS <0)):X = USR(25): RETURN
445 IF C$ = "S" THEN PRINT "TRY AGAIN...";: GOTO 440
450 IF C$ = "K" THEN INPUT "KARAOKE (0-1):";KA: IF KA > = 0 AND KA < = 1 THEN POKE MSG, ASC("K") +128: POKE MSG +1,KA:X = USR(25): RETURN
455 IF C$ = "K" THEN PRINT "TRY AGAIN...";: GOTO 450
460 IF C$ = "L" THEN INPUT "LOCAL (0-1):";LO: IF LO > = 0 AND LO < = 1 THEN POKE MSG, ASC("L") +128: POKE MSG +1,LO *127:X = USR(27): RETURN
465 IF C$ = "L" THEN PRINT "TRY AGAIN...";: GOTO 460
470 IF C$ = CHR$(18) THEN POKE MSG, ASC("Z") +128:X = USR(9): PRINT "REFRESHED": RETURN
472 IF C$ = CHR$(16) THEN INPUT "PIANO (0-1):";PO: IF PO > = 0 AND PO < = 1 THEN POKE MSG, ASC("P") +128: POKE MSG +1,PO:X = USR(25): RETURN
475 IF C$ = CHR$(16) THEN PRINT "TRY AGAIN...";: GOTO 470
480 IF C$ = CHR$(18) THEN POKE MSG, ASC("Z") +128:X = USR(9): PRINT "REFRESHED": RETURN
485 IF C$ = "," THEN POKE MSG, ASC("F") +128: POKE MSG +1, NOT (SF) *127:X = USR(27): PRINT "SOFT PED": RETURN
490 IF C$ = "." THEN POKE MSG, ASC("S") +128: POKE MSG +1, NOT (SO) *127:X = USR(27): PRINT "SOSTENUTO": RETURN
495 IF C$ = "/" THEN POKE MSG, ASC("D") +128: POKE MSG +1, NOT (DA) *127:X = USR(27): PRINT "DAMPER": RETURN
500 IF C$ = "M" THEN INPUT "MULTI (0-1):";MU: IF MU > = 0 AND MU < = 1 THEN POKE MSG, ASC("M") +128: POKE MSG +1,MU:X = USR(31): RETURN
505 IF C$ = "M" THEN PRINT "TRY AGAIN...";: GOTO 500
510 IF C$ = "R" THEN INPUT "REVERB (0-4):";RE: IF RE > = 0 AND RE < = 4 THEN POKE MSG, ASC("V") +128: POKE MSG +1,RE:X = USR(31): RETURN
515 IF C$ = "R" THEN PRINT "TRY AGAIN...";: GOTO 510
520 IF C$ = "E" THEN INPUT "EFFECT (0-4):";EF: IF EF > = 0 AND EF < = 4 THEN POKE MSG, ASC("E") +128: POKE MSG +1,EF:X = USR(31): RETURN
525 IF C$ = "E" THEN PRINT "TRY AGAIN...";: GOTO 520
530 IF C$ = "B" THEN INPUT "BRILLIANCE (0-2):";BR: IF BR > = 0 AND BR < = 2 THEN POKE MSG, ASC("B") +128: POKE MSG +1,C: POKE MSG +2,BR:X = USR(31): RETURN
535 IF C$ = "B" THEN PRINT "TRY AGAIN...";: GOTO 530
540 IF C$ = "V" THEN INPUT "VOLUME (0-127):";VO: IF VO > = 0 AND VO < = 127 THEN POKE MSG, ASC("X") +128: POKE MSG +1,C: POKE MSG +2,7: POKE MSG +3,VO:X = USR(27): RETURN
545 IF C$ = "V" THEN PRINT "TRY AGAIN...";: GOTO 540
550 IF C$ = "P" THEN INPUT "PROGRAM (0-127):";PR: IF PR > = 0 AND PR < = 127 THEN POKE MSG, ASC("X") +128: POKE MSG +1,C: POKE MSG +2,PR:X = USR(28): RETURN
555 IF C$ = "P" THEN PRINT "TRY AGAIN...";: GOTO 550
560 IF C$ > = "0" AND C$ < = "9" THEN POKE MSG, ASC("X") +128: POKE MSG +1,C: POKE MSG +2, VAL(C$):X = USR(28): RETURN
570 IF C$ = "\" THEN POKE MSG, ASC("D") +128: POKE MSG +1,4:X = USR(11): RETURN
580 IF C$ = CHR$(8) THEN POKE MSG, ASC("D") +128: POKE MSG +1,3:X = USR(11): RETURN
590 IF C$ = CHR$(21) THEN POKE MSG, ASC("D") +128: POKE MSG +1,2:X = USR(11): RETURN
600 IF C$ = CHR$(10) THEN POKE MSG, ASC("D") +128: POKE MSG +1,1:X = USR(11): RETURN
610 IF C$ = CHR$(11) THEN POKE MSG, ASC("D") +128: POKE MSG +1,0:X = USR(11): RETURN
620 IF C$ = CHR$(27) THEN QUIT = 1: RETURN
630 PRINT "<UNDEFINED KEY>": RETURN