home *** CD-ROM | disk | FTP | other *** search
/ Rockford Magazine / Rockford_Magazine_024_19xx_-_de_Disk_2_of_2_Side_B.d64 / synthesizer (.txt) < prev    next >
Commodore BASIC  |  2023-02-26  |  2KB  |  79 lines

  1. 10 poke 53281,0:print""chr$(14)
  2. 20 print "[147]     [195][207][205][205][207][196][207][210][197] 64 music synthesizer"
  3. 100 print"          [221]    [221]   [221]   "
  4. 110 print"          [221]    [221]   [221]   "
  5. 120 print"        [146]2 [146]3 [221] [146]5 [146]6 [146]7 [221] [146]9 [146]0 [221] [146]- [146]\ "
  6. 130 print"        [221] [221] [221] [221] [221] [221] [221] [221] [221] [221] [221] [221] "
  7. 140 print"       [209][221][215][221][197][221][210][221][212][221][217][221][213][221][201][221][207][221][208][221]@[221]*[221]^"
  8. 150 print"[211][208][193][195][197]        select solo or polyphonic"
  9. 160 print"[198]1,[198]3,[198]5,[198]7  select octave"
  10. 170 print"[198]2,[198]4,[198]6,[198]8  select waveform"
  11. 175 print"[216]            play song"
  12. 180 print"hang on, setting up frequency table..."
  13. 190 s=13*4096+1024:dimf(26):dimk(255)
  14. 200 fori=0to28:pokes+i,0:next
  15. 210 f1=7040:fori=1to26:f(27-i)=f1*5.8+30:f1=f1/2^(1/12):next
  16. 220 k$="q2w3er5t6y7ui9o0p@-*\^"
  17. 230 fori=1tolen(k$):k(asc(mid$(k$,i)))=i:next
  18. 240 print"[145]                                      "
  19. 250 at=0:de=0:su=15:re=10:sr=su*16+re:ad=at*16+de:wv=16:w=0:m=1:oc=4:hb=256:z=0
  20. 260 fori=0to2:t=i*7:pokes+5+t,ad:pokes+6+t,sr
  21. 270 pokes+2+t,4000and255:pokes+3+t,4000/256:next
  22. 280 pokes+24,15
  23. 300 geta$:ifa$=""then300
  24. 310 fr=k(asc(a$)):iffr=zthen500
  25. 315 fr=f(fr)/m:t=v*7:cr=s+t+4
  26. 320 pokes+5+t,z:pokes+6+t,z
  27. 330 pokecr,8:pokecr,z
  28. 340 pokes+t,fr-hb*int(fr/hb)
  29. 350 pokes+1+t,fr/hb
  30. 360 pokes+5+t,ad:pokes+6+t,sr
  31. 370 pokecr,wv+1:fori=1to50*at:next
  32. 375 pokecr,wv
  33. 380 ifp=1thenv=v+1:ifv=3thenv=0
  34. 400 goto300
  35. 500 ifa$="[133]"thenm=1:oc=4:goto300
  36. 510 ifa$="[134]"thenm=2:oc=3:goto300
  37. 520 ifa$="[135]"thenm=4:oc=2:goto300
  38. 530 ifa$="[136]"thenm=8:oc=1:goto300
  39. 540 ifa$="[137]"thenw=0:wv=16:goto300
  40. 550 ifa$="[138]"thenw=1:wv=32:goto300
  41. 560 ifa$="[139]"thenw=2:wv=64:goto300
  42. 570 ifa$="[140]"thenw=3:wv=128:goto300
  43. 580 ifa$=" "thenp=1-p:goto300
  44. 585 ifa$="x"then10000
  45. 590 ifa$="[147]"then200
  46. 600 goto300
  47. 800 print"hit a key"
  48. 810 geta$:ifa$=""then810:wait for a key
  49. 820 printa$:return
  50. 9000 data40,17,15,17,13,17,12,17,10,17,8,17,6,17,15,13,15,15,13,15,12
  51. 9005 data15,10,15,8,15,6,15,5,15,13,12,13,13,12,13,10,13,8,13,6,13,5,13,4,13
  52. 9006 data12,10,12,12
  53. 9010 data10,12,9,12,7,12,5,12,3,12,1,12
  54. 9020 data10,8,10,0
  55. 9600 data40,12,8,10,12,15,13,13,17,15,15,20
  56. 9610 data19,20,15,12,8,10,12,13,15,17,15,13,12,10,12,8,7,8,10,3
  57. 9620 data7,10,13,12,10
  58. 9630 data12,8,10,12,15,13,13,17,15,15,20
  59. 9640 data19,20,15,12,8,10,12
  60. 9650 data5,15,13,12,10,8,3,8,7,8,12,15,20,15,12,8
  61. 9660 data12,15,18,15,12,8,12,15,17,13,10
  62. 9670 data7,10,13,15,12,8,5,8,12,13,10,7,3,7,10,13,12,10
  63. 9680 data8,12,15,20,0
  64. 9999 data -1,-1
  65. 10000 readte
  66. 10005 reada:ifa=zthen300
  67. 10010 ifa=-1thenrestore:goto10000
  68. 10015 fr=f(a)/m:t=v*7:cr=s+t+4
  69. 10020 pokes+5+t,z:pokes+6+t,z
  70. 10030 pokecr,8:pokecr,z
  71. 10040 pokes+t,fr-hb*int(fr/hb)
  72. 10050 pokes+1+t,fr/hb
  73. 10060 pokes+5+t,ad:pokes+6+t,sr
  74. 10070 pokecr,wv+1:fori=1to50*at:next
  75. 10075 pokecr,wv
  76. 10080 ifp=1thenv=v+1:ifv=3thenv=0
  77. 10090 fori=1tote:next
  78. 10100 goto10005
  79.