Re: [linux-audio-dev] advice: jaz++, ALSA seq API 0.4 -> 0.5

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] advice: jaz++, ALSA seq API 0.4 -> 0.5
From: David Slomin (david.slomin_AT_av.com)
Date: Tue Mar 21 2000 - 18:04:36 EET


Erik Steffl wrote:
>
> the linux midi drivers (OSS) do not have midi-thru functionality.
> I have midi controller keyboard (does not make any sounds, just
> sends out midi events), I can record whatever I play but I cannot
> hear it while recording (I do not have any external synth, only
> soundblaster).
>
> it looks like OSS is not going to have midi thru anytime soon. is
> there any hope to get this functionality from alsa? or from oss free
> (the one included in kernel)?

Hardware based MIDI thru is often more of an annoyance than a
benefit. For instance, my Music Quest MPU-401 clone under OSS has
the behaviour that it forces hardware thru to be off whenever the
port is open by any app, and thru to be on otherwise. I'd have to
hack the driver to modify this probably well intentioned but
actually really annoying behaviour. I've not yet put the time into
making the MPU work with ALSA, so I can't report on the behaviour
there.

That said, if you want to perform MIDI thru in _software_, that's
not difficult at all. Just remember that /dev/midi can be treated
like any other file in Unix and run through the standard commands.
For instance, to send MIDI messages from the external keyboard
to the SoundBlaster, just do a "cp /dev/midi00 /dev/midi01" or
whatever the appropriate device numbers are ("cat /dev/sndstat"
will tell you).

If you want an actual MIDI thru, meaning that messages from the
external synth are being sent to both the SoundBlaster and to an
app, try the following:

   mkfifo /tmp/midi00
   tee /dev/midi01 < /dev/midi00 > /tmp/midi00

Then open /tmp/midi00 instead of /dev/midi00 in your sequencer
or other app.

Div. (a.k.a. the only guy on earth who likes FIFOs)

-- 
David Slomin, Engineer         mailto:david.slomin_AT_av.com
AltaVista Business Solutions   http://solutions.altavista.com/
RFC 822 plaintext email strongly preferred except for attachments


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Tue Mar 21 2000 - 19:17:56 EET