Home » Personal collection » Acorn hard disk » files » music » Notate/PlayDraw
Notate/PlayDraw
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 » Acorn hard disk » files » music |
Filename: | Notate/PlayDraw |
Read OK: | ✔ |
File size: | 053F bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
10REM Setup FS 20MODE0 30DIM SPACE &2000:pi=0:ad=0 40PRINT"Notate File Interpreter"'"Dominic Ford"'' 50ON ERROR REPORT:PRINT" @ ";ERL;" playing &";~pi;" @ &";~ad-SPACE:END 60*RAM 70*DIR $.NOTATE 80: 90REM Load file 100INPUT"Filename";f$ 110DIM pi$(100) 120FORx=SPACE TO (SPACE+&1FFF)STEP4:!x=0:NEXT 130OSCLI "LOAD "+f$+" "+STR$~SPACE 140: 150REM Display info 160ad=SPACE+10 170IF ?ad<>10 THEN PRINT"Title: ";:REPEAT VDU?ad:ad=ad+1:UNTIL ?ad=&A:PRINT 180ad=ad+1 190IF ?ad<>10 THEN PRINT"Author: ";:REPEAT VDU?ad:ad=ad+1:UNTIL ?ad=&A:PRINT 200: 210REM Find voices 220DIM ad(6),len(6) 230ad=ad+35:ad(0)=ad:top=1 240REPEAT 250 REPEAT ad=ad+2:UNTIL (!ad AND&FFFF)=&4040 260 ad=ad+51:ad(top)=ad:top=top+1 270UNTIL (top=6) OR ((?(ad+1))AND&80)=0 280PRINT"Voices: ";top-1'' 290FORr=0TOtop:PRINT~(ad(r)-SPACE):NEXT 300: 310REM Do key signiture 320FORoct=0TO8 330FOR s=0 TO 6 340pi$(s+7*oct)=CHR$(65+s)+STR$oct 350NEXT, 360: 370REM Play it! 380PRINT"Playing..." 390*SPOOL PLAYTEMP 400st$="":FORv=0TOtop-2:PROCprocess(v):NEXT:PRINTst$;CHR$10; 410REPEAT 420st$="" 430FORv=0TOtop-2 440 len(v)=len(v)-1 450 IF len(v)=0 THEN PROCprocess(v) ELSE st$=st$+" " 460NEXT:IF st$<>STRING$(top-1," ")THENPRINTst$;CHR$10; 470UNTIL (!ad(0) AND &FFFF)=&4040 480*SPOOL 490END 500: 510DEFPROCprocess(v) 520len(v)=2^(?(ad(v)+1) AND 7) 530IF (?(ad(v)+1) AND8)<>0 THEN len(v)=len(v)*1.5 540IF (?ad(v) AND 63)>0 THEN 550 st$=st$+pi$(((?ad(v)) AND 63)-21-1+7*3)+CHR$(48+(?(ad(v)+1) AND 7)) 560 IF (?(ad(v)+1) AND8)<>0 THEN st$=st$+"." ELSE st$=st$+" " 570 st$=st$+" " 580ELSE 590 st$=st$+"Rest " 600ENDIF 610ad(v)=ad(v)+2 620ENDPROC
� Setup FS �0 � SPACE &2000:pi=0:ad=0 (/�"Notate File Interpreter"'"Dominic Ford"'' 26� � �:�" @ ";�;" playing &";~pi;" @ &";~ad-SPACE:� <*RAM F*DIR $.NOTATE P: Z� Load file d�"Filename";f$ n� pi$(100) x%�x=SPACE � (SPACE+&1FFF)�4:!x=0:� �� "LOAD "+f$+" "+�~SPACE �: �� Display info �ad=SPACE+10 �6� ?ad<>10 � �"Title: ";:� �?ad:ad=ad+1:� ?ad=&A:� �ad=ad+1 �6� ?ad<>10 � �"Author: ";:� �?ad:ad=ad+1:� ?ad=&A:� �: �� Find voices �� ad(6),len(6) �ad=ad+35:ad(0)=ad:top=1 �� �# � ad=ad+2:� (!ad �&FFFF)=&4040 " ad=ad+51:ad(top)=ad:top=top+1 !� (top=6) � ((?(ad+1))�&80)=0 �"Voices: ";top-1'' "�r=0�top:�~(ad(r)-SPACE):� ,: 6� Do key signiture @�oct=0�8 J � s=0 � 6 Tpi$(s+7*oct)=�(65+s)+�oct ^�, h: r� Play it! |�"Playing..." �*SPOOL PLAYTEMP �-st$="":�v=0�top-2:�process(v):�:�st$;�10; �� � st$="" ��v=0�top-2 � len(v)=len(v)-1 �/ � len(v)=0 � �process(v) � st$=st$+" " �&�:� st$<>�top-1," ")��st$;�10; �� (!ad(0) � &FFFF)=&4040 � *SPOOL �� �: ���process(v) len(v)=2^(?(ad(v)+1) � 7) ,� (?(ad(v)+1) �8)<>0 � len(v)=len(v)*1.5 � (?ad(v) � 63)>0 � &A st$=st$+pi$(((?ad(v)) � 63)-21-1+7*3)+�(48+(?(ad(v)+1) � 7)) 05 � (?(ad(v)+1) �8)<>0 � st$=st$+"." � st$=st$+" " : st$=st$+" " D� N st$=st$+"Rest " X� bad(v)=ad(v)+2 l� �
00000000 0d 00 0a 0e f4 20 53 65 74 75 70 20 46 53 0d 00 |..... Setup FS..| 00000010 14 06 eb 30 0d 00 1e 1b de 20 53 50 41 43 45 20 |...0..... SPACE | 00000020 26 32 30 30 30 3a 70 69 3d 30 3a 61 64 3d 30 0d |&2000:pi=0:ad=0.| 00000030 00 28 2f f1 22 4e 6f 74 61 74 65 20 46 69 6c 65 |.(/."Notate File| 00000040 20 49 6e 74 65 72 70 72 65 74 65 72 22 27 22 44 | Interpreter"'"D| 00000050 6f 6d 69 6e 69 63 20 46 6f 72 64 22 27 27 0d 00 |ominic Ford"''..| 00000060 32 36 ee 20 85 20 f6 3a f1 22 20 40 20 22 3b 9e |26. . .:." @ ";.| 00000070 3b 22 20 70 6c 61 79 69 6e 67 20 26 22 3b 7e 70 |;" playing &";~p| 00000080 69 3b 22 20 40 20 26 22 3b 7e 61 64 2d 53 50 41 |i;" @ &";~ad-SPA| 00000090 43 45 3a e0 0d 00 3c 08 2a 52 41 4d 0d 00 46 11 |CE:...<.*RAM..F.| 000000a0 2a 44 49 52 20 24 2e 4e 4f 54 41 54 45 0d 00 50 |*DIR $.NOTATE..P| 000000b0 05 3a 0d 00 5a 0f f4 20 4c 6f 61 64 20 66 69 6c |.:..Z.. Load fil| 000000c0 65 0d 00 64 12 e8 22 46 69 6c 65 6e 61 6d 65 22 |e..d.."Filename"| 000000d0 3b 66 24 0d 00 6e 0e de 20 70 69 24 28 31 30 30 |;f$..n.. pi$(100| 000000e0 29 0d 00 78 25 e3 78 3d 53 50 41 43 45 20 b8 20 |)..x%.x=SPACE . | 000000f0 28 53 50 41 43 45 2b 26 31 46 46 46 29 88 34 3a |(SPACE+&1FFF).4:| 00000100 21 78 3d 30 3a ed 0d 00 82 1c ff 20 22 4c 4f 41 |!x=0:...... "LOA| 00000110 44 20 22 2b 66 24 2b 22 20 22 2b c3 7e 53 50 41 |D "+f$+" "+.~SPA| 00000120 43 45 0d 00 8c 05 3a 0d 00 96 12 f4 20 44 69 73 |CE....:..... Dis| 00000130 70 6c 61 79 20 69 6e 66 6f 0d 00 a0 0f 61 64 3d |play info....ad=| 00000140 53 50 41 43 45 2b 31 30 0d 00 aa 36 e7 20 3f 61 |SPACE+10...6. ?a| 00000150 64 3c 3e 31 30 20 8c 20 f1 22 54 69 74 6c 65 3a |d<>10 . ."Title:| 00000160 20 20 22 3b 3a f5 20 ef 3f 61 64 3a 61 64 3d 61 | ";:. .?ad:ad=a| 00000170 64 2b 31 3a fd 20 3f 61 64 3d 26 41 3a f1 0d 00 |d+1:. ?ad=&A:...| 00000180 b4 0b 61 64 3d 61 64 2b 31 0d 00 be 36 e7 20 3f |..ad=ad+1...6. ?| 00000190 61 64 3c 3e 31 30 20 8c 20 f1 22 41 75 74 68 6f |ad<>10 . ."Autho| 000001a0 72 3a 20 22 3b 3a f5 20 ef 3f 61 64 3a 61 64 3d |r: ";:. .?ad:ad=| 000001b0 61 64 2b 31 3a fd 20 3f 61 64 3d 26 41 3a f1 0d |ad+1:. ?ad=&A:..| 000001c0 00 c8 05 3a 0d 00 d2 11 f4 20 46 69 6e 64 20 76 |...:..... Find v| 000001d0 6f 69 63 65 73 0d 00 dc 12 de 20 61 64 28 36 29 |oices..... ad(6)| 000001e0 2c 6c 65 6e 28 36 29 0d 00 e6 1b 61 64 3d 61 64 |,len(6)....ad=ad| 000001f0 2b 33 35 3a 61 64 28 30 29 3d 61 64 3a 74 6f 70 |+35:ad(0)=ad:top| 00000200 3d 31 0d 00 f0 05 f5 0d 00 fa 23 20 f5 20 61 64 |=1........# . ad| 00000210 3d 61 64 2b 32 3a fd 20 28 21 61 64 20 80 26 46 |=ad+2:. (!ad .&F| 00000220 46 46 46 29 3d 26 34 30 34 30 0d 01 04 22 20 61 |FFF)=&4040..." a| 00000230 64 3d 61 64 2b 35 31 3a 61 64 28 74 6f 70 29 3d |d=ad+51:ad(top)=| 00000240 61 64 3a 74 6f 70 3d 74 6f 70 2b 31 0d 01 0e 21 |ad:top=top+1...!| 00000250 fd 20 28 74 6f 70 3d 36 29 20 84 20 28 28 3f 28 |. (top=6) . ((?(| 00000260 61 64 2b 31 29 29 80 26 38 30 29 3d 30 0d 01 18 |ad+1)).&80)=0...| 00000270 17 f1 22 56 6f 69 63 65 73 3a 20 22 3b 74 6f 70 |.."Voices: ";top| 00000280 2d 31 27 27 0d 01 22 1e e3 72 3d 30 b8 74 6f 70 |-1''.."..r=0.top| 00000290 3a f1 7e 28 61 64 28 72 29 2d 53 50 41 43 45 29 |:.~(ad(r)-SPACE)| 000002a0 3a ed 0d 01 2c 05 3a 0d 01 36 16 f4 20 44 6f 20 |:...,.:..6.. Do | 000002b0 6b 65 79 20 73 69 67 6e 69 74 75 72 65 0d 01 40 |key signiture..@| 000002c0 0c e3 6f 63 74 3d 30 b8 38 0d 01 4a 0d e3 20 73 |..oct=0.8..J.. s| 000002d0 3d 30 20 b8 20 36 0d 01 54 1d 70 69 24 28 73 2b |=0 . 6..T.pi$(s+| 000002e0 37 2a 6f 63 74 29 3d bd 28 36 35 2b 73 29 2b c3 |7*oct)=.(65+s)+.| 000002f0 6f 63 74 0d 01 5e 06 ed 2c 0d 01 68 05 3a 0d 01 |oct..^..,..h.:..| 00000300 72 0e f4 20 50 6c 61 79 20 69 74 21 0d 01 7c 11 |r.. Play it!..|.| 00000310 f1 22 50 6c 61 79 69 6e 67 2e 2e 2e 22 0d 01 86 |."Playing..."...| 00000320 13 2a 53 50 4f 4f 4c 20 50 4c 41 59 54 45 4d 50 |.*SPOOL PLAYTEMP| 00000330 0d 01 90 2d 73 74 24 3d 22 22 3a e3 76 3d 30 b8 |...-st$="":.v=0.| 00000340 74 6f 70 2d 32 3a f2 70 72 6f 63 65 73 73 28 76 |top-2:.process(v| 00000350 29 3a ed 3a f1 73 74 24 3b bd 31 30 3b 0d 01 9a |):.:.st$;.10;...| 00000360 05 f5 0d 01 a4 0a 73 74 24 3d 22 22 0d 01 ae 0e |......st$=""....| 00000370 e3 76 3d 30 b8 74 6f 70 2d 32 0d 01 b8 14 20 6c |.v=0.top-2.... l| 00000380 65 6e 28 76 29 3d 6c 65 6e 28 76 29 2d 31 0d 01 |en(v)=len(v)-1..| 00000390 c2 2f 20 e7 20 6c 65 6e 28 76 29 3d 30 20 8c 20 |./ . len(v)=0 . | 000003a0 f2 70 72 6f 63 65 73 73 28 76 29 20 8b 20 73 74 |.process(v) . st| 000003b0 24 3d 73 74 24 2b 22 20 20 20 20 20 22 0d 01 cc |$=st$+" "...| 000003c0 26 ed 3a e7 20 73 74 24 3c 3e c4 74 6f 70 2d 31 |&.:. st$<>.top-1| 000003d0 2c 22 20 20 20 20 20 22 29 8c f1 73 74 24 3b bd |," ")..st$;.| 000003e0 31 30 3b 0d 01 d6 1c fd 20 28 21 61 64 28 30 29 |10;..... (!ad(0)| 000003f0 20 80 20 26 46 46 46 46 29 3d 26 34 30 34 30 0d | . &FFFF)=&4040.| 00000400 01 e0 0a 2a 53 50 4f 4f 4c 0d 01 ea 05 e0 0d 01 |...*SPOOL.......| 00000410 f4 05 3a 0d 01 fe 10 dd f2 70 72 6f 63 65 73 73 |..:......process| 00000420 28 76 29 0d 02 08 1d 6c 65 6e 28 76 29 3d 32 5e |(v)....len(v)=2^| 00000430 28 3f 28 61 64 28 76 29 2b 31 29 20 80 20 37 29 |(?(ad(v)+1) . 7)| 00000440 0d 02 12 2c e7 20 28 3f 28 61 64 28 76 29 2b 31 |...,. (?(ad(v)+1| 00000450 29 20 80 38 29 3c 3e 30 20 8c 20 6c 65 6e 28 76 |) .8)<>0 . len(v| 00000460 29 3d 6c 65 6e 28 76 29 2a 31 2e 35 0d 02 1c 17 |)=len(v)*1.5....| 00000470 e7 20 28 3f 61 64 28 76 29 20 80 20 36 33 29 3e |. (?ad(v) . 63)>| 00000480 30 20 8c 0d 02 26 41 20 73 74 24 3d 73 74 24 2b |0 ...&A st$=st$+| 00000490 70 69 24 28 28 28 3f 61 64 28 76 29 29 20 80 20 |pi$(((?ad(v)) . | 000004a0 36 33 29 2d 32 31 2d 31 2b 37 2a 33 29 2b bd 28 |63)-21-1+7*3)+.(| 000004b0 34 38 2b 28 3f 28 61 64 28 76 29 2b 31 29 20 80 |48+(?(ad(v)+1) .| 000004c0 20 37 29 29 0d 02 30 35 20 e7 20 28 3f 28 61 64 | 7))..05 . (?(ad| 000004d0 28 76 29 2b 31 29 20 80 38 29 3c 3e 30 20 8c 20 |(v)+1) .8)<>0 . | 000004e0 73 74 24 3d 73 74 24 2b 22 2e 22 20 8b 20 73 74 |st$=st$+"." . st| 000004f0 24 3d 73 74 24 2b 22 20 22 0d 02 3a 10 20 73 74 |$=st$+" "..:. st| 00000500 24 3d 73 74 24 2b 22 20 22 0d 02 44 05 cc 0d 02 |$=st$+" "..D....| 00000510 4e 14 20 73 74 24 3d 73 74 24 2b 22 52 65 73 74 |N. st$=st$+"Rest| 00000520 20 22 0d 02 58 05 cd 0d 02 62 11 61 64 28 76 29 | "..X....b.ad(v)| 00000530 3d 61 64 28 76 29 2b 32 0d 02 6c 05 e1 0d ff |=ad(v)+2..l....| 0000053f