Home » Archimedes archive » Micro User » MU 1991-07.adf » PD-Stuff » Music/!PlayerMod/Bits/Keyboard

Music/!PlayerMod/Bits/Keyboard

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 » Micro User » MU 1991-07.adf » PD-Stuff
Filename: Music/!PlayerMod/Bits/Keyboard
Read OK:
File size: 062E bytes
Load address: 0000
Exec address: 0000
Duplicates

There is 1 duplicate copy of this file in the archive:

File contents
   10REM > Keyboard
   20REM   Rough display of which notes are being played
   30REM   Uses the correct (!) 3 octave, 12 notes/octave display C-1 to B-3
   40REM   By Nick Smith, 02-Jan-91
   50:
   60MODE 13:OFF
   70:
   80DIM table%(128)
   90RESTORE +2
  100FOR loop%=1 TO 128
  110  READ a%
  120  table%(loop%)=a%
  130NEXT
  140:
  150SYS "XOS_Module",18,"TrackerModule" TO ,,,point%
  160COLOUR 63 TINT 255
  170PRINT TAB(12,3);"Silly Keyboard!"
  180PRINT TAB(10,4);"By Nick Smith, 1991"
  190:
  200n1%=0:n2%=0:n3%=0:n4%=0
  210PRINT TAB(0,0);
  220REPEAT
  230  y1%=!(point%+&A1C+8):x1%=table%(y1% DIV 512)
  240  y2%=!(point%+&A1C+40):x2%=table%(y2% DIV 512)
  250  y3%=!(point%+&A1C+72):x3%=table%(y3% DIV 512)
  260  y4%=!(point%+&A1C+104):x4%=table%(y4% DIV 512)
  270  IF x1%>0 THEN
  280    GCOL 0,8:RECTANGLE FILL x1%*35,200,8,100
  290    GCOL 0,0:IF n1%<>x1% THEN RECTANGLE FILL n1%*35,200,8,100
  300    n1%=x1%
  310  ENDIF
  320  IF x2%>0 THEN
  330    GCOL 0,3:RECTANGLE FILL x2%*35,320,8,100
  340    GCOL 0,0:IF n2%<>x2% THEN RECTANGLE FILL n2%*35,320,8,100
  350    n2%=x2%
  360  ENDIF
  370  IF x3%>0 THEN
  380    GCOL 0,15:RECTANGLE FILL x3%*35,440,8,100
  390    GCOL 0,0:IF n3%<>x3% THEN RECTANGLE FILL n3%*35,440,8,100
  400    n3%=x3%
  410  ENDIF
  420  IF x4%>0 THEN
  430    GCOL 0,48:RECTANGLE FILL x4%*35,560,8,100
  440    GCOL 0,0:IF n4%<>x4% THEN RECTANGLE FILL n4%*35,560,8,100
  450    n4%=x4%
  460  ENDIF
  470UNTIL FALSE
  480:
  490END
  500:
  510DATA  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 0, 5, 6, 7, 8
  520DATA  9, 9, 9,10,11, 0,12, 0,13, 0,14, 0,15, 0,16, 0, 0,17, 0,18, 0, 0,19, 0
  530DATA 20, 0, 0,21, 0, 0, 0,22, 0, 0,23, 0, 0, 0,24, 0, 0,25, 0, 0, 0,26, 0, 0
  540DATA  0,27, 0, 0, 0, 0,28, 0, 0, 0,29, 0, 0, 0, 0, 0,30, 0, 0, 0, 0,31, 0, 0
  550DATA  0, 0,32,33,33,33,33,33,33,33,33,33,33,33,33,34, 0, 0, 0, 0, 0,35, 0, 0
  560DATA  0, 0, 0, 0, 0,36, 0, 0

