As you can specify the client and port to connect to on the command line it is also useful for testing ALSA or clients that need to receive sequencer events.
This program does not have a graphical display, if you require one then you can use pmidi in conjunction with Takashi Iwai's aseqview program to display the song being played.sourceforge download
- For latest ALSA-1.0 and later 0.9 versions
(20 Dec 2003)
- For latest ALSA-0.9-rc6
(1 Dec 2002)
- For earlier ALSA-0.9 CVS versions
(15 Aug 2001)
- Version for ALSA-0.5.x
(15 Aug 2001)
First check that the correct sequencer modules are loaded
for your sound card.
For a card with an external Midi connection, you need to
snd-seq-midiand for the AWE32/64 internal synthesizer you need to load
- If you have an AWE32/64 you will need to load the sounds with sfxload as with the standard kernel drivers.
- Make sure that the synth in the mixer is turned up and unmuted if appropriate.
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
For example to use port 0 on client 65:
pmidi -p 65:0 song.mid
export ALSA_OUT_PORT=65:0 pmidi 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
This is what has to be done to use the OPL3 FM synthesizer with pmidi (provided that the ALSA module snd-card-opl3sa2 is already loaded)
# modprobe -k snd-synth-opl3 $ sbiload -l # (same as pmidi -l) Port Client name Port name 64:0 External MIDI 0 MIDI 0-0 65:0 OPL3 FM synth OPL3 Port $ sbiload -p65:0 --opl3 std.o3 drums.o3 $ pmidi -p65:0 sample.midi
For laptops the sound card (or the driver?) does not keep the instruments patch after suspend so sbiload should be called at resume (as well as alsactl restore)
It should be said that ALSA+pmidi plays with better quality than OSS/Free but that in general FM synthesizers are not great for good midi.
Hosted at Sourceforge.