I'm using FaceOSC and then oscP5 on Processing to access the coordinates of my face.
The problem: on my processing sketch I also use Capture() to get video frames from the camera, but I get a NullPointerException when trying to do this. (Oh, and if I'm not running FaceOSC the sketch works just fine)
What I think is happening is that FaceOSC is already accessing the camera and that's why I can't start it on processing. This is where my code crashes:
video = new Capture(this, myWidth, myHeight);
video.start(); // <--- NullPointerException
I tried to comment the video.start() and just try to .read() the new frames but then I get a black screen...
Well, I think that's pretty much it. The main problem is how can I get two different softwares to access the same camera?
I appreciate any help/directions u guys can give me (:
I'm working on a program that draws a wave using several line() functions, but I think maybe there is a more efficient way to do so. I need to use the line functions because I'm putting some noise in the wave too. Well, I think it's better if you run the code, so here it is:
int val=50;
Wave onda;
void setup(){
size(600,300);
background(255);
strokeWeight(2);
smooth();
frameRate(60);
PVector offset;
offset = new PVector(0,height/2);
// Para onda ficar suave é necessário que a frequência seja uma razão da largura do sketch
onda = new Wave(offset, height/3, width/100, 0.0);
I'm trying to make a pitch detector for acoustic guitars on processing.
I'm very new at audio and having a little trouble for detecting the pitch of each strings of the guitar. I'm using
minim but I don't know how to get info out of the frequency spectrum and detect the exact pitch of that string.
For a regular guitar the frequency range goes from 82Hz (E) to 330Hz (e). For each string it goes like this:
E 82 Hz
A 110 Hz
D 147 Hz
G 196 Hz
B 247 Hz
e 330 Hz
My starting point was
this FFT example of Linear Logaritmic Averages, but I still don't know how to work with this frequency spectrum neither how to detect the pitch accurately.
I'm reading some stuff on the subject right now, but if anybody here has a hint ou a better approach to this problem I would be very greatful.
I'm using PFont on my computer (Ubuntu 12.10 with Firefox and Chromium) and it worked really well, but I just tested at other OS (Mac and Win) and browsers (Safari and Firefox) and I'm getting a blurry font.