Wednesday, December 12, 2012

Dec 12-Final Project


Digital Drum

Students
Brook Bowers, Computer Science
Mary White, Multimedia Marketing and Computing

Description
Digital drum is a pseudo drum head that also allows the user to play an interactive game. The game is an audible version of Simon. Our program plays a sequence of noises and the user is expected to replicate those noises by hitting the appropriate sensor.

Technical Details

Input
The input comes from the user tapping on the piezo sensors in each of the four corners. The input that the Arduino unit reads in is a series of readings of the sound wave generated by the tap. We programmed the Arduino unit to strip out short wavelength readings (to reduce outside noise from interfering). We also had the Arduino determine which sensor had been hit by determining the maximum value in the set of waves read in. We keep track of two pieces of data to transmit then, the number of readings for a particular wave (the magnitude of the hit) and the sensor that was hit (the quadrant). The quadrant and magnitude are then transmitted serially to Processing to specify which sensor was hit and the magnitude of the hit. That data is in turn used to determine struck the right instrument.

Output
Our output is sound played by Processing. We used the standard Processing minim library to load in and play sounds.

Construction
The Drum is constructed out of a sheet of hardboard, 4 piezo sensors, a sheet of acrylic, 4 plastic feet, and some foam core. First we drilled holes in the hardboard and ran the sensor wires through them, hot gluing a piezo in each corner. Then we glued the acrylic to each of the sensors to make sure that the readings would be accurate. Next we used the 3D printer to create feet for our drum head so that the breadboard and Arduino could fit underneath. After gluing these to the hardboard, we created a foam core box that holds the breadboard and Arduino in place so that the drum is portable.

Software
Some of our code is written in Arduino, but the majority of the code is written in 1.5.1 Processing. As stated before, the Arduino unit is programmed to read in the data from the piezo sensors and does a little bit of preprocessing before transmitting that data serially to Processing. There is only one key for our program:
            r: Resets the game back to round 1. The game does not reset on its own, and if a user cannot bear to feel the sting of defeat, then they may use this button to escape failure.