howler.js icon indicating copy to clipboard operation
howler.js copied to clipboard

Support for time stretching

Open musikele opened this issue 8 years ago • 10 comments

Hi, Thank you for your fantastic library ! I need one other feature, a way to manipulate time-stretching so that you can change the speed of the song, without impacting on the pitch. It seems that there is at least one other js open source library that is doing this, like Kali https://github.com/Infinity/Kali

Can you implement this feature, or help me integrating this feature?

musikele avatar Aug 03 '16 13:08 musikele

This is out of the scope of the core library, but would make for an interesting plugin. Just as an FYI, if you force HTML5 mode and change the rate, the speed will change without affecting pitch.

goldfire avatar Aug 03 '16 13:08 goldfire

let's try this out :)

what are the main disadvantages to using html5 mode ?

musikele avatar Aug 03 '16 13:08 musikele

Can I ask you why rate behaves differently in html5 and in webaudio? Is this a bug in one of the two (html5 I believe)? Is there a risk that html5 "rate" feature changes in the future ?

musikele avatar Aug 04 '16 07:08 musikele

It isn't a bug, this is just how it was implemented in HTML5 Audio. I am not aware of any plans for that to change.

goldfire avatar Aug 04 '16 12:08 goldfire

I need this feature!

KitaharaMugiro avatar Dec 17 '21 14:12 KitaharaMugiro

I would also love to have this feature available as an alternative to .rate!

aweibell avatar Feb 03 '22 16:02 aweibell

+1 for that

sugoidesune avatar Sep 17 '22 02:09 sugoidesune

+1

paraself avatar Dec 06 '22 18:12 paraself

Does anyone have experience with a good JavaScript client library for time stretching then?

Looking for a way to slow down the audio that preserves the pitch and sounds good.

FYI:

  • playbackRate on HTMLAudioElement works, but the quality is poor.
  • .playbackRate.value on AudioContext (Web Audio API) affects the pitch (so slow = sounds like some kind of monster)
  • SoundTouchJS… still evaluating, but the demo breaks (need to reload it when updating a parameter) and sounds bad for values under 0.8.

fabswt avatar Apr 17 '23 13:04 fabswt

+1 for this feature

idanstark42 avatar Apr 18 '23 07:04 idanstark42