alemangui / pizzicato

Library to simplify the way you create and manipulate sounds with the Web Audio API.
https://alemangui.github.io/pizzicato/
MIT License
1.67k stars 131 forks source link

Gap between loops #111

Open FrancoisDupuis opened 5 years ago

FrancoisDupuis commented 5 years ago

There is a little gap between loops from file source. Is there a way to remove it ? I set attack and release to 0 but nothing change. Edit: Seems to be with mp3 only. There is a buffer and so there is a gap. So still trying to have a gapless loop with mp3.

sebastianwinter commented 5 years ago

I'm having the same issue! When using the same Sample in WAV everything's fine but that's not an option because of file size.

FrancoisDupuis commented 5 years ago

I ve find that with mp3 files, there is a buffer (due to web browser) which cause that gap. No solution finded now. I use ToneJS to do it with same issue but with a hack, i can loop without gap.

ghost commented 4 years ago

I think it is due to compression. When compressed, there's a short fadeIn/fadeOut by default on an mp3 file. That's why they use instead .ogg or .wav in videogames to loop over short slices of samples.