What is the function of buffer size and hop size in aubio library for python?

479 Views Asked by At

I'm working with the aubio library for sound analysis. Basically to detect onset of beats. aubio.onset() takes 4 arguments, 2 of which are buffer size and hop size. I'm trying to figure how changing these 2 values affects my onset detection.

-B, --bufsize win  The size of the buffer to analyze, that is the length
  of the window used for spectral and temporal computations. Defaults to 512.

-H, --hopsize hop  The number of samples between two consecutive analysis.
  Defaults to 256.

The 2 definitions that I found after doing some online search (https://aubio.org/manual/latest/cli.html#aubioonset) are mentioned above.

From my understanding increasing buffer will require more processing time and increase latency. However is there anything else that buffer size will affect.

Also I did not get what the hop size is, in the above definition what do they mean when they say no of audio samples between 2 consecutive analysis. What is the analysis they are performing and what do they do with the audio samples. How will changing the hop size affect my onset detection

0

There are 0 best solutions below