
NAME

   piano - instrument tuning and frequency measuring program with
   automatic note detection

DESCRIPTION

   piano is a simple but quick instrument tuning and frequency measuring
   programme. Needs a computer with soundcard.

   For better cpu usage in older machines, it is a console (ncurses)
   program.

   Without options, it will guess the note just played (or one of its
   harmonics) and helps you fine-tune it within a range of +/- 1/2 tone.
   The good tones give a green bar in the middle of the waterfall.

   You can also tell it by options to tune a special note and octave or a
   special frequency (for electronic experiments!). A "bias" option is
   helpful for tuning older, lower- tuned pianos. A "soundcorr" option
   corrects the sample rate of the soundcard (there is Tom Sailer's refreq
   program included in the package, which gives you this factor from a
   reference frequency.)

OPTIONS

   -b
          bias: pre-set 'mis-tuning' in 1/440 steps, which means 1 Hz
          steps for the chambertone 'a1'. You can give this option as an
          argument a numeric value <0.9 for example 'piano -b -18'. This
          is useful for old pianos which are often tuned lower.
   -f
          fine tune a given frequency (enter center frequency 55 - 22000
          Hz)
   -n
          note <A, A# = Bb, B, C..., a, a# = bb, b, c...> (with -o)
   -o
          octave <-1 ...6>
   -s
          soundcard samplerate correction factor <0.9 ... 1.1>
   -v
          verbose debug output
   -h
          help

   If another sound-device than /dev/dsp, give it as last argument.
   Default: auto-detect note and auto-switch to fine tune and measure.

CALIBRATION:

   You can use piano without any preparations.

   But there is a way if you want to do it really exactly, for this you
   must know the real sample rate of your soundcard, which is often
   different from the "official" one. By option -s you can tell piano the
   deviation. There is a program included that helps you to get this
   correction factor: Tom Sailer's refreq. You need a known exact clock
   source in the 200Hz-20kHz region. A readily available in most
   households and usually very accurate source is the line sync of an
   ordinary TV receiver. As far as I know, the line sync of the second
   public german TV channel (ZDF) is used as a reference frequency even by
   official bodies. Tune your TV equipment (with baseband video output) to
   a TV channel and feed the video output to the soundcard. Run refreq -f
   15625 as root. After a few seconds, the program should have calculated
   the correction parameters. (The command line above implies PAL format
   with its 15625Hz line sync frequency. For other video formats, use the
   appropriate frequency.) It puts them on the screen, and also writes
   them into the file '/etc/corrections'. You only need the factor
   'soundcorr'.

HOW TO TUNE YOUR OLD PIANO

   I did it like this: First I played some of the obviously not so much
   bad-sounding notes. My piano is so low-tuned that if I played an 'a',
   the program thought it to be a 'g#', so I had to start 'piano -n a' to
   tell it that I played an a, or to play an 'a#' and start autodetection,
   now piano thought it is an 'a'. Then I looked for the 'bias', which is
   the heard tone deviation from the note table, transferred on the
   chambertone 'a1', which is normally 440. So a bias of -1 means:
   mis-tuned as if a were 439 Hz. The bias is the last number in the
   numeric output in the lower part of the screen.

   In my case, after playing some of my best-sounding notes, I guessed the
   bias could be -16. So I restarted piano with 'piano -b -16' and again
   played some notes. Now it guessed the note right, so, when changing the
   note, e.g. from c to d, I only had to press <space> to restart
   autodetection, and it worked. I still found an average bias of -2 in
   most cases when playing not-so-much-mistuned keys. So I restarted piano
   a last time with 'piano -b -18' and had no bias at the good notes. So I
   wrote down that value -18 and decided that the whole piano should
   remain down-tuned so that 'my' chambertone 'a1' is 18 Hz lower than
   440Hz = 422 Hz.

   Now I could tune the piano well. I started with 'a' in an octave like 2
   or 3 and tuned all a's from high to low, so I could also use my ears
   for raw tuning. When changing to a lower octave, I did not have to
   press <space> because the soundcard hears harmonics, and low tones seem
   to be tuned even better by harmonics.

   (The soundcard seems not to hear very precise: If I tuned a tone
   correctly with the harmonic from a high octave, and I switched to
   auto-detect by the space bar, the program tells me my tone is too low.
   So I did not change this tone any more, but remembered this
   frequency-dependant deviation for tuning the very low notes which the
   program could not tune any more with the harmonics.)

   Then I played a high 'g#', pressed <space> to restart the
   autodetection, and went on tuning all 'g#'s, and so on and so on, the
   first time I needed half a day. It became a great sound. It's fun.

BUGS

   See the frequency-dependant deviation described above, but I think this
   is a bug of my soundcard? Other bugs or misfeatures will surely be
   found... Please tell me!

   But if you like it, or have ideas, tell me also, if encouraged I will
   hack on.

SEE ALSO

   The latest version of piano should always be at

   I made the project name piano-tuner because there is an 'emotional
   email program' on the sourceforge server already called "piano"!

   There are maybe better tuning programs for you, but they will work only
   if you use a better and newer computer.

   At sourceforge, I found at least 2, both use fftw and qt and have a
   nice gui:



AUTHORS

   Gnther Montag. [3]Safaridoktor@compuserve.de,

[This email address no longer works - C. Keesan]

   with most code taken from Thomas M. Sailer's ham radio program
   'multimon', and Tom's reffreq from the hf package (I renamed it to
   refreq here to avoid rpm conflicts). This is my first ncurses program,
   inspired by Pawel Jalocha's mt63 ham radio terminal.

