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
setVolume() in minim (Read 1012 times)
setVolume() in minim
Apr 13th, 2009, 4:26am
 
Hi.

I'm using minim to create an audio app for maipulating loops. Unfortunately, I can't seem to be able to set any parameters properly in the AudioPlayer class.

I'm trying to use a graphical slider object to set the volume of a looping sample, with the setVolume() method. The program stops, saying "StackOverflowError: This sketch is attempting too much recursion.".

So, I'm tell the program to do too many calculations at the same time?

the code looks like this:


 void mouseDragged(){
    sliders.mouseDragged();
     
     if(sliders.readyToSendValues()){
       //if the slider has been 'dragged'...

       wave.setVolume(sliders.sendValues());
       //read its value and set the volume of the sample accordingly.
     }      
   }
 }


Anyone have any tips on how to solve this? Am I using setVOlume() correctly? Could I be doing things in the wrong order? I could post some more code, but it's all divided into different classes and it's a bit messy, to be honest.

answers much appreciated.
Page Index Toggle Pages: 1