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.
Page Index Toggle Pages: 1
OPENGL and ESS (Read 1189 times)
OPENGL and ESS
Apr 28th, 2007, 10:28am
 
Interesting Note:
if you setup ESS *then* setup your size() the AudioInput does not seem to work properly but if you setup ESS after your size() then it seems to work.
This Does not work:
void setup(){
   
 Ess.start(this);
 myInput=new AudioInput(bufferSize);
 myFFT=new FFT(bufferSize*2);
 myFFT.envelope(FFTEnvelope);
 myFFT.equalizer(FFTEQ);
 myFFT.smooth=FFTSmooth;
 myFFT.limits(minLimit,maxLimit);
 myFFT.damp(myDamp);
 myFFT.averages(numAverages);
 myInput.start();
size(1024,600, OPENGL);
 frameRate(30);
}
this does:
void setup(){
size(1024,600, OPENGL);
 frameRate(30);    
 Ess.start(this);
 myInput=new AudioInput(bufferSize);
 myFFT=new FFT(bufferSize*2);
 myFFT.envelope(FFTEnvelope);
 myFFT.equalizer(FFTEQ);
 myFFT.smooth=FFTSmooth;
 myFFT.limits(minLimit,maxLimit);
 myFFT.damp(myDamp);
 myFFT.averages(numAverages);
 myInput.start();
}

I did not spend much time fiddling with this so maybe it was just me, but i thought it was interesting and might be a solution to someone elses problem too.
Re: OPENGL and ESS
Reply #1 - Apr 28th, 2007, 1:51pm
 
If you look at the reference for size() it says:

Quote:
The size() function must be the first line in setup().

This is because setup() is actually being called twice when the applet is starting, however will not execute any of the other code after "size()" the second time. That's why always put size() before initializing anything else. Btw. I've been bitten by this myself in the past...
Re: OPENGL and ESS
Reply #2 - Apr 29th, 2007, 12:21am
 
in using  proMIDI  on an intel mac you need to have the Mandolane java extension, but unless you register mandolane (its shareware) you get a pop-screen.  This popup does not work, and the program hangs, unless the MIDI stuff is setup before size(), more stuff got piled infront of size(), then when is switched to OPENGEL ess stopped behaving.
Page Index Toggle Pages: 1