[CM] mi_d and Linux

Orm Finnendahl finnendahl@folkwang-hochschule.de
Wed, 9 Oct 2002 17:31:39 +0200


Am Mittwoch, den 09. Oktober 2002 um 06:47:49 Uhr (-0500) schrieb Rick Taube:
>

> in fact if you can send me your alsa function ill add it before i
> release this version.

The alsa function is: "pmidi -p 71:0 -d0 <file.midi>" pmidi doesn't
quit on my machine after the file has been played as it should,
therefore I kill it before calling it again. But that might be due to
my own lisp routine which writes midi-files.

Also there are some things to setup first: The -p option refers to the
alsa midi port which pmidi is supposed to connect to. In order to send
this midi somewhere, you either have to connect directly to an
alsa-aware software-synth (e.g. timidity), to your hardware output,
or, like I do, to a virtual midi interface (with 4x2 ports). The
latter has the advantage that you can route the midi output anywhere
(also multiplexed) using an application like aconnect or aconnectgui,
which is more or less the same as PatchBay on the Mac.  An additional
advantage of the virtual midi interface is the possibility to symlink
/dev/midixx to those virtual devices and then use any oss compatible
midi software, which hasn't been translated to alsa yet (like pd).  To
install alsa's virtual midi interface login as root and issue

"modprobe snd-virmidi snd_index=1"

To startup timidity in realtime mode, issue 

"timidity -iA -B2,8 -Os -EFreverb=0&".

On my machine, timidity gets port number 128:0 and 128:1.  To connect
directly to timidity you can specify -p 128:0 in the commandline of
pmidi. If you connect to the virtual midi port, you have to specify
its port numbers (on my machine numbers 71:0 to 74:0). The physical
hardware output normally gets port 64:0 assigned. For a list of
possible devices you can issue "pmidi -l" for example.

I hope that's not too complicated and confusing. If anybody has
problems getting it to work, let me know. In any case, Rick, I'm not
too sure whether it is a good idea to include it into the sources as
it depends on assumptions, applications, modules and setups which
aren't standard on linux boxes. Only snd-virmidi, pmidi and aconnect
should be there, if the full alsa got installed.

Yours,
Orm

P.S.: BTW Using common music this way comes *very* close to realtime,
as timidity sits in user space with the samples already loaded.