Skip to content

choccydev/midiboard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

87 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MidiBoard

CLI tool to trigger arbitrary commands using any MIDI 1.0 compatible device.

Docs are oudated; trust more the schema file than this until it's updated

1. What is this?

This tool lets the user associate any executable commands to actions in one or more MIDI devices, like changing volume, altering backlight level, changing a song, starting/stopping a service, or launching any script/executable, on the press of a button or turn of a knob.

2. Getting Started

To use this software you need to install it, define a configuration, and then either run at-will or daemonize the process. The most cumbersome part, of course is writing the configuration file.

For details check the docs.

3. Install

3.1. Cargo

cargo install midiboard

3.2. Manual

  1. Clone

    git clone https://github.com/aordano/midiboard.git
  2. Build

    cd midiboard
    cargo build --release
  3. Copy binary

    sudo cp ./target/release/midiboard /usr/bin/midiboard

4. Configuration

For details on the configuration file check the config docs page.

For help using the CLI, there is integrated help via the --help flag.

4.1. Create a skeleton

This will create it at $HOME/midiboard.json. Optionally add a --path flag to change the output location:

midiboard config --generate

4.2. Define your device

Get the name of your device and put it in the device field in the config:

midiboard devices --list

4.3. Define each command

Listen to the input to know what Is the numerical key value of your chosen knob/button/key:

midiboard devices --input [DEVICE_NAME]

With that value you can fill the corresponding entry on the config file.

5. Running

5.1. Manually

By default it will expect a config file at $HOME/midiboard.json.Optionally add a --path flag to change the output location:

midiboard run

5.2. Daemonized

  1. Get the service file

    wget -O midiboard.service https://raw.githubusercontent.com/aordano/midiboard/master/schema/midiboard.service
  2. Patch and move the service file

    sed -i "s/@USER@/$(whoami)/g" midiboard.service
    sudo mv midiboard.service /etc/systemd/system/midiboard.service

    The file uses the default config location. Modify the service file if you have an alternate path for the config file (add the --path flag).

  3. Enable the service

    sudo systemctl daemon-reload
    sudo systemctl enable --now midiboard