home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
64'er
/
64ER_CD.iso
/
90xx
/
9011a.d64
/
minisynthi
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
1995-03-30
|
2KB
|
43 lines
0 REM (W) BY JOMO WALLA
10 SD=54272:FORI=0TO24:POKESD+I,0:NEXT:DIMHI%(1000):DIMLO%(1000):DIMTD%(1000,1)
20 DIMTH%(256):DIMTL%(256):ZE=161
30 TB$="ZSXDCVGBHNJMQ2W3ER5T6Y7UI9O0P@-*\^"
40 FOR I=1 TO LEN(TB$)
50 FR=63508/2^(1/12)^(94-35-I)
60 HI%=FR/256:LO%=FR-256*HI%
70 TA%=ASC(MID$(TB$,I,1))
80 TH%(TA%)=HI%:TL%(TA%)=LO%:NEXTI:I=0
100 PRINT"[147]MENU:":PRINT"1.TON EINSTELLEN":PRINT"2.LIED AUFNEHMEN"
110 PRINT"3.LIED SPIELEN":PRINT"4.LIED SPEICHERN":PRINT"5.LIED LADEN"
180 GETG$:G=VAL(G$):IFG<1ORG>5THEN180
190 ON G GOSUB 1000,2000,3000,4000,5000
200 GOTO 100
1000 INPUT"[147]LAUTSTAERKE(0-15)";LS
1010 INPUT"WELLENFORM(16/32/64/128)";WF
1020 INPUT"ATTACK(0-15)";A:INPUT"DECAY(0-15)";D:INPUT"SUSTAIN(0-15)";S
1030 INPUT"RELEASE(0-15)";R:IF WF=64 THEN INPUT"PULSBREITE(0-65535)";PB
1040 INPUT"FILTERMODUS(0/1/2/4)";FM:IF FM=0 THEN FF=0:FZ=0:GOTO1100
1050 INPUT"FILTERFREQUENZ(0-2047)";FF
1060 INPUT"FILTERRESONANZ(0-15)";FZ
1100 POKESD+24,16*FM+LS:POKESD+5,16*A+D:POKESD+6,16*S+R:POKESD+23,16*FZ+SGN(FM)
1110 POKESD+21,FF-INT(FF/8)*8:POKESD+22,INT(FF/8):POKESD+2,PB-INT(PB/256)*256
1120 POKESD+3,INT(PB/256):RETURN
2000 GETG$:IFG$=""THEN2000
2010 TP=PEEK(203):FORI=1TO1000:POKEZE,0:POKEZE+1,0:HI%(I)=TH%(G):LO%(I)=TL%(G)
2030 POKESD,LO%(I):POKESD+1,HI%(I):POKE SD+4,WF+1
2035 IFPEEK(203)=TPTHEN2035
2040 TD%(I,0)=PEEK(ZE+1)+256*PEEK(ZE):POKESD+4,WF:POKE198,0:WAIT203,64,255
2050 G=PEEK(60289+PEEK(203))
2060 POKE198,0:TP=PEEK(203):TD%(I,1)=PEEK(ZE+1)+256*PEEK(ZE):IFG=95THENRETURN
2070 NEXTI:RETURN
3000 FORJ=1TOI:POKEZE+1,0:POKEZE,0:POKESD,LO%(J):POKESD+1,HI%(J)
3020 POKESD+4,WF+1:IF PEEK(ZE+1)+256*PEEK(ZE)<TD%(J,0)THEN3020
3040 POKESD+4,WF:IF PEEK(ZE+1)+256*PEEK(ZE)<TD%(J,1)THEN3040
3050 NEXT J:RETURN
4000 INPUT"NAME";N$:N$=N$+",S,W":OPEN1,8,2,N$:A$=CHR$(13):PRINT#1,LS,A$,WF
4010 PRINT#1,PB,A$,A,A$,D,A$,S,A$,R,A$,FM,A$,FF,A$,FZ,A$,I:FORJ=1TOI
4020 PRINT#1,LO%(J),A$,HI%(J),A$,TD%(J,0),A$,TD%(J,1):NEXTJ:CLOSE1:RETURN
5000 INPUT"NAME";N$:N$=N$+",S,R":OPEN1,8,2,N$:INPUT#1,LS,WF,PB,A,D,S,R,FM,FF,FZ
5010 INPUT#1,I:GOSUB1100
5020 FORJ=1TOI:INPUT#1,LO%(J),HI%(J),TD%(J,0),TD%(J,1):NEXTJ:CLOSE1:RETURN