Chapter 7 of the Arduino Projects Book, or the Keyboard Instrument, was my most successful undertaking of the course thus far in more ways than one. To begin, it was my first Arduino project that generally worked immediately upon first try of the wiring and code upload. The wiring itself was quite simple, based on the creation of a resistor ladder through the arrangement of resistors and switches feeding into an analog input. The system also featured a piezo, which was required to generate the soundwaves that were triggered by the switches.
In terms of the code, the tone of the sounds being produced was established by creating an array of frequencies. The project recommended starting with the frequencies for middle C, D, E, and F (262Hz, 294 Hz, 330Hz, and 349 Hz). Music and technology combine well here because an array stores different values that are related to each other: both notes and Hz. In this way, a scale is created. My first test of the project did not reflect this scale, and only the first and last notes would play. After double-checking the wiring, I took another look at the code and realized that I had left out the direction for the second button. I added it in, tried again, and it worked! After a triple-check of the wiring to fix the third button and adjusting the connections, I could finally carry a tune. The scale sounded and worked like it should have!
After playing with the sounds in the midst of the rest of the class trying theirs, I noticed that the tone sounded an awful lot like bagpipes (maybe the sound of an indoor bagpipe performance I attended the previous weekend was still fresh in my mind). I wondered if it would be possible to add more buttons and notes in order to replicate the remarkably short tonal range of the bagpipe, or at least the chanter, and learn to play a wee tune.
A quick google revealed that the chanter produces nine notes. Key differences from the Keyboard Instrument project that will need to be corrected in order to achieve the bagpipe include adding more buttons to the breadboard, determining which Hz accompany each note in the range, and labeling each note in order to facilitate playability. According to the Arduino Projects Book, a more dynamic instrument can be created by replacing the switches and resistor ladder with analog sensors. However, I think that the original design lends itself well to the sound and playing style of the bagpipes, which are sufficiently dynamic in and of themselves if I do say so.
So what value would this digital bagpipe project have for practical application? My local museum represents Scottish settlement in Dutton-Dunwich, featuring an annual weekend commemorating the Battle of Culloden and visits by bagpiper demonstrators during day camps. An oft-repeated craft for the children is “make your own bagpipes” using a plastic garbage bag, an activity that is generally enjoyable but also involves deflated garbage bags covered in child saliva and masking tape. Creating a digital bagpipe could allow them to learn popular bagpipe tunes quickly, being similar to playing an actual instrument but without the breath capacity required to do so. Being an element of a highly traditional culture, bagpipes are something that would not generally be considered a candidate for treatment by this type of technology, but lend themselves to it remarkably well. This has already been noted by the folks at http://www.echanter.com/. My next step moving forward in exploring this for a final project will be reviewing how the echanter is made, comparing it with the Arduino project, and looking for other projects that may be similar. The pipes are calling!