MIDICAT(1)                 OpenBSD Reference Manual                 MIDICAT(1)

NAME
     midicat - MIDI server and manipulation tool

SYNOPSIS
     midicat [-dl] [-f device] [-i file] [-o file] [-U unit]

DESCRIPTION
     The midicat utility is used to manipulate MIDI data.  It can send and re-
     ceive MIDI data from MIDI ports, or it can create software MIDI thru box-
     es, allowing any MIDI-capable application to send MIDI messages to MIDI
     hardware or to another application in a uniform way.

     The options are as follows:

     -d      Do not daemonize.  If this option is specified, midicat will run
             in the foreground and log to stderr.

     -f device
             The midi(4) device or midicat socket to use for MIDI input/out-
             put.  In server mode, devices are subscribed to the MIDI thru
             box.

     -i file
             Send contents of this file to the device.  If the option argument
             is `-' then standard input will be used.

     -l      Listen for incoming connections on UNIX-domain sockets.  This al-
             lows clients to use midicat instead of the regular midi(4) device
             as a software MIDI thru box.

     -o file
             Store received data from the device into this file.  If the op-
             tion argument is `-' then standard output will be used.

     -U unit
             Use the given unit number when creating a software MIDI thru box.
             Only one midicat process can expose a unit number at a given
             time.  The default is 0.

     If midicat is sent SIGHUP, SIGINT or SIGTERM, then processing terminates.

SERVER MODE
     midicat can be used in server mode (-l) to create MIDI thru boxes.  A MI-
     DI thru box allows multiple receivers to receive data from a single
     source.  Additionaly, midicat software thru boxes allow multiple sources
     to be connected to them; in this case MIDI byte-streams are merged, pre-
     serving MIDI message integrity.  This feature is provided to allow multi-
     ple applications acting as sources to keep their connection open while
     idling; it does not replace a fully featured MIDI merger.

     It is generally not desirable to have multiple instances of midicat run-
     ning in server mode, so it is good practice to start it thus:

           $ pgrep -x midicat || midicat -l

     Generally MIDI applications are real-time.  To reduce jitter, especially
     on busy machines, the renice(8) command can be used to give a higher pri-
     ority to the midicat process.  Superuser privileges are required.  For
     example:

           $ midicat -l
           $ sudo renice -n -20 -p `pgrep -x midicat`

SEE ALSO
     aucat(1), midi(4), sndio(7)

OpenBSD 4.7                    October 22, 2009                              2
