Ryan Underwood wrote:
> I'm confused on MIDI deviecs. :)  Rather than bore you with the details of
> what I think is right, (since it is most likely wrong), can someone explain
> what each of the following do?:
>
> /dev/snd/midiC0D0
> /dev/snd/midiC1D0

ALSA raw MIDI devices for card 0 and card 1 (see /proc/asound/cards
for the card number assignments).

"Raw MIDI" means that you can send/receive MIDI with these, but witout
any meta information like timing. These files are useful for sending/
receiving raw SysEx data (.syx files), but not for much else.

> /dev/snd/seq

The ALSA sequencer, which handles all ports on all cards. You're not
supposed to use this file directly.

For a list of ALSA sequencer ports, run "aconnect -io".

> /dev/sound/dmmidi

"dm" = direct music IIRC. I guess this is for an OPL3 FM synth.

> /dev/sound/midi00

This is pretty much identical to /dev/snd/midiC0D0.
There should be a midi01 file for your second card. (?)

> /dev/sound/sequencer

The OSS sequencer, which handles all ports on all cards.

> /dev/sound/sequencer2

Another API for the OSS sequencer.

> I have a Vortex AU8830 card using the alsa driver.  It has a MPU401 UART
> that is enabled.  I also have an ISA Roland MPU401 card using snd-mpu401
> that is loaded after the vortex driver.  My keyboard is attached to the
> ISA MPU401 card, and it also has a waveblaster card on it.  The sound
> card has nothing attached to its joystick port or internal connector.
>
> Pressing keys on my keyboard plays notes on the waveblaster card, which
> goes out the stereo connector on the mpu401 card and to the line-in on
> the sound card.  So I know the MIDI setup is working apart from ALSA.
>
> /dev/snd/midiC0D0:
> cat and press keys on my keyboard, I see nothing.
> cat a midi file to it, hear nothing.

OK, because nothing is connected to card 0.

> /dev/snd/midiC1D0:
> cat and press keys on my keyboard, I see some sort of note data, one/two bytes at a 
> time.

OK.

> ... cat a midi file to it, hear crazy stuff, dmesg complains:

A .mid file contains headers and timing information. When you cat a
file to the rawmidi device, all bytes are sent at once, and the timing
information will be interpreted as MIDI commands, too.

> /dev/snd/seq:
> cat and press keys, see nothing
> cat a file to it,  "write error: Invalid argument"

To play MIDI files, use a program with ALSA sequencer support, like
pmidi.

> The data coming from midiC1D0, sequencer, and sequencer2 are all
> different, but responds to my keyboard, so it must be the MIDI data
> coming from the ISA MPU401 card, right?

Yes.

However, there isn't any device file that would output .mid files, you
have to use a sequencer to record MIDI files.


HTH
Clemens




-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01
_______________________________________________
Alsa-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-user

Reply via email to