home *** CD-ROM | disk | FTP | other *** search
/ 64'er 1993 August / 64er_Magazin_93-08_1993_Markt__Technik_de_Side_B.d64 / musikbaum64 (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  3KB  |  126 lines

  1. 5 print chr$(147):rem clear screen
  2. 10 si=54272:rem sid adresse
  3. 20 fl=si   :rem adresse freq.low-byte
  4. 30 fh=si+1 :rem adresse freq.high-byte
  5. 40 l=si+24 :rem adresse lautstaerke
  6. 50 w=si+4  :rem adresse wellenform
  7. 60 a=si+5  :rem adresse anschlag
  8. 70 h=si+6  :rem adresse halten
  9. 80 v=0     :rem anfangswert lautstaerke
  10. 90 s=0     :rem anfangswert wellenform
  11. 100 y=peek(54298):rem einlesen paddel y
  12. 110 d=y/2.71     :rem 0...255->0...94,.
  13. 120 nr=int(d)    :rem 0...255->0...94.0
  14. 121 rem zuordnung freq.in notenliste
  15. 130 if nr=0 then hi=1:lo=22
  16. 131 if nr=1 then hi=1:lo=39
  17. 132 if nr=2 then hi=1:lo=57
  18. 133 if nr=3 then hi=1:lo=75
  19. 134 if nr=4 then hi=1:lo=95
  20. 135 if nr=5 then hi=1:lo=116
  21. 136 if nr=6 then hi=1:lo=138
  22. 137 if nr=7 then hi=1:lo=161
  23. 138 if nr=8 then hi=1:lo=186
  24. 139 if nr=9 then hi=1:lo=212
  25. 140 if nr=10 then hi=1:lo=240
  26. 141 if nr=11 then hi=2:lo=14
  27. 142 if nr=12 then hi=2:lo=45
  28. 143 if nr=13 then hi=2:lo=78
  29. 144 if nr=14 then hi=2:lo=113
  30. 145 if nr=15 then hi=2:lo=150
  31. 146 if nr=16 then hi=2:lo=190
  32. 147 if nr=17 then hi=2:lo=231
  33. 148 if nr=18 then hi=3:lo=20
  34. 149 if nr=19 then hi=3:lo=66
  35. 150 if nr=20 then hi=3:lo=116
  36. 151 if nr=21 then hi=3:lo=169
  37. 152 if nr=22 then hi=3:lo=224
  38. 153 if nr=23 then hi=4:lo=27
  39. 154 if nr=24 then hi=4:lo=90
  40. 155 if nr=25 then hi=4:lo=156
  41. 156 if nr=26 then hi=4:lo=226
  42. 157 if nr=27 then hi=5:lo=45
  43. 158 if nr=28 then hi=5:lo=123
  44. 159 if nr=29 then hi=5:lo=207
  45. 160 if nr=30 then hi=6:lo=39
  46. 161 if nr=31 then hi=6:lo=133
  47. 162 if nr=32 then hi=6:lo=232
  48. 163 if nr=33 then hi=7:lo=81
  49. 164 if nr=34 then hi=7:lo=193
  50. 165 if nr=35 then hi=8:lo=55
  51. 166 if nr=36 then hi=8:lo=180
  52. 167 if nr=37 then hi=9:lo=56
  53. 168 if nr=38 then hi=9:lo=196
  54. 169 if nr=39 then hi=10:lo=89
  55. 170 if nr=40 then hi=10:lo=247
  56. 171 if nr=41 then hi=11:lo=158
  57. 172 if nr=42 then hi=12:lo=87
  58. 173 if nr=43 then hi=13:lo=10
  59. 174 if nr=44 then hi=13:lo=208
  60. 175 if nr=45 then hi=14:lo=162
  61. 176 if nr=46 then hi=15:lo=129
  62. 177 if nr=47 then hi=16:lo=109
  63. 178 if nr=48 then hi=17:lo=103
  64. 179 if nr=49 then hi=18:lo=112
  65. 180 if nr=50 then hi=19:lo=137
  66. 181 if nr=51 then hi=20:lo=178
  67. 182 if nr=52 then hi=21:lo=237
  68. 183 if nr=53 then hi=23:lo=59
  69. 184 if nr=54 then hi=24:lo=157
  70. 185 if nr=55 then hi=26:lo=20
  71. 186 if nr=56 then hi=27:lo=160
  72. 187 if nr=57 then hi=29:lo=69
  73. 188 if nr=58 then hi=31:lo=3
  74. 189 if nr=59 then hi=32:lo=219
  75. 190 if nr=60 then hi=34:lo=207
  76. 191 if nr=61 then hi=36:lo=225
  77. 192 if nr=62 then hi=39:lo=18
  78. 193 if nr=63 then hi=41:lo=101
  79. 194 if nr=64 then hi=43:lo=219
  80. 195 if nr=65 then hi=46:lo=118
  81. 196 if nr=66 then hi=49:lo=58
  82. 197 if nr=67 then hi=52:lo=39
  83. 198 if nr=68 then hi=55:lo=65
  84. 199 if nr=69 then hi=58:lo=138
  85. 200 if nr=70 then hi=62:lo=5
  86. 201 if nr=71 then hi=65:lo=181
  87. 202 if nr=72 then hi=69:lo=157
  88. 203 if nr=73 then hi=73:lo=193
  89. 204 if nr=74 then hi=78:lo=36
  90. 205 if nr=75 then hi=82:lo=201
  91. 206 if nr=76 then hi=87:lo=182
  92. 207 if nr=77 then hi=92:lo=237
  93. 208 if nr=78 then hi=98:lo=115
  94. 209 if nr=79 then hi=104:lo=78
  95. 210 if nr=80 then hi=110:lo=130
  96. 211 if nr=81 then hi=117:lo=20
  97. 212 if nr=82 then hi=124:lo=10
  98. 213 if nr=83 then hi=131:lo=106
  99. 214 if nr=84 then hi=139:lo=59
  100. 215 if nr=85 then hi=147:lo=130
  101. 216 if nr=86 then hi=156:lo=72
  102. 217 if nr=87 then hi=165:lo=147
  103. 218 if nr=88 then hi=175:lo=107
  104. 219 if nr=89 then hi=185:lo=218
  105. 220 if nr=90 then hi=196:lo=231
  106. 221 if nr=91 then hi=208:lo=156
  107. 222 if nr=92 then hi=221:lo=4
  108. 223 if nr=93 then hi=234:lo=40
  109. 224 if nr=94 then hi=248:lo=20
  110. 225 rem ende notenliste
  111. 230 get a$   :rem tastendruck?
  112. 231 if a$="+" then v=v+1:rem lauter
  113. 232 if a$="-" then v=v-1:rem leiser
  114. 233 if v<0 then v=0     :rem vmin=0
  115. 234 if v>15 then v=15   :rem vmax=15
  116. 235 if a$="e" then s=17 :rem ton ein
  117. 236 if a$="a" then s=0  :rem ton aus
  118. 240 print v,nr,hi,lo
  119. 260 poke l,v:rem lautstaerke
  120. 270 poke a,o*16+5:rem anschlag+abshwel.
  121. 280 poke h,15*16+0:rem halten+auskling.
  122. 290 poke fh,hi:poke fl,lo:rem frequenz
  123. 291 poke si+23,240:rem resonanz
  124. 300 poke w,s:rem wellenform
  125. 310 goto 100
  126.