Hi, 

I've got a MIDI keyboard and an SB PCI64 that I really miss using
now I've ditched MS from my disk. I'd like to keep MS off my disk,
but after several *months* of frustrating and searching the web and
posting to NGs I still don't have it working. So here I am, with
rather a long post; hopefully it has all the info some kind souls out
there need to assist me ...

My setup is this:

        - SB PCI64
        - cheap MIDI keyboard (works fine under MS OSs)
        - ALSA 0.9+0beta12
        - Debian GNU/Linux (woody, kernel=2.4.16)
        - ALSA kernel modules 0.9+0beta12+3+p0
        - alsaplayer 0.99.59

(I guess the experts on the list know this, but according to Linux
kernel documentation, SBPCI64 has no onboard MIDI synth, but the card
does have a MIDI connector, and - under MS OS's - I can use this no
problem. I realise that the MS driver must include the equivalent of
Timidity inside it. Anyway ...)

I think - correct me if I'm wrong - I need to do the following tasks:

        (a) get input of MIDI keyboard events by ALSA PCI64 device
            driver working

        (b) get alsaplayer working using ALSA devices (required by
            (e) below)

        (c) set up virmidi device

        (d) do some plumbing with 'aconnect' so MIDI keyboard events
            are routed through the ALSA PCI64 driver, to the virmidi
            driver

        (e) run Timidity as backend to virmidi 

Ok, well, (d) and (e) I've not got anywhere near attempting yet,
'cos (a), (b) and (c) don't work :-(

Ok, so, dealing with each of those things individually ...

reading MIDI keyboard events
----------------------------

Well, I'm not sure how to do this beyond correct sound card config
and then trying something like 'rosegarden' and pressing keys!

The right modules are loaded:

        dione:~# lsmod | grep snd
        snd-pcm-oss            35168   1  (autoclean)
        snd-mixer-oss           8928   1  (autoclean) [snd-pcm-oss]
        snd-ens1371             9440   2  (autoclean)
        snd-ac97-codec         22304   0  (autoclean) [snd-ens1371]
        snd-rawmidi            12256   0  (autoclean) [snd-ens1371]
        snd-seq-device          3984   0  (autoclean) [snd-rawmidi]
        snd-pcm                47968   0  (autoclean) [snd-pcm-oss snd-ens1371]
        snd-timer              10080   0  (autoclean) [snd-pcm]
        snd                    24808   0  (autoclean) [snd-pcm-oss snd-mixer-oss 
snd-ens1371 snd-ac97-codec snd-rawmidi snd-seq-device snd-pcm snd-timer]
        soundcore               3492   6  (autoclean) [snd]
        
and the config seems fine:

        dione:~# cat /etc/modutils/alsa
        alias char-major-116 snd
        alias snd-card-0 snd-ens1371
        alias char-major-14 soundcore
        alias sound-slot-0 snd-card-0
        alias sound-service-0-0 snd-mixer-oss
        alias sound-service-0-1 snd-seq-oss
        alias sound-service-0-3 snd-pcm-oss
        alias sound-service-0-8 snd-seq-oss
        alias sound-service-0-12 snd-pcm-oss
        options snd snd_major=116 snd_cards_limit=1 snd_device_mode=0660 
snd_device_gid=29 snd_device_uid=0
        options snd-ens1371 snd_index=0 snd_id=ENSONIQ

XMMS, mplayer etc - all configured to use OSS devices - work fine.

But rosegarden's MIDI setup menu just lists the MIDI record device as
'(null device)'.

I've wrote a 5 line C prog just to read /dev/midi or
/proc/asound/dev/midiC0D0, expecting to see printf()'s as I pressed
keys on the MIDI keyboard, but no luck. How can I simply test/verify
that keypresses are seen?

alsaplayer
----------

        dione$ alsaplayer 
        snd_pcm_open: No such file or directory (default)
        /usr/lib/alsaplayer/output/libalsa.so failed to load
        I could not find a suitable output module on your
               system. Make sure they're in "/usr/lib/alsaplayer/output/".
               Use the -o parameter to select one.
        failed to load output add-on. exitting...
        dione$ 

The library it fails to load exists of course. 

Since the OSS aliases are in place, then using XMMS or *non*-ALSA
players works fine. But if ALSA is in 2.5 kernel then I guess I'll
have to get alsaplayer (and other apps) using the ALSA devices rather
than the OSS compatibility devices, right?

So, why doesn't alsaplayer play?

If I try any other ALSA-ish player, for example Timidity with -Os
('s' for ALSA device) then I get a - presumely not unrelated -
error:

        dione:~# timidity -Os ~alexis/bohemian.mid 
        No sound card found.
        Couldn't open ALSA pcm device (`s')

What's going on?

virmidi
-------

Ok, so then I added to /etc/modutils/alsa the following:

        alias snd-card-1 snd-virmidi
        alias sound-slot-1 snd-card-1
        options snd-virmidi snd_index=1 snd_id=VIRTUAL_MIDI

But when I boot this results in:

        ALSA %s:%d: ALSA ../alsa-kernel/core/init.c:77: card 1 is out of range (0-0)
        Card-VirMIDI #1 not found or device busy
        Card-VirMIDI soundcard not found or device busy
        (virmidi)

Huh?

So I tried manually adding the snd-virmidi module with insmod:

        dione:~# insmod snd-virmidi
        Using /lib/modules/2.4.16/alsa/snd-virmidi.o
        /lib/modules/2.4.16/alsa/snd-virmidi.o: unresolved symbol 
snd_virmidi_new_Re3be217c
        dione:~# 

Ok, but with a bit of messing about I got this:

        dione:~# modprobe -a snd-seq-virmidi                    <-- silent, so ok I 
guess
        dione:~# lsmod | grep virmidi
        snd-seq-virmidi         2552   0  (unused)
        snd-seq-midi-event      2792   0  [snd-seq-virmidi]
        snd-seq                36236   0  [snd-seq-virmidi snd-seq-midi-event]
        snd-rawmidi            12256   0  (autoclean) [snd-seq-virmidi snd-ens1371]
        snd                    24808   0  (autoclean) [snd-seq-virmidi 
snd-seq-midi-event snd-seq snd-pcm-oss snd-mixer-oss snd-ens1371 snd-ac97-codec 
snd-rawmidi snd-seq-device snd-pcm snd-timer]

But is that really the way to do it? Surely the entries in
/etc/modutils/alsa are fine, and much more graceful?

Can anybody offer any advice? Is there anybody with the same
card and/or requirement (MIDI keyboard, no onboard MIDI
synth) with it working?

Thanks!

Alexis Huxley
[EMAIL PROTECTED]

PS In case anybody is having the same problem, and finds this article
   via a web search, the information above was primarily gleaned from
   the following URLS:

         http://audio.opensrc.org/modules.php?op=modload&name=News&file=article&sid=8
      
         
http://linux-sound.org/quick-toots/4-sequencers_and_softsynths/quick-toot-midisynth_howto.html

         file:///usr/doc/kernel-doc-2.4.16/Documentation/sound/es1371.gz

   The MIDI HOWTO, the ALSA mini HOWTO were very out of date and didn't offer
   anything useful.

PPS I'll post a summary if anybody is interested. Let me know.

_______________________________________________________________

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas - 
http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink

_______________________________________________
Alsa-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-user

Reply via email to