Portable automated piano tuner

Design team members: Pat Coutsos, Ellen Kaye-Cheveldayoff, Sagini Thulasirajah, Jonathan Wanklin

Supervisor: Prof. Stephen Birkett

Background

Pianos have played a significant role in western culture for more than three-hundred years. To produce sound, the piano converts a pianist's manipulation of its keys and pedals into vibrations of internal piano strings. The strings are grouped in sets of two (called a bichord) or three (called a trichord), and within a set each string must vibrate at the same frequencies. The vibration of the strings is characterized by a fundamental frequency and a number of harmonics. Since each octave in the musical scale represents a doubling in frequency, one would expect that the fundamental frequency of a note would be identical to the 2nd harmonic of a note one octave below. Unfortunately, this is not the case. Strings exhibit what is known as harmonic stretch, in which the harmonics produced are slightly higher than the expected frequencies (note the mismatch of frequencies between C1 and C2 in the figure below).

diagram of an octave of a piano with the frequency labeled for each note

As with any musical instrument, pianos need to be tuned periodically to keep them performing their best. This tuning is a difficult task which should be performed by an expert piano tuner. Due to the unpredictable response of tuning pegs to applied torque, tuning a conventional piano is a mechanically difficult. The issue has been addressed in the design of a post-modern piano that is currently being developed by Prof. Birkett at the University of Waterloo. This piano uses set screws with a linear torque response, rather than the conventional tuning pegs, for fine adjustment of string tension. Piano tuning also requires a high degree of auditory acuity. An experienced tuner, therefore, must not only ensure that each bichord and trichord is in unison, but also that the discrepancies between notes caused by the harmonic stretch is minimized.

Project description

This project aims to develop a portable tool which will be used to automatically tune the post-modern piano currently being designed by Professor Birkett. This device will reduce the physical effort required to tune a piano, and will not require the trained ear of a professional tuner. An average individual with an understanding of tuning frequencies and pitch should be able utilize this device after familiarizing himself with the user interface and setup. This project builds on the work of previous students, who developed a built-in piano tuning device (Perpetually Tuned Piano project) and software for evaluating the frequency mismatch between strings (PitchSpy project).

Design methodology

This project has been divided into two functional components: the hardware for tuning the piano, and the software for frequency analysis. The details of each of these components are displayed in the image below, along with their interconnections with the piano, the user, and each other

diagram including the piano, software, and hardware components of the system

Frequency analysis software

The frequency analysis software is being developed in two stages:

Stage 1: Develop a program that will determine the difference in frequency of a sounding note to a user selected (and internally generated) reference note.

Stage 2: Modify the program from stage 1 so that a trichord could be tuned.

In order to approximate real-time performance as much as possible, the computationally intensive algorithms (note detection, beat generation and beat analysis based on the PitchSpy project) are being implemented in the C programming language. The user interface, along with the audio extraction are being developed in Python for a variety of reasons, the most important of which is the ease of integration with C. The software is being designed for use on a computer running Windows XP/2000 operating system, but cross-platform issues are being considered and it is expected that little effort will be required to create versions of the software for other operating systems.

Tuning hardware

Analogous to the software, the tuning hardware is being developed in two stages:

Stage 1: Develop a device that is capable of tuning a single piano string given the required change in frequency.

Stage 2: Modify the device from stage 1 so that a trichord can be tuned.

The hardware aspect of this project was divided into two major sub-components: the hardware control programming and internal circuitry for motor control. It was decided that that the hardware control programming should be done in the C language for the speed of execution. As fine tuning is especially important for this project, turning the set screws will be accomplished by using a unipolar stepper motor. The control programming will interface with the parallel port of a computer.