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

What is the most optimized way to dynamically loop between two timestamps of an audio track ?

Open Achuttarsing opened this issue 2 years ago • 0 comments

Documentation Is:

  • [X] Missing
  • [ ] Confusing
  • [ ] Incorrect
  • [ ] Other

Describe Issue

Hello team! First, congratulations on your amazing work! I'm new to Howler, and I'm wondering what is the best way to dynamically loop between two timestamps of an audio track.

Let me explain:

  • I have one track (a Howler sound object).
  • I can play/pause the track.
  • When the track is playing, I display its current position.
  • When I want to create a loop between random [start, end] timestamps, I modify the original sound object by adding a sprite called 'loop' and start playing it while pausing the original track.

However, I am not satisfied with the result because there is an abrupt transition from the timestamp of the entire track to the sprite. I would like to be able to define a range [start, end] where the main track would loop if it falls within that interval (like when you set a loop in any DAW). How can I achieve this?

Thank you for your help!

Suggested Improvement

Adding a simple example to the documentation

Achuttarsing avatar Jun 13 '23 12:06 Achuttarsing