We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpIntegration › beatDetection in eclipse
Page Index Toggle Pages: 1
beatDetection in eclipse (Read 1603 times)
beatDetection in eclipse
Dec 4th, 2006, 9:44pm
 
I try do use the beatDetection class in eclipse. If I use it in the main class it works well but if  use it as a seperat class if got allways true for the isKick() methode.
Code:

BeatDetect beat;
AudioInput myInput;

void setup(){
Ess.start(this);
int bufferSize=256;
myInput=new AudioInput(bufferSize);
beat=new BeatDetect(myInput.size, myInput.sampleRate);
beat.detectMode("FREQ_ENERGY");
myInput.start();
}
public void audioInputData(AudioInput theInput) {
beat.detect(theInput);
beat.isKick();
}
Re: beatDetection in eclipse
Reply #1 - Dec 4th, 2006, 10:01pm
 
I don't use Eclipse so I can't begin to tell you why this might be the case. Also, I'm not really a Java programmer. The class was written in Processing and I have only ever used it from within the PDE. It could certainly be the case that some part of the code assumes inclusion inside of the main class.
Re: beatDetection in eclipse
Reply #2 - Dec 4th, 2006, 10:02pm
 
Figured out by myself. There are some calls of frameRate and frameCount. Cause I've extend PApplet to the beatDection class there was no error but also no right values. No I've overlaod an instance of my main class an it works.
Page Index Toggle Pages: 1