Home » Personal collection » Commodore disks » disk42b_unlabelled.d64 » frequency2
frequency2
This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.
Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.
| Tape/disk: | Home » Personal collection » Commodore disks » disk42b_unlabelled.d64 |
| Filename: | frequency2 |
| Read OK: | ✔ |
| File size: | 03D0 bytes |
| Load address: | 0801 |
| Exec address: | 0000 |
File contents
10 REM LISTENS TO SPECTRUM MUSIC
20 REM + DECODES FREQUENCIES
30 :
35 AD=$1900
40 FOR BY=$1900 TO $9000
50 FOR B=7 TO 0 STEP -1
60 Y=PEEK(BY):ZC=ZC+1:TT=TT+1
65 IF (Y AND 2^B) AND ZC>32 THEN GOSUB 1000
70 IF (Y AND 2^B) AND ZC>2 THEN DN=DN+1:ZC=0:BT=TT
90 NEXT B,BY
110 END
120 :
1000 IF DN<50 THEN 2000
1010 F=(5058/(BT/(DN*1.2))-470)/0.05961
1020 GOSUB 3000
2000 DN=0:BT=0:TT=0:RETURN
2990 :
3000 IF BT<330 THEN L=0:GOTO 3030
3010 IF BT<660 THEN L=2:GOTO 3030
3020 L=4:REM CROTCHET
3030 PRINT L,F;
3040 FC=1:RESTORE
3050 READ FX:IF FX>F THEN 3070
3060 FC=FC+1:GOTO 3050
3070 POKE AD,FC:POKE AD+1,0:POKE AD+2,0
3080 POKE AD+3,0:POKE AD+4,0
3090 POKE AD+5,L
3100 POKE AD+6,0:POKE AD+7,0
3110 PRINT"ðŸ¿"
3500 AD=AD+8:RETURN
5000 DATA 1136,1204,1275,1351,1432,1517,1607,1703,1804,1911,2025,2145,2273
5110 DATA 2408,2551,2703,2864,3034,3215,3406,3608,3823,4050,4291,4547,4817,5103
5120 DATA 5407,5728,6069,6430,6812,7217,7647,8101,8583,9094,9634,10207,10814
5130 DATA 11457,12139,12860,13625,14435,15294,16203,17167,18188,19269,20415
5140 DATA 21629,22915,24278,25721,27251,28871,30588,32407,34334,36376,38539
5150 DATA 99999
$ � LISTENS TO SPECTRUM MUSIC E � + DECODES FREQUENCIES K : X# AD�$1900 o( � BY�$1900 � $9000 �2 � B�7 � 0 � �1 �<