midi-relay was written by Joseph Adams and is distributed under the MIT License.
It is not sold, authorized, or associated with any other company or product.
To contact the author or for more information, please visit www.techministry.blog.
midi-relay is designed to allow you to send an HTTP POST request, with JSON data in the body, to the server, which will then send out the appropriate MIDI message to a MIDI port/device available to that server. It can be used to send MIDI across networks and subnets. It can also listen to incoming MIDI messages on ports available to the server and then act on them, sending HTTP requests, running scripts, etc.
RUNNING THIS SOFTWARE FROM BINARY:
- Download a binary release from https://github.com/josephdadams/midi-relay/releases for your OS.
- As of v3.0.0, only desktop application versions are available. To run midi-relay from terminal, use an older version.
RUNNING DIRECTLY WITHIN NODE FOR VERSIONS < 3.0:
- Install
node
if not already installed. https://nodejs.org/en/download/ - Download the midi-relay source code.
- Open a terminal window and change directory to the folder where you placed the source code.
- Type
node main.js
within the this folder. - If this folder does not contain the
midi_triggers.json
file, a new one will be created the next time you add a trigger either via the API or the Settings page.
RUNNING AS A SERVICE, FOR VERSIONS < 3.0:
- Open a terminal window and change directory to the folder where you placed the source code.
- Install the Node.js library,
pm2
, by typingnpm install -g pm2
. This will install it globally on your system. - After
pm2
is installed, typepm2 start main.js --name midi-relay
to daemonize it as a service. - If you would like it to start automatically upon bootup, type
pm2 startup
and follow the instructions on-screen. - To view the console output while running the software with
pm2
, typepm2 logs midi-relay
.
This program runs an HTTP server listening on port 4000
. If this port is in use and cannot be opened, you will receive an error.
Upon startup, the program will enumerate through the available MIDI output ports.
This program is designed to work with a partner module for Bitfocus Companion, however an API is available should you desire to work with it through your own third-party control systems.