Need a pitch pipe to tune your guitar? Try using your computer instead. "Guitar Tuner" helps you tune your 6- or 12-string guitar to perfect concert pitch. The program was originally written for the TI-99/4A (either BASIC), and we've added versions for the Commodore 64, Plus/4, 16, Atari, and IBM PC/PCjr.
Now an accurately tuned guitar is just a few keypresses away. "Guitar Tuner" plays a tone for each string on your 6- or 12-string guitar, freeing your hands to adjust the tuning pegs by ear.
To tune a 6-string guitar, run the program and play the tones by pressing the corresponding letter keys: E for the low (bass) E string; A for the A string; D for the D string; G for the G string; B for the B string; and CTRL-E for the high E string. To tune a 12-string guitar, press the SHIFT (or SHIFT LOCK) key for the second set of strings. This raises the tones by one octave (except for the B and high E strings, which are tuned to the same octave, of course).
If you aren't too familiar with the sound capabilities of your computer, you can learn a lot by studying these simple programs. Notice the DATA numbers at the end of each program; these are the tone values for the sound statements. Some programs convert these numbers with a formula to produce the proper tones. All the tones were verified with a quartz guitartuning meter calibrated for standard concert pitch.
A Note About Notes
The accuracy of any note produced by a computer tone generator (or synthesizer) is measured in the number of bits of frequency resolution. The more bits, the better. (Don't confuse this with the number of bits handled by the computer's main microprocessor—a 16-bit computer might still have a sound chip with only 8-bit frequency resolution, or vice versa.)
For example, the standard pitch for a middle A note is defined by musicians as 440 hertz (cycles per second). Let's say a certain computer's sound chip is limited to 8-bit frequency resolution. The most accurate A note it could generate might be 437.8 hertz. That's close enough to 440 for some people, but it would sound slightly flat to those with a good sense of pitch.
The TI-99/4A, IBM PC, and PCjr have 12-bit frequency resolution (in fact, the TI and PCjr both use the same Texas Instruments sound chip). Twelve-bit resolution is about the minimum required for people with a good sense of pitch. The Commodore 64 has 16-bit frequency resolution, so it's even more accurate. Commodore's new Plus/4 and 16 have 10-bit resolution, which provides passable results. The VIC-20 has only 8-bit frequency resolution, so Guitar Tuner isn't practical on the VIC. The program is easy to write on the VIC, but the tones are too far out of tune for musicians.
Atari computers also have 8-bit frequency resolution (the slightly flat A note described above is produced by the Atari). However, the Atari version of Guitar Tuner takes advantage of a little-known feature that lets you combine two of the 8-bit tone generators to make one 16-bit generator. This improves the accuracy of an A note from 437.8 to 439.97 hertz-close enough for almost anybody. (For more information on this technique, see "Perfect Pitch," COMPUTEI's Second Book of Atari.)