I would like to have buttons that can play certain ranges of audio from a larger file. Sort of:
<button onclick="playClip('http://blah/source1.mp3', 2.5, 3.0, 1.0)">Play clip 1</button>
<button onclick="playClip('http://blah/source2.mp3', 10.0, 2.0, 0.5)">Play clip 2 slow</button>
where playClip has this pattern:
function playClip(src, startOffset, length, rate) {
}
Or instead of length, the final displacement.
Can someone point me to a code that can do this, or help me write it? The closest I could find is https://gist.github.com/remy/753003/download# , but I need clips of different sizes, possibly from different files and with the specified playback speed. I'm afraid I have limited experience with Javascript.
I am trying to replace a Silverlight application that does this.
Thank.
-John
source
share