qiuxiang / aubiojs

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

tempo.do() and onset.do() return a single value only instead of an array #18

Closed rewbs closed 1 year ago

rewbs commented 1 year ago

I believe that in the underlying Aubio implementation, tempo.do() and onset.do() return vectors containing all beat and onset event locations within the last processed buffer.

However, the methods exposed in JS return only a single value:

This means that with tempo, we can't get the estimated location of each beat, and with onset we can only get the last onset event.

rewbs commented 1 year ago

Actually, ignore that – I see now that the returned vector is actually of size 1 (as documented in https://aubio.org/doc/latest/onset_8h.html#a3329b2f251f75556a08bc56ae57cb5fa ).