This page is optimized for mobile devices, if you would prefer the desktop version just click here

3.7 Matlab code that implements piano note detection

This module contains the complete code that implements the Piano Note Detection algorithm described on the preceding pages.

These are the files that contain the code that we used for this project. To run the entire program on a song, place all the files in the Matlab's current directory, and run convertsong(filename), where filename is the name of the wav file containing the song recording. The filename should be inside quotation marks "".

The main program

The main program. To run our entire algorithm on a song, run this file on it, giving only the file name as a parameter.

Note onset detection code

Our Matlab code for finding the times that notes were played at.

Frequency detection code

Our Matlab code for finding the frequencies of piano notes.

Frequency to note conversion code

Matlab code for converting frequencies into the corresponding notes.

Note length and tempo detection code

Our Matlab code for finding the lengths of all the notes and the tempo of the song.
<< Chapter < Page Page > Chapter >>

Read also:

OpenStax, Elec 301 projects fall 2006. OpenStax CNX. Sep 27, 2007 Download for free at http://cnx.org/content/col10462/1.2
Google Play and the Google Play logo are trademarks of Google Inc.
Jobilize.com uses cookies to ensure that you get the best experience. By continuing to use Jobilize.com web-site, you agree to the Terms of Use and Privacy Policy.