Connexions

You are here: Home » Content » Implementation: Code
Content Actions

Implementation: Code

Module by: Tanwee Misra, Kriti Charan, Janice Chow

Summary: This module contains a description of and a link to the functions we created in Matlab to implement the drum kit.

To get a better understanding for how we implemented the drum kit, you might want to have a look at our Matlab code.
The code is available at: http://www.geocities.com/tapthat_virtualdrum/tapthat.html

Essential Files:

proj_301.m- This is a wrapper function to set up video acquisition and collect frames from the camera.
detectcolor.m- This function checks for presence of the LED.
coord.m- This function finds the position of the LED in each frame, computes its velocity and hit-point.
drumdet.m- This function determines which drum was hit.
drumdisp.m- It produces the sound and displays the image corresponding to the drum that was hit.

Files for debugging and setting up the system:

adjust.m- This is mainly for the user’s convenience. It helps adjust the position of the user with respect to the drums.
checkframe.m- This can be used to verify that the color detection works properly for a particular frame.

Comments, questions, feedback, criticisms?

Discussion forum

Send feedback