andrew@0: /* andrew@0: Copyright (C) 2003 Matthew Davies and Paul Brossier andrew@0: andrew@0: This program is free software; you can redistribute it and/or modify andrew@0: it under the terms of the GNU General Public License as published by andrew@0: the Free Software Foundation; either version 2 of the License, or andrew@0: (at your option) any later version. andrew@0: andrew@0: This program is distributed in the hope that it will be useful, andrew@0: but WITHOUT ANY WARRANTY; without even the implied warranty of andrew@0: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the andrew@0: GNU General Public License for more details. andrew@0: andrew@0: You should have received a copy of the GNU General Public License andrew@0: along with this program; if not, write to the Free Software andrew@0: Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. andrew@0: andrew@0: */ andrew@0: andrew@0: /** \file andrew@0: andrew@0: Beat tracking using a context dependant model andrew@0: andrew@0: This file implement the causal beat tracking algorithm designed by Matthew andrew@0: Davies and described in the following articles: andrew@0: andrew@0: Matthew E. P. Davies and Mark D. Plumbley. Causal tempo tracking of audio. andrew@0: In Proceedings of the International Symposium on Music Information Retrieval andrew@0: (ISMIR), pages 164­169, Barcelona, Spain, 2004. andrew@0: andrew@0: Matthew E. P. Davies, Paul Brossier, and Mark D. Plumbley. Beat tracking andrew@0: towards automatic musical accompaniment. In Proceedings of the Audio andrew@0: Engeeniring Society 118th Convention, Barcelona, Spain, May 2005. andrew@0: andrew@0: */ andrew@0: #ifndef BEATTRACKING_H andrew@0: #define BEATTRACKING_H andrew@0: andrew@0: #ifdef __cplusplus andrew@0: extern "C" { andrew@0: #endif andrew@0: andrew@0: /** beat tracking object */ andrew@0: typedef struct _aubio_beattracking_t aubio_beattracking_t; andrew@0: andrew@0: /** create beat tracking object andrew@0: andrew@0: \param winlen: frame size [512] andrew@0: \param channels number (not functionnal) [1] andrew@0: andrew@0: */ andrew@0: aubio_beattracking_t * new_aubio_beattracking(ba_uint_t winlen, ba_uint_t channels); andrew@0: /** track the beat andrew@0: andrew@0: \param bt beat tracking object andrew@0: \param dfframes current input detection function frame, smoothed by andrew@0: adaptive median threshold. andrew@0: \param out stored detected beat locations andrew@0: andrew@0: */ andrew@0: void aubio_beattracking_do(aubio_beattracking_t * bt, fvec_t * dfframes, fvec_t * out); andrew@0: /** delete beat tracking object andrew@0: andrew@0: \param p beat tracking object andrew@0: andrew@0: */ andrew@0: void del_aubio_beattracking(aubio_beattracking_t * p); andrew@0: andrew@0: #ifdef __cplusplus andrew@0: } andrew@0: #endif andrew@0: andrew@0: #endif /* BEATTRACKING_H */