PMIDI(1)

✨ NAME ✨

pmidi β€” a midi file player for ALSA. that's the whole thing, that's the vibe πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

pmidi [ -pclient:port ] [ -l ] [ -ddelay ] file...

🌸 DESCRIPTION 🌸

okay bestie so pmidi reads in the midi files you hand it and plays them through the ALSA sequencer. iconic behavior, no notes. 🎢

you can specify on the command line which sequencer port you want it to use β€” your call, your port. and if you're sitting there like "girl, which ports do i even have" then you use the -l option and it gives you a list of possible sequencer ports for your machine. easy. ✨

πŸ’… OPTIONS πŸ’…

  • -pclient:port β€” specify the ALSA port to send the midi file to. that's the one, that's your port 🫢
  • -l β€” list the possible output ports that could be used. window shopping, but for ports πŸ’–
  • -ddelay β€” delay after song ends. this exists so the last note of a song doesn't get chopped off early (the disrespect 😭). the default is two seconds.

πŸ”’ Port numbers πŸ”’

you can specify client:port numbers in the ALSA_OUTPUT_PORTS environment variable. you can also supply a comma-separated list of client:port numbers β€” or a space-separated one if you quote it correctly, mind the quoting bestie β€” and the reason you'd do that is it lets you play midi files that use more than 16 channels. slay 🌈

πŸ“ Examples πŸ“

pmidi song.mid song2.mid
pmidi -p "64:0, 64:1" song.mid

😭 TROUBLE SHOOTING 😭

before you start, you need to have ALSA installed and configured correctly. periodt. this man page cannot cover all general ALSA topics, but here are a few things to check when things do not seem to be working. 🫠

πŸ¦‹ Checking ALSA πŸ¦‹

  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.
    • For the OPL2/3 internal synthesiser you need to load snd-synth-opl3.
    • For the AWE32/64 internal synthesiser you need to load snd-synth-emu8000.
    • For the SB Live! internal synthesiser you need to load snd-synth-emu10k1.
    • (Let me know of any more)

2a If you have an AWE32/64 or SB Live! you will need to load the sounds with sfxload in the same way as for the standard kernel drivers.

2b If you have the OPL3 FM synthesiser you will have to load the FM instruments with sbiload. See note below.

  1. Make sure that the synth in the mixer is turned up and unmuted if appropriate. πŸ”Š

πŸ‘‘ Before use πŸ‘‘

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. main character decision energy, honestly.

first find out what the possibilities are for your system:

if you run:

pmidi -l

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    Rawmidi 0 - EMU10K1 MPU-401 (U   EMU10K1 MPU - 401 (UART)
65:0    Emu10k1 WaveTable                Emu10k1 Port 0
65:1    Emu10k1 WaveTable                Emu10k1 Port 1
65:2    Emu10k1 WaveTable                Emu10k1 Port 2
65:3    Emu10k1 WaveTable                Emu10k1 Port 3
128:0   FLUID Synth (28152)              Synth input port (28152)
129:0   Client-129                       TiMidity port 0
129:1   Client-129                       TiMidity port 1

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, the next four are the internal wave table synthesiser. then there are two software synthesisers running, FluidSynth (http://www.fluidsynth.org) and Timididy. πŸ’€ the range of it all.

if you don't see anything listed then check that the correct ALSA modules are loaded as in the section "Checking ALSA". πŸ”


πŸ’œ ENVIRONMENT πŸ’œ

  • ALSA_OUTPUT_PORTS β€” Port to use in playing midi file.

⭐ SEE ALSO ⭐

playmidi(1)


🌟 AUTHOR 🌟

Steve Ratcliffe <sr@parabola.me.uk>


and that's the page, bestie β€” straight out of the General Commands Manual, dated Dec 20 2003, and yes it's PMIDI(1) πŸŽ€ go play something gorgeous πŸ¦‹βœ¨