I'm trying to come up with an algorithm for detecting the notes played in a song. So far i've gotten the "chunks" of data that represent an audio clip. The volume of the chunk, along with the presence of each frequency in that particular chunk (left to right). The number in parenthesis is the increase of vol % over the last 4 chunks.
See here: http://imgur.com/a/xAh3T
The sample above is from a recording i made by stepping the D, G, and then B strings on the guitar. As you can tell, to us humans we can fairly easily see the notes being played in the given data. I am wondering how might be best to algorithmically deduce when a note is played.
A few things i've thought about playing around with...
- Multiplying a note's presence by the volume or volume slope of a particular chunk. As a note being played is generally associated with an increase in volume. Or at least somehow incorporating the volume slope into my calculations.
- Averaging the "presence" of a note over a span of chunks, smoothing out the data in a way.
- Looking at variables such as the standard deviation of the "presence" of a particular note over the period of time it generally takes for a note to start and finish manifesting within the data (as you can see by my data it takes about 5 chunks for the note to fully come into play). When that number increases by a certain SD threshold, that would mean a note was played.
- Filtering out irrelevant chunks by volume or volume slope.