source: src/onset/onsetdetection.h @ e460e60

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

src/onset: use a string to set onset mode, keeping onset types enum private, update everywhere onsets are used

  • Property mode set to 100644
File size: 2.2 KB
RevLine 
[96fb8ad]1/*
2         Copyright (C) 2003 Paul Brossier
3
4         This program is free software; you can redistribute it and/or modify
5         it under the terms of the GNU General Public License as published by
6         the Free Software Foundation; either version 2 of the License, or
7         (at your option) any later version.
8
9         This program is distributed in the hope that it will be useful,
10         but WITHOUT ANY WARRANTY; without even the implied warranty of
11         MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12         GNU General Public License for more details.
13
14         You should have received a copy of the GNU General Public License
15         along with this program; if not, write to the Free Software
16         Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17         
18*/
19
[6ebcb08]20/** \file
21 
22  Onset detection functions
23 
24  All of the following onset detection function take as arguments the FFT of a
25  windowed signal (as created with aubio_pvoc). They output one smpl_t per
26  buffer and per channel (stored in a vector of size [channels]x[1]).
27 
28  These functions were first adapted from Juan Pablo Bello's code, and now
29  include further improvements and modifications made within aubio.
30
31*/
[96fb8ad]32
33
34#ifndef ONSETDETECTION_H
35#define ONSETDETECTION_H
36
37#ifdef __cplusplus
38extern "C" {
39#endif
40
41/** onsetdetection structure */
42typedef struct _aubio_onsetdetection_t aubio_onsetdetection_t;
[6ebcb08]43/** execute onset detection function on a spectral frame
44
45  Generic function to compute onset detection.
46 
[bd24069]47  \param o onset detection object as returned by new_aubio_onsetdetection()
[6ebcb08]48  \param fftgrain input signal spectrum as computed by aubio_pvoc_do
49  \param onset output vector (one sample long, to send to the peak picking)
50
51*/
[01b8fcc]52void aubio_onsetdetection_do (aubio_onsetdetection_t *o, cvec_t * fftgrain, fvec_t * onset);
[6ebcb08]53/** creation of an onset detection object
54
55  \param type onset detection mode
56  \param size length of the input spectrum frame
57  \param channels number of input channels
58
59*/
[b4f5967]60aubio_onsetdetection_t * new_aubio_onsetdetection(char_t * onset_mode, uint_t buf_size, uint_t channels);
[6ebcb08]61/** deletion of an onset detection object
62
[bd24069]63  \param o onset detection object as returned by new_aubio_onsetdetection()
[6ebcb08]64
65*/
[e9d8cfe]66void del_aubio_onsetdetection(aubio_onsetdetection_t *o);
67
[96fb8ad]68#ifdef __cplusplus
69}
70#endif
71
72#endif /* ONSETDETECTION_H */
Note: See TracBrowser for help on using the repository browser.