ISSUE-12: (Bugzilla 17390) Loop start/stop points
LoopStartStop
(Bugzilla 17390) Loop start/stop points
- State:
- CLOSED
- Product:
- Web Audio API
- Raised by:
- Joe Berkovitz
- Opened on:
- 2012-04-30
- Description:
- Hi folks,
At the F2F in January we discussed the need for a more powerful looping construct in AudioBufferSourceNode than simply "loop the whole sound", in order to support UC6 (wavetable synthesis) and other user cases. In particular, basic wavetable synths require the ability to start an audio buffer playing and then have it enter a loop in some arbitrary subrange of that sample [m..n]. Trying to achieve this via explicit scheduling of various subranges of a sample by calling noteGrainOn() feels unworkable since sample-accurate transitions from one subrange to another could not be achieved in this way -- and at any rate, it would be very unwieldy. The idea is that noteOn() should perform seamless repetition of the looped subrange of a sample as an integral part of its behavior.
Somehow this idea has been lost, probably due to the coarse-grain definition of looping in the UC document as simply "Playing / Looping sources of audio". However it's an essential requirement for wavetable synthesis and my concern is that games and synths will be seriously compromised without it.
I am proposing that there be separate loopStart and loopEnd properties of AudioBufferSourceNode that are sample-accurate. If respectively set to 0 and the length of the sample, these will cause the entire sample to be looped. If set to offsets M and N, these will cause the sample to be played by noteOn() and noteGrainOn() as if the sample consisted of contiguous subranges [0..M-1], [M..N], [M..N], ...
Thanks!
...Joe - Related Actions Items:
- No related actions
- Related emails:
- [web-audio-api] Loop start/stop points (#157) (from notifications@github.com on 2013-09-11)
- Re: Audio-ISSUE-12 (JLoop start/stop points) [Web Audio API] (from joe@noteflight.com on 2012-05-24)
- Re: Audio-ISSUE-12 (JLoop start/stop points) [Web Audio API] (from olivier.thereaux@bbc.co.uk on 2012-05-24)
- Re: Audio-ISSUE-12 (JLoop start/stop points) [Web Audio API] (from Olli.Pettay@helsinki.fi on 2012-05-24)
- Re: Audio-ISSUE-12 (JLoop start/stop points) [Web Audio API] (from Olli.Pettay@helsinki.fi on 2012-05-24)
- Re: Audio-ISSUE-12 (JLoop start/stop points) [Web Audio API] (from cwilso@google.com on 2012-05-23)
- Re: Audio-ISSUE-12 (JLoop start/stop points) [Web Audio API] (from crogers@google.com on 2012-05-23)
- Audio-ISSUE-12 (JLoop start/stop points) [Web Audio API] (from joe@noteflight.com on 2012-05-23)
- Re: Audio-ISSUE-12 (Joe Berkovitz): Loop start/stop points [Web Audio API] (from robert@ocallahan.org on 2012-05-08)
- Re: Audio-ISSUE-12 (Joe Berkovitz): Loop start/stop points [Web Audio API] (from cwilso@google.com on 2012-05-07)
- Re: Audio-ISSUE-12 (Joe Berkovitz): Loop start/stop points [Web Audio API] (from crogers@google.com on 2012-05-07)
- RE: Audio-ISSUE-12 (Joe Berkovitz): Loop start/stop points [Web Audio API] (from tross@microsoft.com on 2012-05-07)
- RE: Audio-ISSUE-12 (Joe Berkovitz): Loop start/stop points [Web Audio API] (from tross@microsoft.com on 2012-05-07)
- Re: Audio-ISSUE-12 (Joe Berkovitz): Loop start/stop points [Web Audio API] (from olivier.thereaux@bbc.co.uk on 2012-05-07)
- RE: Audio-ISSUE-12 (Joe Berkovitz): Loop start/stop points [Web Audio API] (from tross@microsoft.com on 2012-05-07)
- Re: Audio-ISSUE-12 (Joe Berkovitz): Loop start/stop points [Web Audio API] (from olivier.thereaux@bbc.co.uk on 2012-05-03)
- Minutes of audio WG teleconference, 2012-05-02 (from olivier.thereaux@bbc.co.uk on 2012-05-03)
- Regrets (from schepers@w3.org on 2012-05-02)
- RE: [Agenda] W3C Audio WG Teleconference, 2nd May 2012 (from tross@microsoft.com on 2012-05-02)
- Re: Audio-ISSUE-12 (Joe Berkovitz): Loop start/stop points [Web Audio API] (from olivier.thereaux@bbc.co.uk on 2012-05-02)
- Re: [Agenda] W3C Audio WG Teleconference, 2nd May 2012 (from gabriel.cardoso@inria.fr on 2012-05-01)
- [Agenda] W3C Audio WG Teleconference, 2nd May 2012 (from al@signedon.com on 2012-04-30)
- Audio-ISSUE-12 (Joe Berkovitz): Loop start/stop points [Web Audio API] (from sysbot+tracker@w3.org on 2012-04-30)
Related notes:
In my original proposal I had suggested that loopStart/loopEnd be set to 0 and the sample length in order to loop the entire sample (iff the "loop" attribute is set on the AudioBufferSourceNode).
After some thought I think that while this behavior obviously makes sense when loopEnd is the sample length, it would be also advantageous to define that whole-sample-looping occurs when loopStart == 0 and loopEnd == 0, and that these in fact be those attributes' default values. This provides a guaranteed way to achieve the whole-sample-looping behavior regardless of what underlying AudioBuffer is set into the AudioBufferSourceNode.
Issue under discussion. Setting status as OPEN.
Olivier Thereaux, 30 May 2012, 20:17:46[MikeSmith]: https://www.w3.org/Bugs/Public/show_bug.cgi?id=17390
5 Jun 2012, 13:31:12Display change log