andrew@0
|
1 /*
|
andrew@0
|
2 Copyright (C) 2003 Matthew Davies and 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 Beat tracking using a context dependant model
|
andrew@0
|
23
|
andrew@0
|
24 This file implement the causal beat tracking algorithm designed by Matthew
|
andrew@0
|
25 Davies and described in the following articles:
|
andrew@0
|
26
|
andrew@0
|
27 Matthew E. P. Davies and Mark D. Plumbley. Causal tempo tracking of audio.
|
andrew@0
|
28 In Proceedings of the International Symposium on Music Information Retrieval
|
andrew@0
|
29 (ISMIR), pages 164169, Barcelona, Spain, 2004.
|
andrew@0
|
30
|
andrew@0
|
31 Matthew E. P. Davies, Paul Brossier, and Mark D. Plumbley. Beat tracking
|
andrew@0
|
32 towards automatic musical accompaniment. In Proceedings of the Audio
|
andrew@0
|
33 Engeeniring Society 118th Convention, Barcelona, Spain, May 2005.
|
andrew@0
|
34
|
andrew@0
|
35 */
|
andrew@0
|
36 #ifndef BEATTRACKING_H
|
andrew@0
|
37 #define BEATTRACKING_H
|
andrew@0
|
38
|
andrew@0
|
39 #ifdef __cplusplus
|
andrew@0
|
40 extern "C" {
|
andrew@0
|
41 #endif
|
andrew@0
|
42
|
andrew@0
|
43 /** beat tracking object */
|
andrew@0
|
44 typedef struct _aubio_beattracking_t aubio_beattracking_t;
|
andrew@0
|
45
|
andrew@0
|
46 /** create beat tracking object
|
andrew@0
|
47
|
andrew@0
|
48 \param winlen: frame size [512]
|
andrew@0
|
49 \param channels number (not functionnal) [1]
|
andrew@0
|
50
|
andrew@0
|
51 */
|
andrew@0
|
52 aubio_beattracking_t * new_aubio_beattracking(ba_uint_t winlen, ba_uint_t channels);
|
andrew@0
|
53 /** track the beat
|
andrew@0
|
54
|
andrew@0
|
55 \param bt beat tracking object
|
andrew@0
|
56 \param dfframes current input detection function frame, smoothed by
|
andrew@0
|
57 adaptive median threshold.
|
andrew@0
|
58 \param out stored detected beat locations
|
andrew@0
|
59
|
andrew@0
|
60 */
|
andrew@0
|
61 void aubio_beattracking_do(aubio_beattracking_t * bt, fvec_t * dfframes, fvec_t * out);
|
andrew@0
|
62 /** delete beat tracking object
|
andrew@0
|
63
|
andrew@0
|
64 \param p beat tracking object
|
andrew@0
|
65
|
andrew@0
|
66 */
|
andrew@0
|
67 void del_aubio_beattracking(aubio_beattracking_t * p);
|
andrew@0
|
68
|
andrew@0
|
69 #ifdef __cplusplus
|
andrew@0
|
70 }
|
andrew@0
|
71 #endif
|
andrew@0
|
72
|
andrew@0
|
73 #endif /* BEATTRACKING_H */
|