MTG / essentia

C++ library for audio and music analysis, description and synthesis, including Python bindings
http://essentia.upf.edu
GNU Affero General Public License v3.0
2.83k stars 530 forks source link

ConstantQ Transform? #136

Closed constd closed 5 years ago

constd commented 10 years ago

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 commented 10 years ago

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 commented 10 years ago

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

nkundiushuti commented 9 years ago

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 commented 8 years ago

C++ implementation in QM DSP Library

dbogdanov commented 8 years ago

Implemented in the latest master.

dbogdanov commented 8 years ago

We are in the process of testing our current implementation.

Alternative implementations: https://github.com/librosa/librosa/blob/master/librosa/core/constantq.py http://librosa.github.io/librosa/generated/librosa.core.cqt.html http://librosa.github.io/librosa/_modules/librosa/core/constantq.html#cqt

jordipons commented 7 years ago

Summary of the most relevant CQT implementations:

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 commented 7 years ago

@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 commented 7 years ago

Great I will start reading them!

dbogdanov commented 7 years ago

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

palonso commented 7 years ago

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 commented 7 years ago

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

constd commented 5 years ago

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!

mauriciovmc commented 5 years ago

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 commented 5 years ago

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

sevagh commented 3 years ago

@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.