- From: Audio Working Group Issue Tracker <sysbot+tracker@w3.org>
- Date: Mon, 30 Apr 2012 16:31:33 +0000
- To: public-audio@w3.org
Audio-ISSUE-12 (Joe Berkovitz): Loop start/stop points [Web Audio API] http://www.w3.org/2011/audio/track/issues/12 Raised by: Joe Berkovitz On product: Web Audio API 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
Received on Monday, 30 April 2012 16:31:35 UTC