qiuxiang / aubiojs

aubio for javascript, the real-time audio processing library
https://qiuxiang.github.io/aubiojs/
MIT License
134 stars 36 forks source link

Correct buffer size passed. #17

Closed novikov-alexander closed 1 year ago

novikov-alexander commented 1 year ago

It is not obvious but in aubio buffer_size is actually is window size and hop_size is a real size of the input buffer. There are justifications:

https://github.com/aubio/aubio/blob/master/examples/aubiopitch.c https://github.com/aubio/aubio/blob/master/examples/aubioonset.c

Please, check me carefully.

qiuxiang commented 1 year ago

thx! i will check it later

novikov-alexander commented 1 year ago

I double checked it. You can merge :-) You can also check here: https://github.com/aubio/aubio/blob/master/src/pitch/pitch.h There's said that input should be of hop_size

qiuxiang commented 1 year ago

you are right. i also checked

https://github.com/aubio/aubio/blob/master/tests/src/pitch/test-pitch.c#L7-L11