Orion's Audio Tuner -- Readme/Bug List

Orion Sky Lawlor, 1/14/99.  Version 0.8
For the ACM Quest for Windows CE, 1999.

olawlor@acm.org
http://viz1.cs.uaf.edu/~lawlor/


Introduction:
	This program uses your computer's microphone to
tune a musical instrument (or your voice).  The outer
dial reads the name of the musical pitch, and the
inner dial reads the mistuning from that pitch.  This
can be used to tune a piano or guitar, improve technique
and intonation on wind instruments, and is just a
generally interesting thing to see.


Application:
	In a quiet environment, start the program and
whistle, play the piano, guitar, or wind instrument,
and watch the dials spin.  The program works best 
with a pure, sinusoidal (mellow) sound-- raspy, 
noisy, or distorted tones will confuse it.  It's 
also easier for the program to pick out the correct 
tone at higher freqencies (more Hz per note).


Notes:
	For transposed instruments (those not built 
in concert pitch), you can select the key in which
the output notes are displayed.  Pianos, guitars,
and flutes should leave the key at C; but trumpets,
clarinets, and most brass instruments should set
the key to Bb; and alto and baritone saxaphones
should use Eb. 

(Possible BUG: I only play concert-pitch instruments,
 so the direction of the transposition may be wrong.
 This is something I need to check out.)


Implementation:
	2048 8-bit mono samples are read at 22.050 kHz.
These are DC-centered, FFT'd, and the freqency bins are
converted to decibel power.  The peak bin is identified,
and interpolated to sub-bin accuracy.  This gives a 
freqency peak, in Hz, which is converted via the
formula: 

	log(freq)/log(2)*12-log(440.0)/log(2)*12

into a musical note (in half-steps) in the equal-
tempered scale.  The mistuning, in half-steps, is just 
the distance to the nearest integral note.


	The program is still not nearly as noise-
immune or harmonic-immune as I want.  I probably 
need to wrap the FFT output around an octave, summing
the power at each note-- this should make it less
sensitive to harmonic overtones.

	The program still needs to be ported to
WinCE (grrr... no compiler!) and should probably use 
WinHelp.  The code also needs to be massivly better
commented.
