Home » Archimedes archive » Acorn User » AU 1996-12 B.adf » Regulars_2 » MikeC/Kgen
MikeC/Kgen
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/Kgen |
Read OK: | ✔ |
File size: | 02D9 bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
10REM Key Generator 20REM To generate a look up table of SOUND notes in a key 30DIM N$(12),T%(7),Tv%(12) 40FOR A%=1 TO 12 50READ N$(A%) 60NEXT 70DATA A,A#,B,C,C#,D,D#,E,F,F#,G,G# 80FOR A%=1 TO 7 90READ T%(A%) 100NEXT 110DATA 1,3,4,6,8,9,11 120 130FOR A%=1 TO 12 140READ Tv%(A%) 150NEXT 160DATA 41,45,49,53,57,61,65,69,73,77,81,85 170 180O%=0 190REM N%= Starting note value 1=A, 3=B, 4=C ect 200D%=1 :REM Starting note number 1=A, 2=B , 3=C ect 210N%=T%(D%) 220IF D%>3 THEN R%=-7 ELSE R%=41 240REM FOR THE key of E D%=5 N%=8 250FOR B%=0 TO 1 260FOR A%=0 TO 7 270V%=(R%+4*(N%-1))+O%*48 280PRINT D%;"-";N$(N%);" ";V% 290D%+=1 300IF D%=8 THEN D%=1 310IF A%=2 OR A%=6 THEN I%=1 ELSE I%=2 320N%+=I% 330IF N%>12 THEN N%-=12:O%+=1 340NEXT 350PRINT 360N%-=I% 370IF N%<1 THEN N%+=12:O%-=1 380D%-=1 390IF D%=0 THEN D%=7 400NEXT
� Key Generator 9� To generate a look up table of SOUND notes in a key � N$(12),T%(7),Tv%(12) (� A%=1 � 12 2� N$(A%) <� F"� A,A#,B,C,C#,D,D#,E,F,F#,G,G# P� A%=1 � 7 Z� T%(A%) d� n� 1,3,4,6,8,9,11 x �� A%=1 � 12 � � Tv%(A%) �� �)� 41,45,49,53,57,61,65,69,73,77,81,85 � �O%=0 �/� N%= Starting note value 1=A, 3=B, 4=C ect �3D%=1 :� Starting note number 1=A, 2=B , 3=C ect � N%=T%(D%) �� D%>3 � R%=-7 � R%=41 � � FOR THE key of E D%=5 N%=8 �� B%=0 � 1 � A%=0 � 7 V%=(R%+4*(N%-1))+O%*48 � D%;"-";N$(N%);" ";V% " D%+=1 ,� D%=8 � D%=1 6� A%=2 � A%=6 � I%=1 � I%=2 @ N%+=I% J� N%>12 � N%-=12:O%+=1 T� ^� h N%-=I% r� N%<1 � N%+=12:O%-=1 | D%-=1 �� D%=0 � D%=7 �� �
00000000 0d 00 0a 13 f4 20 4b 65 79 20 47 65 6e 65 72 61 |..... Key Genera| 00000010 74 6f 72 0d 00 14 39 f4 20 54 6f 20 67 65 6e 65 |tor...9. To gene| 00000020 72 61 74 65 20 61 20 6c 6f 6f 6b 20 75 70 20 74 |rate a look up t| 00000030 61 62 6c 65 20 6f 66 20 53 4f 55 4e 44 20 6e 6f |able of SOUND no| 00000040 74 65 73 20 69 6e 20 61 20 6b 65 79 0d 00 1e 1a |tes in a key....| 00000050 de 20 4e 24 28 31 32 29 2c 54 25 28 37 29 2c 54 |. N$(12),T%(7),T| 00000060 76 25 28 31 32 29 0d 00 28 0f e3 20 41 25 3d 31 |v%(12)..(.. A%=1| 00000070 20 b8 20 31 32 0d 00 32 0c f3 20 4e 24 28 41 25 | . 12..2.. N$(A%| 00000080 29 0d 00 3c 05 ed 0d 00 46 22 dc 20 41 2c 41 23 |)..<....F". A,A#| 00000090 2c 42 2c 43 2c 43 23 2c 44 2c 44 23 2c 45 2c 46 |,B,C,C#,D,D#,E,F| 000000a0 2c 46 23 2c 47 2c 47 23 0d 00 50 0e e3 20 41 25 |,F#,G,G#..P.. A%| 000000b0 3d 31 20 b8 20 37 0d 00 5a 0c f3 20 54 25 28 41 |=1 . 7..Z.. T%(A| 000000c0 25 29 0d 00 64 05 ed 0d 00 6e 14 dc 20 31 2c 33 |%)..d....n.. 1,3| 000000d0 2c 34 2c 36 2c 38 2c 39 2c 31 31 0d 00 78 04 0d |,4,6,8,9,11..x..| 000000e0 00 82 0f e3 20 41 25 3d 31 20 b8 20 31 32 0d 00 |.... A%=1 . 12..| 000000f0 8c 0d f3 20 54 76 25 28 41 25 29 0d 00 96 05 ed |... Tv%(A%).....| 00000100 0d 00 a0 29 dc 20 34 31 2c 34 35 2c 34 39 2c 35 |...). 41,45,49,5| 00000110 33 2c 35 37 2c 36 31 2c 36 35 2c 36 39 2c 37 33 |3,57,61,65,69,73| 00000120 2c 37 37 2c 38 31 2c 38 35 0d 00 aa 04 0d 00 b4 |,77,81,85.......| 00000130 08 4f 25 3d 30 0d 00 be 2f f4 20 4e 25 3d 20 53 |.O%=0.../. N%= S| 00000140 74 61 72 74 69 6e 67 20 6e 6f 74 65 20 76 61 6c |tarting note val| 00000150 75 65 20 31 3d 41 2c 20 33 3d 42 2c 20 34 3d 43 |ue 1=A, 3=B, 4=C| 00000160 20 65 63 74 0d 00 c8 33 44 25 3d 31 20 3a f4 20 | ect...3D%=1 :. | 00000170 53 74 61 72 74 69 6e 67 20 6e 6f 74 65 20 6e 75 |Starting note nu| 00000180 6d 62 65 72 20 31 3d 41 2c 20 32 3d 42 20 2c 20 |mber 1=A, 2=B , | 00000190 33 3d 43 20 65 63 74 0d 00 d2 0d 4e 25 3d 54 25 |3=C ect....N%=T%| 000001a0 28 44 25 29 0d 00 dc 1a e7 20 44 25 3e 33 20 8c |(D%)..... D%>3 .| 000001b0 20 52 25 3d 2d 37 20 8b 20 52 25 3d 34 31 0d 00 | R%=-7 . R%=41..| 000001c0 f0 20 f4 20 46 4f 52 20 54 48 45 20 6b 65 79 20 |. . FOR THE key | 000001d0 6f 66 20 45 20 44 25 3d 35 20 4e 25 3d 38 0d 00 |of E D%=5 N%=8..| 000001e0 fa 0e e3 20 42 25 3d 30 20 b8 20 31 0d 01 04 0e |... B%=0 . 1....| 000001f0 e3 20 41 25 3d 30 20 b8 20 37 0d 01 0e 1a 56 25 |. A%=0 . 7....V%| 00000200 3d 28 52 25 2b 34 2a 28 4e 25 2d 31 29 29 2b 4f |=(R%+4*(N%-1))+O| 00000210 25 2a 34 38 0d 01 18 1a f1 20 44 25 3b 22 2d 22 |%*48..... D%;"-"| 00000220 3b 4e 24 28 4e 25 29 3b 22 20 22 3b 56 25 0d 01 |;N$(N%);" ";V%..| 00000230 22 09 44 25 2b 3d 31 0d 01 2c 11 e7 20 44 25 3d |".D%+=1..,.. D%=| 00000240 38 20 8c 20 44 25 3d 31 0d 01 36 1f e7 20 41 25 |8 . D%=1..6.. A%| 00000250 3d 32 20 84 20 41 25 3d 36 20 8c 20 49 25 3d 31 |=2 . A%=6 . I%=1| 00000260 20 8b 20 49 25 3d 32 0d 01 40 0a 4e 25 2b 3d 49 | . I%=2..@.N%+=I| 00000270 25 0d 01 4a 1a e7 20 4e 25 3e 31 32 20 8c 20 4e |%..J.. N%>12 . N| 00000280 25 2d 3d 31 32 3a 4f 25 2b 3d 31 0d 01 54 05 ed |%-=12:O%+=1..T..| 00000290 0d 01 5e 05 f1 0d 01 68 0a 4e 25 2d 3d 49 25 0d |..^....h.N%-=I%.| 000002a0 01 72 19 e7 20 4e 25 3c 31 20 8c 20 4e 25 2b 3d |.r.. N%<1 . N%+=| 000002b0 31 32 3a 4f 25 2d 3d 31 0d 01 7c 09 44 25 2d 3d |12:O%-=1..|.D%-=| 000002c0 31 0d 01 86 11 e7 20 44 25 3d 30 20 8c 20 44 25 |1..... D%=0 . D%| 000002d0 3d 37 0d 01 90 05 ed 0d ff |=7.......| 000002d9