I'm trying to get the volume level from my mic to adjust the size of a box (louder = bigger). But I have the following issues: a) getGain seems to be giving me -64 constantly b) getVolume doesnt seem to be available
I edited a Processing example to respond to the mic rather than the audio file provided but could not figure out how to get the volume
Here is what I have
import ddf.minim.analysis.*;
import ddf.minim.*;
Minim minim;
AudioInput accessMic;
FFT fft;
float boxSize;
void setup () {
size(512, 200, P3D);
minim = new Minim(this);
accessMic = minim.getLineIn();
rectMode(CENTER);
}
void draw() {
background(255);
boxSize = accessMic.getGain();
stroke(255);
println(boxSize);
fill(0);
rect(width/2,height/2,boxSize,boxSize);
}
Any help you can give me would be greatly appreciated Thanks