home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 38 / 038.d81 / midisend (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  4KB  |  142 lines

  1. 10 gosub60100 :clr
  2. 30 poke53280,0:poke53281,0:printchr$(14):print"[147][158]"
  3. 40 dimky(90)
  4. 50 fori=1to90:ky(i)=0:next
  5. 60 fori=60to85:readj:ky(j)=i:ifi>72thenky(j)=i-1
  6. 70 next
  7. 80 data90,83,88,68,67,86,71,66,72,78,74,77,44
  8. 90 data81,50,87,51,69,82,53,84,54,89,55,85,73
  9. 100 flag=0
  10. 110 print"[147]"
  11. 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]"
  12. 130 printtab(2)"[221]                                  [221]"
  13. 140 printtab(2)"[221]    [205][201][196][201] [208]layback [212]est [208]rogram    [221]"
  14. 150 printtab(2)"[221]               with               [221]"
  15. 160 printtab(2)"[221] [211]equential or [208]assport [201]nterface [221]"
  16. 170 printtab(2)"[221]                                  [221]"
  17. 180 printtab(2)"[221]         [196]avid [210]. [194]rooks          [221]"
  18. 190 printtab(2)"[221]            [202]une 1986             [221]"
  19. 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]"
  20. 210 tx=2:rem transmit ready flag
  21. 220 vn=64:rem velocity byte for note on
  22. 230 vo=0:rem velocity byte for note off
  23. 240 dd=20:rem delay time
  24. 250 ifflag<>0thenprint:goto360
  25. 260 print:printtab(10)"[215]hich interface?"
  26. 270 printtab(10)"[211][146]equential"
  27. 280 printtab(10)"[208][146]assport":poke198,.
  28. 290 getz$:ifz$=""then290
  29. 300 ifz$="s"orz$="[211]" thengosub1060:print"[145][145][145][145]":goto350
  30. 310 ifz$="p"orz$="[208]" thengosub1120:print"[145][145][145][145]":goto350
  31. 340 goto290
  32. 350 flag=1
  33. 360 :
  34. 370 printtab(10)"[208][146] - [208]lay [211]cale              "
  35. 380 printtab(10)"[206][146] - [208]lay [206]otes [198]rom [203]eyboard"
  36. 390 printtab(10)"[195][146] - [195]hange [208]rogram          "
  37. 400 printtab(10)"[209][146] - [209]uit                    "
  38. 405 print
  39. 410 print"            [197]nter [211]election:            ";
  40. 420 getj$:ifj$=""then420
  41. 430 ifj$="[208]"orj$="p"then 470
  42. 431 ifj$="[206]"orj$="n"then 720
  43. 433 ifj$="[195]"orj$="c"then 620
  44. 437 ifj$="[209]"orj$="q"then 1040
  45. 440 goto 420
  46. 450 :
  47. 460 rem *** play ascending scale
  48. 470 waitsr,tx:rem ready to transmit?
  49. 480 poketr,144:rem if so, send status byte for note on/note off
  50. 490 forn=60to88
  51. 500 waitsr,tx
  52. 510 poketr,n:rem send note number
  53. 520 waitsr,tx
  54. 530 poketr,vn:rem send velocity byte
  55. 540 fork=1todd:next:rem do-nothing delay loop
  56. 550 waitsr,tx
  57. 560 poketr,n:rem send note number
  58. 570 waitsr,tx
  59. 580 poketr,vo:rem send 0 byte for note off
  60. 590 fork=1to10:next:rem do-nothing break between notes
  61. 600 next
  62. 610 goto110
  63. 620 print"[147][211]end program changes...":print
  64. 630 waitsr,tx:rem ready to transmit?
  65. 640 poketr,192:rem program change status byte
  66. 650 input"[208]rogram number";pn
  67. 660 waitsr,tx
  68. 670 poketr,pn
  69. 680 print"[193]gain (y/n)?"
  70. 690 getj$:ifj$=""then690
  71. 700 ifj$="y"then620
  72. 710 goto110
  73. 720 print"[147]play from keyboard..."
  74. 730 printchr$(142)
  75. 740 print"  2 3   4 5 6"
  76. 750 print" q w e r t y u i"
  77. 760 print"[167] [146]  [146]  [194] [146]  [146]  [146]  [194] [146][165]"
  78. 770 print"[167] [146]  [146]  [194] [146]  [146]  [146]  [194] [146][165]"
  79. 780 print"[167] [146]  [146]  [194] [146]  [146]  [146]  [194] [146][165] (upper octave)"
  80. 790 print"[167] [194] [194] [194] [194] [194] [194] [194] [146][165]"
  81. 800 print"[167] [194] [194] [194] [194] [194] [194] [194] [146][165]"
  82. 810 print:
  83. 820 print"  s d   g h j"
  84. 830 print" z x c v b n m ,"
  85. 840 print"[167] [146]  [146]  [194] [146]  [146]  [146]  [194] [146][165]"
  86. 850 print"[167] [146]  [146]  [194] [146]  [146]  [146]  [194] [146][165]"
  87. 860 print"[167] [146]  [146]  [194] [146]  [146]  [146]  [194] [146][165] (lower octave)"
  88. 870 print"[167] [194] [194] [194] [194] [194] [194] [194] [146][165]"
  89. 880 print"[167] [194] [194] [194] [194] [194] [194] [194] [146][165]"
  90. 890 print:print"press spacebar to quit..."
  91. 900 waitsr,tx
  92. 910 poketr,144
  93. 920 getk$:ifk$=""then920
  94. 930 ifasc(k$)=32thenprintchr$(14):goto110
  95. 940 waitsr,tx
  96. 950 poketr,ky(asc(k$))
  97. 960 waitsr,tx
  98. 970 poketr,vn
  99. 980 fori=1todd:next
  100. 990 waitsr,tx
  101. 1000 poketr,ky(asc(k$))
  102. 1010 waitsr,tx
  103. 1020 poketr,vo
  104. 1030 goto920
  105. 1040 print"[145]           [193]re [217]ou [211]ure? ([217]/[206])          ";
  106. 1041 geta$:ifa$="" then 1041
  107. 1042 ifa$="y"ora$="[217]"then1045
  108. 1043 ifa$="n"ora$="[206]"then print"[145]";:goto 410
  109. 1044 goto 1041
  110. 1045 open15,8,15,"r0:hello connect=hello connect":input#15,er:close15
  111. 1046 ifer<>63thenend
  112. 1047 load"hello connect",8
  113. 1050 rem *** sequential initialization
  114. 1060 cr=56832:rem acia control register
  115. 1070 tr=cr+1:sr=cr+2:rem transmit and status registers
  116. 1080 pokecr,3:rem acia master reset
  117. 1090 pokecr,21:rem disable acia interrupt
  118. 1100 return
  119. 1110 rem *** passport initialization
  120. 1120 cr=56840:rem acia control register
  121. 1130 tr=cr+1:sr=cr:rem transmit and status registers
  122. 1140 pokecr,19:rem acia master reset
  123. 1150 pokecr,17:rem disable acia interrupt
  124. 1160 return
  125. 60100 poke53280,1:poke53281,1
  126. 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]";
  127. 60120 fora=1to23:print"[221]"spc(38)"[221]";:next
  128. 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]"
  129. 60140 fora=217to242:pokea,peek(a)or128:next
  130. 60150 print"          [204][207][193][196][211][212][193][210] [208]resents:"
  131. 60160 print"                              "
  132. 60170 print"              [205][201][196][201]  [211]end      [155] "
  133. 60180 print"                              [155] "
  134. 60190 print"           [194]y  [196]avid [194]rooks   [155] "
  135. 60200 print"                              [155] "
  136. 60210 print"            [195]opyright 1987    [155] "
  137. 60220 print"                              [155] "
  138. 60230 print"                               "
  139. 60240 print"        [208]ress [211][208][193][195][197] to continue"
  140. 60250 ifpeek(203)<>60then60250
  141. 60260 return
  142.