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:
- [web-audio-api] (DelayNodeSmoothing): DelayNode smoothing (#79) (from notifications@github.com on 2013-09-11)
- [web-audio-api] (AudioParamSampling): AudioParam sampling is undefined (#142) (from notifications@github.com on 2013-09-11)
- Re: third public Working Draft of the Web Audio API available (from tmichel@w3.org on 2012-08-02)
- Re: State of issues as of 2012-05-30 (from philipj@opera.com on 2012-06-01)
- State of issues as of 2012-05-30 (from olivier.thereaux@bbc.co.uk on 2012-05-30)
- Re: [Agenda] W3C Audio WG Teleconference, 30th May 2012 (from olivier.thereaux@bbc.co.uk on 2012-05-30)
- Re: Audio-ISSUE-42 (AudioParamSampling): AudioParam sampling is undefined [Web Audio API] (from philipj@opera.com on 2012-05-25)
- Re: Audio-ISSUE-42 (AudioParamSampling): AudioParam sampling is undefined [Web Audio API] (from olivier@thereaux.net on 2012-05-25)
- Re: Summary of issues (from crogers@google.com on 2012-05-22)
- Summary of issues (from mage@opera.com on 2012-05-22)
- Re: Missing information in the Web Audio spec (from crogers@google.com on 2012-05-18)
- Re: Missing information in the Web Audio spec (from philipj@opera.com on 2012-05-18)
- Re: Missing information in the Web Audio spec (from philipj@opera.com on 2012-05-16)
- Audio-ISSUE-47 (DelayNodeSmoothing): DelayNode smoothing [Web Audio API] (from sysbot+tracker@w3.org on 2012-05-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...
FIXED:
https://dvcs.w3.org/hg/audio/rev/0f614b03b8cb
Setting status to Pending Review.
Olivier Thereaux, 25 May 2012, 09:23:00Comment 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
Issue still under discussion setting as OPEN until editor resolves additional feedback.
Olivier Thereaux, 30 May 2012, 20:16:37More detail added in:
https://dvcs.w3.org/hg/audio/rev/3837e5414cad
[MikeSmith]: https://www.w3.org/Bugs/Public/show_bug.cgi?id=17399
5 Jun 2012, 13:08:16Display change log