/mididings

Community maintained fork of https://github.com/dsacre/mididings

Primary LanguagePythonOtherNOASSERTION

mididings

A MIDI router/processor based on Python, 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, floating split points, latched notes, 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, running external commands

Print MIDI event data to the console to help debugging your patches and configuring your MIDI controllers. In addition to its MIDI output, mididings can also execute shell commands and send OSC or DBUS messages.

Installation

Pip / PyPi

Note: Ensure that required dependencies are installed/available before proceeding.

mididings is available as mididings on PyPi:

pip install mididings

Additionally you can tell pip to install dependencies for optional features (called extras) Which ones there are you can lookup in pyproject.toml, too.

pip install mididings[osc,smf,dbus,autorestart,xdg]

Arch Linux

For Arch Linux users, mididings is available as mididings on the official repositories:

pacman -Syu mididings

Source

If you want to test a new version of mididings or develop it, it's easiest to use a virtual environment (venv) into which mididings and all its dependencies are installed without touching a possibly system-wide installation of mididings. Execute this in the root of this repository:

# create and activate the venv
python -m venv venv
source venv/bin/activate
# install mididings
pip install . 

Optional dependencies work just as when installing mididings from PyPI. If you want e.g., MIDI file support and the tools to generate html documentation, you'd activate smf and doc:

pip install .[smf,doc]

You can check if mididings installed correctly by looking up it's path.

which mididings

This should point to a file inside venv. As long as you are in this environment you can edit the sources and rebuild by executing pip again.

If you want to come back at a later time or have a second shell in the environment, just source the activate script:

source venv/bin/activate

System-wide installation

Make sure you have all dependencies installed, either through your package manager, pip or any other method (have a look at the list of dependencies in pyproject.toml) If you want documentation, you also need scdoc & sphinx installed during the build process.

meson build --prefix=/usr/local
meson compile -C build
meson install -C build

Packaging

There are a few build options that might be of interest to you if you are a package maintainer. You can disable generating the documentation:

meson build -Ddocs=disabled -Dman=disabled

You can also generate the docs separately:

meson build -Ddocs-only=true
meson compile -C build
meson install

Note: You need to have mididings (and the matching version of it) installed, possibly in a venv, during build when using docs-only=true.

Development

Dependencies

Required

Optional

  • pyliblo: to send or receieve OSC messages
  • pysmf: to read/write standard MIDI files using the process_file() function
  • dbus-python: to send DBUS messages
  • pyinotify: to automatically restart when a script changes
  • tkinter: for the livedings GUI
  • pyxdg: so mididings knows where to look for configuration files

During Build

  • scdoc: to generate man pages
  • sphinx: and potentially more modules for it to generate html documentation (see pyproject.toml)

Documentation

Some links that might also be of interest:

Support

There is a mailing list at Google Groups for any discussion concerning mididings, including help requests and bug reports.

To post to the list, send mail to mididings@googlegroups.com.

License

mididings is available under the terms of the GNU General Public License, version 2 or later.

The example scripts in doc/examples are available under the terms of the GNU Free Documentation License 1.3 or later.