Home » Archimedes archive » Acorn User » AU 1996-12 B.adf » Regulars_2 » MikeC/AtoMidi

MikeC/AtoMidi

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 » Archimedes archive » Acorn User » AU 1996-12 B.adf » Regulars_2
Filename: MikeC/AtoMidi
Read OK:
File size: 012C bytes
Load address: 0000
Exec address: 0000
File contents
   10REM Acorn sound Number to MIDI value
   20REM Middle C = 53 Acorn & 60 MIDI
   30REM Acorn 4 per semitone - MIDI 1 per semitone
   31REPEAT
   40FOR Acorn%=41 TO 81 STEP 4
   50M%=60+(Acorn%-53)/4
   60SYS&404CC,M%,127
   70PRINTAcorn%,M%
   80PROC_delay
   90SYS&404CB,M%,127
  100NEXT
  101UNTIL FALSE
  110END
  120
  130DEF PROC_delay
  140T%=TIME+30
  150REPEAT UNTIL TIME>T%
  160ENDPROC

&� Acorn sound Number to MIDI value
#� Middle C = 53 Acorn & 60 MIDI
0� Acorn 4 per semitone - MIDI 1 per semitone
�
(� Acorn%=41 � 81 � 4
2M%=60+(Acorn%-53)/4
<ș&404CC,M%,127
F�Acorn%,M%
P�_delay
Zș&404CB,M%,127
d�
e� �
n�
x
�
� �_delay
�T%=�+30
�� � �>T%
��
�
00000000  0d 00 0a 26 f4 20 41 63  6f 72 6e 20 73 6f 75 6e  |...&. Acorn soun|
00000010  64 20 4e 75 6d 62 65 72  20 74 6f 20 4d 49 44 49  |d Number to MIDI|
00000020  20 76 61 6c 75 65 0d 00  14 23 f4 20 4d 69 64 64  | value...#. Midd|
00000030  6c 65 20 43 20 3d 20 35  33 20 41 63 6f 72 6e 20  |le C = 53 Acorn |
00000040  26 20 36 30 20 4d 49 44  49 0d 00 1e 30 f4 20 41  |& 60 MIDI...0. A|
00000050  63 6f 72 6e 20 34 20 70  65 72 20 73 65 6d 69 74  |corn 4 per semit|
00000060  6f 6e 65 20 2d 20 4d 49  44 49 20 31 20 70 65 72  |one - MIDI 1 per|
00000070  20 73 65 6d 69 74 6f 6e  65 0d 00 1f 05 f5 0d 00  | semitone.......|
00000080  28 18 e3 20 41 63 6f 72  6e 25 3d 34 31 20 b8 20  |(.. Acorn%=41 . |
00000090  38 31 20 88 20 34 0d 00  32 17 4d 25 3d 36 30 2b  |81 . 4..2.M%=60+|
000000a0  28 41 63 6f 72 6e 25 2d  35 33 29 2f 34 0d 00 3c  |(Acorn%-53)/4..<|
000000b0  13 c8 99 26 34 30 34 43  43 2c 4d 25 2c 31 32 37  |...&404CC,M%,127|
000000c0  0d 00 46 0e f1 41 63 6f  72 6e 25 2c 4d 25 0d 00  |..F..Acorn%,M%..|
000000d0  50 0b f2 5f 64 65 6c 61  79 0d 00 5a 13 c8 99 26  |P.._delay..Z...&|
000000e0  34 30 34 43 42 2c 4d 25  2c 31 32 37 0d 00 64 05  |404CB,M%,127..d.|
000000f0  ed 0d 00 65 07 fd 20 a3  0d 00 6e 05 e0 0d 00 78  |...e.. ...n....x|
00000100  04 0d 00 82 0d dd 20 f2  5f 64 65 6c 61 79 0d 00  |...... ._delay..|
00000110  8c 0b 54 25 3d 91 2b 33  30 0d 00 96 0c f5 20 fd  |..T%=.+30..... .|
00000120  20 91 3e 54 25 0d 00 a0  05 e1 0d ff              | .>T%.......|
0000012c