Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/python_module.rst

    r4583e75 r6d4802f  
    1 .. _python:
     1.. _python-install:
    22
    3 Python module
    4 =============
     3Installing aubio for Python
     4===========================
    55
    66The aubio extension for Python is available for Python 2.7 and Python 3.
     
    2626    $ sudo ./setup.py install
    2727
    28 Using aubio in python
    29 ---------------------
     28
     29.. _py-doubleprecision:
     30
     31Double precision
     32----------------
     33
     34This module can be compiled in double-precision mode, in which case the
     35default type for floating-point samples will be 64-bit. The default is
     36single precision mode (32-bit, recommended).
     37
     38To build the aubio module with double precision, use the option
     39`--enable-double` of the `build_ext` subcommand:
     40
     41.. code:: bash
     42
     43    $ ./setup.py clean
     44    $ ./setup.py build_ext --enable-double
     45    $ pip install -v .
     46
     47**Note**: If linking against `libaubio`, make sure the library was also
     48compiled in :ref:`doubleprecision` mode.
     49
     50
     51Checking your installation
     52--------------------------
    3053
    3154Once the python module is installed, its version can be checked with:
     
    4164    $ aubio -h
    4265
    43 A simple example
    44 ................
    45 
    46 Here is a :download:`simple script <../python/demos/demo_source_simple.py>`
    47 that reads all the samples from a media file:
    48 
    49 .. literalinclude:: ../python/demos/demo_source_simple.py
    50    :language: python
    51 
    52 Filtering an input sound file
    53 .............................
    54 
    55 Here is a more complete example, :download:`demo_filter.py
    56 <../python/demos/demo_filter.py>`. This files executes the following:
    57 
    58 * read an input media file (``aubio.source``)
    59 
    60 * filter it using an `A-weighting <https://en.wikipedia.org/wiki/A-weighting>`_
    61   filter (``aubio.digital_filter``)
    62 
    63 * write result to a new file (``aubio.sink``)
    64 
    65 .. literalinclude:: ../python/demos/demo_filter.py
    66    :language: python
    67 
    68 More demos
    69 ..........
    70 
    71 Check out the `python demos folder`_ for more examples.
    7266
    7367Python tests
     
    7771``python/tests/run_all_tests``.
    7872
    79 .. _python demos folder: https://github.com/aubio/aubio/blob/master/python/demos
    8073.. _demo_filter.py: https://github.com/aubio/aubio/blob/master/python/demos/demo_filter.py
    8174.. _python tests: https://github.com/aubio/aubio/blob/master/python/tests
Note: See TracChangeset for help on using the changeset viewer.