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

ConstantQ Transform? #136

Closed
constd opened this issue Sep 1, 2014 · 16 comments
Closed

ConstantQ Transform? #136

constd opened this issue Sep 1, 2014 · 16 comments
Assignees
Milestone

Comments

@constd
Copy link

constd commented Sep 1, 2014

My search in the algorithm reference documentation
and a quick search of the repository proved fruitless.
Is there an implementation of it (e.g. like this) available in Essentia?

@dbogdanov
Copy link
Member

We do not have this transform, although it could be nice to have it if we see benefits of using it instead of FFT for descriptor computation.

@dbogdanov dbogdanov added this to the icebox milestone Sep 1, 2014
@dbogdanov
Copy link
Member

dbogdanov commented Sep 8, 2014

Approach by Schörkhuber and Klapuri 2010:
https://code.soundsoftware.ac.uk/projects/constant-q-cpp

@nkundiushuti
Copy link

This is an invertible constant q based on gabor frames, implemented in python and matlab:
https://github.com/alexbw/nsgt
http://www.univie.ac.at/nonstatgab/cqt/

@dbogdanov
Copy link
Member

C++ implementation in QM DSP Library

@dbogdanov
Copy link
Member

Implemented in the latest master.

@dbogdanov
Copy link
Member

@dbogdanov dbogdanov reopened this Sep 28, 2016
@dbogdanov dbogdanov modified the milestones: future, icebox Oct 3, 2016
@jordipons
Copy link

Summary of the most relevant CQT implementations:

  • Brown, 1991, first proposed CQT with a naive very slow implementation.
  • Brown and Puckette, 1992: implemented a faster CQT based on a sparse representation in the frequency domain. This is the current Essentia implementation!
  • Schörkhuber and Klapuri, 2010: a faster CQT based on the same principles as Brown and Puckette, 1992. For first time, it is introduced an algorithm for an approximated reconstruction of the CQT coefficients. Code: http://www.iem.at/~schoerkhuber/cqt2010/
  • Velasco, Holighaus, Dörfler and Grill, 2011: they approach the problem differently - by means of a nonstationary Gabor transform. This allows perfect reconstruction for first time while the transform is still computationally efficient (faster than Schörkhuber and Klapuri, 2010). However, it does not allow real-time implementations and phases are not accurate. Code: http://www.univie.ac.at/nonstatgab/toolbox.php
  • Holighaus, Dörfler, Velasco and Grill, 2012: Based on the Velasco, Holighaus, Dörfler and Grill, 2011 - allowing perfect reconstruction. They propose sliCQT (slicing by using an overlapping window) to allow real-time computations. Code: http://www.univie.ac.at/nonstatgab/toolbox.php
  • Schörkhuber, Klapuri, Holighaus and Dörfler, 2014: Based on the Velasco, Holighaus, Dörfler and Grill, 2011 - allowing perfect reconstruction. They solve the problem with phases by means of a frequency mapping and they also propose a Variable-Q transform (that allows ie. ERBlets). Code: http://www.cs.tut.fi/sgn/arg/CQT/

Schörkhuber, Klapuri, Holighaus and Dörfler, 2014, a nonstationary Gabor transform, allows perfect reconstruction while the phases are still accurate. It might be interesting to implement this in Essentia.

@dbogdanov
Copy link
Member

@pabloEntropia we have to select among the last two approaches (Holighaus 2012 and Schörkhuber 2014) or their combination. You can read these papers meanwhile.

@palonso
Copy link
Contributor

palonso commented Jan 17, 2017

Great I will start reading them!

@dbogdanov
Copy link
Member

@pabloEntropia what's your feedback on these two papers?

@palonso
Copy link
Contributor

palonso commented Jan 30, 2017

Both papers are based on CQ-NSGT (Velasco, Holighaus, Dörfler and Grill, 2011). Holighaus, Dörfler, Velasco and Grill, 2012 just shows how to use the CQ-NSGT frame-wise (sliCQ).
I think that the interesting algorithm to implement is Schörkhuber, Klapuri, Holighaus and Dörfler, 2014, for the reasons exposed by @jordipons
After doing this, we should decide if we create a second algorithm relaying on our CQ-NSGT implementation, Windowing and FrameGenerator to achieve the sliCQ frame-wise behavior or just create a python example script explaining it.

@asapsmc
Copy link

asapsmc commented Aug 24, 2017

Hi!
Any plans for the Invertible-CQT?
Thanks.

@constd
Copy link
Author

constd commented Feb 21, 2019

just saw this: https://mtg.github.io/essentia-labs/news/2019/02/07/invertible-constant-q/
which is awesome! Thank you for taking the time to implement the an invertible CQT!

@constd constd closed this as completed Feb 21, 2019
@mauriciovmc
Copy link

Hello!

Planning to use the variable-Q transform here with Python routines. Is there an implementation for Python of it available? Otherwise, I'll just use the Matlab version instead...

Thanks :)

@palonso
Copy link
Contributor

palonso commented May 27, 2019

In the aforementioned post we show how to use our Constant-Q C++ implementation with Python wrappers in just a few lines:)

@sevagh
Copy link

sevagh commented Sep 17, 2021

@palonso

Thanks for this work - can you confirm that the "Schörkhuber 2014" (i.e. the "best" CQ-NSGT with phase) is the implementation in the code? Also, did you have a chance to implement the time-aligned coefficients/matrix form (namely the rasterization/interpolation as described by the paper?)

In the code it looks like this is true:

However in the associated feature release/blog post (https://mtg.github.io/essentia-labs/news/2019/02/07/invertible-constant-q/), the Schörkhuber 2014 paper is not mentioned in the references.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants