/* Copyright (C) 2017 Paul Brossier This file is part of aubio. aubio is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. aubio is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with aubio. If not, see . */ /** \file Constant-Q Transform TODO add long description \example spectral/test-constantq.c */ #ifndef AUBIO_CONSTANTQ_H #define AUBIO_CONSTANTQ_H #ifdef __cplusplus extern "C" { #endif /** Constant-Q transofmr object This object computes the forward Constant-Q transform. */ typedef struct _aubio_constantq_t aubio_constantq_t; /** create new constant-Q computation object \param size length of the Constant-Q \param samplerate sampling rate of the input signal \param bins_per_octave number of bins per octave */ aubio_constantq_t * new_aubio_constantq(uint_t size, uint_t samplerate, uint_t bins_per_octave); /** compute constant-Q \param s constant-Q object as returned by new_aubio_constantq \param input input fft grain \param cqt_output transformed input array */ void aubio_constantq_do (aubio_constantq_t *s, const cvec_t * input, fvec_t * cqt_output); /** delete constant-q object \param s constant-q object as returned by new_aubio_constantq */ void del_aubio_constantq (aubio_constantq_t *s); /** get number of output bins of a constant-q object \param s constant-q object as returned by new_aubio_constantq \return number of output bins */ uint_t aubio_constantq_get_numbins (aubio_constantq_t *s); #ifdef __cplusplus } #endif #endif /* AUBIO_CONSTANTQ_H */