ISSUE-42: (Bugzilla 17399) AudioParam sampling is undefined

AudioParamSampling

(Bugzilla 17399) AudioParam sampling is undefined

State:
CLOSED
Product:
Web Audio API
Raised by:
Philip J├Ągenstedt
Opened on:
2012-05-15
Description:
It is not defined how the AudioParam values (ramps or AudioNode input) are sampled. These approaches would yield hugely different results:

* Sample-and-hold at the beginning of each processing buffer (if they exist in the implementation).
* Correct downsampling with low pass filtering to below the Nyquist frequency for each processing buffer. This could turn a 20KHz signal into silence.
* Continuously per audio sample at the mixing level. Slow?
Related Actions Items:
No related actions
Related emails:
  1. [web-audio-api] (DelayNodeSmoothing): DelayNode smoothing (#79) (from notifications@github.com on 2013-09-11)
  2. [web-audio-api] (AudioParamSampling): AudioParam sampling is undefined (#142) (from notifications@github.com on 2013-09-11)
  3. Re: third public Working Draft of the Web Audio API available (from tmichel@w3.org on 2012-08-02)
  4. Re: State of issues as of 2012-05-30 (from philipj@opera.com on 2012-06-01)
  5. State of issues as of 2012-05-30 (from olivier.thereaux@bbc.co.uk on 2012-05-30)
  6. Re: [Agenda] W3C Audio WG Teleconference, 30th May 2012 (from olivier.thereaux@bbc.co.uk on 2012-05-30)
  7. Re: Audio-ISSUE-42 (AudioParamSampling): AudioParam sampling is undefined [Web Audio API] (from philipj@opera.com on 2012-05-25)
  8. Re: Audio-ISSUE-42 (AudioParamSampling): AudioParam sampling is undefined [Web Audio API] (from olivier@thereaux.net on 2012-05-25)
  9. Re: Summary of issues (from crogers@google.com on 2012-05-22)
  10. Summary of issues (from mage@opera.com on 2012-05-22)
  11. Re: Missing information in the Web Audio spec (from crogers@google.com on 2012-05-18)
  12. Re: Missing information in the Web Audio spec (from philipj@opera.com on 2012-05-18)
  13. Re: Missing information in the Web Audio spec (from philipj@opera.com on 2012-05-16)
  14. Audio-ISSUE-47 (DelayNodeSmoothing): DelayNode smoothing [Web Audio API] (from sysbot+tracker@w3.org on 2012-05-15)
  15. Audio-ISSUE-42 (AudioParamSampling): AudioParam sampling is undefined [Web Audio API] (from sysbot+tracker@w3.org on 2012-05-15)

Related notes:

This amounts to what's known as k-rate or a-rate processing of parameters.

For some AudioParams (can be specified on a per-param basis) it's essential to process on a per-sample basis. Two examples are:

AudioGainNode .gain : gain operations are crucial to apply accurately for granular synthesis, amplitude envelopes, ...
Oscillator .frequency and .detune : FM synthesis techniques require sample-accurate changes for these parameters

Examples where it's clearly not necessary to process at a per-sample level are:

DynamicsCompressorNode .threshold .knee .release .attack : these are more "set and forget" type parameters. They can be automated with ramps, etc. but would not be expected to change on a per-sample basis. In other words, these are more k-rate parameters

I'll have to go through carefully and specify these all...

Chris Rogers, 18 May 2012, 23:42:17

FIXED:
https://dvcs.w3.org/hg/audio/rev/0f614b03b8cb

Chris Rogers, 24 May 2012, 23:41:08

Setting status to Pending Review.

Olivier Thereaux, 25 May 2012, 09:23:00

Comment from Philip in http://lists.w3.org/Archives/Public/public-audio/2012AprJun/0433.html


This is certainly an improvement! More feedback:

The sampling of k-rate parameters is not defined, the sensible options
would seem to be either the average value over one working buffer (128
samples) or picking the first, middle or last sample for that work buffer.
In other words, if a signal oscillating between 0 and 1 at 20 KHz
oscillator is used to control delayTime, will it be effectively a constant
0.5 second delay or a "random" delay for each work buffer depending on the
phase of the signal?

Editorial issues:

"Please note that the <code>frequency</code>, <code>Q</code>, and
<code>gain</code> parameters are <em>k-rate</em>" can be replaced with
"All parameters are <em>k-rate</em>".

Lowercase and uppercase MUSTs are now both used, presumably not
intentionally.

Typo: coursely -> coarsely

Olivier Thereaux, 30 May 2012, 10:31:02

Issue still under discussion setting as OPEN until editor resolves additional feedback.

Olivier Thereaux, 30 May 2012, 20:16:37

More detail added in:
https://dvcs.w3.org/hg/audio/rev/3837e5414cad

Chris Rogers, 4 Jun 2012, 21:01:46

[MikeSmith]: https://www.w3.org/Bugs/Public/show_bug.cgi?id=17399

5 Jun 2012, 13:08:16

Display change log ATOM feed


Matthew Paradis <matthew.paradis@bbc.co.uk>, Raymond Toy <rtoy@google.com>, Chairs, Chris Lilley <chris@w3.org>, Staff Contact
Tracker: documentation, (configuration for this group), originally developed by Dean Jackson, is developed and maintained by the Systems Team <w3t-sys@w3.org>.
$Id: 42.html,v 1.1 2019/11/12 13:32:24 carcone Exp $