home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C64'er
/
C64'er.iso
/
sh6x
/
sh62b.d64
/
synthesizer
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
1995-03-30
|
5KB
|
179 lines
0 :POKE2053,143:LOAD" SY",8,1::
1 :POKE2081,143:LOAD" TASTEN",8,1
2 :
3 REM ********************************
4 REM ********************************
5 REM ** **
6 REM ** SYNTHESIZER (2.FASSUNG) **
7 REM ** =========== **
8 REM ** **
9 REM ** <C> GEORG GERBER OKT. 1985 **
10 REM ** **
11 REM ** 7500 KARLSRUHE 51 **
12 REM ** **
13 REM ** TULPENSTR.10 **
14 REM ** **
15 REM ** TEL.: 0721/31273 **
16 REM ** **
17 REM ** **
20 REM ********************************
21 REM ********************************
25 :
32 REM *** PARAMETER SETZTEN ------------
33 FF=1000:P=2048:RZ=7:AT=0:DE=0:SU=15:RE=11:FA=0:L=15:W3=1:F2=1
34 GOSUB20000:REM BILDSCHIRM LOESCHEN
35 :
36 REM *** ADRESSEN SETZEN -------------
37 SI=54272:REM * BASISADRESSE 'SID'
38 POKESI+24,15:POKESI+23,0:POKESI+4,0:POKESI+11,0:POKESI+18,0
39 POKESI+5,0:POKESI+6,251:POKESI+12,0:POKESI+13,251:POKESI+19,0:POKESI+20,251
40 A=W1*128+W2*64+W3*32+W4*16+W5*8
41 POKE8*4096+11*256,A
42 POKESI+3,8:POKESI+10,8:POKESI+17,8
43 :
44 REM *** GRUNDTON STIMMEN ------------
45 PRINT"GRUNDTON STIMMEN"
46 PRINT"[197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197]"
47 PRINT"F1++ / F3+ / F5- / F7 --"
48 PRINT" <RETURN> : WEITER"
49 POKESI+4,33
50 G=2228:W=2^(1/12)
60 A=G:GOSUB20500:POKESI,LB:POKESI+1,HB
70 IFPEEK(197)=3THENG=G-100:IFG<350THENG=350
71 IFPEEK(197)=6THENG=G-1:IFG<350THENG=350
72 IFPEEK(197)=5THENG=G+1:IFG>6501THENG=6501
73 IFPEEK(197)=4THENG=G+100:IFG>6501THENG=6501
75 IFPEEK(197)=1THEN80
77 GOTO60
80 POKESI+4,0:PRINT"MOMENT BITTE"
90 REM *** TONLEITER BERECHNEN **
100 FORI=0TO40:A=G*W^I:GOSUB20500:POKE8*4096+5*256+9+2*I,LB
110 POKE8*4096+5*256+10+2*I,HB:NEXT
120 POKE198,0
123 :
200 REM *** HAUPTMENU ------------------
210 GOSUB20000:PRINT""
220 PRINT"W ... WELLENFORM"
221 PRINT"P ... PULSBREITE"
222 PRINT"F ... FILTER"
223 PRINT"L ... LAUTSTAERKE"
224 PRINT"A ... ADSR-HUELLKURVE"
225 PRINT"S ... SPIELEN"
226 PRINT"E ... ENDE"
230 PRINT" BITTE WAEHLEN"
240 GETA$:IFA$=""THEN240
250 IFA$="W"THEN300
251 IFA$="P"THEN500
252 IFA$="F"THEN700
253 IFA$="L"THEN900
254 IFA$="A"THEN1100
255 IFA$="S"THEN1300
256 IFA$="E"THEN1500
260 GOTO240
266 :
300 REM *** WELLENFORM -----------------
310 GOSUB20000:PRINT" WELLENFORM"
320 PRINT"RAUSCHEN ";W1
321 PRINT"RECHTECK ";W2
322 PRINT"SAEGEZAHN ";W3
323 PRINT"DREIECK ";W4
324 PRINT"TEST ";W5
330 PRINT"[145][145][145][145][145][145]"
339 INPUT"";A$:IFVAL(A$)=0ANDA$<>"0"THENPRINT"[145][145]":GOTO339
340 W1=VAL(A$):IFW1<>1ANDW1<>0THENPRINT"[145][145]":GOTO339
341 INPUT"";A$:IFVAL(A$)=0ANDA$<>"0"THENPRINT"[145][145]":GOTO341
342 W2=VAL(A$):IFW2<>1ANDW2<>0THENPRINT"[145][145]":GOTO341
343 INPUT"";A$:IFVAL(A$)=0ANDA$<>"0"THENPRINT"[145][145]":GOTO343
344 W3=VAL(A$):IFW3<>1ANDW3<>0THENPRINT"[145][145]":GOTO343
345 INPUT"";A$:IFVAL(A$)=0ANDA$<>"0"THENPRINT"[145][145]":GOTO345
346 W4=VAL(A$):IFW4<>1ANDW4<>0THENPRINT"[145][145]":GOTO345
347 INPUT"";A$:IFVAL(A$)=0ANDA$<>"0"THENPRINT"[145][145]":GOTO347
348 W5=VAL(A$):IFW5<>1ANDW5<>0THENPRINT"[145][145]":GOTO347
350 A=W1*128+W2*64+W3*32+W4*16+W5*8
360 POKE8*4096+11*256,A
370 GOTO200
377 :
500 REM *** PULSBREITE -----------------
510 GOSUB20000:PRINT" PULSBREITE"
520 G=P:M=4095:GOSUB21000:P=G
530 A=G:GOSUB20500:POKESI+2,LB:POKESI+3,HB:POKESI+9,LB:POKESI+10,HB
531 POKESI+16,LB:POKESI+17,HB
540 GOTO200
544 :
700 REM *** FILTER ---------------------
710 GOSUB20000:PRINT" FILTER"
720 PRINT"FREQUENZ":G=FF:M=2047:GOSUB21000:FF=G
730 PRINT"FILTER A[146]N / AU[146]S"
735 GETA$:IFA$<>"A"ANDA$<>"U"THEN735
740 MO=7:IFA$="U"THENMO=0
750 PRINT"RESONANZ":G=RZ:M=15:GOSUB21000:RZ=G
760 POKESI+23,G*16+MO
780 PRINT"ART:"
800 PRINT"TIEF ";F1
801 PRINT"BAND ";F2
802 PRINT"HOCH ";F3
803 PRINT"[145][145][145][145]":POKE198,0
810 INPUT"";A$:IFA$<>"0"ANDVAL(A$)=0THENPRINT"[145][145]":GOTO810
811 F1=VAL(A$):IFF1<>1ANDF1<>0THENPRINT"[145][145]":GOTO810
812 INPUT"";A$:IFA$<>"0"ANDVAL(A$)=0THENPRINT"[145][145]":GOTO812
813 F2=VAL(A$):IFF2<>1ANDF2<>0THENPRINT"[145][145]":GOTO812
814 INPUT"";A$:IFA$<>"0"ANDVAL(A$)=0THENPRINT"[145][145]":GOTO814
815 F3=VAL(A$):IFF3<>1ANDF3<>0THENPRINT"[145][145]":GOTO814
820 FA=F1*16+F2*32+F3*64
830 POKESI+24,FA+L:GOTO200
888 :
900 REM *** LAUTSTAERKE ----------------
910 GOSUB20000:PRINT" LAUTSTAERKE"
920 G=L:M=15:GOSUB21000:L=G:POKESI+24,L+FA:GOTO200
999 :
1100 REM *** ADSR ----------------------
1110 GOSUB20000:PRINT" ADSR-HUELLKURVE"
1120 PRINT"ATTACK":G=AT:M=15:GOSUB21000:AT=G:POKE198,0
1130 PRINT"DECAY":G=DE:M=15:GOSUB21000:DE=G:POKE198,0
1140 PRINT"SUSTAIN":G=SU:M=15:GOSUB21000:SU=G:POKE198,0
1150 PRINT"RELEASE":G=RE:M=15:GOSUB21000:RE=G:POKE198,0
1180 A=AT*16+DE:POKESI+5,A:POKESI+12,A:POKESI+19,A
1185 A=SU*16+RE:POKESI+6,A:POKESI+13,A:POKESI+20,A
1190 GOTO200
1195 :
1300 REM *** SPIELEN -------------------
1310 GOSUB20000:PRINT" SPIELEN"
1315 POKE53281,4
1320 PRINT"F7:ENDE"
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]";
1330 PRINT"Q[144]2W[144]3ER[144]5T[144]6Y[144]7UI[144]9O[144]0P@[144]-*[144]\^[144]CZ";
1331 PRINT"X[144]DC[144]FVB[144]HN[144]JM[144]K<>[144]:/[144];";
1340 PRINT" [144] [144] [165][144] [144] [144] [165][144] [144] [165][144] [144] [144] ";
1341 PRINT"[180][144] [144] [165][144] [144] [144] [165][144] [144] ";
1350 PRINT" [194] [194] [165][194] [194] [194] [165][194] [194] [165][194] [194] [194] ";
1351 PRINT"[180][194] [194] [180][194] [194] [194] [180][194] [194]";
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]"
1390 SYS8*4096:POKE198,0:GOTO200
1440 :
1500 REM *** ENDE ----------------------
1510 GOSUB20000:PRINT"AUF WIEDERSEHEN[154]"
1520 SYS42115:REM * END OHNE READY
19997 :
19998 :
19999 :
20000 REM *** BILDSCHIRM ---------------
20005 POKE53281,6
20010 PRINT"[147] POLYPHONER SYNTHESIZER"
20011 PRINT" ========================"
20012 PRINT" <C> GEORG GERBER '85"
20020 RETURN
20025 :
20500 REM *** LB / HB AUS A BERECHNEN --
20510 HB=INT(A/256):LB=A-HB*256:RETURN
20560 :
21000 REM *** PARAMETER EINSTELLEN -----
21002 PRINT"F1 ++ / F3 + / F5 - / F7 -- "
21003 PRINT"<RETURN> : ENDE"
21010 PRINT"[145] [157][157][157][157][157]";G
21020 IFPEEK(197)=3THENG=G-100:IFG<0THENG=0
21030 IFPEEK(197)=6THENG=G-1:IFG<0THENG=0
21040 IFPEEK(197)=5THENG=G+1:IFG>MTHENG=M
21050 IFPEEK(197)=4THENG=G+100:IFG>MTHENG=M
21060 IFPEEK(197)=1THENRETURN
21070 GOTO21010