Scroll to navigation

MIDIMINDER-DAEMON(8) System Manager's Manual MIDIMINDER-DAEMON(8)

NAME

midiminder-daemon - MIDI device connection daemon

SYNOPSIS

midiminder [-v|-q] daemon [-p]

DESCRIPTION

The midiminder daemon maintains a set of desired connections (the profile) between ALSA sequencer MIDI ports.

ALSA provides library calls, and a user tool aconnect(1) for connecting pairs of ports. However, these connections are lost when either of the member of the pair disappears, such as if a MIDI device is unplugged, or an application with ports exits. Restoring the port doesn't restore the prior connections it had. As MIDI gear is often inadvertently unplugged and replugged, or power cycled, losing these connections is a significant frustration.

The midiminder daemon takes care of this: It tracks what connections were desired between ports, and automatically reestablishes those connections when ports reattach to the system. Connections (and disconnections) initiated by the user (or applications) are tracked and remembered as well. The whole desired connection state is persistent, even across system reboots, so that the configuration is quickly maintained once devices power back up and applications restarted.

State

The desired connection state is composed of two parts:

The profile is a list of rules for which ports to connect. It is written in a simple syntax that makes it possible to express these connections, even when the devices aren't current connected. The commands in midiminder(1) are used by the user to load, save, and reset the profile. The user can have multiple profile files prepared, and by loading them, reconfigure all the connections with one command.
These are a set of rules the daemon learns by observing connections made by the user via commands such as aconnect(1) and by other software. These rules are considered to override any profile rules, should they conflict. This allows a change from the current profile to be just as robust as the profile itself. The user can also easily drop the observed rules by loading another profile, or using the midiminder reset command.

Both parts of the connection state are persisted into the file system so that they survive restarts of the daemon, or the whole system.

OPTIONS

Increases output message verbosity. Can be applied twice, which increase output to debugging level.
Suppress all output except errors, and basic logging to know the daemon is running.
Causes output of all ALSA sequencer port information when ports are added or re-scanned by the daemon. This information is primarily for understanding how a piece of hardware is representing itself to the ALSA sequencer.

ENVIRONMENT

These variables are normally set by systemd(8) before it launches the daemon.

The path to the directory that the daemon uses to hold a copies of both the profile rules and the observed rules. This directory should not be on a temporary file system so that the desired connection state survives reboots.

The path to the directory that has the UNIX-domain socket used to communicate between the control commands and the running daemon.

Note: If the system configuration is changed such that the midiminder daemon is launched with a non-default value for this variable, it must also be set the same way when using any of the control commands.

FILES

/var/lib/midiminder
The default location of the state directory.

/run/midiminder
The default location of the runtime directory.

The current, loaded profile rules. Located in the state directory.

The observed rules. Located in the state directory.

A UNIX-domain socket, located in the runtime directory. It is used to communicate between the control commands and the daemon.

SEE ALSO

midiminder(1), midiminder-profile(5)