<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE document PUBLIC "-//CNX//DTD CNXML 0.5 plus MathML//EN" "http://cnx.rice.edu/cnxml/0.5/DTD/cnxml_mathml.dtd">
<document xmlns="http://cnx.rice.edu/cnxml" xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="None">
  <name>Note Recognition</name>
  <metadata>
  <md:version>1.2</md:version>
  <md:created>2004/12/09 18:03:17 US/Central</md:created>
  <md:revised>2004/12/13 23:10:19.292 US/Central</md:revised>
  <md:authorlist>
      <md:author id="mlaw">
      <md:firstname>Michael</md:firstname>
      <md:othername>Graham</md:othername>
      <md:surname>Lawrence</md:surname>
      <md:email>mlaw@rice.edu</md:email>
    </md:author>
  </md:authorlist>

  <md:maintainerlist>
    <md:maintainer id="mlaw">
      <md:firstname>Michael</md:firstname>
      <md:othername>Graham</md:othername>
      <md:surname>Lawrence</md:surname>
      <md:email>mlaw@rice.edu</md:email>
    </md:maintainer>
  </md:maintainerlist>
  
  <md:keywordlist>
    <md:keyword>Charles Tripp</md:keyword>
    <md:keyword>Elec 301</md:keyword>
    <md:keyword>Matched Filter</md:keyword>
    <md:keyword>Michael Lawrence</md:keyword>
    <md:keyword>Music</md:keyword>
    <md:keyword>Nate Shaw</md:keyword>
    <md:keyword>Note Recognition</md:keyword>
    <md:keyword>Project</md:keyword>
  </md:keywordlist>

  <md:abstract>Herein exists the nitty gritty details of Charles', Michael's and Nate's project for the Fall 2004 semester of Elec 301.</md:abstract>
</metadata>

  <content>
     <section id="General">
     <name>Macroscopic View</name>
     <figure id="GeneralBlockDiagram">
        <name>General-View Block Diagram</name>
        <media type="image/jpeg" src="BlockDiagram.jpg"/>
        <caption>
           This represents our project on an abstract level.
        </caption>
     </figure>
     <para id="para1">
        This project attempts (and, for the most part, succeeds) to identify a single instrument lost among a barrage of other instruments.  More than that, it attempts to identify which sequence of notes the instrument is playing, the volume at which it plays them and the duration of time for which the instrument plays.
     </para>

     <para id="para2">
        The theory is relatively simple (indeed, we learned it in an introductory course).  For the instrument recognition to work, we must first have a sample of that instrument playing.  Ideally, we would need only one sample from which we could derive all the others using the one-dimensional application of a Mellin-Fourier transform.  Considerations of time, however, caused us to forgo this option.  We instead approached the collection of samples as a good communist would; with great emphasis on labor.  For the purposes of this project, 33 samples (i.e. notes) of a clarinet playing were recorded.
     </para>

     <para id="para3">
        Each of these samples was then matched against the inputted waveform to measure correlation.  The algorithm for accomplishing this task is as follows:
        <list id="Algorithm" type="enumerated">
           <name>Correlation Algorithm</name>
           <item>If it is too large, "chop" the inputted waveform (henceforth referred to as "signal," an all-encompassing term) into smaller, easier-to-handle chunks.</item>
           <item>Input each of those chunks into a program which takes the Fourier transform of both the signal and the samples, multiplies them, and then inverts them back into the time-domain (i.e. convolves the two signals).</item>
           <item>Based on various thresholds and numerous considerations, choose the sample which most closely matches the signal (i.e. read off the highest peak and assign it a value; if that value is high enough, select it as the representative sample).</item>
           <item>Output the data in a user-friendly fashion.</item>  
        </list>
        The implementation of the second step is called a "matched filter."   
     </para>
     <para id="para4">
        The remainder of this course will focus on the four steps of the correlation algorithm.
     </para>
     </section>
     </content>
  
</document>
