home *** CD-ROM | disk | FTP | other *** search
/ 64'er Special 62 / 64er_Magazin_Sonderheft_62_19xx_Markt__Technik_de_Side_B.d64 / synthesizer (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  5KB  |  179 lines

  1. 0 :poke2053,143:load" sy",8,1::
  2. 1 :poke2081,143:load" tasten",8,1
  3. 2 :
  4. 3 rem  ********************************
  5. 4 rem  ********************************
  6. 5 rem  **                            **
  7. 6 rem  **  synthesizer (2.fassung)   **
  8. 7 rem  **  ===========               **
  9. 8 rem  **                            **
  10. 9 rem  ** <c> georg gerber okt. 1985 **
  11. 10 rem **                            **
  12. 11 rem **     7500 karlsruhe 51      **
  13. 12 rem **                            **
  14. 13 rem **     tulpenstr.10           **
  15. 14 rem **                            **
  16. 15 rem **     tel.: 0721/31273       **
  17. 16 rem **                            **
  18. 17 rem **                            **
  19. 20 rem ********************************
  20. 21 rem ********************************
  21. 25 :
  22. 32 rem *** parameter setzten ------------
  23. 33 ff=1000:p=2048:rz=7:at=0:de=0:su=15:re=11:fa=0:l=15:w3=1:f2=1
  24. 34 gosub20000:rem bildschirm loeschen
  25. 35 :
  26. 36 rem *** adressen setzen -------------
  27. 37 si=54272:rem * basisadresse 'sid'
  28. 38 pokesi+24,15:pokesi+23,0:pokesi+4,0:pokesi+11,0:pokesi+18,0
  29. 39 pokesi+5,0:pokesi+6,251:pokesi+12,0:pokesi+13,251:pokesi+19,0:pokesi+20,251
  30. 40 a=w1*128+w2*64+w3*32+w4*16+w5*8
  31. 41 poke8*4096+11*256,a
  32. 42 pokesi+3,8:pokesi+10,8:pokesi+17,8
  33. 43 :
  34. 44 rem *** grundton stimmen ------------
  35. 45 print"grundton stimmen"
  36. 46 print"[197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197]"
  37. 47 print"f1++ / f3+ / f5- / f7 --"
  38. 48 print" <return> : weiter"
  39. 49 pokesi+4,33
  40. 50 g=2228:w=2^(1/12)
  41. 60 a=g:gosub20500:pokesi,lb:pokesi+1,hb
  42. 70 ifpeek(197)=3theng=g-100:ifg<350theng=350
  43. 71 ifpeek(197)=6theng=g-1:ifg<350theng=350
  44. 72 ifpeek(197)=5theng=g+1:ifg>6501theng=6501
  45. 73 ifpeek(197)=4theng=g+100:ifg>6501theng=6501
  46. 75 ifpeek(197)=1then80
  47. 77 goto60
  48. 80 pokesi+4,0:print"moment bitte"
  49. 90 rem *** tonleiter berechnen **
  50. 100 fori=0to40:a=g*w^i:gosub20500:poke8*4096+5*256+9+2*i,lb
  51. 110 poke8*4096+5*256+10+2*i,hb:next
  52. 120 poke198,0
  53. 123 :
  54. 200 rem *** hauptmenu ------------------
  55. 210 gosub20000:print""
  56. 220 print"w ... wellenform"
  57. 221 print"p ... pulsbreite"
  58. 222 print"f ... filter"
  59. 223 print"l ... lautstaerke"
  60. 224 print"a ... adsr-huellkurve"
  61. 225 print"s ... spielen"
  62. 226 print"e ... ende"
  63. 230 print" bitte waehlen"
  64. 240 geta$:ifa$=""then240
  65. 250 ifa$="w"then300
  66. 251 ifa$="p"then500
  67. 252 ifa$="f"then700
  68. 253 ifa$="l"then900
  69. 254 ifa$="a"then1100
  70. 255 ifa$="s"then1300
  71. 256 ifa$="e"then1500
  72. 260 goto240
  73. 266 :
  74. 300 rem *** wellenform -----------------
  75. 310 gosub20000:print"       wellenform"
  76. 320 print"rauschen  ";w1
  77. 321 print"rechteck  ";w2
  78. 322 print"saegezahn  ";w3
  79. 323 print"dreieck  ";w4
  80. 324 print"test  ";w5
  81. 330 print"[145][145][145][145][145][145]"
  82. 339 input"";a$:ifval(a$)=0anda$<>"0"thenprint"[145][145]":goto339
  83. 340 w1=val(a$):ifw1<>1andw1<>0thenprint"[145][145]":goto339
  84. 341 input"";a$:ifval(a$)=0anda$<>"0"thenprint"[145][145]":goto341
  85. 342 w2=val(a$):ifw2<>1andw2<>0thenprint"[145][145]":goto341
  86. 343 input"";a$:ifval(a$)=0anda$<>"0"thenprint"[145][145]":goto343
  87. 344 w3=val(a$):ifw3<>1andw3<>0thenprint"[145][145]":goto343
  88. 345 input"";a$:ifval(a$)=0anda$<>"0"thenprint"[145][145]":goto345
  89. 346 w4=val(a$):ifw4<>1andw4<>0thenprint"[145][145]":goto345
  90. 347 input"";a$:ifval(a$)=0anda$<>"0"thenprint"[145][145]":goto347
  91. 348 w5=val(a$):ifw5<>1andw5<>0thenprint"[145][145]":goto347
  92. 350 a=w1*128+w2*64+w3*32+w4*16+w5*8
  93. 360 poke8*4096+11*256,a
  94. 370 goto200
  95. 377 :
  96. 500 rem *** pulsbreite -----------------
  97. 510 gosub20000:print"         pulsbreite"
  98. 520 g=p:m=4095:gosub21000:p=g
  99. 530 a=g:gosub20500:pokesi+2,lb:pokesi+3,hb:pokesi+9,lb:pokesi+10,hb
  100. 531 pokesi+16,lb:pokesi+17,hb
  101. 540 goto200
  102. 544 :
  103. 700 rem *** filter ---------------------
  104. 710 gosub20000:print"       filter"
  105. 720 print"frequenz":g=ff:m=2047:gosub21000:ff=g
  106. 730 print"filter a[146]n / au[146]s"
  107. 735 geta$:ifa$<>"a"anda$<>"u"then735
  108. 740 mo=7:ifa$="u"thenmo=0
  109. 750 print"resonanz":g=rz:m=15:gosub21000:rz=g
  110. 760 pokesi+23,g*16+mo
  111. 780 print"art:"
  112. 800 print"tief ";f1
  113. 801 print"band ";f2
  114. 802 print"hoch ";f3
  115. 803 print"[145][145][145][145]":poke198,0
  116. 810 input"";a$:ifa$<>"0"andval(a$)=0thenprint"[145][145]":goto810
  117. 811 f1=val(a$):iff1<>1andf1<>0thenprint"[145][145]":goto810
  118. 812 input"";a$:ifa$<>"0"andval(a$)=0thenprint"[145][145]":goto812
  119. 813 f2=val(a$):iff2<>1andf2<>0thenprint"[145][145]":goto812
  120. 814 input"";a$:ifa$<>"0"andval(a$)=0thenprint"[145][145]":goto814
  121. 815 f3=val(a$):iff3<>1andf3<>0thenprint"[145][145]":goto814
  122. 820 fa=f1*16+f2*32+f3*64
  123. 830 pokesi+24,fa+l:goto200
  124. 888 :
  125. 900 rem *** lautstaerke ----------------
  126. 910 gosub20000:print"         lautstaerke"
  127. 920 g=l:m=15:gosub21000:l=g:pokesi+24,l+fa:goto200
  128. 999 :
  129. 1100 rem *** adsr ----------------------
  130. 1110 gosub20000:print"    adsr-huellkurve"
  131. 1120 print"attack":g=at:m=15:gosub21000:at=g:poke198,0
  132. 1130 print"decay":g=de:m=15:gosub21000:de=g:poke198,0
  133. 1140 print"sustain":g=su:m=15:gosub21000:su=g:poke198,0
  134. 1150 print"release":g=re:m=15:gosub21000:re=g:poke198,0
  135. 1180 a=at*16+de:pokesi+5,a:pokesi+12,a:pokesi+19,a
  136. 1185 a=su*16+re:pokesi+6,a:pokesi+13,a:pokesi+20,a
  137. 1190 goto200
  138. 1195 :
  139. 1300 rem *** spielen -------------------
  140. 1310 gosub20000:print"        spielen"
  141. 1315 poke53281,4
  142. 1320 print"f7:ende"
  143. 1327 print"[162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162]";
  144. 1330 print"q[144]2w[144]3er[144]5t[144]6y[144]7ui[144]9o[144]0p@[144]-*[144]\^[144]cz";
  145. 1331 print"x[144]dc[144]fvb[144]hn[144]jm[144]k<>[144]:/[144];";
  146. 1340 print" [144]  [144]  [165][144]  [144]  [144]  [165][144]  [144]  [165][144]  [144]  [144]  ";
  147. 1341 print"[180][144]  [144]  [165][144]  [144]  [144]  [165][144]  [144] ";
  148. 1350 print" [194] [194] [165][194] [194] [194] [165][194] [194] [165][194] [194] [194] ";
  149. 1351 print"[180][194] [194] [180][194] [194] [194] [180][194] [194]";
  150. 1355 print"[146][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184]"
  151. 1390 sys8*4096:poke198,0:goto200
  152. 1440 :
  153. 1500 rem *** ende ----------------------
  154. 1510 gosub20000:print"auf wiedersehen[154]"
  155. 1520 sys42115:rem * end ohne ready
  156. 19997 :
  157. 19998 :
  158. 19999 :
  159. 20000 rem *** bildschirm ---------------
  160. 20005 poke53281,6
  161. 20010 print"[147]        polyphoner synthesizer"
  162. 20011 print"       ========================"
  163. 20012 print"                    <c> georg gerber '85"
  164. 20020 return
  165. 20025 :
  166. 20500 rem *** lb / hb aus a berechnen --
  167. 20510 hb=int(a/256):lb=a-hb*256:return
  168. 20560 :
  169. 21000 rem *** parameter einstellen -----
  170. 21002 print"f1 ++ / f3 + / f5 - / f7 -- "
  171. 21003 print"<return> : ende"
  172. 21010 print"[145]     [157][157][157][157][157]";g
  173. 21020 ifpeek(197)=3theng=g-100:ifg<0theng=0
  174. 21030 ifpeek(197)=6theng=g-1:ifg<0theng=0
  175. 21040 ifpeek(197)=5theng=g+1:ifg>mtheng=m
  176. 21050 ifpeek(197)=4theng=g+100:ifg>mtheng=m
  177. 21060 ifpeek(197)=1thenreturn
  178. 21070 goto21010
  179.