W3C home > Mailing lists > Public > public-audio@w3.org > July to September 2013

Re: [web-audio-api] (OscillatorTypeModification): Oscillator type modification (#136)

From: Olivier Thereaux <notifications@github.com>
Date: Wed, 11 Sep 2013 07:29:53 -0700
To: WebAudio/web-audio-api <web-audio-api@noreply.github.com>
Message-ID: <WebAudio/web-audio-api/issues/136/24244475@github.com>
> [Original comment](https://www.w3.org/Bugs/Public/show_bug.cgi?id=17367#8) by Chris Wilson on W3C Bugzilla. Tue, 03 Sep 2013 15:40:17 GMT

(In reply to [comment #8](#issuecomment-24244465))
> Do we still want to make the `type` oscillator types immutable? It may be
> too late for such breaking change (something like what comment 4 suggest). 

I do not want to change types to be immutable, for the reasons Chris listed.

> If we agree on keeping the interface as-is, we need to be more precise on
> the behaviour a conforming implementation should adopt when mutating the
> `type` attribute.

Definitely agree.

> In light of this use-case for modifying the `type` attribute on a playing
> OscillatorNode, we could spec it this way:
> - Considering the node support "custom" waveforms, possibly out of phase
> with the basic waveform types, we have two options:
>   (1) The phase is preserved when switching between basic oscillator type
> (we need to spec coherent phase among basic types for that, this is bug
> 17366). Switching to/from "custom" type resets the phase ;
>   (2) Switching the type resets the phase, letting everything in the hands
> of the author ;
> I'm in favor of adopting (2), for consistency.  

Consistency with what?  The author doesn't have any phase control (other than doing the math, figuring out precisely when the earliest they can switch, and aligning phase that way).  I would lean toward (1) for that reason.

> - There should not be a crossfade when changing the type. If an author wants
> morphing between two or more waveforms, using GainNode with multiple
> OscillatorNode is easy enough ;


> - Lower bound for the type change to be reflected in the node output could
> be the next block, making this act like an a-rate parameter does not make
> much sense ;


Reply to this email directly or view it on GitHub:
Received on Wednesday, 11 September 2013 14:30:29 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:50:11 UTC