Home » Archimedes archive » Acorn User » AU 1997-02 B.adf » Regulars » StarInfo/Baker/!Guitar/Utilities/Programs/Tuner

StarInfo/Baker/!Guitar/Utilities/Programs/Tuner

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 1997-02 B.adf » Regulars
Filename: StarInfo/Baker/!Guitar/Utilities/Programs/Tuner
Read OK:
File size: 03FF bytes
Load address: 0000
Exec address: 0000
File contents
   10REM ***Guitar Tuner***
   20REM ***By David Baker***
   30PROCinitialise
   40PROCguitar_type
   50END
   60
   70DEF PROCinitialise
   80tempo=(15/60/100)*4096
   90TEMPO tempo
  100VOICES 2
  110*CHANNELVOICE 2 2
  120ENDPROC
  130
  140DEF PROCguitar_type
  150PRINT "Select guitar type:"
  160PRINT " 1: Normal"
  170PRINT " 2: Bass"
  180REPEAT
  190type%=VALGET$
  200IF type%=1 THEN PROCnormal_guitar
  210IF type%=2 THEN PROCbass
  220UNTIL 0
  230ENDPROC
  240
  250DEF PROCnormal_guitar
  260DIM pitch(5)
  270pitch(0)=&2555
  280pitch(1)=&2C00
  290pitch(2)=&32AA
  300pitch(3)=&3955
  310pitch(4)=&3EAA
  320pitch(5)=&4555
  330PRINT '"Normal guitar - Use 1 to 6 to select string"
  340x%=0
  350SOUND 2,-15,pitch(x%),-1
  360PRINT CHR$13;"String ";x%+1;
  370REPEAT
  380key$=INKEY$(0)
  390IF key$>="1" AND key$<="6" x%=VALkey$-1:PRINT CHR$13;"String ";x%+1;:SOUND &2,-15,pitch(x%),-1
  400UNTIL 0
  410
  420DEF PROCbass
  430DIM pitch(3)
  440pitch(0)=&1555
  450pitch(1)=&1C00
  460pitch(2)=&22AA
  470pitch(3)=&2955
  480PRINT '"Bass guitar - Use 1 to 4 to select string"
  490x%=0
  500SOUND 2,-15,pitch(x%),-1
  510PRINT ;CHR$13;"String ";x%+1;
  520REPEAT
  530key$=INKEY$(0)
  540IF key$>="1" AND key$<="4" x%=VALkey$-1:PRINT ;CHR$13;"String ";x%+1;:SOUND &2,-15,pitch(x%),-1
  550UNTIL 0

