Home » Personal collection » Acorn hard disk » files » music » !MakeMIDI/old/!RunIOld

!MakeMIDI/old/!RunIOld

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: !MakeMIDI/old/!RunIOld
Read OK:
File size: 02FA bytes
Load address: 0000
Exec address: 0000
File contents
   10ON ERROR REPORT:PRINT" @ ";ERL:END
   20DIM SPACE &8000
   30OSCLI"LOAD <Obey$Dir>.MIDIHeader "+STR$~SPACE
   40lenW=SPACE+&E1:start=SPACE+&E5:P%=SPACE+&104
   50PROCdeltatime(0):[OPT0:EQUB&C0:EQUB&28:]
   60PROCdeltatime(0):[OPT0:EQUB&90:EQUB60:EQUB&3F:]
   70PROCdeltatime(&17):[OPT0:EQUB&80:EQUB60:EQUB&0:]
   80PROCdeltatime(1):[OPT0:EQUB&90:EQUB61:EQUB&3F:]
   90PROCdeltatime(&17):[OPT0:EQUB&80:EQUB61:EQUB&0:]
  100PROCdeltatime(&17):[OPT0:EQUB&FF:EQUB&2F:EQUB&0:.end ]
  110:
  120length=P%-start:P%=lenW:[OPT0:EQUW0:EQUB(length DIV256):EQUB(length AND255):]
  130OSCLI"SAVE <Obey$Dir>.MIDIOUT "+STR$~SPACE+" "+STR$~end
  140*SETTYPE <Obey$Dir>.MIDIOUT FD4
  150END
  160:
  170DEFPROCdeltatime(n%)
  180LOCALstore%,bit
  190REPEAT:store%=0
  200 FORbit=0TO6
  210  IF((n%MOD2)<>0)THENstore%=store%+2^bit
  220  n%=n%DIV2
  230 NEXT
  240 ?P%=store%-128*(n%<>0):P%=P%+1
  250UNTILn%=0
  260ENDPROC

� � �:�" @ ";�:�
� SPACE &8000
*�"LOAD <Obey$Dir>.MIDIHeader "+�~SPACE
(0lenW=SPACE+&E1:start=SPACE+&E5:P%=SPACE+&104
2)�deltatime(0):[OPT0:EQUB&C0:EQUB&28:]
<0�deltatime(0):[OPT0:EQUB&90:EQUB60:EQUB&3F:]
F1�deltatime(&17):[OPT0:EQUB&80:EQUB60:EQUB&0:]
P0�deltatime(1):[OPT0:EQUB&90:EQUB61:EQUB&3F:]
Z1�deltatime(&17):[OPT0:EQUB&80:EQUB61:EQUB&0:]
d7�deltatime(&17):[OPT0:EQUB&FF:EQUB&2F:EQUB&0:.end ]
n:
xMlength=P%-start:P%=lenW:[OPT0:EQUW0:EQUB(length �256):EQUB(length �255):]
�1�"SAVE <Obey$Dir>.MIDIOUT "+�~SPACE+" "+�~end
�#*SETTYPE <Obey$Dir>.MIDIOUT FD4
��
�:
���deltatime(n%)
��store%,bit
��:store%=0
�
 �bit=0�6
�&  �((n%�2)<>0)�store%=store%+2^bit
�
  n%=n%�2
