Fix 18663: Need a method to get a readonly reading of the combined value when using AudioParam automation curve
authorcrogers
Fri, 05 Oct 2012 13:12:46 -0700
changeset 173 3bddf0c97e77
parent 172 79d44e3f3ced
child 174 2246b4813c5a
Fix 18663: Need a method to get a readonly reading of the combined value when using AudioParam automation curve
webaudio/specification.html
--- a/webaudio/specification.html	Fri Oct 05 12:48:36 2012 -0700
+++ b/webaudio/specification.html	Fri Oct 05 13:12:46 2012 -0700
@@ -1268,30 +1268,6 @@
 </p>
 
 <p>
-The <em>final</em> parameter value used to control the audio DSP is calculated as follows:
-</p>
-
-<ol>
-<li>An <em>intrinsic</em> parameter value will be calculated at each time, which is either the value set directly to the .value attribute,
-or, if there are any scheduled parameter changes (automation events), the value as calculated from these events.  If the .value attribute
-is set after any automation events have been scheduled, then these events will be removed.  When read, the .value attribute
-always returns the <em>intrinsic</em> value for the current time.  If automation events are removed from a given time range, then the
-<em>intrinsic</em> value will remain unchanged and stay at its previous value until either the .value attribute is directly set, or automation events are added
-for the time range.
-</li>
-
-<li>
-An AudioParam will take the rendered audio data from any AudioNode output connected to it and <a href="#down-mix">convert it to mono</a> by down-mixing if it is not
-already mono, then mix it together with other such outputs.
-</li>
-
-<li>
-The <em>final</em> parameter value is the sum of the <em>intrinsic</em> value and the value calculated from (2).
-</li>
-
-</ol>
-
-<p>
 Some synthesis and processing <code>AudioNodes</code> have <code>AudioParams</code> as attributes whose values must
  be taken into account on a per-audio-sample basis.
 For other <code>AudioParams</code>, sample-accuracy is not important and the value changes can be sampled more coarsely.
@@ -1317,6 +1293,7 @@
 interface <dfn id="dfn-AudioParam">AudioParam</dfn> {
 
     attribute float value;
+    readonly attribute float computedValue;
     readonly attribute float minValue;
     readonly attribute float maxValue;
     readonly attribute float defaultValue;
@@ -1352,6 +1329,38 @@
     </dd>
 </dl>
 <dl>
+  <dt id="dfn-computedValue"><code>computedValue</code></dt>
+    <dd>
+    <p>
+    The final value controlling the audio DSP is calculated as follows:
+    </p>
+    
+    <p>
+
+    <ol>
+    <li>An <em>intrinsic</em> parameter value will be calculated at each time, which is either the value set directly to the .value attribute,
+    or, if there are any scheduled parameter changes (automation events), the value as calculated from these events.  If the .value attribute
+    is set after any automation events have been scheduled, then these events will be removed.  When read, the .value attribute
+    always returns the <em>intrinsic</em> value for the current time.  If automation events are removed from a given time range, then the
+    <em>intrinsic</em> value will remain unchanged and stay at its previous value until either the .value attribute is directly set, or automation events are added
+    for the time range.
+    </li>
+
+    <li>
+    An AudioParam will take the rendered audio data from any AudioNode output connected to it and <a href="#down-mix">convert it to mono</a> by down-mixing if it is not
+    already mono, then mix it together with other such outputs.
+    </li>
+
+    <li>
+    The <em>computedValue</em> is the sum of the <em>intrinsic</em> value and the value calculated from (2).
+    </li>
+
+    </ol>
+
+    </p>
+    </dd>
+</dl>
+<dl>
   <dt id="dfn-minValue"><code>minValue</code></dt>
     <dd><p>Nominal minimum value. The <code>value</code> attribute may be set
       lower than this value.</p>