killercrush / music-tempo

Finding out tempo of the music
https://killercrush.github.io/music-tempo
MIT License
124 stars 16 forks source link

RangeError: Invalid string length #1

Closed kzkpro closed 7 years ago

kzkpro commented 7 years ago

Hi i'm getting following error for few tracks. re[_k] = hammWindow[_k] * audioData[i]; ^

RangeError: Invalid string length at Float32Array.join (native) at Float32Array.toString (native)

in **/music-tempo/dist/node/OnsetDetection.js:116:49

can you please let me know how to fix it? thanks!

killercrush commented 7 years ago

Hi @kzkpro, can you send the tracks that cause the error ??

kzkpro commented 7 years ago

@killercrush , here's track http://nepwebsolutions.com/drums.mp3 and thanks for quick reply!

killercrush commented 7 years ago

@kzkpro, I fixed the issue, but still, for this track you have to pass parameter expiryTime, because track contains periods of silence. Something like this: var mt = new MusicTempo(audioData, {expiryTime: 30});.

kzkpro commented 7 years ago

Thanks @killercrush