question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

CQT compute downsampling from hop_length

See original GitHub issue

The CQT implementation will currently fail if the hop_length parameter is not an integer multiple of 2**k where k is the number of downsampling operations in the plan derived from fmin and the number of bins.

We should be able to invert that logic so that k is calculated by the number of trailing 0s in hop_length’s binary representation. That way, we can compute cqt at arbitrary hop lengths, and still get the efficiency gain wherever it’s possible, rather than failing.

This is a low-priority issue, but we should get around to it sooner or later.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
bmcfeecommented, Sep 20, 2021

Annoyingly, this will probably trigger another rewrite of icqt, which at present has a hard-wired assumption that the hop length is a multiple of 2^(n_octaves-1). On the plus side, this rewrite would automatically carry over to support vqt #1161, which should be easier now that the vqt implementation can be simplified a bit. I think we can deal with both issues in a single PR.

0reactions
cwitkowitzcommented, Oct 31, 2021

Hey @bmcfee. Sorry I’m late to this. It does seem that not scaling gamma would lead to the issues you mentioned. In your last example, what VQT parameters did you use?

Read more comments on GitHub >

github_iconTop Results From Across the Web

nnAudio.Spectrogram.CQT2010 — 0.1.5 - Kin Wai Cheuk
Everytime the input audio is downsampled, the CQT relative to the downsampled ... “An efficient algorithm for the calculation of a constant Q...
Read more >
How is sampling rate of audio related to hop length, filter ...
The purpose of downsampling is to lower the sampling rate; there's no other parameter that should change. If well time-stretched, pitch should ...
Read more >
Getting the window sizes on the Constant Q Transform
I am using the Constant Q Transform (CQT) from librosa for a project and I am trying to know the exact time interval...
Read more >
An overview of computing the CQT one octave at the time ...
Here G ( f ) is a lowpass filter and ↓ 2 denotes downsampling by factor two. ... However, the fast CQT computation...
Read more >
librosa.core.constantq — librosa 0.9.1 documentation
See `librosa.util.normalize`. sparsity : float in [0, 1) Sparsify the CQT ... compensate for downsampling fft_basis[:] *= np.sqrt(sr / my_sr) # Compute the ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found