
Hi Eduard!
I am testing how ADSR UGen works and I am still not sure what do parameters to (time)members (attackTime, decayTime, etc) mean. Are they automatically casted to seconds?
For now, yes. All ADSR times are in seconds. We hope to convert them to dur soon. I added two functions in the meantime: .set( dur a, dur d, float s, dur r ); .set( float a, float d, float s, float r );
begin note_on 0 0.000000 end_of_attack 1 10.000000 begin note_off 3 10.000000 end_of_decay 3 10.000000 end_of_sustain 3 10.000000 end_of_release 4 2010.000000 done. 4 2010.000000
This would bean that attack lasts for 10::ms as env.attackTime() was set to .01. But then I don't understand why release ends at 2010::ms as releaseTime() is set to 1.
Aha. This happens because keyOff() is called before the ADSR is in the sustain state. I've fixed it so that the releaseTime is as expected even if keyOff is called way early: 1010. The changes in CVS and will be included in 1.2.0.7. Thanks! Best, Ge!