home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 32 / 032.d81 / metronome (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  2KB  |  75 lines

  1. 0 goto90
  2. 1 ifx(n)>99thenprint""tab(20)"[151]"x(n)
  3. 2 ifx(n)<100thenprint""tab(21)"[151]"x(n)
  4. 3 return
  5. 5 f=peek(203):iff=64thenreturn
  6. 6 iff=40thenn=n+1
  7. 7 iff=43thenn=n-1
  8. 8 ifn<1thenn=1
  9. 9 ifn>39thenn=39
  10. 10 iff=40orf=43thengosub1:goto5
  11. 11 rem note shape selection
  12. 12 iff=59thenprint""tab(15)"[151][145][[157]^"
  13. 13 iff=11thenprint""tab(15)"[151][145]\[157]_"
  14. 14 iff=27thenprint""tab(15)"[151][145]z[157]]"
  15. 15 iff=62then620
  16. 20 return
  17. 90 ifpeek(12296)<>56andpeek(12298)<>68thenload"metronome.fnt",8,1
  18. 100 dimx(39),r(39):s=54272
  19. 110 poke53280,1:poke53281,1:poke650,128
  20. 120 print"[147][144]"spc(7)"welcome to magic metronome"
  21. 130 print""spc(13)"reading data..."
  22. 140 forn=1to39:readx(n),r(n):next
  23. 145 fora=1to1000:next
  24. 150 poke56,48
  25. 210 poke53272,(peek(53272)and240)+12
  26. 230 rem main screen
  27. 240 n=11:print"[147]":print
  28. 250 printtab(11)"[155]magic  metronome"
  29. 260 printtab(18)"[149][169] [223]"
  30. 270 printtab(17)"[169]   [223]"
  31. 280 printtab(16)"[169]     [223]"
  32. 290 printtab(15)"[169]       [223]"
  33. 300 printtab(15)"         "
  34. 310 printtab(15)"[151][145]\[157]_   = "x(n)
  35. 320 print:print
  36. 330 printtab(7)"[151]2[146] = [145][[157]^"spc(8)"+[146] = increase"
  37. 340 printtab(7)"4[146] = [145]\[157]_"spc(8)"-[146] = decrease"
  38. 350 printtab(7)"8[146] = [145]z[157]]"spc(8)"q[146] = quit":print
  39. 360 printtab(6)"values from 40 to 208 b.p.m."
  40. 370 rem timing and sound
  41. 380 pokes+24,15
  42. 390 fort=0tor(n):next
  43. 400 pokes+4,19:pokes+5,0:pokes+1,67:pokes,15
  44. 410 pokes+4,18
  45. 420 print""spc(19)"[149][206][146]"
  46. 422 gosub5
  47. 430 fort=0tor(n):next
  48. 440 pokes+4,19:pokes+5,0:pokes+1,67:pokes,15
  49. 450 pokes+4,18
  50. 460 print""spc(19)"[149][205][146]"
  51. 470 rem increment selection
  52. 480 gosub5
  53. 580 ifx(n)>99thenprint""tab(20)"[151]"x(n)
  54. 590 ifx(n)<100thenprint""tab(21)"[151]"x(n)
  55. 600 goto390
  56. 610 rem quit--windowshade
  57. 620 print"[147]";
  58. 630 a$="                                        "
  59. 640 b$="                                        [146]                   [194][146]"
  60. 650 fora=1to17
  61. 660 print"[144]"a$;:next
  62. 670 printb$
  63. 680 printtab(19)"[215][146]"
  64. 690 printtab(14)"good night!"
  65. 700 poke646,11:open15,8,15,"r0:hello connect=hello connect":input#15,er:close15
  66. 702 ifer<>63thenend
  67. 704 print"[147]":poke53272,21:load"hello connect",8
  68. 710 rem data for x and r
  69. 720 data40,1444,42,1380,44,1316,46,1250,48,1204,50,1158,52,1110
  70. 730 data54,1076,56,1030,58,990,60,960,63,904,66,864
  71. 740 data69,820,72,786,76,740,80,702,84,670,88,630,92,600
  72. 750 data96,580,100,550,104,522,108,494,112,474,116,459,120,438
  73. 760 data126,414,132,390,138,370,144,352,152,330,160,305
  74. 770 data168,288,176,263,184,250,192,238,200,228,208,220
  75.