Ignore:
Timestamp:
Aug 26, 2016, 3:39:52 PM (4 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:
88f7cf9
Parents:
f7547e7
Message:

doc/python_module.rst: improve

File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/python_module.rst

    rf7547e7 r5417b3a  
    1 aubio Python module
    2 ===================
     1Python module
     2=============
    33
    4 Installing with pip
    5 -------------------
     4Installing aubio with pip
     5-------------------------
    66
    77.. code-block:: bash
     
    2020    $ sudo ./setup.py install
    2121
    22 Using the module
    23 ----------------
     22Using aubio in python
     23---------------------
    2424
    25 To use the python module, simply import aubio:
     25Once you have python-aubio installed, you should be able to run ``python -c
     26"import aubio"``.
     27
     28A very simple example
     29.....................
     30
     31Here is a very simple script
     32to read all the samples from a media file:
    2633
    2734.. code-block:: python
     
    3340        while True:
    3441          samples, read = s()
    35           print samples
     42          #print(samples)
    3643          if read < 256: break
    3744
    38 Check out the `python demos for aubio
    39 <https://github.com/piem/aubio/blob/develop/python/demos/>`_ for more examples.
     45Filtering an input sound file
     46.............................
    4047
     48Here is a more complete example, `demo_filter.py`_. This files executes the following:
     49
     50* read an input media file (``aubio.source``)
     51
     52* filter it using an A-weighting filter (``aubio.digital_filter``)
     53
     54* write result to a new file (``aubio.sink``)
     55
     56.. literalinclude:: ../python/demos/demo_filter.py
     57   :language: python
     58
     59More demos
     60..........
     61
     62Check out the `python demos folder`_ for more examples.
     63
     64Python tests
     65------------
     66
     67A number of `python tests`_ are provided. To run them, use
     68``python/tests/run_all_tests``.
     69
     70.. _python tests folder: https://github.com/aubio/aubio/blob/master/python/tests
     71.. _python demos folder: https://github.com/aubio/aubio/blob/master/python/demos
     72.. _demo_filter.py: https://github.com/aubio/aubio/blob/master/python/demos/demo_filter.py
     73
Note: See TracChangeset for help on using the changeset viewer.