MIDI Filters
MIDI Filters support applying a wide range of transformations to MIDI events as they pass through the system.
Accessing MIDI Filters
MIDI Filters are available at many different points:
- MIDI Routes - right click on the route and choose MIDI Filters
- Plugins - right click on the plugin and choose MIDI Filters
Each MIDI filter applies to that point in the MIDI processing pipeline.
You can also access the MIDI filters via the MIDI filter button in the object's slot in the main window:
Note the button lights up green indicator to indicate there are active MIDI Filters on this object.
Global Port MIDI Filters
Global MIDI ports also have MIDI Filter support and provide a convenient way to massage incoming MIDI events across all songs.
For example you can add MIDI Filters to an environment MIDI Input port.
- Open Cantabile's Options
- Switch to the MIDI Ports page
- Double click on a MIDI Port
- Click the MIDI Filters button
Object MIDI Port Files
Media Player and Racks also support MIDI filters on the MIDI Ports:
- Media Players - right click the media player, choose Properties, switch to the MIDI Ports tab, double click the port and choose MIDI Filters
- Rack Ports - open the rack and from the File menu choose Rack Properties, switch to the MIDI Ports tab, double click the port and choose MIDI Filters
MIDI Filter Processing Order
- For MIDI Routes, MIDI Filters are applied after the other MIDI route settings.
- For Plugins, MIDI Filters are applied before the events are forwarded to the plugin.
MIDI Filter Items
Cantabile supports a number of different filter items which are explained below.
A couple of settings are common:
- Channels
- It is possible to indicate the source and target channel(s) for the events. It is possible to select multiple channels by holding the control key while clicking the channel numbers.
- Copy event
- Indicate whether to suppress or copy the original event.
- Edge Triggered
- If checked the source controller is treated as a momentary MIDI button that sends a value > 64 when pressed and < 64 when released. This kind of binding is edge-triggered in that it invokes the target when the value crosses from less that 64 to greater than 64. If unchecked the source controller is expected to send a non-zero value when pressed and no event or a CC value of 0 when released. ie: it triggers on any non-zero value.
- Out of range
-
Choose how to handle event values that are outside a specified range:
- Discard
- values outside the source range are discarded and the binding isn’t invoked.
- Clamp
- values are clamped to the source range and the binding invoked.
- Slide
- the source range is internally adjusted up/down to make the source value within range.
- Passthrough
- the value is passed through the filter item unchanged.
Aftertouch To Controller Map
The After Touch To Controller Map item generates a controller event based on aftertouch values. The aftertouch value can either be from a single note or calculated as the average or maximum of all held notes. This calculated value is sent as the controller event's value.
- Apply to Channels
- The MIDI channels this filter should be applied to.
- Source
-
How to calculate the after touch value
- Maximum of All Held Notes
- Average of All Held Notes
- After touch of a specific note
- Note
- The note to use when "After touch of a specific note" is selected.
- Target Controller
- The controller number of the generated controler events
- Channel
- The channel number of the generated controller events
Button Bank
The Button Bank item allows mapping two ranges of button controllers onto some other MIDI event.
Say you have two banks of button controllers that you'd like to translate to say a program change event. The button bank controller allows this by combining the button presses from one bank with the button presses from the other (using configurable add/multipliers operations) then sends the desired event.
Say you have two banks of button controllers that you'd like to translate to say a program change event. The button bank controller allows this by combining the button presses from one bank with the button presses from the other (using configurable add/multipliers operations) then sends the desired event.
It supports the following settings:
- Apply to Channels
- The MIDI channels this filter should be applied to.
- Bank A Controllers
- The range of button controllers for bank A
- Bank A Base
- Base value for bank A
- Bank A Multiplier
- Multiplier for bank A
- Bank B Controllers
- The range of button controllers for bank B
- Bank B Base
- Base value for bank B
- Bank B Multiplier
- Multiplier for bank B
- Send Event
-
The event to send. Choose from
- Bank Select + Program Change,
- Program Change
- Bank Select
- Controller
- RPN Registered Parameter (Coarse)
- RPN Registered Parameter (Fine)
- NRPN Non-registered Parameter (Coarse)
- NRPN Non-registered Parameter (Fine)
- Controller
- The controller or RPN/NRPN parameter number to send.
For example, assume you have 20 MIDI push buttons - the first set of 10 on MIDI controllers 80-89 and the second set on controllers 90-99. When you press a button in bank A, the filter remembers which one you pressed. When you press a button in bank B, the filter generates a program change event. The program number it generates is calculated by this formula:
(IndexOfButtonA + BankABase) * BankAMultiplier +
(IndexOfButtonB + BankBBase) * BankBMultipler
So say you pressed button 81 then button 93 that would be:
(1 + 0) * 10 + (3 + 0) * 1 = 13
In other words, you're using bank A as the tens column, bank B as the units and you've got a really quick way to access 100 program changes from 20 buttons.
Other notes: * Each bank is optional so you can use it for a single button bank * If the controller range for a bank only has a single controller, it uses the controller value rather than its index. This allows other manipulations of controllers to be created. * The button controllers don't need to be in order. eg: 10-14,20,8 is a valid definition for 7 buttons.
Channel Map
The Channel Map filter item assigns all MIDI events from one or more MIDI channels to one or more other channels.
- Source Channels
- The channel or channels to be remapped.
- Target Channels
- The new channel or channels.
Note: you can select multiple channels by holding the Control key while clicking the channel numbers.
Channel Select
The channel select item filters out all MIDI events except those on one (or more) channels.
- Source Channel(s)
- The channel or channels to be selected
Note: you can select multiple source channels by holding the Control key while clicking the channel numbers.
Controller Latch
Transforms an incoming MIDI controller button or pedal press to a sequencer of controller values.
- Apply to Channels
- The MIDI channels this filter should be applied to.
- Source Controller
- The controller number of the source button/pedal.
- Target Controller
- The controller number of events generated by this filter. Can be the same as the source controller.
- Target Values
- A sequence of controller values. On each press of the source controller button/pedal the next value in the sequencer will be generated as a new controller event.
This filter is intended for cycling through VST parameters that have discrete values rather than continuous controller values. Eg: this could be used to assign a push button to toggle a VST parameter on/off.
Controller Map
The Controller Map filter item maps all MIDI events for one MIDI controller to another MIDI controller. It is possible to map between nearly all kind of events, and to specify a value range to use for both source and target, thereby also scale the values of the events as needed.
- Apply to Channels
- The MIDI channels this filter should be applied to
- From Controller Kind
- The source controller kind to be mapped
- From Controller
- The source controller number to be mapped
- From Range
- The range of the source controller to be mapped
- To Controller Kind
- The kind of controller event to map to
- To Controller
- The controller number to map to
- To Range
- The target range of the mapped events
- New Channel
- Optional remaps the events to a different MIDI channel
- Copy Event
- When selected, the original event is also passed through unmodified
- Out of Range
- How to handle out of range source values (see above).
Controller To Note
Maps controller events to notes.
- Apply to Channels
- The MIDI channels this filter should be applied to
- Controllers
- The set of MIDI controller numbers that should be mapped
- Notes
- The set of MIDI notes that should be generated where each note maps to the corresponding controller number in the same position. The number of notes must match the number of controllers.
- Velocity
- The velocity value of the generated notes. Can be based on the value of the mapped controller event, or a specific velocity value
- Release Mode
-
When the generated note should be released
- When CC Value 0
- Immediately
- Never
- Suppress Original Event
- When selected the original event is not passed through
Controller To Program Map
Maps a MIDI controller event to a MIDI program change event and/or maps controller button presses to next/previous program.
- Apply to Channels
- The MIDI channels this filter should be applied to.
- Select Program CC
- The controller number to be mapped directly to a MIDI program change. The controller’s value becomes the program number sent.
- Next Program CC
-
The controller number of a button to select the next program.
eg: if controller 63 is mapped to the next program, and the last program change event was 42, then pressing controller 63 will yield a program change 43 event.
- Previous Program CC
- The controller number of a button to select the previous program.
- New Channel
- The new channel number for the generated program change events.
- Duplicate Event:
- When cleared, incoming matching controller events are suppressed and new program change events generated. When set , the incoming controller events are passed through unaltered while still generating program change events.
Controller To Switch
Maps a continoue controller event to an on/off controller event.
- From Controller Kind
- The kind of MIDI event to convert from
- From Controller Number
- The controller number of events to be converted
- Threshold
- The minimum value of the controller that switches the target controller on
- To Controller Kind
- The kind of MIDI event to generate
- To Controller
- The controller number of generated events
- Off
- The controller value to send when the source controller is less than the threshold
- On
- The controller value to send when the source controller is greater or equal to the threshold
- New Channel
- The new channel number for the generated program change events.
- Copy Event
- When cleared, incoming matching controller events are suppressed and new events generated. When set , the incoming controller events are passed through unaltered while still generating new events.
HUI Switch Decoder
The HUI spec encodes button presses using two CC messages and uses a concept of zones and ports. A zone typically represents a group of buttons such as a channel strip while a port represents a particular button in that zone. Each zone has 8 ports and there are about 30 defined zones.
The HUI Switch Decoder filter map each button to a CC as follows:
CCNumber = zoneNumber * 8 + portNumber
When pressed value of 127 is sent, when released 0. ie: a standard MIDI button style behaviour. For example: zone 14 port 4 would be mapped to 14 * 8 + 4 = CC #116.
As there aren’t enough CC numbers to cover the full range of zones, if the calculated CC number exceeds 127 then the CC numbers wrap around and the next channel number is used.
A few more details are available in this blog post
Key Range
The Key Range filter item transposes a range of notes up or down by a specified interval. It is possible to change the channel of the notes, and indicate if notes outside the range should be suppressed. Also, if the target channel is different from the source channel then it is possible to indicate whether or not to map other events than notes to the new channel.
The key range filter is similar to the keyboard split filter except instead of creating a single split above/below one point on the keyboard it allows an arbitrary range on the keyboard to be selected.
The key range filter can be used to either remap a range of the keyboard to a new MIDI channel, or to simply suppress notes outside the specified range.
- Apply to Channels
- The MIDI channels this filter should be applied to
- Key Range
- Specifies the first and last note in the range
- Channel
- Specifies a new channel number for all notes matching the specified keyboard range
- Transpose
- The interval to transpose notes in the keyboard range by
- Notes Only
- When selected, only remaps note events. When cleared, all other events are also remapped.
- Suppress out of range notes
- When selected all notes outside the specified range are suppressed. When cleared, notes outside the specified range are passed through the filter unaltered.
- Passthrough Original Events
- When cleared, notes that are remapped are modified and subsequent filter items only see the modified event. When selected, notes that are remapped generate a new event and the original event is passed to the next filter item unaltered.
Also consider the related filter types Keyboard Split and Transpose
Key Range To Note
Maps a range of notes to a single note on the same channel, and keeps the velocity.
- Apply to Channels
- The MIDI channels this filter should be applied to
- Key Range
- The range of notes to be mapped
- Target Note
- The target note to be generated when any note in the range is played
- Retriggerable
- When set, pressing a second note while still holding the first will trigger a second target note. When clear, all notes must be released before the target note can be triggered again.
- Suppress Out of Range Notes
- When set, any notes outside the key range will be suppressed
Keyboard Split
Splits a keyboard range by a specified note, and maps the lower and upper part to two channels, potentially also transposed. It is possible to choose to have other events than notes mapped to the new channels as well.
The keyboard split item splits incoming MIDI events into two separate MIDI channels.
- Apply to Channels
- The MIDI channels this filter should be applied to
- Split Point
- The first note of the upper keyboard range
- Lower Channel
- The new channel for notes below the split point
- Upper Channel
- The new channel for notes above the split point
- Lower Transpose
- The interval to transpose notes in the lower range by
- Upper Transpose
- The interval to transpose notes in the upper range by
- Notes Only
- When selected, only MIDI note events are routed. When cleared (the default), MIDI controllers and other events are duplicated and send to both target channels.
Also consider the related filter types Key Range and Transpose.
Note As Controller
Maps a range of notes to either a single controller, or a range of controllers. It is possible to indicate a condition, ie a controller where the value must be >63, otherwise the filter item will be bypassed.
If the range of notes maps to a single controller, then the index of the source note within the range of notes is used to calculate the controller value.
If the range of notes maps to a range of controllers, then the index of the source note within the range of notes is used to calculate the controller number, and the value for the controller is as indicated by the settings for Released and Pressed.
The Note as Controller filter item emulates a MIDI controller using note events. This filter can emulate either a single variable controller - where a range of notes represents the value of the controller, or a set of button controllers - where each note represents one controller in a series of on/off controllers.
It supports the following settings:
- Apply to Channels
- The MIDI channels this filter should be applied to.
- Mode
- Whether to emulate a single variable controller or a range of button controllers.
- Condition
- The number of a controller whose value must be pressed (>=64) for the emulation to take effect. (see explanation below).
- Key Range
- The range of notes used to emulate the controller or controllers.
- Target CC
- The controller number to emulate.
- Channel
- The channel to send controller events on (or Same to use the same channel as the source note events).
- Min Value (when emulating a variable controller)
- The minimum value of the emulated controller - mapped to the lowest note in the key range
- Max Value (when emulating a variable controller)
- The maximum value of the emulated controller - mapped to the highest note in the key range.
- Released (when emulating button controllers)
- The value of the controller when the note is released - typically 0.
- Pressed (when emulating button controllers)
- The value of the controller when the note is pressed - typically 127.
The condition controller can be used to enable/disable controller emulation using another controller. For example you might define a range of notes to act as a series on/off buttons but only want them to take effect when a real MIDI controller button is pressed, or a pedal maybe. To do this, set the Condition property to the controller number of the button/pedal that enables the emulation. The condition controller must take on a value of 64 or greater when pressed for this feature to work.
Note Map
Provides a one-to-one mapping table for every note.
- Apply to Channels
- The MIDI channels this filter should be applied to
- Note List
- A list of all notes showing the current remapping
- Remap XX to
- Sets the target note for the note selected in the list
- Actions
-
Additional commands for working with the Note Map filter:
- Load One to One Map - loads a map where all notes are mapped to themself
- Load Suppress All Map - loads a map where all notes are suppressed
- Copy Map - copies the current map to the clipboard
- Paste Map - pastes the clipboard to the current map
- Import - imports a note map from a file
- Export - saves the note map to a file
Note On De-duplicator
Suppresses repeated note-on events for the same note that have no intervening note off event.
- Apply to Channels
- The MIDI channels this filter should be applied to
- Mode
-
How duplicated notes should be handled
- Suppress Duplicate Note On
- Insert a Note Off before the duplicate Note On
This filter can be used to suppress repeated note on events from "triple sensor" and other MIDI keyboards that simulate the action of a grand piano - where repeated notes can be played without engaging the dampers.
For plugins and synths that expect exactly one note off event for every note on event, these keyboards can cause stuck notes. This MIDI filter provides a way to use these keyboards with these synths.
Note To Program
Maps note events to program change events
- Apply to Channels
- The MIDI channels this filter should be applied to
- Note Range
- The range of notes to be mapped to program changes
- Note Kind:
-
Which notes should be mapped
- All Notes
- White Notes
- Black Notes
- Base Program Number
- The program number of the first note in the range
- Banked Program Change
- Whether to send a plain program change or a banked program change
See this video for a walkthrough of this filter item.
Parameter Automation
The Parameter Automation filter item assigns a MIDI controller to a parameter of a VST plugin.
- Apply to Channels
- The MIDI channels this filter should be applied to
- Source Controller
- The MIDI controller to be used to control the parameter
- Range (Source)
- Range of values for the source controller. Values outside this range will be clamped to the specified range
- Target Parameter
- The parameter of the VST plugin to be manipulated by the MIDI controller
- Range (Target)
- Range of parameter values for the target parameter
Notes:
- This filter item is provided primarily for backwards compatibility and Bindings provide a more flexible mechanism for mapping MIDI controllers to settings in Cantabile.
- This filter is only available when editing the MIDI filters of a VST plugin.
Pitch Based Velocity Ramp
The Pitch Based Velocity Ramp adjusts the velocity of notes according to their pitch. This filter is useful for adjusting instruments that get too loud or too quite at different parts of the keyboard.
It is possible to indicate the key range to be affected, and how much the velocity should be adjusted across the key range. It is also possible to indicate if notes below and above the key range should be adjusted or left at their original velocity. These options are useful if you want to create a sequence of pitched velocity ramps for different key ranges.
- Apply to Channels
- The MIDI channels this filter should be applied to
- Key Range
- Specifies the first and last note of the range of notes whose velocities are to be adjusted
- Adjust Velocity By
- Specifies a percentage to adjust the velocity of notes by. The first value specifies the velocity adjustment at the low end of the key range. The second value specifies the velocity adjustment at the high end of the key range. Notes within the range will be adjusted by a percentage calculated by linearly interpolating these two values.
- Adjust Notes Below
- Specifies if notes below the specified key range should be adjusted.
- Adjust Notes Above
- Specifies if notes above the specified key range should be adjusted.
The Adjust Notes Above/Below options are useful if you want to create a sequence of pitched velocity ramps for different key ranges.
Program Map
Maps a single program change command to another program change command. Supports banked program changes.
- Apply to Channels
- The MIDI channels this filter should be applied to
- Source Program
- The program number to remap from
- Target Program
- The program number to remap to
- New Channel
- The channel number of the generated program change event
Sostenuto
The Sostenuto midi filter implements the sostenuto pedal from a grand piano, it’s similar to the damper/sustain pedal except it only holds the notes that were on at the time the pedal was pressed.
- Apply to Channels
- The MIDI channels this filter should be applied to
The MIDI controller for Sostenuto is CC#66.
Sticky Note
Keeps a note playing until specifically released, either by the specified Master Release Note or the specified Master Release Controller. It can either be monophonic, in which case the previous note is released when a new note is played, or polyphonic, then all notes are kept playing until released.
- Apply to Channels
- The MIDI channels this filter should be applied to
- Max Polyphony
- The maximum number of notes to be held at one time. When the limit is reached the oldest held note is released and the new note held.
- Master Release Note
- On receiving this note, all currently held notes will be released
- Master Release CC
- On receiving the controller, all currently held notes will be released
- Retriggerable
- Whether the same note can be retriggered a second time while still held
Suppress Events
Filters out notes, controllers, after touch, program change, channel pressure, pitch bend or midi clock on one or more channels. It is possible to indicate a range for notes and for controllers, and also choose whether the range is included or excluded from filtering. The range can be empty, which makes it possible to indicate and empty range of allowed notes, the same as suppressing all notes.
- Apply to Channels
- The MIDI channels this filter should be applied to
- Notes and Aftertouch (first row of settings)
- Which notes and after touch events to suppress or allow
- Controllers (second row of settings)
- Which controllers to suppress or allow
- All Notes
- Suppresses all notes
- All After Touch
- Suppresses all aftertouch events
- Program Change
- Suppresses all program changes
- Channel Pressure
- Suppresses all channel pressure events
- Pitch Bend
- Suppresses all pitch bend events
- MIDI Clock
- Suppresses all MIDI clock events
Sys-ex Decoder/Encoder/Decoder
These filters are described in detail in the Sys-ex Patterns guide
Transpose
The Transpose filter item transposes a range of notes up or down by a specified interval, and optionally changes the channel of those notes.
- Apply to Channels
- The MIDI channels this filter should be applied to.
- Key Range
- The range of notes to be transposed.
- Transpose
- The interval to transpose notes by.
- New Channel
- Optional setting to also change the MIDI channel number of transposed notes.
Notes outside the specified key range are not transposed, nor is their channel changed.
The ability to change channel is useful for creating keyboard splits, although this is now better covered by the new Keyboard Split filter item.
Also consider the related filter types Keyboard Split and Key Range.
Velocity Gate
The velocity gate filter can be used to remap notes according to their velocity. This can be used for example to play one instrument with soft notes and another with loud notes.
The keyboard range filter can be used to either remap notes to a new MIDI channel, or to simply suppress notes outside the specified velocity range.
- Apply to Channels
- The MIDI channels this filter should be applied to.
- Velocity Range
- Specifies the velocity range to remap
- Velocity Delta
- Specifies how much to adjust the velocity of remapped notes by
- New Channel
- Specifies a new channel number for all notes matching the specified keyboard range
- Notes Only
- When selected, only remaps note events. When cleared, all other events are also remapped.
- Suppress out of range notes
- When selected all notes outside the specified velocity range are suppressed. When cleared, notes outside the specified velocity range are passed through the filter unaltered.
- Passthrough Original
- When cleared, notes that are remapped are modified and subsequent filter items only see the modified event. When selected, notes that are remapped generate a new event and the original event is passed to the next filter item unaltered
Velocity/Controller Curve
The Velocity Curve filter item manipulates the values of velocity, controllers, aftertouch, channel pressure and pitch bend events.
- Apply to Channels
- The MIDI channels this filter should be applied to
- Event Kind
- The kind of MIDI event the curve should be applied to
- Curve/Enhance
- Controls the shape of the translation curve
- Curve Amount
- Controls the extent of the translation curve
- Minimum Input Value
- The input value that should be mapped to the minimum output value
- Maximum Input Value
- The input value that should be mapped to the maximum output value
- Minimum Output Value
- The minimum output value
- Maximum Output Value
- The maximum output value
The graph can be used to visualize the type of translation being applied to note velocities. The X-Axis represents the input values, the Y-Axis represents the output values.
Voice Allocator
The Voice Allocator maps notes out on different channels, and is intended for playing polyphonic on a monophonic synth by having several instances of the synth made available on different channels.
- Allocate Voices from Channel
- The MIDI channel this filter should be applied to
- To Channels
- The set of channels that notes should be allocated to.
Notes are allocated on the available channels picking the least recently used inactive channel. If all channels are active, then the least recently channel is used after sending a note-off event to release it.