<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE document PUBLIC "-//CNX//DTD CNXML 0.5 plus MathML//EN" "http://cnx.rice.edu/technology/cnxml/schema/dtd/0.5/cnxml_mathml.dtd">
<document xmlns="http://cnx.rice.edu/cnxml" xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" xmlns:m="http://www.w3.org/1998/Math/MathML" id="new">
  <name>Results, Achievements and Shortcomings of our Implementation</name>
  <metadata>
  <md:version>1.1</md:version>
  <md:created>2006/12/17 23:28:31.426 US/Central</md:created>
  <md:revised>2006/12/19 23:18:07.959 US/Central</md:revised>
  <md:authorlist>
      <md:author id="agostin">
      <md:firstname>Alan</md:firstname>
      
      <md:surname>Gostin</md:surname>
      <md:email>algo86@rice.edu</md:email>
    </md:author>
  </md:authorlist>

  <md:maintainerlist>
    <md:maintainer id="agostin">
      <md:firstname>Alan</md:firstname>
      
      <md:surname>Gostin</md:surname>
      <md:email>algo86@rice.edu</md:email>
    </md:maintainer>
  </md:maintainerlist>
  
  <md:keywordlist>
    <md:keyword>achievement</md:keyword>
    <md:keyword>detection</md:keyword>
    <md:keyword>harmony</md:keyword>
    <md:keyword>implementation</md:keyword>
    <md:keyword>melody</md:keyword>
    <md:keyword>note</md:keyword>
    <md:keyword>piano</md:keyword>
    <md:keyword>result</md:keyword>
    <md:keyword>shortcoming</md:keyword>
  </md:keywordlist>

  <md:abstract>This module provides example inputs and outputs of the piano note detection algorithm using our implementation. It also discusses what our algorithm and implementation do well and what they do inadequately.</md:abstract>
</metadata>
  <content>
    <para id="element-65">The culmination of our efforts resulted in a wide array of both achievements and shortcomings. We discovered many detection  techniques that could be coded and implemented easily and effectively. Conversely, there were many nuances and non-ideal behaviors exhibited in even the most simple of piano pieces that a talented musician would have trouble detecting, let alone a program in Matlab. 
</para>
<section id="achievements">
  <name>Achievements</name>
<list id="element-306" type="bulleted"><item>High precision in hit detection for reasonably paced songs up to eighth notes</item>
 <item>High success-rate in note detection for single notes played at a time</item>
 <item>Effective quantization from frequency to note for well-tuned pianos</item>
 <item>Very precise note-length determination for all notes actually detected and analyzed</item></list>
</section>
<section id="shortcomings">
  <name>Shortcomings</name>
<list id="element-196" type="bulleted"><item>Faults in piano and non-ideal behavior can cause anomalies in output
  <list id="piano-fault-sublist" type="bulleted">
  <item>Poor tuning causes note-detection errors</item>
  <item>Residual ringing after key-release can cause notes to   appear longer in duration</item>
  </list></item>
 <item>Chord detection, especially in octaves, is imprecise: some overlapping notes escape detection</item>
 <item>Poor note-hit detection in “busy” songs</item>
 <item>Overlapping note-hits causes single, held notes to appear as multiple shorter notes</item>
</list>
</section>
<section id="examples">
  <name>Examples</name>
<para id="element-708">We used many different songs to test our algorithm, but these three examples effectively illustrate the above points. The songs are a chromatic scale starting at C5, <cite>Mary had a Little Lamb</cite>, and the beginning of Pachelbel's <cite>Canon in D</cite>.</para><para id="element-375">Each example contains the original recording in the top left, a matrix representation of the generated sheet music on the right, and a computer-generated song playing the sheet music in the bottom left. In other words, the generated music is what would be heard if someone were to play the sheet music we generate.</para><para id="element-802">To read the matrix form on the right, read left to right, then top to bottom. Each row contains a set of notes that are played simultaneously, followed by the length of the note. After playing those note(s), proceed to the next line and play those notes. At no time should two notes from different rows both be played.</para><table frame="none" colsep="0" rowsep="0" id="element-760"><name>C5 Chromatic Scale</name>
<tgroup cols="2"><tbody>
  <row>
    <entry><link src="allnotesC5.wav">The original recording
           </link></entry>
    <entry morerows="1"> 
      <media type="image/png" src="C5chrom.png"/>
    </entry>
  </row>
  <row>
    <entry><link src="allnotesC5_NEW.wav">The generated music
           </link></entry>    
  </row>
</tbody>




</tgroup>
</table><para id="element-693">Here, the melody of this simple scale is deciphered perfectly. The only errors being that the previous notes ring through twice (marked in red), and the last note's length was unable to be determined due to the lengthy silence at the end of the recording (marked in blue).</para><table frame="none" colsep="0" rowsep="0" id="element-213"><name>Mary had a Little Lamb</name>
<tgroup cols="2"><tbody>
  <row>
    <entry><link src="MaryA4.wav">The original recording
           </link></entry>
    <entry morerows="1"> 
      <media type="image/png" src="MaryA4.png"/>
    </entry>
  </row>
  <row>
    <entry><link src="MaryA4_NEW.wav">The generated music
           </link></entry>    
  </row>
</tbody>
</tgroup>
</table><para id="element-777">Again, this simple song was deciphered perfectly except for previous notes ringing through (marked in red), and the failure to find the last note's length due to the silence at the end of the recording (marked in blue).</para><table frame="none" colsep="0" rowsep="0" id="element-310"><name>Pachelbel's Canon in D</name>
<tgroup cols="2"><tbody>
  <row>
    <entry><link src="pachelbel30.wav">The original recording
           </link></entry>
    <entry morerows="1"> 
      <media type="image/png" src="pachelbel30.png"/>
    </entry>
  </row>
  <row>
    <entry><link src="pachelbel30_NEW.wav">The generated music
           </link></entry>    
  </row>
</tbody>
</tgroup>
</table><para id="element-660">This song shows the greatest shortcoming of our implementation, which is difficulty detecting chords. Again, note that the melody and the note lengths were deciphered perfectly. However, when the quieter, higher harmony begins to play, it does not get picked up (marked in green). Finally, the repeated F#/Gb2 at the end shows how overlapping notes cause a longer note to appear as two shorter notes.</para>   
</section>
  </content>
  
</document>
