Created
September 24, 2019 19:05
-
-
Save Frank-Buss/b9a37249d32d3cbdeff29433bcd4bba8 to your computer and use it in GitHub Desktop.
play some music on the Commander X16
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
100 O=5:N=10:GOSUB 1000 | |
110 O=5:N=10:GOSUB 1000 | |
120 O=6:N=4:GOSUB 1000 | |
130 O=6:N=4:GOSUB 1000 | |
140 O=6:N=6:GOSUB 1000 | |
150 O=6:N=6:GOSUB 1000 | |
160 O=6:N=4:GOSUB 1000 | |
170 O=6:N=4:GOSUB 1000 | |
900 END | |
1000 REM N = NOTE, O = OCTAVE | |
1010 REM ENABLE L/R, SET CONNECTION 7 | |
1020 POKE $9FE0, $20 : POKE $9FE1, $C7 | |
1030 REM SET FREQUENCY | |
1040 POKE $9FE0, $28 : POKE $9FE1, O*16+N | |
1050 REM ATTACK | |
1060 POKE $9FE0, $80 : POKE $9FE1, $18 | |
1070 REM RELEASE | |
1080 POKE $9FE0, $E0 : POKE $9FE1, $0E | |
1090 REM NOTE ON | |
1100 POKE $9FE0, $08 : POKE $9FE1, $08 | |
1110 REM WAIT A BIT | |
1120 FOR I = 1 TO 2000:NEXT | |
1130 REM NOTE OFF | |
1140 POKE $9FE0, $08 : POKE $9FE1, $00 | |
1150 FOR I = 1 TO 1000:NEXT | |
1160 RETURN |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment