Musical Note Recognition 

Results & Conclusions
Future Development
Group Memnbers
      The process used for this project can be described in six different stages. 

    The first step involves the input of a sequence of desired musical sounds.  The sequence of sounds are digitally recorded.

    In the second step, the signal is analyzed using Matlab. In Matlab, the series of notes are plotted in the time domain.

    The third step requires a bit more analysis and programming.  We designed a windowing technique that determines the window of each note in the sequence.  This technique first involved a method to determine when a note begins and ends.  The Matlab code that accomplishes this is called noteparse.m . This program takes in a double array specified by the data and outputs a vector of division points that correspond to separate and distinct notes. In other words, trying to find when one note stops and another starts. The returned vector will include the midpoint of the end of note and the beginning of the next.  The program notewindows.m  was created as function that uses noteparse.m and determines the actual window of each note.  The spectrogram in the diagram above, which is a sequence of increasing notes, illustrates the objective of windowing.  As can be easily noticed, there is a visible drop in energy between notes. This fact was used in determining the actual window of a note.

    The fourth step involves the analysis of the signal in the frequency domain.  Now that the windows of each note have been determined, each individual note is  converted to the frequency domain. Hence, the use of the Fast Fourier Transform (FFT) in the Matlab code noterecog.m.

    The fifth step involves determining the the fundamental frequency of each note.  A standard musical note played by standard instruments is described by a fundamental frequency, which is the maximum frequency, along with other smaller harmonics.  Therefore, to determine the fundamental frequency, noterecog.m finds the maximum frequency for each signal.

    Finally, the actual results of our labor. To determine the actual note, noterecog.m calls on another program called findpitch.m. This program is based on two helper programs choosepitch.m and helpfindoctave.m. Based on the frequency of the pitches in the middle C octave, the octave above middle C, the program determines whether the input frequency
is above or below this range. If the frequency is below the middle C octave range it multiplies the
the input frequency by 2, adds one to a counter that keeps track of how many times the process has recurred and then calls the process on the input frequency times 2. If the frequency is above the middle C octave range it divides the input frequency by 2 and goes through the same process but now it divides by 2 instead of multiplying. If the frequency is in the middle C octave range it determines what pitch it is based on some accepted ranges/values for pitches and return
the pitch. Finally, the program returns the pitch and the octave above or below
the middle C octave.  (Positive for octaves above, negative for octaves below).