transmidi
v1.0.0
Published
Translate midi messages
Downloads
6
Readme
_ _ _ _
| |_ _ __ __ _ _ __ ___ _ __ ___ (_) __| (_)
| __| '__/ _` | '_ \/ __| '_ ` _ \| |/ _` | |
| |_| | | (_| | | | \__ \ | | | | | | (_| | |
\__|_| \__,_|_| |_|___/_| |_| |_|_|\__,_|_|
Translate midi messages
Motivation
I have a Roland FC-100 MKII pedal board I wanted to use with Bias FX 2 and I didn't find any tool to translate program changes to the control changes required to command Bias FX 2.
Install
npm i -g transmidi
Usage without installation
npx transmidi [translations-file]
Usage
transmidi [translations-file]
Input selection
First, you'll select your midi input:
Output selection
Then, the midi output where translated messages will go to:
And after that you can start having fun!
On the left you'll see the input messages and on the right you'll see your translations.
Print help / usage
transmidi --help
Monitor mode
Start in monitor mode (will print all messages on the selected input):
transmidi
Sample translations file
const translations = {
192: {
0: [176, 81, 0],
1: [176, 82, 0],
2: [176, 83, 0],
3: [176, 84, 0],
4: [176, 85, 0],
5: [176, 86, 0],
6: [176, 87, 0],
7: [176, 88, 0]
},
176: {
80: {
127: [176, 81, 0],
0: [176, 82, 0]
}
}
}
module.exports = translations
Translations file
The translations file is what you need to tell transmidi how to translate a given input into the desired input.
Midi messages are composed of: [status, data1, data2]
.
You can read more in midi, the core midi package used by transmidi to work its magic.
Message can have one or two data elements.
Let's say you want to translate [192, 0]
into [176, 81, 0]
, that's:
{
192: {
0: [176, 81, 0]
}
}
If you have a message with two data elements, for example, [176, 80, 0]
, and you want to translate it into [176, 81, 0]
, you'll need:
{
176: {
81: {
0: [176, 81, 0]
}
}
}
Simple right?! 😁
If you know some JavaScript, you'll notice you match input messages with an object and translations are always arrays.
And you don't need to know the input midi messages beforehand, transmidi got you covered there too! Just run transmidi
and you'll get into monitor mode, where you'll be able to see all the midi messages generated by your device.
Enjoy!