Justin Kaput's log

So I've written the codes in Arduino and Processing for my drum glove to work. I made the glove out of 1/2 inch pipe insulator foam with a push button inserted into each of the 4 chunks of foam, one for each of the 4 fingers on one hand. I decided against making one for the thumb because it was too awkward to play it at the angle I needed to mount the push button at. I know using push buttons isn't the greatest way of building the glove, but it works the same as if they were pressure sensors. I haven't taught myself a song with it yet, but with enough time playing with it and it shouldn't be too long. Here are the codes:

Here are some pics of the glove setup and a short video of the program working is attached.

So I realize this isn't exactly the same as the Megatap 3000, but it works in the same fashion. If I had time to order the force sensitive resistors online I would have, but these push buttons were the best alternative I could find.

My mom sent me this link (http://www.chris3000.com/portfolio/megatap-3000/) to a website that has plans for MegaTap 3000, which is a set of drum gloves that use pressure sensors on the fingertips to play drum sounds. My idea would be to create my own drum gloves and have them play a set of drums in a processing sketch. I would use different fingers as different elements of the drum kit, and could possibly (no promises) play part of a song when it's all finished. I think this would be really cool to play with and could be elaborated later into possibly guitar and/or bass gloves. I would try to make them now, but I don't think I can teach myself guitar and have it ready to go in a week.

This one isn't very exciting, but I figured I'd better turn it in and get started on my final. It turns two motors one way when the cursor is on the white rectangle in the processing window and the other way when the cursor is on the red rectangle. Here are my codes:

I used keys on the keyboard to light up the RGB LED different colors when different keys are pressed. The keys used are "r" for the red LED, "g" for the green LED, "b" for the blue LED, and "y", "c", "m", and "w" to light up combinations of the three LEDs to produce yellow, cyan, magenta, and white, respectively. When the key is pressed in the Processing window, the background color is changed also. Here are my codes:

I tried to make it so that pressing a combination of keys would light up the same combination of LEDs, but it would either not turn off when the keys were released or would only light up one of the LEDs.

For this sketch I used the X position of the cursor in the Processing window to control both the brightness of an LED connected to pin 9 of my Arduino and the opacity of a rectangle in the Processing window. Here are my codes:

This circuit uses four push buttons connected to pins 4-7 on the Arduino to control sound in Processing. For each button pressed, a different drum sound is played in Processing. For example: when the button connected to pin 4 is pressed, a cowbell sound is played. The sounds can also be played by pressing keys k, j, h, and g.

This one took me a while to figure out. It took me a couple tries to figure out where exactly to save the sound clips so that they could be read in the program, and then when i got that worked out the sound would repeat until another button was pressed, and then that sound would repeat. I solved that by resetting val every time the void draw function was run. I still have no idea where the values change from 1-4 to 49-52, but I got the program working and I didn't want to mess it up. A Fritzing picture of my circuit is attached.

I built a completely new circuit for this one. I got rid of the push buttons and added two potentiometers attached to analog pins 0 and 4 so that I could get two analog values to control the frequency(pitch) and amplitude(volume).

void setup() { size(400, 220, P2D); // sets window size minim = new Minim(this); // get a line out from Minim with default bufferSize, sample rate, and bit depth out = minim.getLineOut(Minim.STEREO); // create a sine wave oscillator, set to value of freq, value of amp, sample rate from line out sine = new SineWave(freq, amp, out.sampleRate()); // set the portamento speed on the oscillator to 200 milliseconds sine.portamento(200); // add the oscillator to the line out out.addSignal(sine); // declares myPort and begins serial communication at 9600 bps myPort = new Serial(this, Serial.list()[0], 9600); // store values from myPort in a buffer until value is reached myPort.bufferUntil('\n');