4 – bit Piano

November 22, 2015 § Leave a Comment

Hi folks, I’ve been working on lab 6 of the Embedded Systems – Shape the World course. Here is my 4-bit piano in all it’s glory:

The algorithm uses periodic interrupts that steps through the profile a sound wave (32 steps in this case). The interrupt period for each step vary depending on the pitch we would like to play. The faster the period, the higher the pitch. The buttons from left to right correspond to C, D, E, F notes respectively.

This lab really made me think about how electric keyboards are made and programmed. A lot of work must have been made to digitally profile numerous instruments, I also imagine the programming to be very sophisticated to play multiple notes simultaneously. I wonder if periodic interrupts are used in general electric keyboards similarly to this lab, and if so, whether or not interrupts are nested in another to superimpose different pitches together to play several notes simultaneously?

Anyways, on to the next lab.

Leave a Reply

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

What’s this?

You are currently reading 4 – bit Piano at Wilfrid Ngo.

meta