Results

The final product came together as we had designed, and in some ways turned out even better than we had planned. For example, we thought that we were going to struggle to get sheet music generation to function as it is a somewhat complex problem. There are not a lot of easily accessible sheet music generators so we were unsure of how successful that portion of the project would be. As the project came together, we found that our planning at the beginning actually led to the sheet music and playing features to work smoothly exactly as we had intended. Our main method of testing the system was to simply play through songs. We would write a song, play through it, and ensure that all of the LEDs and inputs were working correctly in that song. We also included a "Freeplay" mode where none of the keys were lit up unless you pressed them. Not only is this a cool thing to add for the user if they want the keys to light up as they play, it also helped us debug as we could tell visually that each key input and LED output were correctly mapped. We actually caught a bug using this where we had swapped the row and column mapping for two keys, so the input on one would light up the LED on the other.

Interfacing with the Keyboard

We did not need to take very many measurements of our actual system, however we did need to use the oscilloscope to map the pre-existing rows and columns to keys in our system. There were actually 5 columns and 8 rows in the keyboard hardware and this ended up mapping to the keys in the following way. We used an oscilloscope to measure the columns and rows and determine that they were active low. The first seven keys mapped to column 1 (one row unmapped for this column), columns 2 through 4 mapped to 8 keys each, then finally the last column only mapped one key. If we sent a mock input to the unmapped columns and rows then we found that the piano actually played notes that were not on the keyboard. Our best guess to why is that the keyboard uses the same hardware as other keyboard models with more keys. Then, using a digital logic analyzer, we were able to generate a spreadsheet mapping the rows and columns to the correct keys and translate between row/column and key number in software.

Demo Video

The following video does a good job of demonstrating the final product. You can see how the sheet music feature came together, observe the simple and usable interface, and understand the gameplay loop. The video also includes some more discussion of our songwriting method and how that translates to the gameplay itself.