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 & HelpSound,  Music Libraries › Ess | updating envelope effect
Page Index Toggle Pages: 1
Ess | updating envelope effect (Read 307 times)
Ess | updating envelope effect
Mar 12th, 2009, 4:10pm
 
Hi,
I'm using Ess to envelope a wav sound. I'm using a variable to change the envelope effect according to external events, but I'm having big problems.
It looks like every time I apply my envelope effect, it multiplies (or something) with the previous envelope effects I used before...
Ok, just to make you understand:



-------------------------------------------------------
import krister.Ess.*;
import processing.net.*;

Envelope myEnvelope;
Envelope envelope_lv0;

....

void playSounds(int whichSound, float whatVolume){
 windIntensity= map(absWind, 0, 200, 0, 1);

 EPoint[] env_lv0 = new EPoint[3];
 env_lv0[0] = new EPoint(0,1);
 env_lv0[1] = new EPoint(reverberation,3);
 env_lv0[2] = new EPoint(3,0);
 envelope_lv0 = new Envelope(env_lv0);
 
 envelope_lv0.filter(suono[whichSound]);

 suono[whichSound].volume(whatVolume);      // sets volume
 suono[whichSound].play();                  // play sounds
}
-------------------------------------------------------



The playSounds function is activated by an external event (e.g. on keyPressed).
The point is: the 1st time the sound is played it's ok, then the effects starts to go lowder and lowder...

Is there any way to reset it everytime?
Page Index Toggle Pages: 1