Annotation of src/usr.bin/aucat/midicat.1, Revision 1.4
1.4 ! ratchov 1: .\" $OpenBSD: midicat.1,v 1.3 2009/09/27 11:51:20 ratchov Exp $
1.1 ratchov 2: .\"
3: .\" Copyright (c) 2006 Alexandre Ratchov <alex@caoua.org>
4: .\"
5: .\" Permission to use, copy, modify, and distribute this software for any
6: .\" purpose with or without fee is hereby granted, provided that the above
7: .\" copyright notice and this permission notice appear in all copies.
8: .\"
9: .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10: .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11: .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12: .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13: .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14: .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15: .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16: .\"
1.4 ! ratchov 17: .Dd $Mdocdate: September 27 2009 $
1.1 ratchov 18: .Dt MIDICAT 1
19: .Os
20: .Sh NAME
21: .Nm midicat
22: .Nd MIDI server and manipulation tool
23: .Sh SYNOPSIS
24: .Nm midicat
1.4 ! ratchov 25: .Op Fl dl
1.1 ratchov 26: .Op Fl f Ar device
27: .Op Fl i Ar file
28: .Op Fl o Ar file
29: .Op Fl U Ar unit
30: .Sh DESCRIPTION
31: The
32: .Nm
33: utility is used to manipulate MIDI data.
34: It can send and receive MIDI data from MIDI ports,
35: or it can create software MIDI thru boxes,
36: allowing any MIDI-capable application to
37: send MIDI messages to MIDI hardware
38: or to another application in a uniform way.
39: .Pp
40: The options are as follows:
41: .Bl -tag -width Ds
42: .It Fl f Ar device
43: The
44: .Xr midi 4
45: device or
46: .Nm
47: socket to use for MIDI input/output.
1.2 ratchov 48: In server mode, devices are subscribed to the MIDI thru box.
1.4 ! ratchov 49: .It Fl d
! 50: Do not daemonize.
! 51: If this option is specified,
! 52: .Nm
! 53: will run in the foreground and log to
! 54: .Em stderr .
1.1 ratchov 55: .It Fl i Ar file
1.2 ratchov 56: Send contents of this file to the device.
1.1 ratchov 57: If the option argument is
58: .Sq -
59: then standard input will be used.
60: .It Fl l
61: Listen for incoming connections on Unix domain sockets.
62: This allows clients to use
63: .Nm
64: instead of the regular
65: .Xr midi 4
66: device as a software MIDI thru box.
67: .It Fl o Ar file
68: Store received data from the device into this file.
69: If the option argument is
70: .Sq -
71: then standard output will be used.
72: .It Fl U Ar unit
73: Use the given unit number when creating a software MIDI thru box.
74: Only one
75: .Nm
76: process can expose a unit number at a given time.
77: The default is 0.
78: .El
79: .Pp
80: If
81: .Nm
82: is sent
83: .Dv SIGHUP ,
84: .Dv SIGINT
85: or
86: .Dv SIGTERM ,
87: then processing terminates.
88: .Sh SERVER MODE
89: .Nm
90: can be used in server mode
91: .Pq Fl l
92: to create MIDI thru boxes.
93: A MIDI thru box allows multiple receivers
94: to receive data from a single source.
95: Additionaly,
96: .Nm
97: software thru boxes allow multiple sources to be connected
98: to them; in this case MIDI byte-streams are merged,
99: preserving MIDI message integrity.
100: This feature is provided to allow multiple applications
101: acting as sources to keep their connection open while
102: idling; it does not replace a fully featured MIDI merger.
103: .Pp
104: It is generally not desirable to have multiple instances of
105: .Nm
106: running in server mode, so it is good practice to start it thus:
107: .Bd -literal -offset indent
108: $ pgrep -x midicat || midicat -l
109: .Ed
110: .Pp
111: Generally MIDI applications are real-time.
112: To reduce jitter, especially on busy machines, the
113: .Xr renice 8
114: command can be used to give a higher priority to the
115: .Nm
116: process.
117: Superuser privileges are required.
118: For example:
119: .Bd -literal -offset indent
120: $ midicat -l
121: $ sudo renice -n -20 -p `pgrep -x midicat`
122: .Ed
123: .Sh SEE ALSO
124: .Xr aucat 1 ,
125: .Xr midi 4 ,
126: .Xr sndio 7