home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 38
/
038.d81
/
midisend
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-26
|
4KB
|
142 lines
10 gosub60100 :clr
30 poke53280,0:poke53281,0:printchr$(14):print"[147][158]"
40 dimky(90)
50 fori=1to90:ky(i)=0:next
60 fori=60to85:readj:ky(j)=i:ifi>72thenky(j)=i-1
70 next
80 data90,83,88,68,67,86,71,66,72,78,74,77,44
90 data81,50,87,51,69,82,53,84,54,89,55,85,73
100 flag=0
110 print"[147]"
120 printtab(2)"[176][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][174]"
130 printtab(2)"[221] [221]"
140 printtab(2)"[221] [205][201][196][201] [208]layback [212]est [208]rogram [221]"
150 printtab(2)"[221] with [221]"
160 printtab(2)"[221] [211]equential or [208]assport [201]nterface [221]"
170 printtab(2)"[221] [221]"
180 printtab(2)"[221] [196]avid [210]. [194]rooks [221]"
190 printtab(2)"[221] [202]une 1986 [221]"
200 printtab(2)"[173][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][189]"
210 tx=2:rem transmit ready flag
220 vn=64:rem velocity byte for note on
230 vo=0:rem velocity byte for note off
240 dd=20:rem delay time
250 ifflag<>0thenprint:goto360
260 print:printtab(10)"[215]hich interface?"
270 printtab(10)"[211][146]equential"
280 printtab(10)"[208][146]assport":poke198,.
290 getz$:ifz$=""then290
300 ifz$="s"orz$="[211]" thengosub1060:print"[145][145][145][145]":goto350
310 ifz$="p"orz$="[208]" thengosub1120:print"[145][145][145][145]":goto350
340 goto290
350 flag=1
360 :
370 printtab(10)"[208][146] - [208]lay [211]cale "
380 printtab(10)"[206][146] - [208]lay [206]otes [198]rom [203]eyboard"
390 printtab(10)"[195][146] - [195]hange [208]rogram "
400 printtab(10)"[209][146] - [209]uit "
405 print
410 print" [197]nter [211]election: ";
420 getj$:ifj$=""then420
430 ifj$="[208]"orj$="p"then 470
431 ifj$="[206]"orj$="n"then 720
433 ifj$="[195]"orj$="c"then 620
437 ifj$="[209]"orj$="q"then 1040
440 goto 420
450 :
460 rem *** play ascending scale
470 waitsr,tx:rem ready to transmit?
480 poketr,144:rem if so, send status byte for note on/note off
490 forn=60to88
500 waitsr,tx
510 poketr,n:rem send note number
520 waitsr,tx
530 poketr,vn:rem send velocity byte
540 fork=1todd:next:rem do-nothing delay loop
550 waitsr,tx
560 poketr,n:rem send note number
570 waitsr,tx
580 poketr,vo:rem send 0 byte for note off
590 fork=1to10:next:rem do-nothing break between notes
600 next
610 goto110
620 print"[147][211]end program changes...":print
630 waitsr,tx:rem ready to transmit?
640 poketr,192:rem program change status byte
650 input"[208]rogram number";pn
660 waitsr,tx
670 poketr,pn
680 print"[193]gain (y/n)?"
690 getj$:ifj$=""then690
700 ifj$="y"then620
710 goto110
720 print"[147]play from keyboard..."
730 printchr$(142)
740 print" 2 3 4 5 6"
750 print" q w e r t y u i"
760 print"[167] [146] [146] [194] [146] [146] [146] [194] [146][165]"
770 print"[167] [146] [146] [194] [146] [146] [146] [194] [146][165]"
780 print"[167] [146] [146] [194] [146] [146] [146] [194] [146][165] (upper octave)"
790 print"[167] [194] [194] [194] [194] [194] [194] [194] [146][165]"
800 print"[167] [194] [194] [194] [194] [194] [194] [194] [146][165]"
810 print:
820 print" s d g h j"
830 print" z x c v b n m ,"
840 print"[167] [146] [146] [194] [146] [146] [146] [194] [146][165]"
850 print"[167] [146] [146] [194] [146] [146] [146] [194] [146][165]"
860 print"[167] [146] [146] [194] [146] [146] [146] [194] [146][165] (lower octave)"
870 print"[167] [194] [194] [194] [194] [194] [194] [194] [146][165]"
880 print"[167] [194] [194] [194] [194] [194] [194] [194] [146][165]"
890 print:print"press spacebar to quit..."
900 waitsr,tx
910 poketr,144
920 getk$:ifk$=""then920
930 ifasc(k$)=32thenprintchr$(14):goto110
940 waitsr,tx
950 poketr,ky(asc(k$))
960 waitsr,tx
970 poketr,vn
980 fori=1todd:next
990 waitsr,tx
1000 poketr,ky(asc(k$))
1010 waitsr,tx
1020 poketr,vo
1030 goto920
1040 print"[145] [193]re [217]ou [211]ure? ([217]/[206]) ";
1041 geta$:ifa$="" then 1041
1042 ifa$="y"ora$="[217]"then1045
1043 ifa$="n"ora$="[206]"then print"[145]";:goto 410
1044 goto 1041
1045 open15,8,15,"r0:hello connect=hello connect":input#15,er:close15
1046 ifer<>63thenend
1047 load"hello connect",8
1050 rem *** sequential initialization
1060 cr=56832:rem acia control register
1070 tr=cr+1:sr=cr+2:rem transmit and status registers
1080 pokecr,3:rem acia master reset
1090 pokecr,21:rem disable acia interrupt
1100 return
1110 rem *** passport initialization
1120 cr=56840:rem acia control register
1130 tr=cr+1:sr=cr:rem transmit and status registers
1140 pokecr,19:rem acia master reset
1150 pokecr,17:rem disable acia interrupt
1160 return
60100 poke53280,1:poke53281,1
60110 print"[147][176][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][174]";
60120 fora=1to23:print"[221]"spc(38)"[221]";:next
60130 print"[173][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][189][157][148][192]"
60140 fora=217to242:pokea,peek(a)or128:next
60150 print" [204][207][193][196][211][212][193][210] [208]resents:"
60160 print" "
60170 print" [205][201][196][201] [211]end [155] "
60180 print" [155] "
60190 print" [194]y [196]avid [194]rooks [155] "
60200 print" [155] "
60210 print" [195]opyright 1987 [155] "
60220 print" [155] "
60230 print" "
60240 print" [208]ress [211][208][193][195][197] to continue"
60250 ifpeek(203)<>60then60250
60260 return