source:
doc/develop.rst
@
9681849
Last change on this file since 9681849 was 2d00e5c, checked in by , 8 years ago | |
---|---|
|
|
File size: 2.3 KB |
Developping with aubio
Read Contribute to report issues and request new features.
See Doxygen documentation for the complete documentation of the C library, built using Doxygen.
Below is a brief Library overview.
Library overview
Here is a brief overview of the C library. See also the Doxygen documentation for a more detailed list of available functions.
Vectors and matrix
fvec_t are used to hold vectors of float (smpl_t).
.. literalinclude:: ../tests/src/test-fvec.c :language: C :lines: 7
// set some elements vec->data[511] = 2.; vec->data[vec->length-2] = 1.;
Similarly, fmat_t are used to hold matrix of floats.
.. literalinclude:: ../tests/src/test-fmat.c :language: C :lines: 9-19
Reading a sound file
In this example, aubio_source is used to read a media file.
First, create the objects we need.
.. literalinclude:: ../tests/src/io/test-source.c :language: C :lines: 22-24, 30-32, 34
Note
With samplerate = 0, aubio_source will be created with the file's original samplerate.
Now for the processing loop:
.. literalinclude:: ../tests/src/io/test-source.c :language: C :lines: 40-44
At the end of the processing loop, clean-up and de-allocate memory:
.. literalinclude:: ../tests/src/io/test-source.c :language: C :lines: 50-56
See the complete example: :download:`test-source.c <../tests/src/io/test-source.c>`.
Computing the spectrum
Now let's create a phase vocoder:
.. literalinclude:: ../tests/src/spectral/test-phasevoc.c :language: C :lines: 6-11
The processing loop could now look like:
.. literalinclude:: ../tests/src/spectral/test-phasevoc.c :language: C :lines: 21-35
See the complete example: :download:`test-phasevoc.c <../tests/src/spectral/test-phasevoc.c>`.
Doxygen documentation
The latest version of the doxygen documentation is available at:
https://aubio.org/doc/latest
Contribute
Please report any issue and feature request at the Github issue tracker. Patches and pull-requests welcome!