1.Dd 1 August 1994 (Modified 22 February 1996)
2.Dt PLAYMIDI 1
3.Os "Linux 1.3.60+"
4.Sh NAME
5.Nm playmidi, xplaymidi, splaymidi
6.Nd midi file player
7.Sh SYNOPSIS
8.Nm [s|x]playmidi
9.Op Fl 8cCdeEfF4gGiImoprRtvVz
10.Op Ar
11.Sh DESCRIPTION
12.Nm playmidi
13is a full-featured midi file player for Linux systems or
14others using the Voxware 3.5 sound driver or newer.
15It can play back midi files on general midi devices or
16FM or Gravis Ultrasound.  If no files are specified,
17.Nm playmidi
18will give a summary of all command line options.
19If more than one file is specified, you can use xplaymidi or
20splaymidi or -r mode for interactive control, allowing
21you to skip to the previous song, next song, speed up
22or slow down the midi file, or repeat a midi file while viewing
23a real-time display of data in the midi file.
24.Sh OPTIONS
25Command line options are described below.
26(make sure to precede them with a dash (``-''))
27.Bl -hang -width 8
28.It Fl 8
29
30force the use of 8-bit patches with the gravis ultrasound
31to conserve memory.   Patches are automatically reloaded as
328-bit when memory runs out, but if you know in advance, you can
33save a step and speed up the loading process.
34.It Fl c#
35
36set the channel mask (in hexidecimal) of which channels to
37play from the midi file.   This is useful if you have a midi file
38with some channels that don't sound very good on your hardware.
39.It Fl d
40
41ignore any drum (percussion) tracks in a midi file. (See also
42.Fl m#
43).  This is useful for FM or any other hardware where percussion
44sounds especially bad.  Also useful for midi files where the
45percussion is poorly written.
46.It Fl e
47
48send output to external midi.   This is what you'll want to do
49if you have any midi hardware connected to your system.  This
50option is the default for playmidi as distributed.
51.It Fl f
52
53send output to fm synth using fm patches.  You'll need to use
54this option to playback on any non-midi soundcard with the
55exception of the gravis ultrasound.
56.It Fl 4
57
58send output to fm synth using 4-op OPL/3 patches (BROKEN!)
59Don't use this option since it doesn't work yet.
60.It Fl g
61
62send output to Gravis Ultrasound.  If you have a gravis ultrasound
63without anything connected to the midi port, this option is for you.
64.It Fl E#
65
66set mask of channels to always output to external midi.   If you want
67to use more than one playback device, this option allows you to specify
68what channels to send to the external midi port.  For example,
6900FF would send channels 1 - 8  to external midi.
70.It Fl F#
71
72set mask of channels to always output to fm.  Used as above.
73.It Fl G#
74
75set mask of channels to always output to gus.  Used as above.
76.It Fl i#
77
78set the channel mask (in hexidecimal) of which channels to
79ignore from the midi file.   This option is good for midi files
80with a few channels you don't want to listen to.
81.It Fl m#
82
83set the channel mask (in hexidecimal) of which channels to
84consider percussion channels.  See also
85.Fl d
86
87This option is good for midi files that don't conform to the
88default percussion arrangement of playmidi.  GM standard specifies
89percussion in channel 10 only.   Some files disobey that requiring
90this setting.
91.It Fl o#
92
93forces output to a given synth number (0-4).  This option is old
94and obsolete.  Don't use it.  It's probably been removed by the
95time you read this.
96.It Fl p[chan,]prog[,chan,prog...]
97
98forces a given program number (1-128) to be used for all output
99on given channel, or if no channel is specified, program will
100be used for all channels.  For example:
101.Fl p33
102sets all channels to program 33,
103.Fl p5,124
104sets just channel 5 to program 124, and
105.Fl p1,33,2,55,9,22,10,17
106sets channel 1 to program 33, channel 2 to program 55, channel 9
107to program 22, and channel 10 (percussive) to use the Power Drum Set.
108If you're using a Waveblaster, you'll want to use
109.Fl p10,129
110to set channel 10 to playback percussion.  You should quote arguments to
111.Fl p
112if you want to include whitespace between them.
113.It Fl I
114
115shows a list general midi programs and numbers.   This is intended to
116make it easier to use the above option.
117.It Fl t#
118
119skews tempo by a factor (float).   This is good for files you think
120the author wrote too slow or two fast.   Also good if you want to listen
121to lots of files at high-speeds, or play a file at slow speeds in order
122to learn to play a song on some instrument (like piano).
123.It Fl r
124
125real time ansi (25-line) playback graphics tracking of all
126notes on each channel and the current playback clock.
127This flag is assumed when using xplaymidi or splaymidi.
128.It Fl P#
129
130remap all percussion channels to play on given channel.  This
131is useful if you have a file with percussion on multiple midi
132channels and your midi hardware only supports percussion on
133one channel.  For example
134.Fl P10
135would send all percussion channels to channel 10.
136.It Fl R#
137
138set initial reverb level.  Valid range is 0 - 127.
139For fm, the setting is either "on" (nonzero), or "off" (zero).
140.It Fl C#
141
142set initial chorus level.  Valid range is 0 - 127.
143.It Fl Vchn,vel[,chn,vel...]
144
145set velocity for all notes in a channel.  All velocity information
146for the given channel will be replaced by the given velocity.  One
147day I'll change this option to allow all channels to be modified
148as with the
149.Fl p
150option.
151.It Fl x#
152
153excludes the given channel number from the mask of channels to
154load from the midi file.
155.It Fl z
156
157zero channel data in output stream -- for special applications.
158.Sh AUTHOR
159Nathan Laredo (laredo@gnu.ai.mit.edu)
160.Sh HISTORY
161.Nm playmidi
162was originally designed out of impatience with other midi
163players.  The startup time is negligable on all devices
164except gravis ultrasound (must wait for patches to load).
165The meaning of the various real-time displays is yet-to-be-documented.
166
167Playmidi 2.x is nearly a total re-write compared with the original 1.1
168release.
169.Sh BUGS
170splaymidi doesn't properly restore terminal mode on exit; you may
171want to use ";stty sane" at the end of any splaymidi command.
172GUS playback quality will improve as kernel driver improves.
173A lot of new features of playmidi are as of yet undocumented.
1744-op FM playback doesn't work.  Some incomplete or corrupted
175midi files may cause unpredictable results or seg faults.
176No other known bugs.  If you want new features or find undocumented
177ones (bugs), please email laredo@gnu.ai.mit.edu.
178