These units offer some more advanced/specific functionality than what’s provided in the core mididings module. Unless otherwise noted, they are made available by importing the mididings.extra module.
Note
Some of these units are implemented in Python using Process(), and are thus not safe to use with the jack-rt backend.
A diatonic harmonizer.
Parameters: |
|
---|
# add a third above each note, based on the C# harmonic minor scale
Harmonize('c#', 'minor_harmonic', ['unison', 'third'])
Filter individual voices from a chord.
Parameters: |
|
---|
Create multiple VoiceFilter() units to route each voice to a different instrument.
Parameters: |
|
---|
Regardless of the number of voices specified, the lowest and highest note played will always be routed to the first and last patch in the list, respectively.
#route up to three voices to different channels
VoiceSplit([Channel(1), Channel(2), Channel(3)])
Limit the “MIDI polyphony”.
Parameters: |
|
---|
Note that the actual polyphony of a connected synthesizer can still be higher than the limit set here, e.g. due to a long release phase.
Make the MIDI signal monophonic, i.e. only one note can be played at any given time. When one note is released while another is still held (but silent), the previous one will be retriggered.
Create a floating split point that moves dynamically depending on what you are playing, allowing a region of the keyboard to be shared between two split zones.
Parameters: |
|
---|
# split the keyboard somewhere between C2 and C3
FloatingKeySplit('c2', 'c3', Channel(1), Channel(2))
Convert sustain pedal control changes to note-off events, by delaying note-offs until the pedal is released.
Parameters: |
|
---|
Makes notes latching, so they will keep playing when the key is released.
Parameters: |
|
---|
Filter out program changes if the same program has already been selected on the same port/channel.
Filter notes by key color.
Parameters: | color – the key color, either 'black' or 'white'. |
---|
Convert control change to system exclusive event using a sysex pattern.
Parameters: |
|
---|
Generate all-notes-off (CC #123) and sustain off (CC #64) events on all channels.
Parameters: | bypass – If true, events will be sent directly on all output ports, instead of originating from the Panic() unit and being subject to further processing. |
---|
Call engine.restart().
Call engine.quit().
Send an OSC message. Parameters are the same as for liblo.send(). Additionally, instead of a specific value, each data argument may also be a Python function that takes a single MidiEvent parameter, and returns the value to be sent.
Defined in mididings.extra.osc. Requires pyliblo.
Send a DBUS message. Instead of a specific value, each data argument may also be a Python function that takes a single MidiEvent parameter, and returns the value to be sent.
Defined in mididings.extra.dbus. Requires dbus-python.
# change FFADO output volume using a MIDI controller
CtrlFilter(42) >> SendDBUS(
'org.ffado.Control',
'/org/ffado/Control/DeviceManager/%s/Mixer/OUT0Gain' % DEVICEID,
'org.ffado.Control.Element.Continuous',
'setValue',
lambda ev: ev.value * (2**17)
)