A few years ago Gibson began introducing some clever new technology to a select few guitars which automatically tuned the instrument and kept it there (seen most recently in the gorgeous Firebird X). I think that it's fair to say that robot tuning has not quite been a phenomenal success, perhaps due to the fact that tuning six strings only takes a few seconds and doesn't require any specialist training. That's certainly not true of the piano, which has more than 200 strings divided between 88 keys and its tuning is, for the most part, gratefully handed over to the experienced ear of a professional technician. In the 1990s, Kansas City mechanical engineer and classically-trained pianist Don A. Gilmore created a mechanical self-tuning device for the piano. From there he went on to develop a thermal system that can bring the whole instrument to tune within a minute.

Gilmore told us that when Dick Dolan of QRS Music was introduced to an early prototype of the self-tuning system in early 2002, he was so impressed that he immediately signed up the engineer to further develop the device - then consisting of a Basic Stamp program and sustained with the modified Ebow. The CEO was given a tuning wrench to "knock the string out of tune and it would go right back into tune."

"During my experimentation with the earlier mechanical device I had been using a modified Ebow to continuously sustain the string while I experimented with the wave on my scope," says Gilmore. "I had scratched through the potting on the Ebow to expose the legs of its amplifier chip, then soldered a wire to the appropriate leg and tapped the signal for my circuit. I had given some thought to a full, self-tuning piano, but it was never really practical until I had my epiphany."

The entire tuning process is said to take less than a minute and at the end of the playing session, the power is turned off and the piano returned to its previous state

"I was considering wild ideas about forcing electricity at a given frequency through the piano strings, wondering if it might have any effect on the pitch. I immediately went to my lab and hooked up a bench-top DC power supply to a string on an electric guitar that I had. I found that by turning the dial on the power supply I could easily control the pitch of the string. I also found that it took very little current or temperature change."

"Once I had started work on the self-tuner, it quickly dawned on me that this was an excellent way to do the automatic tuning (rather than have to strike each note over and over). This way I could tune all the strings simultaneously and have a steady wave that was easy to measure, and repeatable with each tuning."

On completion of the project, the self-tuning system was to head for the Prelude line of Story & Clark grand pianos. A change of management at QRS, however, and a subsequent change of company direction, meant that Gilmore's invention was never to emerge from its prototyping stage. After a few years of going nowhere, Gilmore opted to break free from QRS and develop the system independently.

"I am a mechanical engineer, so I had to learn electronics on my own and experiment and redesign the device over and over to get to where I am," he told Gizmag. "The device is all surface mount technology, so each iteration had to be sent to China to have the boards populated."

Each string of the piano has its own sustainer module, but this never actually touches any of the strings. Unlike the Ebow, which uses magnetic coils to pickup a signal, the self-tuning system makes use of infrared sensors as there would be too much magnetic interference and feedback between so many coils, so close together.

The low bass sustainer modules

"Each sensor has an LED infrared emitter and a phototransistor receiver," explains Gilmore. "Normally these sensors are used as a proximity switch, but I found that if I wire the phototransistor like an amplifier, I can actually see the vibration of the string's reflection in the signal."

To tune a string to the correct pitch, the note is entered into a continuous sustain and then compared with the frequency of one that's correctly-tuned (determined when the instrument if first warm-tuned by a technician at the factory) by an onboard processor. The pitch is adjusted using an electrical current delivered to each string via ordinary battery-compartment springs riveted to printed circuit boards positioned at the bottom of the tuning pins, where they are exposed to the underside of the pinblock. The current causes the strings to warm and expand, which decreases the string tension and lowers the pitch. Lowering the current cools the strings and raises the pitch.

"With some minor signal conditioning I can get a crisp square wave at the fundamental frequency of the string's vibration," says Gilmore. "I use a high-speed counter connected to a 100 MHz clock oscillator. I connect the string signal to the gate of the counter, so that each time the string vibrates it turns the counter on, then the next time it vibrates, it turns it back off, then I read the accumulated value of the counter. So I get a large, high-resolution number every time the string vibrates that represents the period of the vibration (which is just the reciprocal of the frequency or pitch). The system is so accurate that I can see natural fluctuations in the string's vibration. In fact, it is impractical to tune finer than about 1/10th of a musical cent because of this minute wandering of pitch."

"To handle the massive amount of I/O, I use an FPGA (Field Programmable Gate Array). This is just a big chip with a huge amount of logic gates inside. Rather than run on a sequential program like other processors, an FPGA can be permanently burnt with a custom logic circuit. So each string of the piano has its own dedicated logic counter and evaluator circuit that runs concurrently with the rest of the 200+ circuits. No polling, no delays. Just true, simultaneous and extremely fast operation."

The self-tuning piano system's main circuit board

"But even an FPGA only has so many pins and I don't have enough to also control all 200+ outputs. So I came up with a long line of shift registers in series into which I can shift a giant 219-bit word from a single serial line from the FPGA. Each of the bits of this word is connected to a small power transistor that turns 5 volts on or off for each string. By continuously changing this word I can control when and how often each string is turned off and on. So I can get 219 separate PWM (Pulse-Width Modulated) duty cycles and precisely control the pitch of all the strings simultaneously... and with a single wire."

The system raises or lowers the temperature of each string until the piano is in tune. When pitch is achieved, the continuous sustain ends and the system maintains the current to keep the string in tune. Gilmore says that the entire tuning process takes less than a minute, has a tuning accuracy of ± 0.001 cents and at the end of the playing session, the power is turned off and the piano returned to its previous state.

As for the cost of running the system, the current working prototype has a 1200-watt, 5-volt power supply that's said to draw about 800 watts or so, depending on the day's conditions. In the Midwest, energy costs about US$0.07 per kilowatt-hour, and as "it's only switched on when you play, that would mean a three-hour practice session would cost about 17 cents."

The current setup is designed for the system to be installed in new pianos at the factory, and initially tuned by a master technician. As such, the cost of the system could be absorbed into the overall price of an instrument (somewhat akin to adding options like air-conditioning to cars). Gilmore says that it might be possible to develop future systems that can be retrofitted into existing pianos but there are a few hurdles to overcome before that happens, such as finding a way to insulate the strings from the agraffes (guides at the tuning-pin end of the string) in the field.

Gilmore also told us that the system could also easily incorporate alternate tunings, as the stored factory tuning is just a block of 219 numbers at 32-bits each and so doesn't take up too much memory.

"The only added cost would really be the operator interface (a keypad and readout to be able to choose tunings)," he says. "I have also considered that it could potentially be a diagnostic tool for techs to plug into."

Installing the self-tuning system in the piano

At the moment, Gilmore is looking for manufacturing partners to take the concept further. The working prototype is demonstrated in the following video, in which Gilmore has connected a laptop via USB to the normally self-contained electronics in order to display some debug text and better illustrate how it works.

"I tuned a single note (three unison strings) so that it is easier to hear how far out-of-tune it is," he says. "I also drastically detuned the three strings to exaggerate. In reality, when the system is switched off the strings go sharp, but don't really sound too bad."