home *** CD-ROM | disk | FTP | other *** search
/ C64'er / C64'er.iso / sh6x / sh62b.d64 / synthesizer (.txt) < prev    next >
Commodore BASIC  |  1995-03-30  |  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.