Re: [web-audio-api] (setValueCurveAtTime): AudioParam.setValueCurveAtTime (#131)

> [Original comment](https://www.w3.org/Bugs/Public/show_bug.cgi?id=17335#9) by Marcus Geelnard (Opera) on W3C Bugzilla. Tue, 11 Dec 2012 09:08:04 GMT

(In reply to [comment #9](#issuecomment-24244438))
> Certainly not! :)
> No, just refering to curves.
> 
> As for the other other parameters, it would be handy to have a 'better than
> linear/ramp' interpolator that can be switched on or off.
> But (AA)filtering would only be necessary when oversampling, as can be the
> case with curves.

Well, I'm pretty sure that a mathematical exponential ramp exhibits an infinite frequency spectrum (i.e. requires an infinite number of Fourier terms to reconstruct properly), and that just sampling it without any filtering will indeed result in aliasing. This is also true for a linear ramp, or even a simple setValueAtTime.

That's analogous to what would happen if you implemented the Oscillator node with just trivial mathematical functions (such as using the modulo operator to implement a saw wave).

I guess that my point is: Do we really have to care about aliasing filters for AudioParams at all? It would make things much more complicated. If you really want to do things like Nyquist-correct sampling of a custom curve, you can use a AudioBufferSourceNode as the input to an AudioParam instead.

---
Reply to this email directly or view it on GitHub:
https://github.com/WebAudio/web-audio-api/issues/131#issuecomment-24244444

Received on Wednesday, 11 September 2013 14:36:18 UTC