9 REM PIANO KEYBOARD C 64
10 REM AUS DEM USER-MANUAL
20 REM BEI 345 WURDE LAUTSTAERKE EINGEFUEGT
90 REM PIANO KEYBOARD C 64
100 PRINT""
110 PRINT""
120 PRINT""
130 PRINT""
140 PRINT""
150 PRINT"
160 PRINT"
170 PRINT"
180 PRINT"
190 S=13*4096+1024:DIMF(26):DIMK(255)
200 FORI=0TO28:POKES+I,0:NEXT
210 F1=7040:FORI=1TO26:F(27−I)=F1*5.8+30:F1=F1/2↑(1/12):NEXT
220 K$="
230 FORI=1TOLEN(K$):K(ASC(MID$(K$,I)))=I:NEXT
240 PRINT""
250 AT=0:DE=0:SU=15:RE=9:SV=SU*16+RE:AV=AT*16+DE:WV=16:W=0:M=1:OC=4:HB=256:Z=0
260 FORI=0TO2:POKES+5+I*7,AT*16+DE:POKES+6+I*7,SU*16+RE
270 POKES+2+I*7,4000AND255:POKES+3+I*7,4000/256:NEXT
300 GETA$:IFA$=""THEN300
310 FR=F(K(ASC(A$)))/M:T=V*7:CR=S+T+4:IFFR=ZTHEN500
320 POKES+6+T,Z:REM FINISH DEC/SUS
325 POKES+5+T,Z:REM FINISH ATT/REL
330 POKECR,8:POKECR,0:REM FIX OFF
340 POKES+T,FR−HB*INT(FR/HB):REM SET LO
345 POKE54296,15
350 POKES+1+T,FR/HB:REM SET HI
360 POKES+6+T,SV:REM SET DEC/SUS
365 POKES+5+T,AV:REM SET ATT/REL
370 POKECR,WV+1:FORI=1TO50*AT:NEXT
375 POKECR,WV:REM PULSE
380 IFP=1THENV=V+1:IFV=3THENV=0
400 GOTO300
500 IFA$=""THENM=1:OC=4:GOTO300:REM F1
510 IFA$=""THENM=2:OC=3:GOTO300:REM F3
520 IFA$=""THENM=4:OC=2:GOTO300:REM F5
530 IFA$=""THENM=8:OC=1:GOTO300:REM F7
540 IFA$=""THENW=0:WV=16:GOTO300:REM F2
550 IFA$=""THENW=1:WV=32:GOTO300:REM F4
560 IFA$=""THENW=2:WV=64:GOTO300:REM F6
570 IFA$=""THENW=3:WV=128:GOTO300:REM F8
580 IFA$=""THENP=1−P:GOTO300:REM SPACE
590 IFA$=""THEN200:REM CLR
600 GOTO300
800 PRINT"
810 GETA$:IFA$=""THEN810:WAIT FOR A KEY
820 PRINTA$:RETURN
3000 GETA$:IFA$=""THEN300
3100 FR=F(K(ASC(A$)))/M:T=V*7:CR=S+T+4:IFFR=ZTHEN500
3400 POKES+T,FR−HB*INT(FR/HB):REM SET LO
3500 POKES+1+T,FR/HB:REM SET HI
5800 IFA$=""THEN200:REM CLR
READY.