.\" $OpenBSD: midicat.1,v 1.2 2018/11/30 08:00:43 jmc Exp $ .\" .\" Copyright (c) 2015 Alexandre Ratchov .\" .\" Permission to use, copy, modify, and distribute this software for any .\" purpose with or without fee is hereby granted, provided that the above .\" copyright notice and this permission notice appear in all copies. .\" .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" .Dd $Mdocdate: November 30 2018 $ .Dt MIDICAT 1 .Os .Sh NAME .Nm midicat .Nd send to or receive from MIDI ports .Sh SYNOPSIS .Nm midicat .Bk -words .Op Fl d .Op Fl i Ar file .Op Fl o Ar file .Op Fl q Ar port .Ek .Sh DESCRIPTION The .Nm utility receives MIDI data from the given input MIDI port and/or sends it to the given output MIDI port. The options are as follows: .Bl -tag -width Ds .It Fl d Dump transferred data in hex on stderr. .It Fl i Ar file Read MIDI data from this file instead of receiving it from the MIDI port. If the option argument is .Sq - then standard input will be used. .It Fl o Ar file Write MIDI data to this file instead of sending it to the MIDI port. If the option argument is .Sq - then standard output will be used. .It Fl q Ar port Use this .Xr sndio 7 MIDI port for input/output. If the option is used twice, the first one specifies the input port and the second one the output port. .El .Pp If no files are specified, then .Nm transfers data from the MIDI input port to the MIDI output port. .Sh EXAMPLES Send the given file to .Pa rmidi/0 : .Bd -literal -offset indent $ midicat -i file.syx -q rmidi/0 .Ed .Pp Dump data received from .Pa rmidi/0 to stderr: .Bd -literal -offset indent $ midicat -d -q rmidi/0 -o /dev/null .Ed .Pp Send data from .Pa rmidi/0 to .Pa midithru/0 : .Bd -literal -offset indent $ midicat -q rmidi/0 -q midithru/0 .Ed .Sh SEE ALSO .Xr midi 4 , .Xr sndio 7 , .Xr sndiod 8