Changeset 4ef9a9b


Ignore:
Timestamp:
Oct 25, 2009, 9:03:00 PM (11 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/constantq, feature/pitchshift, feature/pydocstrings, feature/timestretch, master, pitchshift, sampler, timestretch, yinfft+
Children:
29808b1
Parents:
62b8ab2
Message:

src/aubio.h: improve documentation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/aubio.h

    r62b8ab2 r4ef9a9b  
    2020
    2121/** \mainpage
    22  *
    23  * \section whatis Introduction
    24  *
    25  *  aubio is a library for audio labelling: it provides functions for pitch
    26  *  estimation, onset detection, beat tracking, and other annotation tasks.
    27  *
    28  *  \verbinclude README
    29  *
    30  * \section bugs bugs and todo
    31  *
    32  *  This software is under development. It needs debugging and
    33  *  optimisations.
    34  *
    35  *  See <a href='bug.html'>bugs</a> and <a href='todo.html'>todo</a> lists.
    36  *
     22 
     23  \section introduction Introduction
     24 
     25  aubio is a library to extract annotations from audio signals: it provides a
     26  set of functions that take an input audio signal, and output pitch estimates,
     27  attack times (onset), beat location estimates, and other annotation tasks.
     28 
     29  \section basics Basics
     30 
     31  All object structures in aubio share the same function prefixes and suffixes:
     32 
     33    - \p new_aubio_foo creates the object \p foo
     34    - \p aubio_foo_do executes the object \p foo
     35    - \p del_aubio_foo destroys the object \p foo
     36
     37  All memory allocation and deallocation take place in the \p new_ and \p del_
     38  functions. Optionally, more than one \p _do methods are available.
     39  Additional parameters can be adjusted and observed using:
     40 
     41    - \p aubio_foo_get_param, getter function, gets the value of a parameter
     42    - \p aubio_foo_set_param, setter function, changes the value of a parameter
     43
     44  Unless specified in its documentation, no memory operations take place in the
     45  getter functions. However, memory resizing can take place in setter
     46  functions.
     47
     48  \subsection vectors Vectors
     49
     50  Two basic structures are being used in aubio: ::fvec_t and ::cvec_t. The
     51  ::fvec_t structures are used to store vectors of floating pointer number,
     52  optionally on several channels. ::cvec_t are used to store complex number,
     53  as two vectors of norm and phase elements, also on several channels.
     54 
     55  Additionally, the ::lvec_t structure can be used to store floating point
     56  numbers in double precision. They are mostly used to store filter
     57  coefficients, to avoid instability.
     58 
     59  \subsection objects Available objects
     60
     61  Here is a list of some of the most common objects for aubio:
     62
     63  \code
     64
     65  // fast Fourier transform (FFT)
     66  aubio_fft_t *fft = new_aubio_fft (winsize, channels);
     67  // phase vocoder
     68  aubio_pvoc_t *pv = new_aubio_pvoc (winsize, stepsize, channels);
     69  // onset detection
     70  aubio_onset_t *onset = new_aubio_onset (method, winsize, stepsize, channels, samplerate);
     71  // pitch detection
     72  aubio_pitch_t *pitch = new_aubio_pitch (method, winsize, stepsize, channels, samplerate);
     73  // beat tracking
     74  aubio_tempo_t *tempo = new_aubio_tempo (method, winsize, stepsize, channels, samplerate);
     75
     76  \endcode
     77
     78  See the <a href="globals_type.html">list of typedefs</a> for a complete list.
     79
     80  \subsection example Example
     81
     82  Here is a simple example that creates an A-Weighting filter and applies it to a
     83  vector.
     84 
     85  \code
     86
     87  // set channels, window size, and sampling rate
     88  uint_t channels = 2, winsize = 1024, samplerate = 44100;
     89  // create a vector
     90  fvec_t *this_buffer = new_fvec (winsize, channels);
     91  // create the a-weighting filter
     92  aubio_filter_t *this_filter = new_aubio_filter_weighting (channels, samplerate);
     93 
     94  while (running) {
     95    // here some code to pass some data in fvec_t in ...
     96    // apply the filter, in place
     97    aubio_filter_do (this_filter, this_buffer);
     98    // here some code to used the filtered buffer
     99  }
     100 
     101  // and free the structures
     102  del_aubio_filter (this_filter);
     103  del_fvec (this_buffer);
     104
     105  \endcode
     106
     107  Several examples of C programs are available in the \p examples/ and \p tests/src
     108  directory of the source tree.
     109
     110  \subsection unstable_api Unstable API
     111
     112  Several more functions are available and used within aubio, but not
     113  documented here, either because they are not considered useful to the user,
     114  or because they may need to be changed in the future. However, they can still
     115  be used by defining AUBIO_UNSTABLE to 1 before including the aubio header:
     116
     117  \code
     118  #define AUBIO_UNSTABLE 1
     119  #include <aubio/aubio.h>
     120  \endcode
     121
     122  Future versions of aubio could break API compatibility with these functions
     123  without warning. If you choose to use functions in AUBIO_UNSTABLE, you are on
     124  your own.
     125
     126  \section download Download
     127 
     128  Latest versions, further documentation, examples, wiki, and mailing lists can
     129  be found at http://aubio.org .
     130 
    37131 */
    38132
     
    40134#define AUBIO_H
    41135
    42 /**
    43  * Global aubio include file.
    44  * Programmers just need to include this file as:
    45  *
    46  * @code
    47  *   #include <aubio/aubio.h>
    48  * @endcode
    49  *
    50  * @file aubio.h
     136/** @file aubio.h Global aubio include file.
     137
     138  Programmers just need to include this file as:
     139 
     140  @code
     141    #include <aubio/aubio.h>
     142  @endcode
     143 
    51144 */
    52145
Note: See TracChangeset for help on using the changeset viewer.