This article provides some detailed example and associated configuration file for MIDIRouter (https://github.com/NothNoth/MIDIRouter).
Using Pitch Wheel as an Aftertouch wheel
So your keyboard has a Pitch Wheel but not an aftertouch one? Worse, keyboard still uses channel 7 (and you’ve lost the manual) and you want Aftertouch events to be sent on channel 1.
It’s pretty easy so setup a simple configuration to convert Pitch Wheel messages into Aftertouch.
{
"SourceDevice": "Korg",
"DestinationDevice": "MOOG",
"DefaultPassthrough": false,
"Verbose": true,
"Rules": [
{
"Name": "Pitch Wheel to Aftertouch",
"Filter": {
"Name": "All Pitch Wheel",
"MsgType": "Pitch Wheel",
"Channel": "7",
"Settings": {
"Pitch": "*"
}
},
"Transform": {
"Mode": "None"
},
"Generator": {
"Name": "Aftertouch out",
"MsgType":"Aftertouch",
"Channel": "1",
"Settings": {
"Pressure": "$"
}
}
}
]
}
The header section of the figuration file is again qui simple, just set the input MIDI interface and the output one.
We can achieve our use case with just one simple rule.
Filter:
On the filter section, we set MsgType to « Pitch Wheel » in order to look for these messages on our input interface.
We use ‘7’ for midi channel because your Pitch Wheel events are sent on this channel (and you’ve lost the manual, remember).
We set the Pitch value to ‘*’ because we want to process all values.
Transform:
Again we won’t use the Transform section here, we want to map the complete pitch range (0 to 127) to aftertouch events (0 to 127), so we set it to « None ».
Generator:
We want to send Aftertouch events, so we set MsgType to « Aftertouch ».
We want to re-emit the message on the channel 1 instead of the original 7 channel: we set the Channel to ‘1’.
Now comes the (almost)-tricky part:
- Pitch Wheel have Pitch values
- Aftertouch have Pressure values
We want to copy the pitch value read from the Pitch Wheel event to the pressure value of the Aftertouch event. We canot use « * » as a Pressure value because Pitch Wheel and Aftertouch are distinct events.
On a Generator configuration, values can be set to:
- A given hardcoded value (what we did for the MIDI Channel)
- ‘*’: The original value of same type (what we did on our previous example with Note on events)
- ‘$’: The extracted value from the captured message
What value is extracted from the Pitch Wheel message? The Pitch value!
So by using « Pressure »: « $ » we just copy the extracted Pitch value to the Pressure value.
By using a similar technique, you could also use the Pitch Wheel to generate NoteOn events, use Notes to generate Program Change events and so on!