"Self tuning piano" questions

R Moody remoody@midstatesd.net
Thu, 25 Dec 2003 22:16:49 -0600


----- Original Message -----
From: "Don A. Gilmore" <eromlignod@kc.rr.com>
To: <dm.porritt@verizon.net>; "Pianotech" <pianotech@ptg.org>
Sent: Thursday, December 25, 2003 10:40 AM
Subject: Re: "Self tuning piano" questions



Don Gilmore write....
> Actually it is extremely accurate.  You can do things with electronics,
even
> on a simple level, that are incredible.
>
> The one-shot counter works on the priciple that once it is triggered it
> turns its output "on" at the first low-to-high transition of the square
> wave.  Then it waits for the next low-to-high transition to turn it "off"
> (it's counting to "one").  The reaction time is in a few nanoseconds and
the
> trigger pulse to start the process can be at any time since it waits to
> start the pulse until the first low-to-high.

Earlier you mentioned you could do this with chips from Radio Shack for
under $10.  I have not bought an ETD because they are too expensive.  $150 I
thought I would never see, but when Robert Scott offered his Tunelab95 for
free trial I jumped on that but found just as with any tool, (complicated
machine actually) there is a learning curve, both for how to use it and what
it can actually do for you.  But a device accurate to 1/600 cents from off
the shelf parts for $10?--- I will be forced to become a machine tuner.  ; )
(as if) (but you never know).
    I read an article describing in depth the self tuning system, I assume
it was by you but I forgot where.  Journal?, Music Trades?  Did someone mail
me a clipping?  Is it in html or on the net?
    From the article, the system seems feasible it only remains to be seen
if it is practical.  It has to be made and put into a piano without alarming
the accounting dept.  I was hoping to see one at NAMM last Jan, in fact I
think it was announced but the head of QRS would only say it was not going
to be exhibited.  When I tried to ask specific questions he did not seem
anxious to get  into that discussion.
    So I am wondering how well will it actually perform as far as a piano
