开发者

jQuery onclick play a sound and speed/slow it down

I want 4 buttons.

1.When you click PLAY a sound plays continously. For example this sound; clicking sound

2.STOP stops the loop.

3.FASTER (interval) 开发者_高级运维increases the bpm

4.SLOWER (interval) decreases the bpm

How can this be accomplished?


This won't COMPLETELY answer your question/issue, but have you checked out the jQuery plugin jPlayer?

UPDATE:

Looking at your question further, and listening to the sound sample you provided, it looks like you are trying to create a metronome of sorts? If you're using JS, it's going to be hard to make it very accurate. Even using setInterval won't guarantee as exact an interval between sounds/clicks as you'd probably want.

Consider something server-side that will actually build a file on-the-fly and stream it to the browser.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