Changes

MidtermProject

2,583 bytes added, 00:08, 21 May 2010
ā†’ā€ŽDocumentation
== Title ==
MotionDJMIDI Capture
== Description ==
*Interactive paradigm
It This program uses the viewers movements brightness tracking in the Video library of Processing to control different sounds track the brightest pixel. Using a song. I would like to use flashlight, the user controls the frame differencing method frequency and utilize the way it quantifies the amount of movement in the video frame to control different parameters/filters amplitude of a songdrum synthesized MIDI notes. Some Simultaneously, a predetermined array of notes plays at random and creates random ellipses that appears on the control parameters are going to be the speed, treble, key, and volumescreen. I’m hoping that this project will create This creates an interaction improvisational live "duet" between what the see on participant and the program. The colors of the ellipses both controlled by the screen user and how their movement affects the song that is playing. It will give way program are generated at random to add a unique dynamic visual experience with a music that does not involve electrical controls, turntables, dance pads or even an actual instrument. But rather, it gives your body some control over the sounds you hear through your own motions.
*Technical Description
Uses The flashlight held by the frame differencing methods to capture user will be tracked by the amount brightness tracking method in Processing's video library. The top half of movement in a frame and then send those numbers the screen is designated to Logic Pro the area where the user can control the MIDI notes. Left to right controls the amplitude, while Up and Down control different filters that would then change the sound of the songfrequency. The input would be While the amount bottom half of movement in the video frame and screen is designated to the output would be random ellipses that create a change in sort of rhythmic dance on the sound of screen while playing an improvised melody for the songsuser to interact with. I would split used the frame into quadrants, one for a different filter. An amount of movement also has to be specified Soundcipher library to control the amount changeMIDI sounds. For example, The speed of each drawing of the ellipses as well as the speed at which playing of the participant notes is moving in determined by the quadrant that controls frame rate is by default is set at 6. The user can change the amplitude of frame rate to faster or slower by pressing the song determines how loud of soft up or down button on the song is playingkeyboard.
The flow in of information will go as follows: A song would begin to play and As the user would move and interact with moves the flashlight across the screen. Processing , it will then take change the amount of movement in MIDI note's parameters (amplitude and frequency) while the random ellipses play a melody on the designated quadrants bottom half of the screen and send those numbers to Logic Pro. Logic Pro has an environment that is able to process numbers and use them as controls to different filters and parameters. The changes in ending result is an interactive MIDI sound dialogue between the parameters would then be transferred to the audio speakers, user and finally the user can hear how their movements changed the sound of the songprogram.
== Visualization Documentation ==*Functional DiagramsCodeFlow Diagram/** *MIDI Capture[[Image:flowdiagram * by Leilani Martin * * Tracks the brightest pixel in a live video signal and plays a musical note at that pixel, a live duet between a predetermined/random MIDI melody and the drum notes controlled by the user.jpg]] */
import processing.video.*;
import arb.soundcipher.*;
Sample Screenshots //soundcipher dataSoundCipher sc = new SoundCipher(this); //MIDI scale for square melodyint[] scale = {57, 60, 60, 62, 64, 67, 67, 69, 72};int rate = 7;   Capture video;void setup() { size(What 640, 480); //160 // Uses the user will default video input, seethe reference if this causes an error video = new Capture(this, width, height, 30); noStroke(); smooth(); frameRate(6); } //Handles Frame Ratevoid keyPressed(){ if (key == CODED){ if (keyCode == UP){ frameRate(rate * 2); } else if(keyCode == DOWN){ frameRate(rate - 1); } }}  //Captures the video and finds the brightest pixelvoid draw() { if (video.available()) { video.read(); image(video, 0, 0, width, height); // Draw the webcam video onto the screen int brightestX = 0; // X-coordinate of the brightest video pixel int brightestY = 0; // Y-coordinate of the brightest video pixel float brightestValue = 0; // Brightness of the brightest video pixel // Search for the brightest pixel: For each row of pixels in the video image and // for each pixel in the yth row, compute each pixel's index in the video video.loadPixels(); int index = 0; for (int y = 0; y < video.height; y++) { for (int x = 0; x < video.width; x++) { // Get the color stored in the pixel int pixelValue = video.pixels[index]; // Determine the brightness of the pixel float pixelBrightness = brightness(pixelValue); // If that value is brighter than any previous, then store the // brightness of that pixel, as well as its (x,y) location if (pixelBrightness > brightestValue) { brightestValue = pixelBrightness; brightestY = y; brightestX = x; } index++; } } //Capture to MIDI note (Drum sounds) ellipse(brightestX, brightestY, 25, 25); fill(random(0, 255), random(0, 255), random(0, 255)); stroke(random(0, 255)); strokeWeight(3); sc.instrument(sc.DRUM); sc.playNote(brightestY, brightestX, 3000); //Line dividing the screen line(0, 160, 700, 160); stroke(200); //Random ellipse melody if (random(1) < 0.8) { sc.instrument(2); sc.playNote(scale[(int)random(scale.length)], (int)random(80)+40, 0.2); stroke(color(random(256), random (256), random(256))); ellipse(random(0, 1000), random(300, 500), 100, 100); }}}    *Screen Captures  [[Image:screenshotsshot1.jpgpng]] [[Image:shot2.png]] *Live Screen Capture Video Link-View Live video recording: http://s102.photobucket.com/albums/m110/alohahoopstar/?action=view&current=ISUHD.flv
28
edits