Midi router: mididings
mididings is a MIDI router and processor, supporting ALSA and JACK MIDI. It is available under the GNU GPL and currently runs on Linux.
Features:
- MIDI routing and filtering. Filter events depending on their event type, channel, note number, velocity, etc., and freely route them between an arbitrary number of input and output ports.
- Modifying and converting MIDI events. Transpose notes, apply velocity curves, change controller values and ranges, or convert events to any other MIDI event type. mididings also includes more complex functions like a diatonic harmonizer, support for latched notes, limiting polyphony, and more.
- Seamless switching between patches. Set up different "scenes", each with its own MIDI routing and processing, and switch between them at any time, even while playing. Switching scenes does not affect notes already held, and does not result in dropouts or stuck notes!
- MIDI event monitoring. Print MIDI event data to the console to help debugging your patches and configuring your MIDI controllers.
- Running external commands. In addition to its MIDI output, mididings can also execute shell commands and send OSC or DBUS messages.
- Text-based, extensible in Python. mididings scripts are in fact Python scripts, and patches are really just Python objects. This allows you to build even complex setups with just a few lines of code.
- Low latency, realtime operation. The core of mididings is written in efficient C++, avoiding performance penalties often associated with scripting languages like Python. Using mididings with the JACK realtime backend incurs zero additional latency.
Instal.lació
Requirements:
* Python ≥ 2.5 * Boost ≥ 1.34.1 (Boost.Python, Boost.Thread) * ALSA * JACK
Necessito boost, que no sé el que és.
Per instal.lar boost: http://ubuntuforums.org/showthread.php?t=978487
Vaig a www.boost.org (Boost C++ Libraries)(Boost provides free peer-reviewed portable C++ source libraries.) i em baixo la última versió (1.42.0, febrer 2010): boost_1_42_0.tar.gz. són 39 MB.
$ tar xzf boost_1_42_0.tar.gz $ cd boost_1_42_0
Mirar Getting Started: http://www.boost.org/doc/libs/1_42_0/more/getting_started/unix-variants.html
$ ./bootstrap.sh -> ha funcionat $ ./bjam -> compila bé. $ sudo ./bjam install
The only error messages you see when building Boost—if any—should be related to the IOStreams library's support of zip and bzip2 formats as described here. Install the relevant development packages for libz and libbz2 if you need those features. Other errors when building Boost libraries are cause for concern. -> són els errors que jo trobo, per tant no els dono importància
Ja puc tornar a la instal.lació del mididings.
./setup.py build sudo ./setup.py install
i s'ha instal.lat bé!
Exemple 1
Les becerol.les: Exemple 1
Let's start with something very simple. fitxer transpose.py:
from mididings import * run(Transpose(3))
The import statement imports everything from the mididings Python module into the global namespace. The run() function is then used to run a simple patch, in this case consisting of just a single Transpose() unit.
You can start this script by saving it to a Python file and executing it, for example:
$ python transpose.py
What this script does is to create an ALSA MIDI client with one input and one output port. It will then start listening for events on the input port, transpose all incoming note-on and note-off events up by 3 semitones, and send all events to the output port. Pressing Ctrl+C terminates the script.
Això és lo important. Tenim un client ALSA MIDI, i connecto el vkeybd al client transpose, i el client transpose al fluidsynth, i ja tinc el primer exemple de midi router amb mididings: una transposició de 3 semitons.
Però no funciona...
$ python transpose.py
Traceback (most recent call last):
File "transpose.py", line 1, in <module>
from mididings import *
File "/usr/local/lib/python2.6/dist-packages/mididings/__init__.py", line 14, in <module>
from mididings.engine import run, run_scenes, run_patches, process_file
File "/usr/local/lib/python2.6/dist-packages/mididings/engine.py", line 13, in <module>
import _mididings
ImportError: libboost_python.so.1.42.0: cannot open shared object file: No such file or directory
$ cd /usr/local/lib
$ ls -la
...
lrwxrwxrwx 1 root root 25 2010-02-16 01:12 libboost_python.so -> libboost_python.so.1.42.0
...
de moment, no surt
creat per Joan Quintana Compte, febrer 2010