When I was trying to learn guitar I found tuning it impossible so I
wrote this program which helped a lot. I still find it much easier to
tune using it so I thought other people might find it useful too.

It requires you to have a soundcard of course. I have a gus so that's
what I wrote it for. It uses /dev/dsp so it might work with other
soundcards but I wouldn't guarentee it.

The program basically reads samples from the soundcard, does a fourier
transform to find the dominant frequency and then based on the tuning
it will print out what note it is.

Using it
--------

The notes are printed out by name followed by a .x where x from 0 to 9
shows how much closer to the next note it is. For example

E.9 says that this note is almost an F. Its pretty useful since each
note spans at least 10-12 Hz so it allows you to tune your instrument
more acurately.

Using the program is simple. Just run it and play the notes. It tells
you what you played and since you know what it should be (hopefully)
you can tune it and play it again.

In case you want to tune your guitar to another instrument (like a
harmonica) which has a slightly different tuning, you can tell the
program the frequency of the E by playing it in the beginning. That's
why it asks you the annoying question "Use standard tuning ...".

For a list of options do, tune -h.

In case you're just learning guitar and keep forgetting what note each
string is (don't laugh this used to happen to me) you can remember it
by playing the appropriate fret on the string you just tuned. So you
first tune the low E string. Then play the 5th fret on it, it will
tell you that the note you just played is an A. You should now tune
the next string to this note and so on. Don't forget that you must
tune the B string to the 4th fret of the G string (the G is the fourth
string from the top).

Compiling/Installing
--------------------

It should compile without modification on any Linux, don't know about
other machines. The included binary was compiled with gcc 2.6.3.

It doesn't require any special priveleges or anything so you should be
able to put the binary pretty much anywhere you want.

The fourier transforms are some public domain code from netlib. The
headers and compiled library is in the subdirectory fft.
