[linux-audio-user] Timididy + Virmidi = no sound?

Hedley Robertson hedley at hedleyrobertson.com
Thu May 12 19:04:47 EDT 2005


Hi all.

Ok I am pretty much at a loss here... but hopefully someone with a little
more linux midi experience can point me in the right direction.

The short problem statement:  aconnect doesn't appear to connect virmidi
ports to Timidity ports.

Using gentoo, 2.6.11 kernel.  All ALSA drivers and libraries are version 
1.0.9.
Timidity is version 2.13.2.

It is probably worth mentioning that I have loaded the virmidi and intel8x0
cards in different orders (slots) and the same issues appeared.  Currently
the virmidi device is card 1, and intel8x0 (nforce3) is card 2.

only relevant output from dmesg:

May 12 16:07:11 hedleytop intel8x0_measure_ac97_clock: measured 49416 usecs
May 12 16:07:11 hedleytop intel8x0: clocking to 47439
May 12 16:07:33 hedleytop intel8x0_measure_ac97_clock: measured 49433 usecs
May 12 16:07:33 hedleytop intel8x0: clocking to 47456

----------------------------------------------------------------------
I fire up the timidity soft synth:

       /usr/bin/timidity -iA -B2,8 -Os -EFreverb=0

----------------------------------------------------------------------
Listing of cards and devices available:

bash-2.05b# cat /proc/asound/devices
 1:       : sequencer
11: [0- 3]: raw midi
10: [0- 2]: raw midi
 9: [0- 1]: raw midi
 8: [0- 0]: raw midi
 0: [0- 0]: ctl
33:       : timer
50: [1- 2]: digital audio playback
57: [1- 1]: digital audio capture
48: [1- 0]: digital audio playback
56: [1- 0]: digital audio capture
 32: [1- 0]: ctl

bash-2.05b# cat /proc/asound/cards
0 [VirMIDI        ]: VirMIDI - VirMIDI
                    Virtual MIDI Card 1
1 [nForce3        ]: NFORCE - NVidia nForce3
                    NVidia nForce3 with AD1981B at 0xe0002000, irq 11

bash-2.05b# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 1: nForce3 [NVidia nForce3], device 0: Intel ICH [NVidia nForce3]
 Subdevices: 1/1
 Subdevice #0: subdevice #0
card 1: nForce3 [NVidia nForce3], device 2: Intel ICH - IEC958 [NVidia
nForce3 - IEC958]
 Subdevices: 1/1
 Subdevice #0: subdevice #0

----------------------------------------------------------------------
Input ports listed:

bash-2.05b# aconnect -i
client 0: 'System' [type=kernel]
   0 'Timer           '
   1 'Announce        '
client 64: 'Virtual Raw MIDI 0-0' [type=kernel]
   0 'VirMIDI 0-0     '
client 65: 'Virtual Raw MIDI 0-1' [type=kernel]
   0 'VirMIDI 0-1     '
client 66: 'Virtual Raw MIDI 0-2' [type=kernel]
   0 'VirMIDI 0-2     '
client 67: 'Virtual Raw MIDI 0-3' [type=kernel]
   0 'VirMIDI 0-3     '

----------------------------------------------------------------------
Output ports:

bash-2.05b# aconnect -o
client 64: 'Virtual Raw MIDI 0-0' [type=kernel]
   0 'VirMIDI 0-0     '
client 65: 'Virtual Raw MIDI 0-1' [type=kernel]
   0 'VirMIDI 0-1     '
client 66: 'Virtual Raw MIDI 0-2' [type=kernel]
   0 'VirMIDI 0-2     '
client 67: 'Virtual Raw MIDI 0-3' [type=kernel]
   0 'VirMIDI 0-3     '
client 128: 'TiMidity' [type=user]
   0 'TiMidity port 0 '
   1 'TiMidity port 1 '
   2 'TiMidity port 2 '
   3 'TiMidity port 3 '

----------------------------------------------------------------------
Playing directly to Timidity works and sounds great.  Timidity runs
at about 50% processor utilization.

aplaymidi -p 128:0 /root/Necromancer.mid

Then I try to connect my virtmidi port and play through it.

aconnect 64:0 128:0
aplaymidi -p 64:0 /root/Necromancer.mid

Doesn't give any errors, appears to play, yet no sound!  Timidity only
uses about 5% processor this time.  Something apparently is happening,
but I have no idea what =)  It appears to behave the same when playing
to an unbound/unconnected virmidi port as well

("aplaymidi -p 64:0 /root/Necromancer.mid" - same effect)

----------------------------------------------------------------------
my .asoundrc (not sure if this is helpful, as sound pretty much works
for most everything else, but could help?)

#/etc/asound.conf start:

# define the default device
pcm.!default {
 type plug
 slave.pcm "dmixer"
}

# define the "dsp0" device
pcm.dsp0 {
 type plug
 slave.pcm "dmixer"
}

# define the slave pcm dmixer device
pcm.dmixer {
 type dmix
 ipc_key 1024
 slave {
       pcm "hw:1,0"
       period_time 0
       period_size 1024
       buffer_size 8192
       rate 44100
 }
 bindings {
       0 0
       1 1
 }
}

# define the "dsnooped" device for capturing
pcm.dsnooped {
       type dsnoop
       ipc_key 1024
               slave {
               pcm "hw:1,0"
               period_time 0
               period_size 1024
               buffer_size 8192
               rate 44100
       }

}

# define the "duplex" device for full duplex operations
pcm.duplex {
 type asym
 playback.pcm "dmixer"
 capture.pcm "dsnooped"
}

# define the "dsp1" device and slave "duplex" for full duplex operations
pcm.dsp1 {
   type plug
   slave.pcm "duplex"
}

# define the "dmixer" control device
ctl.dmixer {
 type hw
 card 1
 }

# define the "dsp2" for folks who don't want to play friendly with dmix
pcm.dsp2 { type hw card 0 }
#end.

Thanks for any help you can provide.

Hedley



More information about the Linux-audio-user mailing list