2 Copyright (C) 2003-2015 Paul Brossier <piem@aubio.org>
4 This file is part of aubio.
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.
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.
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/>.
23 Spectral adaptive whitening
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.
31 http://www.eecs.qmul.ac.uk/~markp/2007/StowellPlumbley07-icmc.pdf
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.
37 http://ismir2012.ismir.net/event/papers/049_ISMIR_2012.pdf
38 http://www.cp.jku.at/research/papers/Boeck_etal_ISMIR_2012.pdf
43 #ifndef _AUBIO_SPECTRAL_WHITENING_H
44 #define _AUBIO_SPECTRAL_WHITENING_H
50 /** spectral whitening structure */
51 typedef struct _aubio_spectral_whitening_t aubio_spectral_whitening_t;
53 /** execute spectral adaptive whitening, in-place
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()
59 void aubio_spectral_whitening_do (aubio_spectral_whitening_t * o,
62 /** creation of a spectral whitening object
64 \param buf_size window size of input grains
65 \param hop_size number of samples between two consecutive input grains
66 \param samplerate sampling rate of the input signal
69 aubio_spectral_whitening_t *new_aubio_spectral_whitening (uint_t buf_size,
73 /** reset spectral whitening object
75 \param o spectral whitening object as returned by new_aubio_spectral_whitening()
78 void aubio_spectral_whitening_reset (aubio_spectral_whitening_t * o);
80 /** set relaxation time for spectral whitening
82 \param o spectral whitening object as returned by new_aubio_spectral_whitening()
83 \param relax_time relaxation time in seconds between 20 and 500, defaults 250
86 uint_t aubio_spectral_whitening_set_relax_time (aubio_spectral_whitening_t * o,
89 /** get relaxation time of spectral whitening
91 \param o spectral whitening object as returned by new_aubio_spectral_whitening()
92 \return relaxation time in seconds
95 smpl_t aubio_spectral_whitening_get_relax_time (aubio_spectral_whitening_t * o);
97 /** set floor for spectral whitening
99 \param o spectral whitening object as returned by new_aubio_spectral_whitening()
100 \param floor value (typically between 1.e-6 and .2, defaults to 1.e-4)
103 uint_t aubio_spectral_whitening_set_floor (aubio_spectral_whitening_t * o,
106 /** get floor of spectral whitening
108 \param o spectral whitening object as returned by new_aubio_spectral_whitening()
112 smpl_t aubio_spectral_whitening_get_floor (aubio_spectral_whitening_t * o);
114 /** deletion of a spectral whitening
116 \param o spectral whitening object as returned by new_aubio_spectral_whitening()
119 void del_aubio_spectral_whitening (aubio_spectral_whitening_t * o);
125 #endif /* _AUBIO_SPECTRAL_WHITENING_H */