Skip to content
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

CQT doesn't work on waveforms on short chunks like 0.5s #109

Open
kkp15 opened this issue Nov 25, 2021 · 2 comments
Open

CQT doesn't work on waveforms on short chunks like 0.5s #109

kkp15 opened this issue Nov 25, 2021 · 2 comments
Assignees
Labels
question Further information is requested

Comments

@kkp15
Copy link

kkp15 commented Nov 25, 2021

CQT doesn't work on waveforms on short chunks.
Is this something expected?

@KinWaiCheuk
Copy link
Owner

May I know if you are using CQT1992? It is an expected behavior especially when you include low-frequency bins. Because for CQT, in order to maintain a constant Q (the same number of wavenumbers), the kernels for low frequencies will be much longer than the kernels for high frequencies. When the kernel for the lowest frequency bin is longer than your waveform, you will get this error.

There are two solutions
(1): exclude low-frequency bins by setting fmin>=220. But this might not be a good solution if you need the low-frequency information
(2): Use CQT2010 instead of CQT1992. CQT2010 uses the downsampling method to prevent the above problem from happening. But it might introduce some artifacts to your input signal.

@KinWaiCheuk KinWaiCheuk self-assigned this Nov 25, 2021
@KinWaiCheuk KinWaiCheuk added the question Further information is requested label Nov 25, 2021
@kkp15
Copy link
Author

kkp15 commented Nov 29, 2021

Thank you for your answer.
I'm using CQT1992v2 right now.
Is there any way I can calculate the minimum length based on the CQT hyperparameters?
Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants