Lizzy’s Status 3/23

Lizzy’s Status 3/23

So for the last two weeks I have made significant progress to the mid-semester demo and getting a fully working project. Since I had worked on pitch the last week, one of the last things left to do for basic notes would be to find their duration (quarter, half, etc.). To do this, I performed template matching. I found a bunch of different piano music files and saved each connected component into a template file system connected to the project. Then as I run through the components, I check against each template and see which ones have the same pixel values (or close enough) that it is a match. I take the best one, look at where it came from in the file system, and then use that as the duration. This works for most basic types of note, rests, clefs, accents, measure bars, time signatures etc. I also have a few lines where if no template matches, it saves the current component into the top level directory for templates so it can be sorted correctly and it will match the next time. That way my template system can continue to get better as we work on more music.

The only cases where template matching is not a good contender is chords (multiple note heads on a single stem), and connected notes like eighth notes since there are so many variations in them. I am ignoring these cases for now, but hope to work on them more in the next week and maybe have them ready for the mid-semester demo.

Then I worked on ordering the components in the correct way for the musicXML file. This file requires that each note is written by measure. Given one measure, all notes are listed from left to right from the treble staff, and then left to right on the base staff, and then then next measure occurs. Therefore, I first sorted all my notes, rests, accents, and measure bars (only important things for musicXML) by which staff it is on and then left to right x values when on the same staff. Given this new list of components, I reorganized by going through one staff until I hit a measure bar, then going to the next staff until a measure bar, then going back up to the first, etc. until the entire stave is complete. Then going to the next stave.

Now I am currently working on putting accents on the correct notes. These include dots that are to the right of a note, sharps, flats, naturals that are to the left of the note, as well as looking at the key signature. This is still a work in progress though.

I also need to be able to make these dictionaries into a musicXML file eventually so, I looked through some of them and tested which parts were vital to it working properly. Then I am building up each object appropriately and hopefully this is done by the end of the week since it is vital to the project and demo.

Leave a Reply

Your email address will not be published. Required fields are marked *