[PD] udev & usb midi interfaces

Daniel Wilcox danomatika at gmail.com
Mon May 17 11:28:42 CEST 2010


> ---------- Forwarded message ----------
> From: "Ingo Scherzinger" <ingo at miamiwave.com>
> To: "'pd-list'" <pd-list at iem.at>
> Date: Mon, 17 May 2010 09:10:27 +0200
> Subject: [PD] udev & usb midi interfaces
>
> Hi,
>
>
>
> does anybody know the search path to get udev information about usb midi
> interfaces?
>
> It should be something like “udevadm info -a -p / ??? …”. I’m not realy
> sure how to search for the soundcard either.
>
> I was using “lshal” which gives me a lot of information but I can’t tell
> which part to use for the udev device rules.
>
> I read Daniel Drake’s “writing udev rules” but he doesn’t mention sound at
> all.
>
Yeah, it's easy ... try

udevinfo -a -p $(udevinfo -q path -n /dev/*your device*)

and plug in the device ... this command will list all the udev attributes it
sees when it makes the sysfs usb tree. I use it it see what attributes I can
use for writing udev rules. Drake may not explciity list "sound" or "midi"
devices, but they are covered by the tutorial as well ... just find where
the device is mounted in /dev and use that node in udevinfo.

> I really need to write some udev rules to straighten out my 2 usb midi
> interfaces and soundcard that get mixed up all the time.
>
Why udev rules then ...? I use the portaudio index of the soundcard to pass
to pd with -audiodev on startup (I use -nogui and alsa) and another script
which parses aconnect -io to determine the alsa mdii index, then calls
aconnect again to connect pd with the midi device.

Actually, perhaps you are right as it would be nice to have udev run
aconnect whenever my midi device is plugged in.

-- 
Dan Wilcox
danomatika
www.robotcowboy.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20100517/79c0a6dd/attachment.htm>


More information about the Pd-list mailing list