Home » Personal collection » Acorn hard disk » files » music » Notate/Player

Notate/Player

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/Player
Read OK:
File size: 0629 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
  320INPUT"Key signiture number";k
  330FORoct=0TO10:RESTORE:FORs=0TOk*7:READz:NEXT
  340FOR s=7*oct TO 7*oct+6
  350READpi%(s):pi%(s)=pi%(s)+48*oct
  360NEXT,
  370:
  380REM Play it!
  390PRINT"Playing..."
  400FORv=0TOtop-2:PROCprocess(v):NEXT
  410REPEAT
  420FORr=0TO650:NEXT
  430FORv=0TOtop-2
  440 len(v)=len(v)-1
  450 IF len(v)=0 THEN PROCprocess(v)
  460NEXT
  470UNTIL (!ad(0) AND &FFFF)=&4040
  480:
  490DEFPROCprocess(v)
  500len(v)=2^(?(ad(v)+1) AND 7)
  510IF (?(ad(v)+1) AND8)<>0 THEN len(v)=len(v)*1.5
  520offset=0
  530IF (?ad(v) AND 128)<>0 THEN offset=offset-&1000/12
  540IF (?ad(v) AND 64)<>0 THEN offset=offset+&1000/12
  550IF (?ad(v) AND 63)>0 THEN
  560 pi=pi%(((?ad(v)) AND 63)-1)
  570 IF v<2 THEN pi=pi-48*1 ELSE pi=pi-0
  580 pi=&1000+&1000/48*pi+0.49
  590 SOUND v+1,-8,pi+offset,100:PRINTv," ",pi%(((?ad(v)) AND 63)-1)
  600ELSE
  610 SOUND v+1,0,0,100
  620ENDIF
  630ad(v)=ad(v)+2
  640ENDPROC
  650:
  660DATA -1:REM Key skipper
  670DATA 0,4,12,20,24,32,40
  680DATA -4,4,12,20,24,32,40
  690DATA -4,4,12,16,24,32,40
  700DATA -4,4,12,16,24,32,36
  710DATA -4,4,8,16,24,32,36