tuner is concerned.  Especially unisons.   Since most ETD users tune the
unisons by ear, (don't they?) I wonder how your system will fare.
Regarding your demo model, have you demonstrated it in front of a group of
piano tuners, and can it really tune a 3 string unison to their
satisfaction?  This is a trick question because the your goal is made when
the piano sounds OK when playing music, after all it is QRS the player piano
people who are interested and I know from my own player piano that it can be
way out of tune but still sound OK when a roll is played, but sounds
horrible when I sit down to play it.  So I think if your system  comes close
but not up to professional tuning standards it will still suffice for the
listeners and most important the customers.
    I have seen how the SAT III does---superb on everything but unisons. But
if your micro second counting system really is accurate to 1/600 (the SAT is
1/10 cent ??) AND gives unisons (as good or better and faster than by ear),
you stand to make out quite well in the ETD market.



>
> Actually I don't really care whether it matches a strobe tuner in actual
> frequency since it will be tuned by hand.  As long as I tune it with the
> same method I stored with, it will match the factory tuning exactly.  The
> actual values are determned by the tech's ear and are immaterial.
>
> Don A. Gilmore
> Mechanical Engineer
> Kansas City
>
So you don't produce a tuning, only measure and record and reproduce that
record?  But could you have the strings tuned to something like
440*2^(1/12)?
Somewhere it was mentioned there might be historical tunings offered.  Would
these have to be tuned by  hand first and then recorded by your system, or
can you program the system to produce a particular temperament?

You indicated you would explain in more detail the square wave aspect of
your system.  I am interested. From what I pasted in below, I think I get
the gist.  My synthesizer has a square wave, or kind of one.  Is this the
same kind of square wave you are talking about?  The synth square wave is
composed of only the odd harmonics?  So that means when I play a major 3rd I
will not hear the 4th harmonic of the top note which means the 5th harmonic
of the bottom note has nothing to beat with.   Very strange hearing an ET
major 3rd not beating.  If you or anyone can explain why the synth square
waves only gives odd harmonics I am all ears.



----Richard Moody

> Hi David:
>
> Actually it is extremely accurate.  You can do things with electronics,
even
> on a simple level, that are incredible.
>
> The one-shot counter works on the principle that once it is triggered it
> turns its output "on" at the first low-to-high transition of the square
> wave.  Then it waits for the next low-to-high transition to turn it "off"
> (it's counting to "one").  The reaction time is in a few nanoseconds and
the
> trigger pulse to start the process can be at any time since it waits to
> start the pulse until the first low-to-high.
>
> When testing the system I set it up so that a single string sustains, the
> process is triggered and the counter number is sent from the processor to
my
> laptop computer every half-second or so and is displayed on the screen.
So
> I get a number that refreshes twice a second.  It will only fluctuate by
one
> or two at A-440 (much less than a cent).
>
> Actually I don't really care whether it matches a strobe tuner in actual
> frequency since it will be tuned by hand.  As long as I tune it with the
> same method I stored with, it will match the factory tuning exactly.  The
> actual values are determined by the tech's ear and are immaterial.
>
> Don A. Gilmore
> Mechanical Engineer
> Kansas City

I have done active probing for resonsances similar to
> what you did for an article in the Journal, "Measuring Inharmonicity Using
> Continuous Excitation", June 1993.  I found that the resonant peaks, even
> when measured in this manner, are still too broad to define a resonant
> frequency to any better than about .02 cents.  So 1/6000th of a cent is a
> bit beyond belief.
>
> Robert Scott
> Real-Time Specialties

I can indeed get that accuracy and I can do it in a few milliseconds,
believe it or not.  You have made the assumption that frequency counting is
the only solution to determining frequency (as many in the past have).  To
get 1/6000th of a cent takes a fast processor like we intend to use, but I
can (and did) do it with three simple chips from Radio Shack and still get
an accuracy of 1/200th of a cent and do it in 36 ms!

The signal from the pickups is super-clean (virtually no overtones).  I
convert this wave to a square wave using a simple chip called a Schmitt
trigger ($0.16 at Radio Shack).  Then, rather than count waves for a long
time to get a frequency, I determine the "period" (the time for one complete
vibration), which is just the reciprocal of the frequency and is just as
useful.

How do I get it so accurate?  Well, if I'm willing to splurge another $0.86
I can get a little 10 MHz crystal oscillator.  This puts out 10 million
square-wave pulses each second and is ultra-accurate.  Then for another five
bucks (this is getting expensive!) I buy me a programmable counter chip.
The counter chip has several independent counters that can count pulses this
fast.  I use two of them.

The first one is a one-shot counter and I feed it the square wave from the
piano string and tell it to count to "one".  The way the counter works (I
can get into more detail if you like), this produces an output pulse equal
in duration to exactly one vibration of the string.  I feed this signal to
the "gate" of the second counter.  All the gate does is tell the second
timer when to start and stop counting.  So if I feed it my one-vibration
pulse it will turn the counter "on" for one vibration and then back "off".
What is it counting?  The 10 MHz oscillator!  Then I read the number out of
it to see what I got.  What I get is how many times a 10 MHz oscillator
pulses during one vibration of the string.  Do you see where we're going
here?

Let's use A-440 for an example.  An oscillator pulsing 10 million times a
second would pulse

10,000,000 / 440 = 22,727 times

during one period of A-440.  If I wanted a string to vibrate at exactly 440
Hz, I would have to tune it until my counter read 22,727.  And remember, the
time it takes to do this measurement is just one period, or

1 / 440 = 2.3 milliseconds.

Obviously the largest, slowest waves would be from the Big Daddy A0 string
at 27.5 Hz.  Then the counter would read 10,000,000 / 27.5 = 363,636 pulses.

The resolution of the counter is, obviously, one count (it can't count
fractions of a count, only integers).  The frequency at one cent above A0 is

f = 27.5 x 2^(1/1200) = 27.5159 Hz

This results in a count of 10,000,000 / 27.5159 = 363,426.  This differs
from the other count by

363,636 - 363,426 = 210 pulses

That's 210 pulses difference in reading to detune the note by just one cent.
And it took

1 / 27.5 = 36.4 milliseconds

For about $6.00.

Actually I have found that an accuracy of better than a tenth of a cent or
so is futile since the string naturally wavers more than this even when held
at a constant volume.  It's also far better than any but the finest ear
could detect.

Don A. Gilmore
Mechanical Engineer
Kansas City



This PTG archive page provided courtesy of Moy Piano Service, LLC