Results

Our Demo Video

Everything performed as planned during our demonstration. Our embedded digital control system of Otamatone was able to boot when getting powered on, showing a user-interactable menu on the piTFT, and functioning correctly as the player press one of the four buttons on the menu. The results of running our project met the goals outlined in the description section.

As shown in the 2-minute video, the four buttons on the piTFT – calibration, keyboard, demo, quit – served four functions correctly. When the user pressed one of the four buttons, the font of buttons would turn from white to red, and the corresponding mode would be triggered.

The Calibration mode, indicated by the “calibration” button on the top left corner of the menu, calibrates the mapping from the resistance values to frequencies of the notes we play. When the system was on the calibration node, we could hear the music notes played and calibrated in ascending order of a chromatic scale, as expected.

The Keyboard mode, triggered by pressing the “Keyboard” button on the top right corner of the menu, enabled the keyboard playing feature. Connecting an external keyboard to the pi via a USB port, we could play any music piece we wanted to play, one note at a time, if the keys of that piece were within the range from C4 to D5. We pressed keyboard keys from A to L for the white piano keys from C4 to D5, as well as the keyboard keys from E to O for the black piano keys, and tried playing a few songs, our project worked as intended, producing sounds at exact frequencies one at a time and printed the note we played on the piTFT.

The Demo mode, shown as a button on the bottom left corner of TFT, ran demo songs. When it was pressed for the first, second, and third time, happy birthday, jingle bell, and Ikenai borderline was played and the project exited the demo mode automatically after finishing playing. We found no out-of-tune notes or wrong beats and the demo mode was successful.

The Keyboard mode, triggered by pressing the “Keyboard” button on the top right corner of the menu, enabled the keyboard playing feature. Connecting an external keyboard to the pi via a USB port, we could play any music piece we wanted to play, one note at a time, if the keys of that piece were within the range from C4 to D5. We pressed keyboard keys from A to L for the white piano keys from C4 to D5, as well as the keyboard keys from E to O for the black piano keys, and tried playing a few songs, our project worked as intended, producing sounds at exact frequencies one at a time and printed the note we played on the piTFT.

One thing noteworthy was that, before the demo, our pygame stopped working and an error message of “pygame not initialized” was thrown. Because of this error, we had to postpone our demonstration until we fixed it because our UI and game play was dependent on the TFT display. Upon checking with the professor we found the issue was the touch sensor on the TFT not getting recognized by RPi. We had the same issue before during the design and testing stage, and our way of fixing it was either rebooting RPi or re-assembling the piTFT, RPi, SD card, and wires. However, neither of these methods worked on the demo day and we had to use a different RPi along with a different piTFT to make our system work again.