8-Bit Software Online Conversion
Night Music (Master) - Listing
10REM Mozart - The Little Night Music
20REM for 8-BS Public Domain
30REM by M.Bobrowski 9'91
40
50MODE128:HIMEM=TOP+&D9:H%=HIMEM
60DIM ch%(3),e%(2),note%(2)
70ENVELOPE1,3,0,0,0,0,0,0,125,-5,-2,-
3,125,100
80OSCLI"FX108,1":OSCLI"L.S.Mozart2 30
00":OSCLI"FX108,0":VDU23;8202;0;0;0;
90FORI%=0TO3:PROCset`up(H%):PROCplay:
H%=ch%(3):NEXT
100END
110
120DEFPROCset`up(N%)
130ch%(0)=N%:FOR J%=1 TO 3
140REPEAT N%=N%+1:UNTIL?N%=&FF
150N%=N%+2:ch%(J%)=N%
160NEXT
170ENDPROC
180
190DEFPROCplay
200FORC%=0TO2:note%(C%)=0:e%(C%)=0:NEX
T
210REPEAT
220IF ADVAL(-6)>0 PROCsound(0)
230IF ADVAL(-7)>0 PROCsound(1)
240IF ADVAL(-8)>0 PROCsound(2)
250UNTIL e%(0) AND e%(1) AND e%(2)
260ENDPROC
270
280DEFPROCsound(C%)
290P%=ch%(C%)?(note%(C%)*2):D%=ch%(C%)
?(note%(C%)*2+1)
300IF P%=255 e%(C%)=TRUE:ENDPROC
310IF P%=0 E%=0 ELSE E%=1
320SOUND C%+1,E%,P%,D%
330note%(C%)=note%(C%)+1
340ENDPROC