[9f060d1] | 1 | /* |
---|
| 2 | Copyright (C) 2003-2015 Paul Brossier <piem@aubio.org> |
---|
| 3 | |
---|
| 4 | This file is part of aubio. |
---|
| 5 | |
---|
| 6 | aubio is free software: you can redistribute it and/or modify |
---|
| 7 | it under the terms of the GNU General Public License as published by |
---|
| 8 | the Free Software Foundation, either version 3 of the License, or |
---|
| 9 | (at your option) any later version. |
---|
| 10 | |
---|
| 11 | aubio is distributed in the hope that it will be useful, |
---|
| 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
| 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
| 14 | GNU General Public License for more details. |
---|
| 15 | |
---|
| 16 | You should have received a copy of the GNU General Public License |
---|
| 17 | along with aubio. If not, see <http://www.gnu.org/licenses/>. |
---|
| 18 | |
---|
| 19 | */ |
---|
| 20 | |
---|
| 21 | /** \file |
---|
| 22 | |
---|
| 23 | Spectral adaptive whitening |
---|
| 24 | |
---|
| 25 | References: |
---|
| 26 | |
---|
| 27 | D. Stowell and M. D. Plumbley. Adaptive whitening for improved real-time |
---|
| 28 | audio onset detection. In Proceedings of the International Computer Music |
---|
| 29 | Conference (ICMC), 2007, Copenhagen, Denmark. |
---|
| 30 | |
---|
| 31 | http://www.eecs.qmul.ac.uk/~markp/2007/StowellPlumbley07-icmc.pdf |
---|
| 32 | |
---|
| 33 | S. Böck,, F. Krebs, and M. Schedl. Evaluating the Online Capabilities of |
---|
| 34 | Onset Detection Methods. In Proceedings of the 13th International Society for |
---|
| 35 | Music Information Retrieval Conference (ISMIR), 2012, Porto, Portugal. |
---|
| 36 | |
---|
| 37 | http://ismir2012.ismir.net/event/papers/049_ISMIR_2012.pdf |
---|
| 38 | http://www.cp.jku.at/research/papers/Boeck_etal_ISMIR_2012.pdf |
---|
| 39 | |
---|
| 40 | */ |
---|
| 41 | |
---|
| 42 | |
---|
| 43 | #ifndef _AUBIO_SPECTRAL_WHITENING_H |
---|
| 44 | #define _AUBIO_SPECTRAL_WHITENING_H |
---|
| 45 | |
---|
| 46 | #ifdef __cplusplus |
---|
| 47 | extern "C" { |
---|
| 48 | #endif |
---|
| 49 | |
---|
| 50 | /** spectral whitening structure */ |
---|
| 51 | typedef struct _aubio_spectral_whitening_t aubio_spectral_whitening_t; |
---|
| 52 | |
---|
| 53 | /** execute spectral adaptive whitening, in-place |
---|
| 54 | |
---|
| 55 | \param o spectral whitening object as returned by new_aubio_spectral_whitening() |
---|
| 56 | \param fftgrain input signal spectrum as computed by aubio_pvoc_do() or aubio_fft_do() |
---|
| 57 | |
---|
| 58 | */ |
---|
| 59 | void aubio_spectral_whitening_do (aubio_spectral_whitening_t * o, |
---|
| 60 | cvec_t * fftgrain); |
---|
| 61 | |
---|
| 62 | /** creation of a spectral whitening object |
---|
| 63 | |
---|
| 64 | \param win_size length of the input spectrum frame |
---|
| 65 | |
---|
| 66 | */ |
---|
| 67 | aubio_spectral_whitening_t *new_aubio_spectral_whitening (uint_t buf_size, |
---|
| 68 | uint_t hop_size, |
---|
| 69 | uint_t samplerate); |
---|
| 70 | |
---|
| 71 | /** reset spectral whitening object |
---|
| 72 | |
---|
| 73 | \param o spectral whitening object as returned by new_aubio_spectral_whitening() |
---|
| 74 | |
---|
| 75 | */ |
---|
| 76 | void aubio_spectral_whitening_reset (aubio_spectral_whitening_t * o); |
---|
| 77 | |
---|
| 78 | /** set relaxation time for spectral whitening |
---|
| 79 | |
---|
| 80 | \param o spectral whitening object as returned by new_aubio_spectral_whitening() |
---|
| 81 | \param relax_time relaxation time in seconds |
---|
| 82 | |
---|
| 83 | */ |
---|
| 84 | void aubio_spectral_whitening_set_relax_time (aubio_spectral_whitening_t * o, |
---|
| 85 | smpl_t relax_time); |
---|
| 86 | |
---|
| 87 | /** get relaxation time of spectral whitening |
---|
| 88 | |
---|
| 89 | \param o spectral whitening object as returned by new_aubio_spectral_whitening() |
---|
| 90 | \return relaxation time in seconds |
---|
| 91 | |
---|
| 92 | */ |
---|
| 93 | smpl_t aubio_spectral_whitening_get_relax_time (aubio_spectral_whitening_t * o); |
---|
| 94 | |
---|
| 95 | /** deletion of a spectral whitening |
---|
| 96 | |
---|
| 97 | \param o spectral whitening object as returned by new_aubio_spectral_whitening() |
---|
| 98 | |
---|
| 99 | */ |
---|
| 100 | void del_aubio_spectral_whitening (aubio_spectral_whitening_t * o); |
---|
| 101 | |
---|
| 102 | #ifdef __cplusplus |
---|
| 103 | } |
---|
| 104 | #endif |
---|
| 105 | |
---|
| 106 | #endif /* _AUBIO_SPECTRAL_WHITENING_H */ |
---|