I'm trying to use the aubio(https://aubio.org) library for pitch detection. I'm trying to use the API for C and one of the parameters of the new_aubio_pitch
function is hop_size
. What does hop_size
mean and how do you choose one?
Asked
Active
Viewed 6,758 times
7

sher222
- 135
- 1
- 8
-
First result from [Google search](https://www.dsprelated.com/freebooks/sasp/Choice_Hop_Size.html) – Antti Haapala -- Слава Україні Jul 11 '18 at 03:31
-
1I.e. `hop_size` tells how many samples it can jump forward after one frame of FFT analysis. 1 is the best, any larger is a trade-off between quality and speed. – Antti Haapala -- Слава Україні Jul 11 '18 at 03:37
1 Answers
8
Hop size should refer to the number of samples in between successive frames. For signal analysis Hop Size should be less than the frame size, so that frames overlap.
In the diagram below
- Hop size would be
Q
- frame size would be
K
- all in relation to a signal
s(n)
If your follow up question is 'why would you do that?', then there is a good answer to be found at this topic here:
https://dsp.stackexchange.com/questions/36509/why-is-each-window-frame-overlapping

fdcpp
- 1,677
- 1
- 14
- 25