� 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
@�"Key signiture number";k
J�oct=0�10:�:�s=0�k*7:�z:�
T� s=7*oct � 7*oct+6
^ �pi%(s):pi%(s)=pi%(s)+48*oct
h�,
r:
|� Play it!
��"Playing..."
��v=0�top-2:�process(v):�
��
��r=0�650:�
��v=0�top-2
� len(v)=len(v)-1
� � len(v)=0 � �process(v)
��
�� (!ad(0) � &FFFF)=&4040
�:
���process(v)
�len(v)=2^(?(ad(v)+1) � 7)
�,� (?(ad(v)+1) �8)<>0 � len(v)=len(v)*1.5
offset=0
0� (?ad(v) � 128)<>0 � offset=offset-&1000/12
/� (?ad(v) � 64)<>0 � offset=offset+&1000/12
&� (?ad(v) � 63)>0 �
0 pi=pi%(((?ad(v)) � 63)-1)
:! � v<2 � pi=pi-48*1 � pi=pi-0
D pi=&1000+&1000/48*pi+0.49
N9 � v+1,-8,pi+offset,100:�v," ",pi%(((?ad(v)) � 63)-1)
X�
b � v+1,0,0,100
l�
vad(v)=ad(v)+2
��
�:
�� -1:REM Key skipper
�� 0,4,12,20,24,32,40
�� -4,4,12,20,24,32,40
�� -4,4,12,16,24,32,40
�� -4,4,12,16,24,32,36
�� -4,4,8,16,24,32,36
�
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 25 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  1d e8 22 4b 65 79 20 73  69 67 6e 69 74 75 72 65  |.."Key signiture|
000002d0  20 6e 75 6d 62 65 72 22  3b 6b 0d 01 4a 1d e3 6f  | number";k..J..o|
000002e0  63 74 3d 30 b8 31 30 3a  f7 3a e3 73 3d 30 b8 6b  |ct=0.10:.:.s=0.k|
000002f0  2a 37 3a f3 7a 3a ed 0d  01 54 17 e3 20 73 3d 37  |*7:.z:...T.. s=7|
00000300  2a 6f 63 74 20 b8 20 37  2a 6f 63 74 2b 36 0d 01  |*oct . 7*oct+6..|
00000310  5e 20 f3 70 69 25 28 73  29 3a 70 69 25 28 73 29  |^ .pi%(s):pi%(s)|
00000320  3d 70 69 25 28 73 29 2b  34 38 2a 6f 63 74 0d 01  |=pi%(s)+48*oct..|
00000330  68 06 ed 2c 0d 01 72 05  3a 0d 01 7c 0e f4 20 50  |h..,..r.:..|.. P|
00000340  6c 61 79 20 69 74 21 0d  01 86 11 f1 22 50 6c 61  |lay it!....."Pla|
00000350  79 69 6e 67 2e 2e 2e 22  0d 01 90 1c e3 76 3d 30  |ying...".....v=0|
00000360  b8 74 6f 70 2d 32 3a f2  70 72 6f 63 65 73 73 28  |.top-2:.process(|
00000370  76 29 3a ed 0d 01 9a 05  f5 0d 01 a4 0e e3 72 3d  |v):...........r=|
00000380  30 b8 36 35 30 3a ed 0d  01 ae 0e e3 76 3d 30 b8  |0.650:......v=0.|
00000390  74 6f 70 2d 32 0d 01 b8  14 20 6c 65 6e 28 76 29  |top-2.... len(v)|
000003a0  3d 6c 65 6e 28 76 29 2d  31 0d 01 c2 1d 20 e7 20  |=len(v)-1.... . |
000003b0  6c 65 6e 28 76 29 3d 30  20 8c 20 f2 70 72 6f 63  |len(v)=0 . .proc|
000003c0  65 73 73 28 76 29 0d 01  cc 05 ed 0d 01 d6 1c fd  |ess(v)..........|
000003d0  20 28 21 61 64 28 30 29  20 80 20 26 46 46 46 46  | (!ad(0) . &FFFF|
000003e0  29 3d 26 34 30 34 30 0d  01 e0 05 3a 0d 01 ea 10  |)=&4040....:....|
000003f0  dd f2 70 72 6f 63 65 73  73 28 76 29 0d 01 f4 1d  |..process(v)....|
00000400  6c 65 6e 28 76 29 3d 32  5e 28 3f 28 61 64 28 76  |len(v)=2^(?(ad(v|
00000410  29 2b 31 29 20 80 20 37  29 0d 01 fe 2c e7 20 28  |)+1) . 7)...,. (|
00000420  3f 28 61 64 28 76 29 2b  31 29 20 80 38 29 3c 3e  |?(ad(v)+1) .8)<>|
00000430  30 20 8c 20 6c 65 6e 28  76 29 3d 6c 65 6e 28 76  |0 . len(v)=len(v|
00000440  29 2a 31 2e 35 0d 02 08  0c 6f 66 66 73 65 74 3d  |)*1.5....offset=|
00000450  30 0d 02 12 30 e7 20 28  3f 61 64 28 76 29 20 80  |0...0. (?ad(v) .|
00000460  20 31 32 38 29 3c 3e 30  20 8c 20 6f 66 66 73 65  | 128)<>0 . offse|
00000470  74 3d 6f 66 66 73 65 74  2d 26 31 30 30 30 2f 31  |t=offset-&1000/1|
00000480  32 0d 02 1c 2f e7 20 28  3f 61 64 28 76 29 20 80  |2.../. (?ad(v) .|
00000490  20 36 34 29 3c 3e 30 20  8c 20 6f 66 66 73 65 74  | 64)<>0 . offset|
000004a0  3d 6f 66 66 73 65 74 2b  26 31 30 30 30 2f 31 32  |=offset+&1000/12|
000004b0  0d 02 26 17 e7 20 28 3f  61 64 28 76 29 20 80 20  |..&.. (?ad(v) . |
000004c0  36 33 29 3e 30 20 8c 0d  02 30 1e 20 70 69 3d 70  |63)>0 ...0. pi=p|
000004d0  69 25 28 28 28 3f 61 64  28 76 29 29 20 80 20 36  |i%(((?ad(v)) . 6|
000004e0  33 29 2d 31 29 0d 02 3a  21 20 e7 20 76 3c 32 20  |3)-1)..:! . v<2 |
000004f0  8c 20 70 69 3d 70 69 2d  34 38 2a 31 20 8b 20 70  |. pi=pi-48*1 . p|
00000500  69 3d 70 69 2d 30 0d 02  44 1e 20 70 69 3d 26 31  |i=pi-0..D. pi=&1|
00000510  30 30 30 2b 26 31 30 30  30 2f 34 38 2a 70 69 2b  |000+&1000/48*pi+|
00000520  30 2e 34 39 0d 02 4e 39  20 d4 20 76 2b 31 2c 2d  |0.49..N9 . v+1,-|
00000530  38 2c 70 69 2b 6f 66 66  73 65 74 2c 31 30 30 3a  |8,pi+offset,100:|
00000540  f1 76 2c 22 20 22 2c 70  69 25 28 28 28 3f 61 64  |.v," ",pi%(((?ad|
00000550  28 76 29 29 20 80 20 36  33 29 2d 31 29 0d 02 58  |(v)) . 63)-1)..X|
00000560  05 cc 0d 02 62 12 20 d4  20 76 2b 31 2c 30 2c 30  |....b. . v+1,0,0|
00000570  2c 31 30 30 0d 02 6c 05  cd 0d 02 76 11 61 64 28  |,100..l....v.ad(|
00000580  76 29 3d 61 64 28 76 29  2b 32 0d 02 80 05 e1 0d  |v)=ad(v)+2......|
00000590  02 8a 05 3a 0d 02 94 18  dc 20 2d 31 3a 52 45 4d  |...:..... -1:REM|
000005a0  20 4b 65 79 20 73 6b 69  70 70 65 72 0d 02 9e 18  | Key skipper....|
000005b0  dc 20 30 2c 34 2c 31 32  2c 32 30 2c 32 34 2c 33  |. 0,4,12,20,24,3|
000005c0  32 2c 34 30 0d 02 a8 19  dc 20 2d 34 2c 34 2c 31  |2,40..... -4,4,1|
000005d0  32 2c 32 30 2c 32 34 2c  33 32 2c 34 30 0d 02 b2  |2,20,24,32,40...|
000005e0  19 dc 20 2d 34 2c 34 2c  31 32 2c 31 36 2c 32 34  |.. -4,4,12,16,24|
000005f0  2c 33 32 2c 34 30 0d 02  bc 19 dc 20 2d 34 2c 34  |,32,40..... -4,4|
00000600  2c 31 32 2c 31 36 2c 32  34 2c 33 32 2c 33 36 0d  |,12,16,24,32,36.|
00000610  02 c6 18 dc 20 2d 34 2c  34 2c 38 2c 31 36 2c 32  |.... -4,4,8,16,2|
00000620  34 2c 33 32 2c 33 36 0d  ff                       |4,32,36..|
00000629