top of page

STAGE III: Chords

The third stage of our project is designed to take in a single chord (multiple notes sounded at the same time) and tune the chord to Just Intonation tuning.


The algorithm we used begins by breaking down the spectrum of the chord by isolating each peak in the spectrum and tuning each peak to Equal Temperament tuning in a manner similar to the first stage. The peaks are first located by using findpeaks(), a built-in MATLAB function, with a specified minimum peak height. The algorithm then generates an ideal bandpass filter to retrieve only one peak at a time. Each peak represents a fundamental or harmonic of one of the guitar’s strings. The sounds that are not contained by DFT peaks are also preserved. The peaks are then each tuned by using MATLAB’s resample() as in Stages I and II. They are then adjusted to Just Intonation tuning, which is a slightly better system for chord tuning. Because the DFT is linear, the peaks can be added together in either the time or the frequency domain and the output of the function is a tuned version of the input chord.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

This is an image of the spectra of the tuned and untuned C Major chords. You can see in the zoomed-in image that there are some peaks, representing partials, in the untuned version that do not quite line up: these are the reason the chord sounds out-of-tune. Notice that in the tuned version these peaks line up, and a trained musical ear can tell that the sounds more pleasant.

 

Listen to our results!

 

 

 

 

 

 

C Major Chord - Untuned
00:00 / 00:00
C Major Chord - Tuned
00:00 / 00:00
bottom of page