src/tempo/beattracking.h: improve documentation
[aubio.git] / src / tempo / beattracking.h
index 0cc8301..06d4196 100644 (file)
@@ -1,20 +1,21 @@
 /*
-  Copyright (C) 2003 Matthew Davies and Paul Brossier
+  Copyright (C) 2003-2009 Matthew Davies and Paul Brossier <piem@aubio.org>
 
-  This program is free software; you can redistribute it and/or modify
+  This file is part of aubio.
+
+  aubio is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
-  the Free Software Foundation; either version 2 of the License, or
+  the Free Software Foundation, either version 3 of the License, or
   (at your option) any later version.
 
-  This program is distributed in the hope that it will be useful,
+  aubio is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.
 
   You should have received a copy of the GNU General Public License
-  along with this program; if not, write to the Free Software
-  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-         
+  along with aubio.  If not, see <http://www.gnu.org/licenses/>.
+
 */
 
 /** \file
@@ -31,6 +32,8 @@
   Matthew E. P. Davies, Paul Brossier, and Mark D. Plumbley. Beat tracking
   towards automatic musical accompaniment. In Proceedings of the Audio
   Engeeniring Society 118th Convention, Barcelona, Spain, May 2005.
+
+  \example tempo/test-beattracking.c
   
 */
 #ifndef BEATTRACKING_H
@@ -45,11 +48,14 @@ typedef struct _aubio_beattracking_t aubio_beattracking_t;
 
 /** create beat tracking object
 
-  \param winlen: frame size [512] 
-  \param channels number (not functionnal) [1]
+  \param winlen length of the onset detection window
+  \param hop_size number of onset detection samples [512] 
+  \param samplerate samplerate of the input signal
 
 */
-aubio_beattracking_t * new_aubio_beattracking(uint_t winlen, uint_t channels);
+aubio_beattracking_t * new_aubio_beattracking(uint_t winlen, uint_t hop_size,
+    uint_t samplerate);
+
 /** track the beat 
 
   \param bt beat tracking object
@@ -58,7 +64,9 @@ aubio_beattracking_t * new_aubio_beattracking(uint_t winlen, uint_t channels);
   \param out stored detected beat locations 
 
 */
-void aubio_beattracking_do(aubio_beattracking_t * bt, fvec_t * dfframes, fvec_t * out);
+void aubio_beattracking_do (aubio_beattracking_t * bt, fvec_t * dfframes,
+    fvec_t * out);
+
 /** get current tempo in bpm
 
   \param bt beat tracking object
@@ -68,6 +76,7 @@ void aubio_beattracking_do(aubio_beattracking_t * bt, fvec_t * dfframes, fvec_t
 
 */
 smpl_t aubio_beattracking_get_bpm(aubio_beattracking_t * bt);
+
 /** get current tempo confidence 
 
   \param bt beat tracking object
@@ -77,6 +86,7 @@ smpl_t aubio_beattracking_get_bpm(aubio_beattracking_t * bt);
 
 */
 smpl_t aubio_beattracking_get_confidence(aubio_beattracking_t * bt);
+
 /** delete beat tracking object
 
   \param p beat tracking object