- From: Chris Rogers <crogers@google.com>
- Date: Thu, 7 Oct 2010 12:53:59 -0700
- To: Alistair MacDonald <al@bocoup.com>
- Cc: "public-xg-audio@w3.org" <public-xg-audio@w3.org>
- Message-ID: <AANLkTikha8+g8aiaNg_bD2UkuG_cud-noF0PqNsGcMM8@mail.gmail.com>
Hi Al, you brought up a couple of questions about curves which I don't think anyone has addressed yet. On Mon, Oct 4, 2010 at 10:59 AM, Alistair MacDonald <al@bocoup.com> wrote: > Good afternoon group, > > One thing we discussed in the Telecon today was the automation/control of > Audio Node parameters from JavaScript using curves, where the processing is > being performed by the compiled C code. > > It seems like this is something not yet covered in the WebKit Audio API and > Joe Berkovitz brought up some interesting points from his experience working > on the StandingWave audio engine for Flash. > > I just wanted to bring the subject up in the mailing list and perhaps spark > some discussion on what form this feature might take in an API. > > Eg: > > What syntax could be used to define and apply curves from JavaScript? > > What kinds of curves are needed? (Parametric, linear, quad, etc) > I previously talked about curves in a general way without addressing the exact way of how the time/values are specified. I'm pretty sure we would want at least the ability to specify simple linear (breakpoint) curves as well as sample-accurate curves (for grain windows, and high-resolution amplitude shaping). But maybe we would also want quad. One thought that comes to mind is that we might be able to choose to only support linear and sample-accurate in the API, but a custom graphical UI could still present quad curve editing. These graphical curves could then be converted to linear or sample-accurate in JS with no loss of generality. > Can the user supply their own curve algorithm in the same way users can add > easing modes to graphics animations? > If we support sample-accurate curves then JS can generate arbitrarily complex shapes. Can curves values/types be changed real-time etc? > I think this should be possible. Of course you would only hear the part of the curve that is playing "now", so if you edit a portion of the curve which is in the past (has already) played then you wouldn't hear any difference. Can curves be quantized to a BPM clock? > I think it should be possible to implement some BPM-based looped-curves (LFOs). > > Can curves drive frequency parameters for synthesis? > I hope so :) I'm imagining that these curves could be attached to any AudioParam, including "cutoff frequency". Cheers, Chris
Received on Thursday, 7 October 2010 19:54:30 UTC