Skip to content

Instantly share code, notes, and snippets.

@mikusp
mikusp / cq.c
Created January 9, 2014 15:26
Constant Q transform implemented in C using FFTW and custom build of CXSparse from SuiteSparse. Based on a MATLAB implementation presented in http://doc.ml.tu-berlin.de/bbci/material/publications/Bla_constQ.pdf .
#include <stdlib.h>
#include <math.h>
#include <complex.h>
#include "../../cxsparse/Include/cs.h"
#include <fftw3.h>
float* cq_hanning_window(int length) {
float* result = fftwf_alloc_real(length);