1.\" $NetBSD: midirecord.1,v 1.5 2015/09/23 05:31:01 mrg Exp $ 2.\" 3.\" Copyright (c) 1998, 1999, 2001, 2002, 2010 Matthew R. Green 4.\" All rights reserved. 5.\" 6.\" Redistribution and use in source and binary forms, with or without 7.\" modification, are permitted provided that the following conditions 8.\" are met: 9.\" 1. Redistributions of source code must retain the above copyright 10.\" notice, this list of conditions and the following disclaimer. 11.\" 2. Redistributions in binary form must reproduce the above copyright 12.\" notice, this list of conditions and the following disclaimer in the 13.\" documentation and/or other materials provided with the distribution. 14.\" 15.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 16.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 18.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 19.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 20.\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 22.\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 23.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25.\" SUCH DAMAGE. 26.\" 27.Dd July 22, 2015 28.Dt MIDIRECORD 1 29.Os 30.Sh NAME 31.Nm midirecord 32.Nd record midi files 33.Sh SYNOPSIS 34.Nm 35.Op Fl aDfhoqV 36.Op Fl B Ar buffersize 37.Op Fl c Ar channels 38.Op Fl d Ar devices 39.Op Fl f Ar sequencerdev 40.Op Fl n Ar notesperbeat 41.Op Fl R Ar roundbeats 42.Op Fl r Ar raw_output 43.Op Fl T Ar tempo 44.Op Fl t Ar time 45.Ar file 46.Sh DESCRIPTION 47The 48.Nm 49program converts the sequencer events read on 50.Ar sequencerdev 51to the named MIDI SMF output. 52If the file name is \-, output will go to the standard output. 53By default, timing for events begins with the first event. 54The 55.Fl o 56flag may be used to start timing events at the process start up. 57.Sh OPTIONS 58The following options are available: 59.Bl -tag -width XnXnotesperbeatX 60.It Fl a 61Append to the specified file, rather than overwriting. 62.It Fl B Ar buffersize 63Set the sequencer device read buffer size to 64.Ar buffersize . 65The default value is 32768 bytes. 66.It Fl c Ar channels 67Sets the filter list of channels to 68.Ar channels , 69which is a comma separated list of channels to filter in. 70.It Fl D 71Enable debug log. 72.It Fl d Ar devices 73Sets the filter list of devices to 74.Ar devices , 75which is a comma separated list of devices to filter in. 76.It Fl f Ar sequencerdev 77Sets the sequencer device to use to 78.Ar sequencerdev . 79The default is 80.Pa /dev/music . 81.It Fl h 82Print a help message. 83.It Fl n Ar notesperbeat 84Sets the MIDI notes (clocks) per beat to 85.Ar notesperbeat . 86.It Fl o 87Start the relative timer at process start up instead of at 88the first event. 89.It Fl q 90Be quiet. 91.It Fl R Ar roundbeats 92Round timings to 93.Ar roundbeats 94of a note. 95Output will always be aligned to this many beats. 96.It Fl r Ar raw_output 97Create the raw output of the sequencer device in 98.Ar raw_output . 99.It Fl T Ar tempo 100Set the tempo for the recording to 101.Ar tempo . 102.It Fl t Ar time 103Sets the maximum amount of time to record. 104Format is [hh:]mm:ss[.dddddd]. 105.It Fl V 106Be verbose. 107.El 108.Sh ENVIRONMENT 109.Bl -tag -width MIDIDEVICE 110.It Ev MIDIDEVICE 111the midi device to be used. 112.El 113.Sh SEE ALSO 114.Xr midiplay 1 , 115.Xr midi 4 , 116.Xr sequencer 4 117.Sh HISTORY 118The 119.Nm 120program was first seen in 121.Nx 7 . 122.Sh AUTHORS 123The 124.Nm 125program was written by 126.An Matthew R. Green Aq Mt mrg@eterna.com.au . 127.Sh BUGS 128SYSEX, LOCAL and FULLSIZE messages are not currently handled, but the 129.Nx 130.Xr sequencer 4 131device does not generate them. 132