source: src/onset/onsetdetection.h @ e6a78ea

feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5pitchshiftsamplertimestretchyinfft+
Last change on this file since e6a78ea was e6a78ea, checked in by Paul Brossier <piem@piem.org>, 15 years ago

src: update all headers to GPLv3

  • Property mode set to 100644
File size: 2.2 KB
Line 
1/*
2  Copyright (C) 2003-2009 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  Onset detection functions
24 
25  All of the following onset detection function take as arguments the FFT of a
26  windowed signal (as created with aubio_pvoc). They output one smpl_t per
27  buffer and per channel (stored in a vector of size [channels]x[1]).
28 
29  These functions were first adapted from Juan Pablo Bello's code, and now
30  include further improvements and modifications made within aubio.
31
32*/
33
34
35#ifndef ONSETDETECTION_H
36#define ONSETDETECTION_H
37
38#ifdef __cplusplus
39extern "C" {
40#endif
41
42/** onsetdetection structure */
43typedef struct _aubio_onsetdetection_t aubio_onsetdetection_t;
44/** execute onset detection function on a spectral frame
45
46  Generic function to compute onset detection.
47 
48  \param o onset detection object as returned by new_aubio_onsetdetection()
49  \param fftgrain input signal spectrum as computed by aubio_pvoc_do
50  \param onset output vector (one sample long, to send to the peak picking)
51
52*/
53void aubio_onsetdetection_do (aubio_onsetdetection_t *o, cvec_t * fftgrain, fvec_t * onset);
54/** creation of an onset detection object
55
56  \param type onset detection mode
57  \param size length of the input spectrum frame
58  \param channels number of input channels
59
60*/
61aubio_onsetdetection_t * new_aubio_onsetdetection(char_t * onset_mode, uint_t buf_size, uint_t channels);
62/** deletion of an onset detection object
63
64  \param o onset detection object as returned by new_aubio_onsetdetection()
65
66*/
67void del_aubio_onsetdetection(aubio_onsetdetection_t *o);
68
69#ifdef __cplusplus
70}
71#endif
72
73#endif /* ONSETDETECTION_H */
Note: See TracBrowser for help on using the repository browser.