Annotation of src/usr.bin/aucat/midicat.1, Revision 1.6
1.6 ! ratchov 1: .\" $OpenBSD: midicat.1,v 1.5 2009/10/12 17:32:33 sobrado 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.6 ! ratchov 17: .Dd $Mdocdate: October 12 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
1.5 sobrado 42: .It Fl d
43: Do not daemonize.
44: If this option is specified,
45: .Nm
46: will run in the foreground and log to
47: .Em stderr .
1.1 ratchov 48: .It Fl f Ar device
49: The
50: .Xr midi 4
51: device or
52: .Nm
53: socket to use for MIDI input/output.
1.2 ratchov 54: In server mode, devices are subscribed to the MIDI thru box.
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
1.6 ! ratchov 61: Listen for incoming connections on
! 62: .Ux Ns -domain
! 63: sockets.
1.1 ratchov 64: This allows clients to use
65: .Nm
66: instead of the regular
67: .Xr midi 4
68: device as a software MIDI thru box.
69: .It Fl o Ar file
70: Store received data from the device into this file.
71: If the option argument is
72: .Sq -
73: then standard output will be used.
74: .It Fl U Ar unit
75: Use the given unit number when creating a software MIDI thru box.
76: Only one
77: .Nm
78: process can expose a unit number at a given time.
79: The default is 0.
80: .El
81: .Pp
82: If
83: .Nm
84: is sent
85: .Dv SIGHUP ,
86: .Dv SIGINT
87: or
88: .Dv SIGTERM ,
89: then processing terminates.
90: .Sh SERVER MODE
91: .Nm
92: can be used in server mode
93: .Pq Fl l
94: to create MIDI thru boxes.
95: A MIDI thru box allows multiple receivers
96: to receive data from a single source.
97: Additionaly,
98: .Nm
99: software thru boxes allow multiple sources to be connected
100: to them; in this case MIDI byte-streams are merged,
101: preserving MIDI message integrity.
102: This feature is provided to allow multiple applications
103: acting as sources to keep their connection open while
104: idling; it does not replace a fully featured MIDI merger.
105: .Pp
106: It is generally not desirable to have multiple instances of
107: .Nm
108: running in server mode, so it is good practice to start it thus:
109: .Bd -literal -offset indent
110: $ pgrep -x midicat || midicat -l
111: .Ed
112: .Pp
113: Generally MIDI applications are real-time.
114: To reduce jitter, especially on busy machines, the
115: .Xr renice 8
116: command can be used to give a higher priority to the
117: .Nm
118: process.
119: Superuser privileges are required.
120: For example:
121: .Bd -literal -offset indent
122: $ midicat -l
123: $ sudo renice -n -20 -p `pgrep -x midicat`
124: .Ed
125: .Sh SEE ALSO
126: .Xr aucat 1 ,
127: .Xr midi 4 ,
128: .Xr sndio 7