[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: getting going with midi




> I have an audigy card and pmidi installed. I can play wav, mpeg,
> etc. files etc. using applications such as gxine and xmms. However, I
> would now like to play a .midi file.
> 
> I have pmidi installed. To find the available ports I do:
> 
>    $ pmidi -l
>    Port     Client name                       Port name
>    64:0     Audigy MPU-401 (UART) - Rawmid    Audigy MPU-401 (UART)
>    64:32    Audigy MPU-401 (UART) - Rawmid    Audigy MPU-401 #2 
> 
> I have a symlink /dev/midi --> /dev/midi00. The midi00 is 660
> root:audio. User is in the audio group.
> 
> So then I'd assume this command should play a midi file:
> 
>    $ pmidi -p 64:0 filename.midi
> 
> But instead, it just hangs with no sound out.
> 
> Any suggestions

My main suggestion is to do some reading, in particular about what
midi is.  Google Is Your Friend here; that's how most people figure
this stuff out.

To get you started:

A midi file does not contain information about sounds to be reproduced,
as e.g. a .wav file or an .mp3 file do.  Instead, it contains a sequence
of midi instructions (not unlike a computer program), which must be
acted upon by a midi controller that knows how to interpret them.
Typically, such a controller is in a synthesizer, and so when you
"play" a midi file what you're really doing is feeding a set of
instructions ("start playing note #43 on instrument #2 now" . . ."stop
playing note #7 on instrument #16 now" . . .) to a synthesizer.

IIRC (and someone please jump in if I'm wrong -- I don't have access
to my audio docs right now), 64:0 is the MPU-401 raw MIDI output --
the MIDI port on the back of your sound card.   So when you send
a sequence of MIDI instructions there, the computer is trying to
send them to the external synthesizer that you've got hooked up
to your computer via a MIDI cable.  Don't have one of those?  Then
you're not going to hear anything.  Your computer is sending the
sequence of instructions, but nothing is listening to act upon
them.

"But wait," you say, "I know other people with this soundcard are
able to hear music when they play a MIDI file."  Well, it turns out
that the SB Live, the SB Audigy, etc., have a cheap wavetable
synthesizer on the card itself.  So you can send MIDI instructions
to that wavetable synth, and it'll execute them and make sound.
But for that to happen,

1 -- you have to have the right modules (drivers) installed.  The
fact that you only saw the 64:0 and 64:32, and *not* 65:0, when you
listed available ports, suggests to me that you don't.  IIRC (and I
could be remembering wrong), 65:0 is the port for the internal
wavetable synth;

2 -- the internal wavetable synth has to have a set of sounds to
use as the basis for building the sounds it's going to make.  For
the Creative SB cards, this is known as a "soundfont".  You have to
have a soundfont loaded into the card's memory in advance, so that
the card knows what combinations of tones, at different amplitudes,
to make when it's supposed to play note #16 on instrument #6.  The
CD your SB came with should have a simple soundfont on it; there
are better free ones available for d/l around the web.  Once you
have a soundfont (.sf2) file available, there's a linux command
line program for loading it into your card's wavetable synth's
memory; I can't remember the name right now.  If you're not doing
hardcore work with the synth, and just want the synth to work
without having to deal with all this "loading the soundfont" crap
every time, just set it up to occur on boot.

For more, google on "midi on linux", pls.

HTH.

-c










Reply to: