This is pmidi - a command line midi player for ALSA
Written by Steve Ratcliffe <email@example.com>
See the file COPYING for licence details.
Build and install
You should be able to just type 'make'. All configuration variables
are in make.conf if you need to change anything.
By default it will install into /usr/local/bin, change INSTDIR in
make.conf to change this.
1. First check that the correct sequencer modules are
loaded for your sound card. For a card with an external
Midi connection, you need to load snd-seq-midi and
for the AWE32/64 internal synthesizer you need to
2. If you have an AWE32/64 you will need to load the
sounds with sfxload in the same way as for the standard kernel
3. Make sure that the synth in the mixer is turned
up and unmuted if appropriate.
pmidi [-p client:port ...] [-l] [-d delay] file ...
-p client:port - A alsa client and port number to send midi to
-l - List possible output ports that could be used
-d delay - Delay after song ends (default 2 sec)
Because you may have more than one sound card and each sound
card may have several MIDI connections, you have to tell pmidi
which one to use.
First find out what the possibilities are for your system:
If you run:
it will give you a list of the possible devices that it
can play to. On my system I get:
Port Client name Port name
64:0 0: MIDI Synth MIDI 0-0
65:0 AWE Wave Table Synth : 0 Emu8000 port 0
65:1 AWE Wave Table Synth : 0 Emu8000 port 1
65:2 AWE Wave Table Synth : 0 Emu8000 port 2
65:3 AWE Wave Table Synth : 0 Emu8000 port 3
Any of the port numbers in the first column can be used with pmidi. In
the example above the first one is the external Midi port, and the other
four are the internal wavetable synthesizer.
If you don't see anything listed then check that the correct ALSA modules
are loaded as in the section "Before use".
You specify the port or ports to use with the -p option,
or by setting the environment variable ALSA_OUT_PORT.
For example to use port 0 on client 65:
pmidi -p 65:0 song.mid
A list of client ports can be supplied, which will be used
if the midi file contains port select sequences.
pmidi -p 65:0,65:1,65:2,65:3 song.mid
You can also use spaces to separate with suitable quoting
on the command line.
Thanks to Frank van de Pol, Takashi Iwai and Paul Leonard
for reporting problems and patches.
Where to report bugs and feedback
Please report any problems to firstname.lastname@example.org