� > Keyboard
5�   Rough display of which notes are being played
I�   Uses the correct (!) 3 octave, 12 notes/octave display C-1 to B-3
( �   By Nick Smith, 02-Jan-91
2:
<
� 13:�
F:
P� table%(128)
Z� +2
d� loop%=1 � 128
n
  � a%
x  table%(loop%)=a%
��
�:
�2ș "XOS_Module",18,"TrackerModule" � ,,,point%
�� 63 Ȝ 255
�� �12,3);"Silly Keyboard!"
�"� �10,4);"By Nick Smith, 1991"
�:
�n1%=0:n2%=0:n3%=0:n4%=0
�� �0,0);
��
�0  y1%=!(point%+&A1C+8):x1%=table%(y1% � 512)
�1  y2%=!(point%+&A1C+40):x2%=table%(y2% � 512)
�1  y3%=!(point%+&A1C+72):x3%=table%(y3% � 512)
2  y4%=!(point%+&A1C+104):x4%=table%(y4% � 512)
  � x1%>0 �
$    � 0,8:ȓ Ȑ x1%*35,200,8,100
"1    � 0,0:� n1%<>x1% � ȓ Ȑ n1%*35,200,8,100
,    n1%=x1%
6  �
@  � x2%>0 �
J$    � 0,3:ȓ Ȑ x2%*35,320,8,100
T1    � 0,0:� n2%<>x2% � ȓ Ȑ n2%*35,320,8,100
^    n2%=x2%
h  �
r  � x3%>0 �
|%    � 0,15:ȓ Ȑ x3%*35,440,8,100
�1    � 0,0:� n3%<>x3% � ȓ Ȑ n3%*35,440,8,100
�    n3%=x3%
�  �
�  � x4%>0 �
�%    � 0,48:ȓ Ȑ x4%*35,560,8,100
�1    � 0,0:� n4%<>x4% � ȓ Ȑ n4%*35,560,8,100
�    n4%=x4%
�  �
�� �
�:
��
�:
�M�  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 0, 5, 6, 7, 8
M�  9, 9, 9,10,11, 0,12, 0,13, 0,14, 0,15, 0,16, 0, 0,17, 0,18, 0, 0,19, 0
M� 20, 0, 0,21, 0, 0, 0,22, 0, 0,23, 0, 0, 0,24, 0, 0,25, 0, 0, 0,26, 0, 0
M�  0,27, 0, 0, 0, 0,28, 0, 0, 0,29, 0, 0, 0, 0, 0,30, 0, 0, 0, 0,31, 0, 0
&M�  0, 0,32,33,33,33,33,33,33,33,33,33,33,33,33,34, 0, 0, 0, 0, 0,35, 0, 0
0�  0, 0, 0, 0, 0,36, 0, 0
�
00000000  0d 00 0a 10 f4 20 3e 20  4b 65 79 62 6f 61 72 64  |..... > Keyboard|
00000010  0d 00 14 35 f4 20 20 20  52 6f 75 67 68 20 64 69  |...5.   Rough di|
00000020  73 70 6c 61 79 20 6f 66  20 77 68 69 63 68 20 6e  |splay of which n|
00000030  6f 74 65 73 20 61 72 65  20 62 65 69 6e 67 20 70  |otes are being p|
00000040  6c 61 79 65 64 0d 00 1e  49 f4 20 20 20 55 73 65  |layed...I.   Use|
00000050  73 20 74 68 65 20 63 6f  72 72 65 63 74 20 28 21  |s the correct (!|
00000060  29 20 33 20 6f 63 74 61  76 65 2c 20 31 32 20 6e  |) 3 octave, 12 n|
00000070  6f 74 65 73 2f 6f 63 74  61 76 65 20 64 69 73 70  |otes/octave disp|
00000080  6c 61 79 20 43 2d 31 20  74 6f 20 42 2d 33 0d 00  |lay C-1 to B-3..|
00000090  28 20 f4 20 20 20 42 79  20 4e 69 63 6b 20 53 6d  |( .   By Nick Sm|
000000a0  69 74 68 2c 20 30 32 2d  4a 61 6e 2d 39 31 0d 00  |ith, 02-Jan-91..|
000000b0  32 05 3a 0d 00 3c 0a eb  20 31 33 3a 87 0d 00 46  |2.:..<.. 13:...F|
000000c0  05 3a 0d 00 50 11 de 20  74 61 62 6c 65 25 28 31  |.:..P.. table%(1|
000000d0  32 38 29 0d 00 5a 08 f7  20 2b 32 0d 00 64 13 e3  |28)..Z.. +2..d..|
000000e0  20 6c 6f 6f 70 25 3d 31  20 b8 20 31 32 38 0d 00  | loop%=1 . 128..|
000000f0  6e 0a 20 20 f3 20 61 25  0d 00 78 16 20 20 74 61  |n.  . a%..x.  ta|
00000100  62 6c 65 25 28 6c 6f 6f  70 25 29 3d 61 25 0d 00  |ble%(loop%)=a%..|
00000110  82 05 ed 0d 00 8c 05 3a  0d 00 96 32 c8 99 20 22  |.......:...2.. "|
00000120  58 4f 53 5f 4d 6f 64 75  6c 65 22 2c 31 38 2c 22  |XOS_Module",18,"|
00000130  54 72 61 63 6b 65 72 4d  6f 64 75 6c 65 22 20 b8  |TrackerModule" .|
00000140  20 2c 2c 2c 70 6f 69 6e  74 25 0d 00 a0 0f fb 20  | ,,,point%..... |
00000150  36 33 20 c8 9c 20 32 35  35 0d 00 aa 1e f1 20 8a  |63 .. 255..... .|
00000160  31 32 2c 33 29 3b 22 53  69 6c 6c 79 20 4b 65 79  |12,3);"Silly Key|
00000170  62 6f 61 72 64 21 22 0d  00 b4 22 f1 20 8a 31 30  |board!"...". .10|
00000180  2c 34 29 3b 22 42 79 20  4e 69 63 6b 20 53 6d 69  |,4);"By Nick Smi|
00000190  74 68 2c 20 31 39 39 31  22 0d 00 be 05 3a 0d 00  |th, 1991"....:..|
000001a0  c8 1b 6e 31 25 3d 30 3a  6e 32 25 3d 30 3a 6e 33  |..n1%=0:n2%=0:n3|
000001b0  25 3d 30 3a 6e 34 25 3d  30 0d 00 d2 0c f1 20 8a  |%=0:n4%=0..... .|
000001c0  30 2c 30 29 3b 0d 00 dc  05 f5 0d 00 e6 30 20 20  |0,0);........0  |
000001d0  79 31 25 3d 21 28 70 6f  69 6e 74 25 2b 26 41 31  |y1%=!(point%+&A1|
000001e0  43 2b 38 29 3a 78 31 25  3d 74 61 62 6c 65 25 28  |C+8):x1%=table%(|
000001f0  79 31 25 20 81 20 35 31  32 29 0d 00 f0 31 20 20  |y1% . 512)...1  |
00000200  79 32 25 3d 21 28 70 6f  69 6e 74 25 2b 26 41 31  |y2%=!(point%+&A1|
00000210  43 2b 34 30 29 3a 78 32  25 3d 74 61 62 6c 65 25  |C+40):x2%=table%|
00000220  28 79 32 25 20 81 20 35  31 32 29 0d 00 fa 31 20  |(y2% . 512)...1 |
00000230  20 79 33 25 3d 21 28 70  6f 69 6e 74 25 2b 26 41  | y3%=!(point%+&A|
00000240  31 43 2b 37 32 29 3a 78  33 25 3d 74 61 62 6c 65  |1C+72):x3%=table|
00000250  25 28 79 33 25 20 81 20  35 31 32 29 0d 01 04 32  |%(y3% . 512)...2|
00000260  20 20 79 34 25 3d 21 28  70 6f 69 6e 74 25 2b 26  |  y4%=!(point%+&|
00000270  41 31 43 2b 31 30 34 29  3a 78 34 25 3d 74 61 62  |A1C+104):x4%=tab|
00000280  6c 65 25 28 79 34 25 20  81 20 35 31 32 29 0d 01  |le%(y4% . 512)..|
00000290  0e 0f 20 20 e7 20 78 31  25 3e 30 20 8c 0d 01 18  |..  . x1%>0 ....|
000002a0  24 20 20 20 20 e6 20 30  2c 38 3a c8 93 20 c8 90  |$    . 0,8:.. ..|
000002b0  20 78 31 25 2a 33 35 2c  32 30 30 2c 38 2c 31 30  | x1%*35,200,8,10|
000002c0  30 0d 01 22 31 20 20 20  20 e6 20 30 2c 30 3a e7  |0.."1    . 0,0:.|
000002d0  20 6e 31 25 3c 3e 78 31  25 20 8c 20 c8 93 20 c8  | n1%<>x1% . .. .|
000002e0  90 20 6e 31 25 2a 33 35  2c 32 30 30 2c 38 2c 31  |. n1%*35,200,8,1|
000002f0  30 30 0d 01 2c 0f 20 20  20 20 6e 31 25 3d 78 31  |00..,.    n1%=x1|
00000300  25 0d 01 36 07 20 20 cd  0d 01 40 0f 20 20 e7 20  |%..6.  ...@.  . |
00000310  78 32 25 3e 30 20 8c 0d  01 4a 24 20 20 20 20 e6  |x2%>0 ...J$    .|
00000320  20 30 2c 33 3a c8 93 20  c8 90 20 78 32 25 2a 33  | 0,3:.. .. x2%*3|
00000330  35 2c 33 32 30 2c 38 2c  31 30 30 0d 01 54 31 20  |5,320,8,100..T1 |
00000340  20 20 20 e6 20 30 2c 30  3a e7 20 6e 32 25 3c 3e  |   . 0,0:. n2%<>|
00000350  78 32 25 20 8c 20 c8 93  20 c8 90 20 6e 32 25 2a  |x2% . .. .. n2%*|
00000360  33 35 2c 33 32 30 2c 38  2c 31 30 30 0d 01 5e 0f  |35,320,8,100..^.|
00000370  20 20 20 20 6e 32 25 3d  78 32 25 0d 01 68 07 20  |    n2%=x2%..h. |
00000380  20 cd 0d 01 72 0f 20 20  e7 20 78 33 25 3e 30 20  | ...r.  . x3%>0 |
00000390  8c 0d 01 7c 25 20 20 20  20 e6 20 30 2c 31 35 3a  |...|%    . 0,15:|
000003a0  c8 93 20 c8 90 20 78 33  25 2a 33 35 2c 34 34 30  |.. .. x3%*35,440|
000003b0  2c 38 2c 31 30 30 0d 01  86 31 20 20 20 20 e6 20  |,8,100...1    . |
000003c0  30 2c 30 3a e7 20 6e 33  25 3c 3e 78 33 25 20 8c  |0,0:. n3%<>x3% .|
000003d0  20 c8 93 20 c8 90 20 6e  33 25 2a 33 35 2c 34 34  | .. .. n3%*35,44|
000003e0  30 2c 38 2c 31 30 30 0d  01 90 0f 20 20 20 20 6e  |0,8,100....    n|
000003f0  33 25 3d 78 33 25 0d 01  9a 07 20 20 cd 0d 01 a4  |3%=x3%....  ....|
00000400  0f 20 20 e7 20 78 34 25  3e 30 20 8c 0d 01 ae 25  |.  . x4%>0 ....%|
00000410  20 20 20 20 e6 20 30 2c  34 38 3a c8 93 20 c8 90  |    . 0,48:.. ..|
00000420  20 78 34 25 2a 33 35 2c  35 36 30 2c 38 2c 31 30  | x4%*35,560,8,10|
00000430  30 0d 01 b8 31 20 20 20  20 e6 20 30 2c 30 3a e7  |0...1    . 0,0:.|
00000440  20 6e 34 25 3c 3e 78 34  25 20 8c 20 c8 93 20 c8  | n4%<>x4% . .. .|
00000450  90 20 6e 34 25 2a 33 35  2c 35 36 30 2c 38 2c 31  |. n4%*35,560,8,1|
00000460  30 30 0d 01 c2 0f 20 20  20 20 6e 34 25 3d 78 34  |00....    n4%=x4|
00000470  25 0d 01 cc 07 20 20 cd  0d 01 d6 07 fd 20 a3 0d  |%....  ...... ..|
00000480  01 e0 05 3a 0d 01 ea 05  e0 0d 01 f4 05 3a 0d 01  |...:.........:..|
00000490  fe 4d dc 20 20 30 2c 20  30 2c 20 30 2c 20 30 2c  |.M.  0, 0, 0, 0,|
000004a0  20 30 2c 20 30 2c 20 30  2c 20 30 2c 20 30 2c 20  | 0, 0, 0, 0, 0, |
000004b0  30 2c 20 30 2c 20 30 2c  20 30 2c 20 30 2c 20 30  |0, 0, 0, 0, 0, 0|
000004c0  2c 20 31 2c 20 32 2c 20  33 2c 20 34 2c 20 30 2c  |, 1, 2, 3, 4, 0,|
000004d0  20 35 2c 20 36 2c 20 37  2c 20 38 0d 02 08 4d dc  | 5, 6, 7, 8...M.|
000004e0  20 20 39 2c 20 39 2c 20  39 2c 31 30 2c 31 31 2c  |  9, 9, 9,10,11,|
000004f0  20 30 2c 31 32 2c 20 30  2c 31 33 2c 20 30 2c 31  | 0,12, 0,13, 0,1|
00000500  34 2c 20 30 2c 31 35 2c  20 30 2c 31 36 2c 20 30  |4, 0,15, 0,16, 0|
00000510  2c 20 30 2c 31 37 2c 20  30 2c 31 38 2c 20 30 2c  |, 0,17, 0,18, 0,|
00000520  20 30 2c 31 39 2c 20 30  0d 02 12 4d dc 20 32 30  | 0,19, 0...M. 20|
00000530  2c 20 30 2c 20 30 2c 32  31 2c 20 30 2c 20 30 2c  |, 0, 0,21, 0, 0,|
00000540  20 30 2c 32 32 2c 20 30  2c 20 30 2c 32 33 2c 20  | 0,22, 0, 0,23, |
00000550  30 2c 20 30 2c 20 30 2c  32 34 2c 20 30 2c 20 30  |0, 0, 0,24, 0, 0|
00000560  2c 32 35 2c 20 30 2c 20  30 2c 20 30 2c 32 36 2c  |,25, 0, 0, 0,26,|
00000570  20 30 2c 20 30 0d 02 1c  4d dc 20 20 30 2c 32 37  | 0, 0...M.  0,27|
00000580  2c 20 30 2c 20 30 2c 20  30 2c 20 30 2c 32 38 2c  |, 0, 0, 0, 0,28,|
00000590  20 30 2c 20 30 2c 20 30  2c 32 39 2c 20 30 2c 20  | 0, 0, 0,29, 0, |
000005a0  30 2c 20 30 2c 20 30 2c  20 30 2c 33 30 2c 20 30  |0, 0, 0, 0,30, 0|
000005b0  2c 20 30 2c 20 30 2c 20  30 2c 33 31 2c 20 30 2c  |, 0, 0, 0,31, 0,|
000005c0  20 30 0d 02 26 4d dc 20  20 30 2c 20 30 2c 33 32  | 0..&M.  0, 0,32|
000005d0  2c 33 33 2c 33 33 2c 33  33 2c 33 33 2c 33 33 2c  |,33,33,33,33,33,|
000005e0  33 33 2c 33 33 2c 33 33  2c 33 33 2c 33 33 2c 33  |33,33,33,33,33,3|
000005f0  33 2c 33 33 2c 33 34 2c  20 30 2c 20 30 2c 20 30  |3,33,34, 0, 0, 0|
00000600  2c 20 30 2c 20 30 2c 33  35 2c 20 30 2c 20 30 0d  |, 0, 0,35, 0, 0.|
00000610  02 30 1d dc 20 20 30 2c  20 30 2c 20 30 2c 20 30  |.0..  0, 0, 0, 0|
00000620  2c 20 30 2c 33 36 2c 20  30 2c 20 30 0d ff        |, 0,36, 0, 0..|
0000062e