| So we have Env.adsr and Env.asr, but I am often looking for the fixed-length equivalent of adsr, which is currently available only inconveniently as Env.new(). How about this? *adr { arg attackTime=0.01, decayTime=0.3, sustainLevel=0.5, sustainTime=1.0, releaseTime=1.0, peakLevel=1.0, curve = -4.0, bias = 0.0; ^this.new( [0, peakLevel, peakLevel * sustainLevel, peakLevel * sustainLevel, 0] + bias, [attackTime, decayTime, sustainTime, releaseTime], curve ) } Or *adsr_fixed or some other name, I'm not picky. hjh : H. James Harkins : jamshark70@xxxxxxxxxxxxxxxxx : http://www.dewdrop-world.net .::!:.:.......:.::........:..!.::.::...:..:...:.:.:.:..: "Come said the Muse, Sing me a song no poet has yet chanted, Sing me the universal." -- Whitman |