xref: /netbsd-src/usr.bin/midiplay/midiplay.1 (revision 413d532bcc3f62d122e56d92e13ac64825a40baf)
1.\" $NetBSD: midiplay.1,v 1.19 2010/01/16 08:50:29 mbalmer Exp $
2.\" Copyright (c) 1998 The NetBSD Foundation, Inc.
3.\" All rights reserved.
4.\"
5.\" Author: Lennart Augustsson
6.\"
7.\" Redistribution and use in source and binary forms, with or without
8.\" modification, are permitted provided that the following conditions
9.\" are met:
10.\" 1. Redistributions of source code must retain the above copyright
11.\"    notice, this list of conditions and the following disclaimer.
12.\" 2. Redistributions in binary form must reproduce the above copyright
13.\"    notice, this list of conditions and the following disclaimer in the
14.\"    documentation and/or other materials provided with the distribution.
15.\"
16.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
17.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
18.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
20.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
23.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26.\" POSSIBILITY OF SUCH DAMAGE.
27.\"
28.Dd January 16, 2010
29.Dt MIDIPLAY 1
30.Os
31.Sh NAME
32.Nm midiplay
33.Nd play MIDI and RMID files
34.Sh SYNOPSIS
35.Nm
36.Op Fl d Ar devno
37.Op Fl f Ar file
38.Op Fl l
39.Op Fl m
40.Op Fl p Ar pgm
41.Op Fl q
42.Op Fl t Ar tempo
43.Op Fl v
44.Op Fl x
45.Op Ar file ...
46.Sh DESCRIPTION
47The
48.Nm
49command plays MIDI and RMID files using the sequencer device.
50If no file name is given it will play from standard input, otherwise
51it will play the named files.
52.Pp
53RMID files are Standard MIDI Files embedded in a RIFF container and
54can usually be found with the
55.Sq rmi
56extension.
57They contain some
58additional information in other chunks which are not parsed by
59.Nm
60yet.
61.Pp
62The program accepts the following options:
63.Bl -tag -width Fl
64.It Fl d Ar devno
65specifies the number of the MIDI device used for output (as listed
66by the
67.Fl l
68flag).
69There is no way at present to have
70.Nm
71map playback to more than one device.
72The default is device is given by environment variable
73.Ev MIDIUNIT .
74.It Fl f Ar file
75specifies the name of the sequencer device.
76.It Fl l
77list the possible devices without playing anything.
78.It Fl m
79show MIDI file meta events (copyright, lyrics, etc).
80.It Fl p Ar pgm
81force all channels to play with the single specified
82program (or instrument patch, range 1-128).
83Program change events in the file will be suppressed.
84There is no way at present to have
85.Nm
86selectively map channels or instruments.
87.It Fl q
88specifies that the MIDI file should not be played, just parsed.
89.It Fl t Ar tempo-adjust
90specifies an adjustment (in percent) to the tempi recorded in the file.
91The default of 100 plays as specified in the file, 50 halves every tempo,
92and so on.
93.It Fl v
94be verbose.
95If the flag is repeated the verbosity increases.
96.It Fl x
97play a small sample sound instead of a file.
98.El
99.Pp
100A file containing no tempo indication will be played as if it specified
101150 beats per minute.
102You have been warned.
103.Sh ENVIRONMENT
104.Bl -tag -width MIDIUNIT
105.It Ev MIDIUNIT
106the default number of the MIDI device used for output.
107The default is 0.
108.El
109.Sh FILES
110.Bl -tag -width /dev/music
111.It Pa /dev/music
112MIDI sequencer device
113.El
114.Sh SEE ALSO
115.Xr midi 4
116.Sh HISTORY
117The
118.Nm
119command first appeared in
120.Nx 1.4 .
121.Sh BUGS
122It may take a long while before playing stops when
123.Nm
124is interrupted, as the data already buffered in the sequencer will contain
125timing events.
126