For my Final Project, I created a music note visualizer that can allow users to learn how to read music by playing the desired note and then seeing it appear on a stanza.
Process:
When I was creating this project, I first has to get an understanding on how I would want the music notes to appear on the stanzas. I imported photos of quarter notes and then I started playing around with the size and positioning of these notes. I wanted to make sure that every note was recently spaced out on the stanza well. I spent time trying to find the perfect amount of spacing for the x and y coordinates of each note. I knew that no matter what, the C note would always have the same y position, but the x position will change depending on when it was pressed. So After I found each of the notes y coordinates, I then figured out how many spaces I wanted between each note. I stored the x coordinates in an array. I also have a global variable that keeps track of the positon of the array, that way each time a button is pressed, the global variable is incremented, causing it to position the next note and the new location.
When it came to creating the buttons, it wasn’t that challenging once I fixed some of the issues I had with importing the library. I also created a play and clear button to allow users to play their current song and clear the entire song, and start over.
Challenge:
The one issue I’m having with my project is when I go to play the sound, it does not play each note individually. Although I have a for loop iterating through and playing each individual note, I believe the issue is the for loop is iterating too fast through the notes so maybe this is causing the notes to blend together.