- From: Alistair MacDonald <al@signedon.com>
- Date: Mon, 28 Nov 2011 16:50:08 -0500
- To: Chris Rogers <crogers@google.com>
- Cc: public-audio@w3.org
- Message-ID: <CAJX8r2m0sGM5v=gxU3i26cFyYpXos4xD3PZX_ZSvaesmvG37Bw@mail.gmail.com>
Wondered what your thoughts were on this? Al On Mon, Nov 28, 2011 at 4:47 PM, Raymond Toy <rtoy@google.com> wrote: > > > On Mon, Nov 28, 2011 at 11:39 AM, Alistair MacDonald <al@signedon.com>wrote: > >> Hi Group, >> >> While working with the Web Audio API at TPAC I was taking some notes. I >> sent these to Chris Rogers and we started discussing this a few weeks back. >> >> Some of the technical discussion may be very useful / interesting to >> people experimenting with the API, so I'm going to forward the thread to >> public-audio here. >> >> At the bottom of the email I have attached the original notes I sent to >> Chris. >> >> Comments/discussion always welcome, >> >>> >>> P O S S I B L E - B U G S >>> =========================== >>> >>> >>> >>> AudioParam ...RampToValueAtTime( 0, 0 ) >>> --------------------------------------- >>> >>> Exponential ramps do not seem to work properly when starting using >>> "zero" values. >>> I would expect to hear the sound ramping in from 0 or out to 0, instead >>> the >>> transition appears to be immediate when it reaches the given time. Much >>> like the >>> behavior of the setValueAtTime() method. >>> >> >> This is a consequence of the math behind exponential curves. You can >> always have an exponentially increasing curve from >> value1 -> value2 >> >> > It's not clear from the webaudio docs what an exponential ramp should do, > but we could define the ramp to be > > value1 + (value2-value1)*(1-exp(-t/C)) > > This will be an exponential ramp starting at value1 and asymptotically > approaching value2. > > Two major differences: > > > - 0 is valid starting point. > - We never actually reach value2, but just get closer and closer. > > Ray > >
Received on Monday, 28 November 2011 21:50:37 UTC