Re: [whatwg] Audio synthesis
On Tue, 21 Jul 2009, Patrick Mueller wrote: > > I've just started playing a bit with audio. One thing I noticed with > both FF 3.5 and WebKit nightlies is that usage of the "loop" attribute > set to true does not provide seamless looping. ie, there is a > significant pause between when the audio clip end is reached and when > the clip starts again. > > The spec makes no statement on the seamless-ness of the looping. > > From a practical standpoint though, having seamless looping is important > if you actually have audio that is designed to loop, and you'd like to > just allocate the resource for one loop. Think of the background sound > for a game, for instance. It also makes the trick of using a very short > sound clip specified in a data: url pretty much worthless, as you'd > presumably want to loop such a clip seamlessly. > > It makes me wonder what the use of having the seamful looping actually > is, besides of course annoying people. :-) I agree that looping should be seamless, but really we can't even guarantee that the start of the clip will still be in RAM when you reach the end, so this is more a quality-of-implementation issue than a spec issue. On Wed, 22 Jul 2009, Philip J�genstedt wrote: > > The spec simply says "If the media element has a loop attribute > specified, then seek to the earliest possible position of the media > resource and abort these steps." This would give seamless looping if an > implementation makes an effort to make it so. I certainly don't think > there should be an option to have seamless looping or not, each > implementation will simply have to do its best. Indeed. On Wed, 22 Jul 2009, Anne van Kesteren wrote: > > Unless memory fails me badly, the sole reason we have a looping API at > all is for seamless looping. (Otherwise you'd simply listen for the > ended event and invoke play() when it is dispatched.) Also true. -- Ian Hickson U+1047E)\._.,--,'``.fL http://ln.hixie.ch/ U+263A/, _.. \ _\ ;`._ ,. Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
Re: [whatwg] Audio synthesis
On Wed, 22 Jul 2009 04:38:08 +0200, Patrick Mueller wrote: > But since you mention it, any idea whether the Moz developers plan on > implementing seamless looping or not? I'm curious whether anyone cares, > and what folks interpretation of looping means. The spec should be made > more specific, one way or another ("must/should/may implement seamless > looping"). Or even provide some other mechanism to allow for seamless > looping if the current APIs are insufficient, and it's deemed important. Unless memory fails me badly, the sole reason we have a looping API at all is for seamless looping. (Otherwise you'd simply listen for the ended event and invoke play() when it is dispatched.) -- Anne van Kesteren http://annevankesteren.nl/
Re: [whatwg] Audio synthesis
On Wed, 22 Jul 2009 04:38:08 +0200, Patrick Mueller wrote: Robert O'Callahan wrote: On Wed, Jul 22, 2009 at 1:36 AM, Patrick Mueller wrote: I've just started playing a bit with audio. One thing I noticed with both FF 3.5 and WebKit nightlies is that usage of the "loop" attribute set to true does not provide seamless looping. ie, there is a significant pause between when the audio clip end is reached and when the clip starts again. That might be related to the fact that we haven't implemented 'loop' yet. Woops, caught me there. It's exciting to have programmatic audio available AT ALL, was forgetting some of the details. But since you mention it, any idea whether the Moz developers plan on implementing seamless looping or not? I'm curious whether anyone cares, and what folks interpretation of looping means. The spec should be made more specific, one way or another ("must/should/may implement seamless looping"). Or even provide some other mechanism to allow for seamless looping if the current APIs are insufficient, and it's deemed important. The spec simply says "If the media element has a loop attribute specified, then seek to the earliest possible position of the media resource and abort these steps." This would give seamless looping if an implementation makes an effort to make it so. I certainly don't think there should be an option to have seamless looping or not, each implementation will simply have to do its best. -- Philip Jägenstedt Core Developer Opera Software
Re: [whatwg] Audio synthesis
Robert O'Callahan wrote: On Wed, Jul 22, 2009 at 1:36 AM, Patrick Mueller wrote: I've just started playing a bit with audio. One thing I noticed with both FF 3.5 and WebKit nightlies is that usage of the "loop" attribute set to true does not provide seamless looping. ie, there is a significant pause between when the audio clip end is reached and when the clip starts again. That might be related to the fact that we haven't implemented 'loop' yet. Woops, caught me there. It's exciting to have programmatic audio available AT ALL, was forgetting some of the details. But since you mention it, any idea whether the Moz developers plan on implementing seamless looping or not? I'm curious whether anyone cares, and what folks interpretation of looping means. The spec should be made more specific, one way or another ("must/should/may implement seamless looping"). Or even provide some other mechanism to allow for seamless looping if the current APIs are insufficient, and it's deemed important. -- Patrick Mueller - http://muellerware.org
Re: [whatwg] Audio synthesis
On Wed, Jul 22, 2009 at 1:36 AM, Patrick Mueller wrote: > I've just started playing a bit with audio. One thing I noticed with both > FF 3.5 and WebKit nightlies is that usage of the "loop" attribute set to > true does not provide seamless looping. ie, there is a significant pause > between when the audio clip end is reached and when the clip starts again. > That might be related to the fact that we haven't implemented 'loop' yet. Rob -- "He was pierced for our transgressions, he was crushed for our iniquities; the punishment that brought us peace was upon him, and by his wounds we are healed. We all, like sheep, have gone astray, each of us has turned to his own way; and the LORD has laid on him the iniquity of us all." [Isaiah 53:5-6]
Re: [whatwg] Audio synthesis
Ian Hickson wrote: On Tue, 7 Jul 2009, Philip Jagenstedt wrote: For all of the simpler use cases you can already generate sounds yourself with a data uri. For example, with is 2 samples of silence: "data:audio/wav;base64,UklGRigAAABXQVZFZm10IBABAAEARKwAAIhYAQACABAAZGF0YQQA". I hope we haven't infringed a John Cage copyright here. It might be worthwhile implementing the API you want as a JavaScript library and see if you can actually do useful things with it. If the use cases are compelling and require native browser support to be performant enough, perhaps it could go into a future version of HTML. A JS library attempting to do this would definitely be helpful in determining how much need there is for this. I've just started playing a bit with audio. One thing I noticed with both FF 3.5 and WebKit nightlies is that usage of the "loop" attribute set to true does not provide seamless looping. ie, there is a significant pause between when the audio clip end is reached and when the clip starts again. The spec makes no statement on the seamless-ness of the looping. From a practical standpoint though, having seamless looping is important if you actually have audio that is designed to loop, and you'd like to just allocate the resource for one loop. Think of the background sound for a game, for instance. It also makes the trick of using a very short sound clip specified in a data: url pretty much worthless, as you'd presumably want to loop such a clip seamlessly. It makes me wonder what the use of having the seamful looping actually is, besides of course annoying people. :-) -- Patrick Mueller