Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Controlling audio speed of a mp3 file

I would like to play a mp3 soundtrack on my website, and manipulate the speed of the soundtrack by a percentage using a slider. I'm wondering how this could be done with only HTML(5) and JavaScript. I haven't been able to find any examples or tutorials, any help would be greatly appreciated.

like image 490
Charles Avatar asked May 12 '14 21:05

Charles


People also ask

Can you slow an MP3?

If you're looking for a free tool to slow down your MP3 tracks, VEED is the perfect app you can use! All you have to do is select a speed from the Settings. In order to slow down your music or audio file, you must select a speed lower than 1x. Or you can enter a custom speed on the custom field.


1 Answers

Something like this:

myaudio=document.getElementById("audio1");
myaudio.playbackRate=0.5;

This is the basics to demonstrate that audio and videos both have property you can set to change the playing rate. The implementation of sliders and other things, you can achieve using jquery based on how you want it.

like image 122
Jack_of_All_Trades Avatar answered Sep 27 '22 20:09

Jack_of_All_Trades