� �
�# ?P%=store%-128*(n%<>0):P%=P%+1
�	�n%=0
�
�
00000000  0d 00 0a 14 ee 20 85 20  f6 3a f1 22 20 40 20 22  |..... . .:." @ "|
00000010  3b 9e 3a e0 0d 00 14 11  de 20 53 50 41 43 45 20  |;.:...... SPACE |
00000020  26 38 30 30 30 0d 00 1e  2a ff 22 4c 4f 41 44 20  |&8000...*."LOAD |
00000030  3c 4f 62 65 79 24 44 69  72 3e 2e 4d 49 44 49 48  |<Obey$Dir>.MIDIH|
00000040  65 61 64 65 72 20 22 2b  c3 7e 53 50 41 43 45 0d  |eader "+.~SPACE.|
00000050  00 28 30 6c 65 6e 57 3d  53 50 41 43 45 2b 26 45  |.(0lenW=SPACE+&E|
00000060  31 3a 73 74 61 72 74 3d  53 50 41 43 45 2b 26 45  |1:start=SPACE+&E|
00000070  35 3a 50 25 3d 53 50 41  43 45 2b 26 31 30 34 0d  |5:P%=SPACE+&104.|
00000080  00 32 29 f2 64 65 6c 74  61 74 69 6d 65 28 30 29  |.2).deltatime(0)|
00000090  3a 5b 4f 50 54 30 3a 45  51 55 42 26 43 30 3a 45  |:[OPT0:EQUB&C0:E|
000000a0  51 55 42 26 32 38 3a 5d  0d 00 3c 30 f2 64 65 6c  |QUB&28:]..<0.del|
000000b0  74 61 74 69 6d 65 28 30  29 3a 5b 4f 50 54 30 3a  |tatime(0):[OPT0:|
000000c0  45 51 55 42 26 39 30 3a  45 51 55 42 36 30 3a 45  |EQUB&90:EQUB60:E|
000000d0  51 55 42 26 33 46 3a 5d  0d 00 46 31 f2 64 65 6c  |QUB&3F:]..F1.del|
000000e0  74 61 74 69 6d 65 28 26  31 37 29 3a 5b 4f 50 54  |tatime(&17):[OPT|
000000f0  30 3a 45 51 55 42 26 38  30 3a 45 51 55 42 36 30  |0:EQUB&80:EQUB60|
00000100  3a 45 51 55 42 26 30 3a  5d 0d 00 50 30 f2 64 65  |:EQUB&0:]..P0.de|
00000110  6c 74 61 74 69 6d 65 28  31 29 3a 5b 4f 50 54 30  |ltatime(1):[OPT0|
00000120  3a 45 51 55 42 26 39 30  3a 45 51 55 42 36 31 3a  |:EQUB&90:EQUB61:|
00000130  45 51 55 42 26 33 46 3a  5d 0d 00 5a 31 f2 64 65  |EQUB&3F:]..Z1.de|
00000140  6c 74 61 74 69 6d 65 28  26 31 37 29 3a 5b 4f 50  |ltatime(&17):[OP|
00000150  54 30 3a 45 51 55 42 26  38 30 3a 45 51 55 42 36  |T0:EQUB&80:EQUB6|
00000160  31 3a 45 51 55 42 26 30  3a 5d 0d 00 64 37 f2 64  |1:EQUB&0:]..d7.d|
00000170  65 6c 74 61 74 69 6d 65  28 26 31 37 29 3a 5b 4f  |eltatime(&17):[O|
00000180  50 54 30 3a 45 51 55 42  26 46 46 3a 45 51 55 42  |PT0:EQUB&FF:EQUB|
00000190  26 32 46 3a 45 51 55 42  26 30 3a 2e 65 6e 64 20  |&2F:EQUB&0:.end |
000001a0  5d 0d 00 6e 05 3a 0d 00  78 4d 6c 65 6e 67 74 68  |]..n.:..xMlength|
000001b0  3d 50 25 2d 73 74 61 72  74 3a 50 25 3d 6c 65 6e  |=P%-start:P%=len|
000001c0  57 3a 5b 4f 50 54 30 3a  45 51 55 57 30 3a 45 51  |W:[OPT0:EQUW0:EQ|
000001d0  55 42 28 6c 65 6e 67 74  68 20 81 32 35 36 29 3a  |UB(length .256):|
000001e0  45 51 55 42 28 6c 65 6e  67 74 68 20 80 32 35 35  |EQUB(length .255|
000001f0  29 3a 5d 0d 00 82 31 ff  22 53 41 56 45 20 3c 4f  |):]...1."SAVE <O|
00000200  62 65 79 24 44 69 72 3e  2e 4d 49 44 49 4f 55 54  |bey$Dir>.MIDIOUT|
00000210  20 22 2b c3 7e 53 50 41  43 45 2b 22 20 22 2b c3  | "+.~SPACE+" "+.|
00000220  7e 65 6e 64 0d 00 8c 23  2a 53 45 54 54 59 50 45  |~end...#*SETTYPE|
00000230  20 3c 4f 62 65 79 24 44  69 72 3e 2e 4d 49 44 49  | <Obey$Dir>.MIDI|
00000240  4f 55 54 20 46 44 34 0d  00 96 05 e0 0d 00 a0 05  |OUT FD4.........|
00000250  3a 0d 00 aa 13 dd f2 64  65 6c 74 61 74 69 6d 65  |:......deltatime|
00000260  28 6e 25 29 0d 00 b4 0f  ea 73 74 6f 72 65 25 2c  |(n%).....store%,|
00000270  62 69 74 0d 00 be 0e f5  3a 73 74 6f 72 65 25 3d  |bit.....:store%=|
00000280  30 0d 00 c8 0d 20 e3 62  69 74 3d 30 b8 36 0d 00  |0.... .bit=0.6..|
00000290  d2 26 20 20 e7 28 28 6e  25 83 32 29 3c 3e 30 29  |.&  .((n%.2)<>0)|
000002a0  8c 73 74 6f 72 65 25 3d  73 74 6f 72 65 25 2b 32  |.store%=store%+2|
000002b0  5e 62 69 74 0d 00 dc 0d  20 20 6e 25 3d 6e 25 81  |^bit....  n%=n%.|
000002c0  32 0d 00 e6 06 20 ed 0d  00 f0 23 20 3f 50 25 3d  |2.... ....# ?P%=|
000002d0  73 74 6f 72 65 25 2d 31  32 38 2a 28 6e 25 3c 3e  |store%-128*(n%<>|
000002e0  30 29 3a 50 25 3d 50 25  2b 31 0d 00 fa 09 fd 6e  |0):P%=P%+1.....n|
000002f0  25 3d 30 0d 01 04 05 e1  0d ff                    |%=0.......|
000002fa