So I am working on this art installation and would really appreciate some help getting it up and running. I am new to Processing if that helps.
The program that I am writing is supposed to take a live video feed (using openCV), process it and return a centroid position to a variable. That all works just fine. Phase two is to use the centroid position to play a note using the Minim Library, which also works.
The problem is that when the sound plays, it clips at the ends sometimes, like there is static on the line or the eq has maxed out or something. Can anyone tell me why this is happening? Does anyone know how to fix it?
Thanks in advance!
//cats in a bag paino/ catsinabag test alterations:
import java.awt.*;
import processing.core.*;
import ddf.minim.*; // for audio
import ddf.minim.ugens.*;
import ddf.minim.analysis.*;
import ddf.minim.*;
import ddf.minim.signals.*;
import hypermedia.video.*;
Minim minim = new Minim( this );
AudioOutput out = minim.getLineOut();
OpenCV video = null;
// camera width/height
int capture_width = 320;
int capture_height = 240;
// threshold for background subtraction
int threshold = 105;
// some variables to control the contrast/brightness of the camera image
//SOURCE (original image from camera or movie), the BUFFER (image after any operations like convert, brightness, threshold, etc...), the MEMORY (the image stored when OpenCV.remember(..) is called)