Changes between Version 2 and Version 3 of python-rtmidi


Ignore:
Timestamp:
07/22/2012 03:14:10 AM (8 years ago)
Author:
carndt
Comment:

Update for version 0.2a

Legend:

Unmodified
Added
Removed
Modified
  • python-rtmidi

    v2 v3  
    3636    published in the hope that other developers try it out and help finding 
    3737    bugs, and that its API is not yet finalised. What is there should work 
    38     but is currently only tested thoroughly under Linux/ALSA and less 
    39     regulary under Linux/JACK and OS X/CoreMIDI. Windows support is still 
    40     untested but will be reviewed soon. 
     38    but is currently only tested thoroughly under Linux ALSA/JACK and less 
     39    regularly under OS X (CoreMIDI/JACK) and Windows (WinMM). Support for 
     40    Windows Kernel Streaming API does not work yet due to compilation problems. 
    4141 
    4242 
     
    6868More usage examples can be found in the ``tests`` directory of the source 
    6969distribution. API documentation is available by looking at the docstrings in 
    70 the Cython source code or using tools like ``pydoc`` or IPython_ or by 
     70the Cython source code or using tools like ``pydoc`` or IPython_ and by 
    7171reading the RtMidi_ documentation. 
    7272 
     
    8080 
    8181 
     82Installer (Windows only) 
     83------------------------ 
     84 
     85An installer with a pre-compiled version for Windows with Windows MultiMedia 
     86API support is available through PyPI fro some Python versions. Download it 
     87from python-rtmidi's `PyPI page`_ and start the installer by double-clicking. 
     88 
     89 
    8290From PyPI 
    8391--------- 
     
    94102This will download the source distribution, compile the extension and install 
    95103it in your active Python installation. Unless you want to change the Cython 
    96 source file ``rtmidi.pyx``, there is no need to have Cython installed. 
     104source file ``_rtmidi.pyx``, there is no need to have Cython installed. 
    97105 
    98106``python-rtmidi`` also works well with virtualenv_ and virtualenvwrapper_. If 
     
    111119commands, e.g.:: 
    112120 
    113     $ wget http://chrisarndt.de/projects/python-rtmidi/download/python-rtmidi-0.1a.tar.gz 
    114     $ tar xzf python-rtmidi-0.1a.tar.gz 
    115     $ cd python-rtmidi-0.1a 
     121    $ wget http://chrisarndt.de/projects/python-rtmidi/download/python-rtmidi-0.2a.tar.gz 
     122    $ tar xzf python-rtmidi-0.2a.tar.gz 
     123    $ cd python-rtmidi-0.2a 
    116124    $ python setup.py install 
    117125 
     
    139147============ 
    140148 
    141 Naturally, you'll need a C++ compiler and a build environment. On debian-based 
    142 Linux systems, installing the ``build-essential`` package should get you this, 
    143 on Mac OS X install the latest Xcode or ``g++`` from MacPorts or homebrew. On 
    144 Windows you can use MinGW. 
     149Naturally, you'll need a C++ compiler and a build environment. See the 
     150platform-specific hints below. 
     151 
     152Only if you want to change the Cython source file ``_rtmidi.pyx`` or want to 
     153recompile ``_rtmidi.cpp`` with a newer Cython version, you'll need to install 
     154Cython >= 0.17. Currently this version is only available via the Git 
     155respository (see Cython web site) as version 0.17pre. The ``_rtmidi.cpp`` file 
     156in the  source distribution was compiled with Cython 0.17pre as of 2012-07-22 
     157and Python 2.7.2. 
     158 
     159RtMidi (and therefore ``python-rtmidi``) supports several low-level MIDI 
     160libraries on different operating systems. Only one of the available options 
     161needs to be present on the target system, but support for more than one can be 
     162compiled in. The setup script will try to detect available libraries and should 
     163use the appropriate compilations flags automatically. 
     164 
     165    * Linux: ALSA, JACK 
     166    * OS X: CoreMIDI, JACK 
     167    * Windows: MultiMedia (MM), Windows Kernel Streaming 
     168 
     169 
     170Linux 
     171----- 
     172 
     173For the C++ compiler and the pthread library install the ``build-essential`` 
     174package on debian-based systems. 
    145175 
    146176Then you'll need Python development headers and libraries. On Linux, install 
     
    148178you should already have these. 
    149179 
    150 Only if you want to change the Cython source file ``rtmidi.pyx`` or want to 
    151 recompile ``rtmidi.cpp`` with a newer Cython version, you'll need to install 
    152 Cython >= 0.17. Currently this version is only available via the Git 
    153 respository (see Cython web site) as version 0.17pre. The ``rtmidi.cpp`` file 
    154 in the  source distribution was compiled with Cython 0.17pre as of 2012-07-13. 
    155  
    156 RtMidi (and therefore ``python-rtmidi``) supports several low-level MIDI 
    157 libraries on different operating systems. Only one of the available options 
    158 needs to present on the target system, but support for more than one can be 
    159 compiled in. 
    160  
    161     * Linux: ALSA, JACK 
    162     * OS X: CoreMIDI, JACK 
    163     * Windows: MultiMedia (MM), Windows Kernel Streaming 
    164  
    165 On Linux, to get ALSA support, you must install development files for the 
    166 ``libasound`` library (debian package: ``libasound.dev``). For JACK support, 
    167 install the ``libjack`` development files (``libjack-dev`` or 
    168 ``libjack-jackd2-dev``). 
    169  
    170 On OS X, CoreMIDI support comes with installing Xcode. For JACK support, 
    171 install JACK for OS X from http://www.jackosx.com/ with the full installer. 
    172  
    173 On Windows, you'll need ``winmm.dll`` for Windows MultiMedia System support 
    174 and you'll need to edit the ``WINLIB_DIR`` variable in the ``setup.py`` file 
    175 to point to the location of this DLL. Support for compiling ``python-rtmidi`` 
    176 with Windows Kernel Streaming is currently not provided by the setup file. 
    177 Patches are welcome. 
     180To get ALSA support, you must install development files for the ``libasound`` 
     181library (debian package: ``libasound-dev``). For JACK support, install the 
     182``libjack`` development files (``libjack-dev`` or ``libjack-jackd2-dev``). 
     183 
     184 
     185OS X 
     186---- 
     187 
     188Install the latest Xcode or ``g++`` from MacPorts or homebrew (untested). 
     189CoreMIDI support comes with installing Xcode. For JACK support, install 
     190`JACK for OS X`_ with the full installer. 
     191 
     192 
     193Windows 
     194------- 
     195 
     196On Windows you'll need Visual Studio 2008 Express. Visual Studio 2010 (Express) 
     197or later editions will not work with current official Python distributons. 
     198After you have installed the Visual Studio, you probably need to edit the 
     199``WINLIB_DIR`` and ``WININC_DIR`` variables at the top of the ``setup.py`` file 
     200to point to the location of ``WinMM.lib`` and the Microsoft SDK headers. 
     201 
     202Compiling ``python-rtmidi`` with Windows Kernel Streaming support currently 
     203does not work due to syntax errors in ``RtMidi.cpp``. This is currentyl being 
     204investigated. You can exclude Windows Kernel Streaming Support by providing 
     205the ``--no-winks`` option to the ``setup.py`` invocation. 
     206 
     207Compiling with MinGW also does not work out-of-the-box yet. If you have any 
     208useful hints, please let the author know. 
     209 
    178210 
    179211 
     
    210242.. _rtmidi: http://www.music.mcgill.ca/~gary/rtmidi/index.html 
    211243.. _python-rtmidi: http://chrisarndt.de/projects/python-rtmidi/ 
     244.. _pypi page: http://python.org/pypi/python-rtmidi#downloads 
    212245.. _cython: http://cython,org/ 
    213246.. _pip: http://python.org/pypi/pip 
     
    216249.. _virtualenvwrapper: http://www.doughellmann.com/projects/virtualenvwrapper/ 
    217250.. _ipython: http://ipython.org/ 
     251.. _jack for os x: http://www.jackosx.com/ 
    218252 
    219253}}}