[PlanetCCRMA] virmidi and pd

Andre Almeida Andre.Almeida@ircam.fr
Mon Jan 31 09:11:01 2005


Hi

I don't have any device in the MIDI Settings dialog either... But pd 
receives messages sent to virmidi anyway...

Here's how I do it:

1) Load virmidi with

 > > modprobe snd-virmidi

after doing this I have

 > > cat /proc/asound/cards
 > 0 [A5451          ]: ALI5451 - ALI 5451
 >                      ALI 5451 at 0x8400, irq 10
 > 1 [VirMIDI        ]: VirMIDI - VirMIDI
 >                      Virtual MIDI Card 1


2) Launch

 > > pd -mididev 2

If  it succeedes in connecting to the midi driver it won't output 
anything to stderr, otherwise it prints:

 > couldn't open MIDI input device 2
 > couldn't open MIDI output device 2
 > opened 0 MIDI input device(s) and 0 MIDI output device(s).

so this is how I tell if pd is connected to virmidi or not.

Another way is to open the "Test Audio and MIDI" patch. Any message 
received on input will produce some effect on the patch.

3) Connect applications to pd using alsa-patch-bay or qjackctl. pd 
inputs / outputs are called "Virtual Raw MIDI x-y", x being the card nbr 
and y the channel nbr. Usually I connect it to 1-0.

Hope this helps
Andre

 
Andres Cabrera wrote:

> Hi all,
> I can't manage to use virmidi with pd (CCRMA packages all) in FC2. 
> I've looked around, but can't find solutions, I hope some of you can 
> help.
> virmidi doesn't show up as an option in pd, and trying -mididev (or 
> -midiindev) with 2,3 or 4, doesn't work. No device is available on the 
> Media>MIDI Setting... dialog.
> virmidi appears not to be working. I tried connecting vkeybd to
> Virtual Raw MIDI 3-0, and Virtual Raw MIDI 3-0 to Hydrogen. There is 
> no MIDI received, while if I connect vkeybd directly, Hydrogen 
> responds. (Maybe I'm using virmidi wrong...)
>
> Here's some information:
> $ cat /proc/asound/cards
> 0 [I82801CAICH3   ]: ICH - Intel 82801CA-ICH3
>                      Intel 82801CA-ICH3 with CS4205 at 0xd800, irq 11
> 3 [VirMIDI        ]: VirMIDI - VirMIDI
>                      Virtual MIDI Card 1
> ----------------------------------------------------------------------
> $ cat /proc/asound/devices
>  25: [0- 1]: digital audio capture
>  16: [0- 0]: digital audio playback
>  24: [0- 0]: digital audio capture
>   0: [0- 0]: ctl
>   1:       : sequencer
>  33:       : timer
> 107: [3- 3]: raw midi
> 106: [3- 2]: raw midi
> 105: [3- 1]: raw midi
> 104: [3- 0]: raw midi
>  96: [3- 0]: ctl
>
> $ cat /proc/asound/oss/devices
>  61: [3-13]: raw midi
>  50: [3- 2]: raw midi
> -----------------------------------------------------------------
> $ cat /proc/asound/oss/sndstat
> Sound Driver:3.8.1a-980706 (ALSA v1.0.8 emulation code)
> Kernel: Linux localhost.localdomain 2.6.10-2.1.ll.rhfc2.ccrma #1 Thu 
> Dec 30 06:24:24 EST 2004 i686
> Config options: 0
>
> Installed drivers:
> Type 10: ALSA emulation
>
> Card config:
> Intel 82801CA-ICH3 with CS4205 at 0xd800, irq 11
> Virtual MIDI Card 1
>
> Audio devices: NOT ENABLED IN CONFIG
>
> Synth devices: NOT ENABLED IN CONFIG
>
> Midi devices:
> 3: Virtual Raw MIDI
>
> Timers:
> 7: system timer
>
> Mixers: NOT ENABLED IN CONFIG
>
> ----------------------------------------------------------------
> modules.conf
> # -- ALSA configuration
>
>
>  alias char-major-116 snd
>  alias char-major-14 soundcore
> options snd major=116 cards_limit=4 device_mode=0666 device_gid=0 
> device_uid=0
>  alias snd-card-0 snd-usb-audio
>  alias snd-card-1 snd-mona
>  alias snd-card-2 snd-intel8x0
>  alias snd-card-3 snd-virmidi
>
> #-- OSS compatibility 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
>
>  sound-slot-1 snd-card-1
>  alias sound-service-1-0 snd-mixer-oss
>  alias sound-service-1-3 snd-pcm-oss
>  alias sound-service-1-12 snd-pcm-oss
>  sound-slot-2 snd-card-2
>  alias sound-service-2-0 snd-mixer-oss
>  alias sound-service-2-3 snd-pcm-oss
>  alias sound-service-2-12 snd-pcm-oss
>  sound-slot-3 snd-card-3
>  alias sound-service-3-0 snd-mixer-oss
>  alias sound-service-3-3 snd-pcm-oss
>  alias sound-service-3-12 snd-pcm-oss
> #-- Options
>
> options snd-usb-audio index=0
> options snd-mona index=1
> options snd-intel8x0 index=2
> options snd-virmidi index=3
>
> #-- Keep modules from being autocleaned
>  add options -k snd-card-0
>  add options -k snd-card-1
>  add options -k snd-card-2
>  add options -k snd-card-3
> #-- ALSA configuration END
> ----------------------------------------------------------
> # aconnect -lo
> client 88: 'Virtual Raw MIDI 3-0' [type=kernel]
>     0 'VirMIDI 3-0     '
>         Connected From: 129:0
> client 89: 'Virtual Raw MIDI 3-1' [type=kernel]
>     0 'VirMIDI 3-1     '
> client 90: 'Virtual Raw MIDI 3-2' [type=kernel]
>     0 'VirMIDI 3-2     '
> client 91: 'Virtual Raw MIDI 3-3' [type=kernel]
>     0 'VirMIDI 3-3
>
> (I don't have my Mona or Midisport hardware with me right now, but the 
> problem persists if they are there as well...)
> Something I find suspicious is the order in which modules are loaded 
> when I do:
> # /etc/init.d/alsasound restart
> Shutting down sound driver                                 [  OK  ]
> Starting sound driver snd-intel8x0                         [  OK  ]
> Starting sound driver snd-mona                             [  OK  ]
> Starting sound driver snd-usb-audio                        [  OK  ]
> Starting sound driver snd-virmidi                          [  OK  ]
> Starting sequencer                                         [  OK  ]
> Restoring sound driver settings                            [  OK  ]
>
>
> Shouldn't the modules be loaded in the order they are in modules.conf?
>
> Sorry for the long post, I hope someone can help me out.
>
> Cheers,
> Andres
>
>
> _______________________________________________
> PlanetCCRMA mailing list
> PlanetCCRMA@ccrma.stanford.edu
> http://ccrma-mail.stanford.edu/mailman/listinfo/planetccrma
>
>