Guitar Tuner
Introduction
Before using a guitar, it is standard practice to check the tuning. This application allows the guitar to be checked against six reference notes and gives an indication of the closeness of tuning on the three LEDs of the TMS320C6711DSK.
Configuration of the Adaptive Filter
The guitar tuner is implemented as an adaptive filter. In this type of Finite Impulse Response Filter (FIR) the constants are not fixed, but are adjusted by making successive approximations based on the error between the input and the reference.
The configuration of the adaptive filter used for the guitar tuner is shown below:
When the guitar is completely in tune, the Error will be zero.
Generation of Reference Signal
The reference sine wave is generated using an Infinite Impulse Response (IIR) filter using a recursive equation.
y(n) = Ay(N-1) + By(N-2) + Cx(n-1)
where: A = 2coswT
B = -1
C = sinwT
Here, wT will be ouput frequency / Nyquist frequency.
In this application the C function sine() proved to be too slow and a table could not cope with the range of different frequencies.
Guitar Input
The guitar input requires a large amount of preamplifier gain, especially on the 1st string where the signal fades quickly.
Output
The output of the adaptive filter is used to drive the bargraph LEDs on the TMS320C6711 DSK. Only when the note from the guitar is within a few Hertz of the reference will the three LEDS come on fully.
Possible Modifications
The guitar tuner has been implemented for standard E - A - D - G - B - E tuning. There are a range of other guitar tunings, so the references could be changed for example, to D - A - D - F# - A - D.
Selective Music Filter
The guitar tuner can also be used with an input from a CD player. The LEDs will only come on when the music contains a single specific note is being played - a very sharp filter indeed. In this case, the amount of preamplifier gain should be reduced in the application code.
Additional Equipment Required
Multimedia speakers
CD player with connecting cable
Electric guitar
Cable for inch jack to 1/8 inch jack.