- From: Olivier Thereaux <olivier.thereaux@bbc.co.uk>
- Date: Wed, 15 Jan 2014 09:21:47 +0000
- To: Karl Tomlinson <karlt+public-audio@karlt.net>
- CC: Audio WG <public-audio@w3.org>
Karl, thanks for raising this. At this point I am considering this a “bug report” on the generic rule which the group has agreed upon. Making an exception to that rule for gain might be one way forward. Would you mind adding it (including the two examples) as an issue in GitHub? https://github.com/WebAudio/web-audio-api/issues I will put it on the agenda during the group teleconference tomorrow. Thanks, Olivier On 30 Dec 2013, at 23:28, Karl Tomlinson <karlt+public-audio@karlt.net> wrote: > On Mon, 23 Dec 2013 11:55:41 +0000, Olivier Thereaux wrote: > >> We discussed this issue again at our last teleconference, and confirmed the >> resolution to have .value effectively be an alias for setTargetAtTime() - with >> time constants TBD. > > Please see below for two features of AudioParam.value attributes > that are provided by the Web Audio draft and Gecko and Blink > implementations. (I assume WebKit is similar.) Each of these > features would be removed if the .value setter were re-spec'd as an > alias for setTargetAtTime(). > > 1. The setter can be used to set the initial value of an AudioParam. > > This feature is useful on GainNode for example to ensure the > signal is silenced when first connected. > > var node = context.createGain(); > node.gain.value = 0; > > Using setTargetAtTime() would mean the node initially passes the > signal at full volume, and then the multiplier would approach zero. > > Setting the initial values of parameters is more important than > having a transition applied when changing values after the node > has begun processing signal. No attempt to spec transitions on > running streams should remove the feature allowing use of setters > for initial values. > > This problem was already pointed out in [1], but not so strongly > because, at that point in time, the CfC was no longer looking > for feedback on details of how de-zippering would be performed. > > 2. The getter returns the value provided to the setter, if no > automation events have been scheduled. > > For example, the steady-state gain below is 0.2. > > var node = context.createGain(); > node.gain.value = 0; > node.gain.value += 0.1; > node.gain.value += 0.1; > > Using setTargetAtTime() would change the steady state gain to 1.1. > > [1] http://lists.w3.org/Archives/Public/public-audio/2013OctDec/0315.html -- Olivier Thereaux - BBC Internet Research and Future Services ----------------------------- http://www.bbc.co.uk This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated. If you have received it in error, please delete it from your system. Do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately. Please note that the BBC monitors e-mails sent or received. Further communication will signify your consent to this. -----------------------------
Received on Wednesday, 15 January 2014 09:22:20 UTC