-
Notifications
You must be signed in to change notification settings - Fork 533
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PitchYin out of range #376
Comments
Right, we should be able to re-configure frame size on fly if given input of different size. |
so you should be able to remove the parameters right? it's a bit confusing because it gives you the impression that you can configure something when you actually don't. regarding the out of range and the tau what's the issue there? |
frameSize parameter should be optional. It can be used to optimize memory allocation, similarly how it is done in some other algorithms (for example, Spectrum). The idea is to avoid allocating memory for vectors in |
This is addressed in ff351e7 |
Indeed, |
- Check if this update works correctly - Regression unit test fails
Something to do with audio buffer, frame and hopsize?
|
The fix_pitchyin branch fixes this issue. It seems to work ok. Unit test is now failing though. We need to implement a better real case test. |
Hi,
the difference function in the compute method goes out of range, by looking at the code it seems it couldn't do otherwise, the difference function is based on the _yin vector which is resized as _frameSize/2+1, the '+1' is what cause the error.
If I understand correctly the frameSize is equal to the signal or at least in my case I always use a pcm buffer(is this the signal?) of 1024 samples so that's what I use to set signal and frameSize.
this check in PitchYin compute also suggest that:
throw EssentiaException("PitchYin: Unexpected frame size of the input signal frame: ", signal.size(), " instead of ", _frameSize);
pitchyin.cpp line 89
another note regarding the difference function is it seems to skip the first sample(tau=1), why does it do that?
I'm a bit confused about why this function as many other can take a parameter which is either overrided or not accepted, wouldn't make sense to don't expose the parameter in the configure and just use what ever is passed to the compute? In this case is the frameSize which must be equal to the signal size,
below is another example in PitchYinFFT
if ((int)spectrum.size() != _frameSize/2+1) {//_sqrMag.size()/2+1) {
Algorithm::configure( "frameSize", int(2*(spectrum.size()-1)) );
}
The text was updated successfully, but these errors were encountered: