home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Set of Apple II Hard Drive Images
/
eric.hdv
/
ANNMIDI
/
INT0PLAY.BAS
< prev
next >
Wrap
BASIC Source File
|
2020-08-13
|
3KB
|
62 lines
0 IF PEEK(104) < >21 THEN POKE 104,21: POKE 21 *256,0: PRINT CHR$(4)"-INT0PLAY.BAS": END
1 REM INT0PLAY.BAS
10 PRINT CHR$(4)"PR#3"
25 TEXT : HOME
30 PRINT "APPLE //e MIDI FILE FORMAT 0 PLAYER - WITH MIDI KARAOKE ": PRINT : PRINT "(c) 1995 - Eric Rangell"
35 PRINT : PRINT "(Press RETURN to see catalog of /MIDI volume.)"
40 PRINT : PRINT : INPUT "MFF0 FILE TO PLAY:";FI$
41 IF FI$ = "" THEN PRINT CHR$(4)"CAT/MIDI": GOTO 40
43 IF RIGHT$(FI$,1) = CHR$(13) THEN FI$ = LEFT$(FI$, LEN(FI$) -1)
45 IF LEFT$(FI$,1) < >"/" THEN FI$ = "/MIDI/" +FI$
46 PRINT CHR$(4)"BLOAD "FI$",A$2000,B9,L1,T$D7": IF PEEK(8192) >0 THEN PRINT "NOT A MIDI 0 FILE": GOTO 40
47 PRINT : PRINT : PRINT "OPTIONS: L=Lyrics off S=Speed display on"
48 PRINT " I=Inverse Piano O=Piano Off P=Piano Keys inverse"
49 PRINT " K=Karaoke Look Ahead M=Set init speed": PRINT
70 INPUT "Enter options, then press RETURN to start the music:";R$
75 PRINT CHR$(4)"BLOAD MIDI8300.OBJ,D1"
80 PRINT CHR$(4)"BLOAD INT0DRVR.OBJ,D1"
85 PRINT CHR$(4)"BLOAD MKBC8500.OBJ,D1"
90 PRINT CHR$(4)"BLOAD INT0PLAY.OBJ,D1"
91 IP = 0:PO = 0:PI = 0:KO = 0
92 FOR I = 1 TO LEN(R$)
93 IF MID$ (R$,I,1) = "L" THEN POKE 8 *256 +2 *16,0
94 IF MID$ (R$,I,1) = "S" THEN POKE 8 *256 +2 *16 +1,1
95 IF MID$ (R$,I,1) = "D" THEN POKE 8 *4096 +5,1
96 IF MID$ (R$,I,1) = "I" THEN IP = 1
97 IF MID$ (R$,I,1) = "O" THEN PO = 1
98 IF MID$ (R$,I,1) = "P" THEN PI = 1
99 IF MID$ (R$,I,1) = "K" THEN KO = 1
100 SI = 0: IF MID$ (R$,I,1) = "M" THEN ME = 1: INPUT "Speed Increment :";SI: IF SI <0 THEN SI = 256 +SI
101 NEXT I
150 PRINT CHR$(4)"BLOAD "FI$",A$827,B12,L2,T$D7": REM GET RESOLUTION
160 FOR I = 1 TO LEN(FI$): POKE 8 *4096 +6 +I, ASC( MID$ (FI$,I,1)): NEXT I: POKE 8 *4096 +6 + LEN(FI$) +1,0
170 POKE 8 *4096 +6, LEN(FI$)
200 IF PO = 1 THEN POKE 8 *256 +2 *16 +2,0
300 IF IP = 1 OR PI = 1 THEN POKE 8 *256 +2 *16 +5,1
400 IF KO = 1 THEN POKE 8 *256 +2 *16 +6,1
450 IF ME = 1 THEN POKE 8 *256 +2 *16 +9,SI
500 IF PO < >1 THEN HOME
505 IF IP < >1 THEN 550
510 PI$ = "<CTRL-O> <CTRL-N> <CTRL-O> <CTRL-N> <CTRL-O> <CTRL-N> <CTRL-O> <CTRL-N> <CTRL-O> <CTRL-N> <CTRL-O> <CTRL-N>"
520 P2$ = "<CTRL-O> <CTRL-N> <CTRL-O> <CTRL-N> <CTRL-O> <CTRL-N> <CTRL-O> <CTRL-N>"
530 FOR I = 1 TO 16
540 FOR J = 1 TO 6: PRINT PI$;: NEXT : PRINT P2$;: NEXT
550 VTAB 17: PRINT "----";L2$;: FOR DH = 1 TO 28 - LEN(L2$): PRINT "-";: NEXT : PRINT "Karaoke Window--------------------Key:(---)-----";
552 VTAB 24: REM IF KO = 1 THEN VTAB 23
553 PRINT "=========== <--:Faster -->:Slower ESC:Pause SPACE:Stop F:Sharp/Flat D:Drums";
555 IF PO < >1 THEN FOR I = 1 TO 16: VTAB I: HTAB 79: PRINT MID$ (" 1 2 3 4 5 6 7 8 910111213141516",(I -1) *2 +1,2);: NEXT
560 POKE 34,17: REM top window
570 POKE 35,23: REM IF KO = 1 THEN POKE 35,22
580 HOME
581 PRINT "Now playing: ";FI$
900 CALL 8 *4096 +5 *256: REM ALLOC INT
905 POKE 8 *4096 +5 *256 +22,0: POKE 8 *4096 +5 *256 +23,16: REM INITIAL TEMPO
910 CALL 8 *4096: REM PLAY
911 POKE -16368,0: REM IGNORE ANY KEY PRESSED TO EXIT
915 CALL 8 *4096 +5 *256 +6: REM STOP CLOCK
920 CALL 8 *4096 +5 *256 +2 *16 +5: REM DEALLOC INT
950 CALL 8 *4096 +3 *256 +11: REM ALL SOUNDS OFF
970 TEXT
980 PRINT : INPUT "Run Again? (Y/N):";Y$: IF ( LEFT$(Y$,1) = "Y") OR ( LEFT$(Y$,1) = "y") THEN 25
990 END
999 REM IGNORE ANY GARBAGE BELOW