Re: Creating ADSR Envelopes

Well, that could of course give you a value for a future time based on
what's currently known in the scheduler; if other calls are scheduled, or
the .value is set, that might not reflect reality, though.  I think it
would be easier (and actually clarify the normal case, too) to have
something that schedules taking the current result of scheduling and
setting it as the currently scheduled value (at that point in time), and
cancels any currently pending or in-progress scheduling events.  You could
use it in the normal release case as a replacement for the current pairing
of:

this.envelope.gain.cancelScheduledValues(now);
this.envelope.gain.setValueAtTime( this.envelope.gain.value, now );

-C


On Thu, Jan 10, 2013 at 6:47 PM, Robert O'Callahan <robert@ocallahan.org>wrote:

> Seems to me a simple way to solve this would be to add a getValueAtTime()
> method to AudioParam (which throws an error or something for AudioParams
> driven by an AudioNode).
>
> Rob
> --
> Jesus called them together and said, “You know that the rulers of the
> Gentiles lord it over them, and their high officials exercise authority
> over them. Not so with you. Instead, whoever wants to become great among
> you must be your servant, and whoever wants to be first must be your
> slave — just as the Son of Man did not come to be served, but to serve,
> and to give his life as a ransom for many.” [Matthew 20:25-28]
>

Received on Friday, 11 January 2013 17:30:20 UTC