andrew@0
|
1 /*
|
andrew@0
|
2 Copyright (C) 2006 Paul Brossier
|
andrew@0
|
3
|
andrew@0
|
4 This program is free software; you can redistribute it and/or modify
|
andrew@0
|
5 it under the terms of the GNU General Public License as published by
|
andrew@0
|
6 the Free Software Foundation; either version 2 of the License, or
|
andrew@0
|
7 (at your option) any later version.
|
andrew@0
|
8
|
andrew@0
|
9 This program is distributed in the hope that it will be useful,
|
andrew@0
|
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
|
andrew@0
|
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
andrew@0
|
12 GNU General Public License for more details.
|
andrew@0
|
13
|
andrew@0
|
14 You should have received a copy of the GNU General Public License
|
andrew@0
|
15 along with this program; if not, write to the Free Software
|
andrew@0
|
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
andrew@0
|
17
|
andrew@0
|
18 */
|
andrew@0
|
19
|
andrew@0
|
20 /** \file
|
andrew@0
|
21
|
andrew@0
|
22 Tempo detection driver
|
andrew@0
|
23
|
andrew@0
|
24 This object stores all the memory required for tempo detection algorithm
|
andrew@0
|
25 and returns the estimated beat locations.
|
andrew@0
|
26
|
andrew@0
|
27 */
|
andrew@0
|
28
|
andrew@0
|
29 #ifndef TEMPO_H
|
andrew@0
|
30 #define TEMPO_H
|
andrew@0
|
31
|
andrew@0
|
32 #ifdef __cplusplus
|
andrew@0
|
33 extern "C" {
|
andrew@0
|
34 #endif
|
andrew@0
|
35
|
andrew@0
|
36 /** tempo detection structure */
|
andrew@0
|
37 typedef struct _aubio_tempo_t aubio_tempo_t;
|
andrew@0
|
38
|
andrew@0
|
39 /** create tempo detection object */
|
andrew@0
|
40 aubio_tempo_t * new_aubio_tempo (aubio_onsetdetection_type type_onset,
|
andrew@0
|
41 ba_uint_t buf_size, ba_uint_t hop_size, ba_uint_t channels);
|
andrew@0
|
42
|
andrew@0
|
43 /** execute tempo detection */
|
andrew@0
|
44 void aubio_tempo(aubio_tempo_t *o, fvec_t * input, fvec_t * tempo);
|
andrew@0
|
45
|
andrew@0
|
46 /** set tempo detection silence threshold */
|
andrew@0
|
47 void aubio_tempo_set_silence(aubio_tempo_t * o, smpl_t silence);
|
andrew@0
|
48
|
andrew@0
|
49 /** set tempo detection peak picking threshold */
|
andrew@0
|
50 void aubio_tempo_set_threshold(aubio_tempo_t * o, smpl_t threshold);
|
andrew@0
|
51
|
andrew@0
|
52 /** delete tempo detection object */
|
andrew@0
|
53 void del_aubio_tempo(aubio_tempo_t * o);
|
andrew@0
|
54
|
andrew@0
|
55 #ifdef __cplusplus
|
andrew@0
|
56 }
|
andrew@0
|
57 #endif
|
andrew@0
|
58
|
andrew@0
|
59 #endif /* TEMPO_H */
|