Introduction

pmidi ALSA

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.

Download

sourceforge download

For latest ALSA-1.0 and later 0.9 versions
pmidi-1.6.0.tar.gz
(20 Dec 2003)


For latest ALSA-0.9-rc6
pmidi-1.5.5.tar.gz
(1 Dec 2002)


For earlier ALSA-0.9 CVS versions
pmidi-1.5.4.tar.gz
(15 Aug 2001)


Version for ALSA-0.5.x
pmidi-1.4.2.tar.gz
(15 Aug 2001)


Usage

Before use

  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 load snd-synth-emu8000.


  2. If you have an AWE32/64 you will need to load the sounds with sfxload as with the standard kernel drivers.


  3. Make sure that the synth in the mixer is turned up and unmuted if appropriate.


Find out the correct port number

pmidi -l
 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
pmidi

Running pmidi

-p ALSA_OUT_PORT

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

OPL3 FM synthesizer

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
http://www.kss-loka.si/~uros/sbiload.html

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.

Acknowledgements

Hosted at Sourceforge.

Get pmidi alsa midi client at SourceForge.net.
  Fast, secure and Free Open Source software downloads



Copyright © Steve Ratcliffe 2008.