ALSA utility to keep your MIDI devices connected
- Using
aconnect
to reconnect your devices and your software gets old quick. - If you power cycle a synth... you've got to
aconnect
it again. - Bandmate "helps" by unplugging a USB cord to untanlge and plugs it in again: Now you're controller is disconnected.
amidiminder
is a program that runs as a service. It will:
-
Reads a rules file of connections you'd like made.
-
When the MIDI devices & software -
amidimider
will automatically connect them according to the rules. -
It also Watches any connections you make with
aconnect
or that your software makes, and remembers them too. -
If any MIDI port goes away (power cycle, pulled USB cord, etc..), ALSA will silentlly remove the connections... ... But when the MIDI port comes back -
amidimider
's got your back and will connect them right back up again just as they were.
Prerequisites:
- g++, 6 or later
- make
- libasound2-dev
sudo apt install g++ make libasound2-dev
Clone this repo and run make
:
git clone https://github.com/mzero/amidiminder.git
cd amidiminder
make
Outputs:
- build executable is in
build/amidiminder
. - deb package is in
build/amidiminder.deb
.
Installing the built deb package will install a systemd service that runs
amidiminder
at startup.
sudo dpkg -i build/amidiminder.deb
That's it. — It's installed. — It's running — You're done!
amidiminder
reads a rules file from /etc/amidiminder.rules
. If you edit
that file, you can first check it is legal:
amidiminder -C # checks the rules and then quits
Then, restart the service:
sudo systemctl restart amidiminder
Example:
nanoKEY2 --> Circuit
# connects the first port for each device as shown
bicycle <-- Launchpad Pro MK3
bicycle <-- Launchpad Pro MK3:2
bicycle:synths --> Circuit
# the port direction can go which ever way is convienent for you
# ports can be specified by number or by name
amidiauto by Blokas Labs.
https://github.com/CLIUtils/CLI11 CLI11 1.8 Copyright (c) 2017-2019 University of Cincinnati, developed by Henry Schreiner under NSF AWARD 1414736. All rights reserved.