Ignore:
Timestamp:
Dec 5, 2018, 10:34:39 PM (5 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/cnn, feature/crepe, feature/pitchshift, feature/timestretch, fix/ffmpeg5, master
Children:
283a619a
Parents:
5b46bc3 (diff), f19db54 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' into feature/pitchshift

File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/requirements.rst

    r5b46bc3 r633400d  
    11.. _requirements:
    22
    3 Requirements
    4 ============
    5 
    6 While aubio can be built without any external dependencies, we **recommend** to
    7 use at least some of the following libraries.
    8 
    9 Platform notes
    10 --------------
    11 
    12 On all platforms, you will need to have installed:
    13 
    14  - a compiler (gcc, clang, msvc, ...)
    15  - python (any version >= 2.7, including 3.x)
    16  - a terminal to run command lines in
    17 
    18 Linux
    19 .....
    20 
    21 The following `External libraries`_ will be used if found: `libav`_,
    22 `libsamplerate`_, `libsndfile`_, `libfftw3`_.
    23 
    24 macOS
    25 .....
    26 
    27 The following system frameworks will be used on Mac OS X systems:
    28 
    29   - `Accelerate <https://developer.apple.com/reference/accelerate>`_ to compute
    30     FFTs and other vectorized operations optimally.
    31 
    32   - `CoreAudio <https://developer.apple.com/reference/coreaudio>`_ and
    33     `AudioToolbox <https://developer.apple.com/reference/audiotoolbox>`_ to
    34     decode audio from files and network streams.
    35 
    36 .. note::
    37 
    38   To build a fat binary for both ``i386`` and ``x86_64``, use ``./waf configure
    39   --enable-fat``.
    40 
    41 The following `External libraries`_ will also be checked: `libav`_,
    42 `libsamplerate`_, `libsndfile`_, `libfftw3`_.
    43 
    44 Windows
    45 .......
    46 
    47 To use a specific version of the compiler, ``--msvc_version``. To build for a
    48 specific architecture, use ``--msvc_target``. For instance, to build aubio
    49 for ``x86`` using ``msvc 12.0``, use:
    50 
    51 .. code:: bash
    52 
    53     waf configure --msvc_version='msvc 12.0' --msvc_target='x86'
    54 
    55 
    56 The following `External libraries`_ will be used if found: `libav`_,
    57 `libsamplerate`_, `libsndfile`_, `libfftw3`_.
    58 
    59 iOS
    60 ...
    61 
    62 The following system frameworks will be used on iOS and iOS Simulator.
    63 
    64   - `Accelerate <https://developer.apple.com/reference/accelerate>`_ to compute
    65     FFTs and other vectorized operations optimally.
    66 
    67   - `CoreAudio <https://developer.apple.com/reference/coreaudio>`_ and
    68     `AudioToolbox <https://developer.apple.com/reference/audiotoolbox>`_ to
    69     decode audio from files and network streams.
    70 
    71 To build aubio for iOS, configure with ``--with-target-platform=ios``. For the
    72 iOS Simulator, use ``--with-target-platform=iosimulator`` instead.
    73 
    74 By default, aubio is built with the following flags on iOS:
    75 
    76 .. code:: bash
    77 
    78     CFLAGS="-fembed-bitcode -arch arm64 -arch armv7 -arch armv7s -miphoneos-version-min=6.1"
    79 
    80 and on iOS Simulator:
    81 
    82 .. code::
    83 
    84     CFLAGS="-arch i386 -arch x86_64 -mios-simulator-version-min=6.1"
    85 
    86 Set ``CFLAGS`` and ``LINKFLAGS`` to change these default values, or edit
    87 ``wscript`` directly.
    88 
    893Build options
    90 -------------
    91 
    92 Some additional options can be passed to the configure step. For the complete
    93 list of options, run:
    94 
    95 .. code:: bash
    96 
    97     $ ./waf configure --help
    98 
    99 Double precision
    100 ................
    101 
    102 To compile aubio in double precision mode, configure with ``--enable-double``.
    103 
    104 To compile aubio in single precision mode, use ``--disable-double`` (default).
    105 
    106 Fat binary
    107 ..........
    108 
    109 To build a fat binary on Mac OS platforms, configure with ``--enable-fat``.
     4=============
     5
     6If built without any external dependencies aubio can be somewhat useful, for
     7instance to read, process, and write simple wav files.
     8
     9To support more media input formats and add more features to aubio, you can use
     10one or all of the following `external libraries`_.
     11
     12You may also want to know more about the `other options`_ and the `platform
     13notes`_
     14
     15The configure script will automatically for these extra libraries. To make sure
     16the library or feature is used, pass the `--enable-flag` to waf. To disable
     17this feature, use `--disable-feature`.
     18
     19To find out more about the build commands, use the `--verbose` option.
    11020
    11121External libraries
     
    12131    If ``pkg-config`` is not found in ``PATH``, the configure step will
    12232    succeed, but none of the external libraries will be used.
     33
     34Media libraries
     35---------------
    12336
    12437libav
     
    16982configure with ``--disable-samplerate``
    17083
     84Optimisation libraries
     85----------------------
     86
    17187libfftw3
    17288........
     
    18399configure with ``--disable-fftw3``
    184100
    185 External tools
     101blas
     102....
     103
     104On macOs/iOS, `blas
     105<https://en.wikipedia.org/wiki/Basic_Linear_Algebra_Subprograms>`_ are made
     106available through the Accelerate framework.
     107
     108On Linux, they can be enabled with ``--enable-blas``.  On Debian (etch),
     109`atlas`_, `openblas`_, and `libblas`_ have been successfully tested.
     110
     111When enabled, ``waf`` will check for the current blas configuration by running
     112``pkg-config --libs blas``. Depending of the library path returned by
     113``pkg-config``, different headers will be searched for.
     114
     115.. note::
     116
     117    On Debian systems, `multiple versions of BLAS and LAPACK
     118    <https://wiki.debian.org/DebianScience/LinearAlgebraLibraries>`_ can be
     119    installed. To configure which libblas is being used:
     120
     121    .. code-block:: console
     122
     123      $ sudo update-alternatives --config libblas.so
     124
     125..
     126  Expected pkg-config output for each alternative:
     127    /usr/lib/atlas-base/atlas/libblas.so
     128    -L/usr/lib/atlas-base/atlas -lblas
     129    /usr/lib/openblas-base/libblas.so
     130    -L/usr/lib/openblas-base -lblas
     131    /usr/lib/libblas/libblas.so
     132    -lblas
     133
     134atlas
     135.....
     136
     137`ATLAS BLAS APIs <http://math-atlas.sourceforge.net/>`_ will be used the path
     138returned by ``pkg-config --libs blas`` contains ``atlas``.
     139
     140..
     141  ``<atlas/cblas.h>`` will be included.
     142
     143Example:
     144
     145.. code-block:: console
     146
     147  $ pkg-config --libs blas
     148  -L/usr/lib/atlas-base/atlas -lblas
     149  $ ./waf configure --enable-atlas
     150  [...]
     151  Checking for 'blas'                      : yes
     152  Checking for header atlas/cblas.h        : yes
     153
     154openblas
     155........
     156
     157`OpenBlas libraries <https://www.openblas.net/>`_ will be used when the output
     158of ``pkg-config --libs blas`` contains 'openblas',
     159
     160..
     161  ``<openblas/cblas.h>`` will be included.
     162
     163Example:
     164
     165.. code-block:: console
     166
     167  $ pkg-config --libs blas
     168  -L/usr/lib/openblas-base -lblas
     169  $ ./waf configure --enable-atlas
     170  [...]
     171  Checking for 'blas'                      : yes
     172  Checking for header openblas/cblas.h     : yes
     173
     174libblas
     175.......
     176
     177`Netlib's libblas (LAPACK) <https://www.netlib.org/lapack/>`_ will be used if
     178no specific library path is specified by ``pkg-config``
     179
     180..
     181  ``<cblas.h>`` will be included.
     182
     183Example:
     184
     185.. code-block:: console
     186
     187  $ pkg-config --libs blas
     188  -lblas
     189  $ ./waf configure --enable-atlas
     190  [...]
     191  Checking for 'blas'                      : yes
     192  Checking for header cblas.h              : yes
     193
     194
     195Platform notes
    186196--------------
    187197
    188 If the following tools are found, additional documentations are built:
     198On all platforms, you will need to have installed:
     199
     200 - a compiler (gcc, clang, msvc, ...)
     201 - python (any version >= 2.7, including 3.x)
     202 - a terminal to run command lines in
     203
     204Linux
     205.....
     206
     207The following `External libraries`_ will be used if found: `libav`_,
     208`libsamplerate`_, `libsndfile`_, `libfftw3`_.
     209
     210macOS
     211.....
     212
     213The following system frameworks will be used on Mac OS X systems:
     214
     215  - `Accelerate <https://developer.apple.com/reference/accelerate>`_ to compute
     216    FFTs and other vectorized operations optimally.
     217
     218  - `CoreAudio <https://developer.apple.com/reference/coreaudio>`_ and
     219    `AudioToolbox <https://developer.apple.com/reference/audiotoolbox>`_ to
     220    decode audio from files and network streams.
     221
     222.. note::
     223
     224  To build a fat binary for both ``i386`` and ``x86_64``, use ``./waf configure
     225  --enable-fat``.
     226
     227The following `External libraries`_ will also be checked: `libav`_,
     228`libsamplerate`_, `libsndfile`_, `libfftw3`_.
     229
     230To build a fat binary on a darwin like system (macOS, tvOS, appleOS, ...)
     231platforms, configure with ``--enable-fat``.
     232
     233Windows
     234.......
     235
     236To use a specific version of the compiler, ``--msvc_version``. To build for a
     237specific architecture, use ``--msvc_target``. For instance, to build aubio
     238for ``x86`` using ``msvc 12.0``, use:
     239
     240.. code:: bash
     241
     242    waf configure --msvc_version='msvc 12.0' --msvc_target='x86'
     243
     244
     245The following `External libraries`_ will be used if found: `libav`_,
     246`libsamplerate`_, `libsndfile`_, `libfftw3`_.
     247
     248iOS
     249...
     250
     251The following system frameworks will be used on iOS and iOS Simulator.
     252
     253  - `Accelerate <https://developer.apple.com/reference/accelerate>`_ to compute
     254    FFTs and other vectorized operations optimally.
     255
     256  - `CoreAudio <https://developer.apple.com/reference/coreaudio>`_ and
     257    `AudioToolbox <https://developer.apple.com/reference/audiotoolbox>`_ to
     258    decode audio from files and network streams.
     259
     260To build aubio for iOS, configure with ``--with-target-platform=ios``. For the
     261iOS Simulator, use ``--with-target-platform=iosimulator`` instead.
     262
     263By default, aubio is built with the following flags on iOS:
     264
     265.. code:: bash
     266
     267    CFLAGS="-fembed-bitcode -arch arm64 -arch armv7 -arch armv7s -miphoneos-version-min=6.1"
     268
     269and on iOS Simulator:
     270
     271.. code::
     272
     273    CFLAGS="-arch i386 -arch x86_64 -mios-simulator-version-min=6.1"
     274
     275Set ``CFLAGS`` and ``LINKFLAGS`` to change these default values, or edit
     276``wscript`` directly.
     277
     278Other options
     279-------------
     280
     281Some additional options can be passed to the configure step. For the complete
     282list of options, run:
     283
     284.. code:: bash
     285
     286    $ ./waf --help
     287
     288Here is an example of a custom command:
     289
     290.. code:: bash
     291
     292    $ ./waf --verbose configure build install \
     293                --enable-avcodec --enable-wavread --disable-wavwrite \
     294                --enable-sndfile --enable-samplerate --enable-docs \
     295                --destdir $PWD/build/destdir --testcmd="echo %s" \
     296                --prefix=/opt --libdir=/opt/lib/multiarch \
     297                --manpagesdir=/opt/share/man  \
     298                uninstall clean distclean dist distcheck
     299
     300.. _doubleprecision:
     301
     302Double precision
     303................
     304
     305The datatype used to store real numbers in aubio is named `smpl_t`. By default,
     306`smpl_t` is defined as `float`, a `single-precision format
     307<https://en.wikipedia.org/wiki/Single-precision_floating-point_format>`_
     308(32-bit).  Some algorithms require a floating point representation with a
     309higher precision, for instance to prevent arithmetic underflow in recursive
     310filters.  In aubio, these special samples are named `lsmp_t` and defined as
     311`double` by default (64-bit).
     312
     313Sometimes it may be useful to compile aubio in `double-precision`, for instance
     314to reproduce numerical results obtained with 64-bit routines. In this case,
     315`smpl_t` will be defined as `double`.
     316
     317The following table shows how `smpl_t` and `lsmp_t` are defined in single- and
     318double-precision modes:
     319
     320.. list-table:: Single and double-precision modes
     321   :align: center
     322
     323   * -
     324     - single
     325     - double
     326   * - `smpl_t`
     327     - ``float``
     328     - ``double``
     329   * - `lsmp_t`
     330     - ``double``
     331     - ``long double``
     332
     333To compile aubio in double precision mode, configure with ``--enable-double``.
     334
     335To compile in single-precision mode (default), use ``--disable-double`` (or
     336simply none of these two options).
     337
     338Disabling the tests
     339...................
     340
     341In some case, for instance when cross-compiling, unit tests should not be run.
     342Option ``--notests`` can be used for this purpose. The tests will not be
     343executed, but the binaries will be compiled, ensuring that linking against
     344libaubio works as expected.
     345
     346.. note::
     347
     348  The ``--notests`` option should be passed to both ``build`` and ``install``
     349  targets, otherwise waf will try to run them.
     350
     351Edit wscript
     352............
     353
     354Many of the options are gathered in the file `wscript`. a good starting point
     355when looking for additional options.
     356
     357.. _build_docs:
     358
     359Building the docs
     360-----------------
     361
     362If the following command line tools are found, the documentation will be built
     363built:
    189364
    190365 - `doxygen <http://doxygen.org>`_ to build the :ref:`doxygen-documentation`.
    191366 - `txt2man <https://github.com/mvertes/txt2man>`_ to build the :ref:`manpages`
     367 - `sphinx <http://sphinx-doc.org>`_ to build this document
    192368
    193369These tools are searched for in the current ``PATH`` environment variable.
     
    196372To disable the documentation, configure with ``--disable-docs``. To build with
    197373the documentation, configure with ``--enable-docs``.
    198 
Note: See TracChangeset for help on using the changeset viewer.