� ***Guitar Tuner***
� ***By David Baker***
�initialise
(�guitar_type
2�
<
F� �initialise
Ptempo=(15/60/100)*4096
Zȟ tempo
dȠ 2
n*CHANNELVOICE 2 2
x�
�
�� �guitar_type
�� "Select guitar type:"
�� " 1: Normal"
�� " 2: Bass"
��
�type%=��
�� type%=1 � �normal_guitar
�� type%=2 � �bass
�� 0
��
�
�� �normal_guitar
� pitch(5)
pitch(0)=&2555
pitch(1)=&2C00
"pitch(2)=&32AA
,pitch(3)=&3955
6pitch(4)=&3EAA
@pitch(5)=&4555
J4� '"Normal guitar - Use 1 to 6 to select string"
Tx%=0
^� 2,-15,pitch(x%),-1
h� �13;"String ";x%+1;
r�
|
key$=�(0)
�R� key$>="1" � key$<="6" x%=�key$-1:� �13;"String ";x%+1;:� &2,-15,pitch(x%),-1
�� 0
�
�� �bass
�� pitch(3)
�pitch(0)=&1555
�pitch(1)=&1C00
�pitch(2)=&22AA
�pitch(3)=&2955
�2� '"Bass guitar - Use 1 to 4 to select string"
�x%=0
�� 2,-15,pitch(x%),-1
�� ;�13;"String ";x%+1;
�

key$=�(0)
S� key$>="1" � key$<="4" x%=�key$-1:� ;�13;"String ";x%+1;:� &2,-15,pitch(x%),-1
&� 0
�
00000000  0d 00 0a 18 f4 20 2a 2a  2a 47 75 69 74 61 72 20  |..... ***Guitar |
00000010  54 75 6e 65 72 2a 2a 2a  0d 00 14 1a f4 20 2a 2a  |Tuner***..... **|
00000020  2a 42 79 20 44 61 76 69  64 20 42 61 6b 65 72 2a  |*By David Baker*|
00000030  2a 2a 0d 00 1e 0f f2 69  6e 69 74 69 61 6c 69 73  |**.....initialis|
00000040  65 0d 00 28 10 f2 67 75  69 74 61 72 5f 74 79 70  |e..(..guitar_typ|
00000050  65 0d 00 32 05 e0 0d 00  3c 04 0d 00 46 11 dd 20  |e..2....<...F.. |
00000060  f2 69 6e 69 74 69 61 6c  69 73 65 0d 00 50 1a 74  |.initialise..P.t|
00000070  65 6d 70 6f 3d 28 31 35  2f 36 30 2f 31 30 30 29  |empo=(15/60/100)|
00000080  2a 34 30 39 36 0d 00 5a  0c c8 9f 20 74 65 6d 70  |*4096..Z... temp|
00000090  6f 0d 00 64 08 c8 a0 20  32 0d 00 6e 15 2a 43 48  |o..d... 2..n.*CH|
000000a0  41 4e 4e 45 4c 56 4f 49  43 45 20 32 20 32 0d 00  |ANNELVOICE 2 2..|
000000b0  78 05 e1 0d 00 82 04 0d  00 8c 12 dd 20 f2 67 75  |x........... .gu|
000000c0  69 74 61 72 5f 74 79 70  65 0d 00 96 1b f1 20 22  |itar_type..... "|
000000d0  53 65 6c 65 63 74 20 67  75 69 74 61 72 20 74 79  |Select guitar ty|
000000e0  70 65 3a 22 0d 00 a0 12  f1 20 22 20 31 3a 20 4e  |pe:"..... " 1: N|
000000f0  6f 72 6d 61 6c 22 0d 00  aa 10 f1 20 22 20 32 3a  |ormal"..... " 2:|
00000100  20 42 61 73 73 22 0d 00  b4 05 f5 0d 00 be 0c 74  | Bass".........t|
00000110  79 70 65 25 3d bb be 0d  00 c8 1e e7 20 74 79 70  |ype%=....... typ|
00000120  65 25 3d 31 20 8c 20 f2  6e 6f 72 6d 61 6c 5f 67  |e%=1 . .normal_g|
00000130  75 69 74 61 72 0d 00 d2  15 e7 20 74 79 70 65 25  |uitar..... type%|
00000140  3d 32 20 8c 20 f2 62 61  73 73 0d 00 dc 07 fd 20  |=2 . .bass..... |
00000150  30 0d 00 e6 05 e1 0d 00  f0 04 0d 00 fa 14 dd 20  |0.............. |
00000160  f2 6e 6f 72 6d 61 6c 5f  67 75 69 74 61 72 0d 01  |.normal_guitar..|
00000170  04 0e de 20 70 69 74 63  68 28 35 29 0d 01 0e 12  |... pitch(5)....|
00000180  70 69 74 63 68 28 30 29  3d 26 32 35 35 35 0d 01  |pitch(0)=&2555..|
00000190  18 12 70 69 74 63 68 28  31 29 3d 26 32 43 30 30  |..pitch(1)=&2C00|
000001a0  0d 01 22 12 70 69 74 63  68 28 32 29 3d 26 33 32  |..".pitch(2)=&32|
000001b0  41 41 0d 01 2c 12 70 69  74 63 68 28 33 29 3d 26  |AA..,.pitch(3)=&|
000001c0  33 39 35 35 0d 01 36 12  70 69 74 63 68 28 34 29  |3955..6.pitch(4)|
000001d0  3d 26 33 45 41 41 0d 01  40 12 70 69 74 63 68 28  |=&3EAA..@.pitch(|
000001e0  35 29 3d 26 34 35 35 35  0d 01 4a 34 f1 20 27 22  |5)=&4555..J4. '"|
000001f0  4e 6f 72 6d 61 6c 20 67  75 69 74 61 72 20 2d 20  |Normal guitar - |
00000200  55 73 65 20 31 20 74 6f  20 36 20 74 6f 20 73 65  |Use 1 to 6 to se|
00000210  6c 65 63 74 20 73 74 72  69 6e 67 22 0d 01 54 08  |lect string"..T.|
00000220  78 25 3d 30 0d 01 5e 18  d4 20 32 2c 2d 31 35 2c  |x%=0..^.. 2,-15,|
00000230  70 69 74 63 68 28 78 25  29 2c 2d 31 0d 01 68 19  |pitch(x%),-1..h.|
00000240  f1 20 bd 31 33 3b 22 53  74 72 69 6e 67 20 22 3b  |. .13;"String ";|
00000250  78 25 2b 31 3b 0d 01 72  05 f5 0d 01 7c 0d 6b 65  |x%+1;..r....|.ke|
00000260  79 24 3d bf 28 30 29 0d  01 86 52 e7 20 6b 65 79  |y$=.(0)...R. key|
00000270  24 3e 3d 22 31 22 20 80  20 6b 65 79 24 3c 3d 22  |$>="1" . key$<="|
00000280  36 22 20 78 25 3d bb 6b  65 79 24 2d 31 3a f1 20  |6" x%=.key$-1:. |
00000290  bd 31 33 3b 22 53 74 72  69 6e 67 20 22 3b 78 25  |.13;"String ";x%|
000002a0  2b 31 3b 3a d4 20 26 32  2c 2d 31 35 2c 70 69 74  |+1;:. &2,-15,pit|
000002b0  63 68 28 78 25 29 2c 2d  31 0d 01 90 07 fd 20 30  |ch(x%),-1..... 0|
000002c0  0d 01 9a 04 0d 01 a4 0b  dd 20 f2 62 61 73 73 0d  |......... .bass.|
000002d0  01 ae 0e de 20 70 69 74  63 68 28 33 29 0d 01 b8  |.... pitch(3)...|
000002e0  12 70 69 74 63 68 28 30  29 3d 26 31 35 35 35 0d  |.pitch(0)=&1555.|
000002f0  01 c2 12 70 69 74 63 68  28 31 29 3d 26 31 43 30  |...pitch(1)=&1C0|
00000300  30 0d 01 cc 12 70 69 74  63 68 28 32 29 3d 26 32  |0....pitch(2)=&2|
00000310  32 41 41 0d 01 d6 12 70  69 74 63 68 28 33 29 3d  |2AA....pitch(3)=|
00000320  26 32 39 35 35 0d 01 e0  32 f1 20 27 22 42 61 73  |&2955...2. '"Bas|
00000330  73 20 67 75 69 74 61 72  20 2d 20 55 73 65 20 31  |s guitar - Use 1|
00000340  20 74 6f 20 34 20 74 6f  20 73 65 6c 65 63 74 20  | to 4 to select |
00000350  73 74 72 69 6e 67 22 0d  01 ea 08 78 25 3d 30 0d  |string"....x%=0.|
00000360  01 f4 18 d4 20 32 2c 2d  31 35 2c 70 69 74 63 68  |.... 2,-15,pitch|
00000370  28 78 25 29 2c 2d 31 0d  01 fe 1a f1 20 3b bd 31  |(x%),-1..... ;.1|
00000380  33 3b 22 53 74 72 69 6e  67 20 22 3b 78 25 2b 31  |3;"String ";x%+1|
00000390  3b 0d 02 08 05 f5 0d 02  12 0d 6b 65 79 24 3d bf  |;.........key$=.|
000003a0  28 30 29 0d 02 1c 53 e7  20 6b 65 79 24 3e 3d 22  |(0)...S. key$>="|
000003b0  31 22 20 80 20 6b 65 79  24 3c 3d 22 34 22 20 78  |1" . key$<="4" x|
000003c0  25 3d bb 6b 65 79 24 2d  31 3a f1 20 3b bd 31 33  |%=.key$-1:. ;.13|
000003d0  3b 22 53 74 72 69 6e 67  20 22 3b 78 25 2b 31 3b  |;"String ";x%+1;|
000003e0  3a d4 20 26 32 2c 2d 31  35 2c 70 69 74 63 68 28  |:. &2,-15,pitch(|
000003f0  78 25 29 2c 2d 31 0d 02  26 07 fd 20 30 0d ff     |x%),-1..&.. 0..|
000003ff