<div class="gmail_quote"><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">---------- Forwarded message ----------<br>From: &quot;Ingo Scherzinger&quot; &lt;<a href="mailto:ingo@miamiwave.com">ingo@miamiwave.com</a>&gt;<br>
To: &quot;&#39;pd-list&#39;&quot; &lt;<a href="mailto:pd-list@iem.at">pd-list@iem.at</a>&gt;<br>Date: Mon, 17 May 2010 09:10:27 +0200<br>Subject: [PD] udev &amp; usb midi interfaces<br>








<div lang="DE" link="blue" vlink="purple">

<div>

<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;font-family:Arial">Hi,</span></font></p>

<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;font-family:Arial"> </span></font></p>

<p class="MsoNormal"><font size="2" face="Arial"><span lang="EN-GB" style="font-size:10.0pt;font-family:Arial">does anybody know the search path to get udev
information about usb midi interfaces?</span></font></p>

<p class="MsoNormal"><font size="2" face="Arial"><span lang="EN-GB" style="font-size:10.0pt;font-family:Arial">It should be something like “udevadm info -a -p
/ ??? …”. I’m not realy sure how to search for the soundcard
either.</span></font></p>

<p class="MsoNormal"><font size="2" face="Arial"><span lang="EN-GB" style="font-size:10.0pt;font-family:Arial">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.</span></font></p>

<p class="MsoNormal"><font size="2" face="Arial"><span lang="EN-GB" style="font-size:10.0pt;font-family:Arial">I read Daniel Drake’s “writing udev rules”
but he doesn’t mention sound at all.</span></font></p></div></div></blockquote><div>Yeah, it&#39;s easy ... try</div><div><br></div><div><span class="Apple-style-span" style="font-family: Monaco, &#39;Courier New&#39;, Courier, monospace; font-size: 12px; border-collapse: collapse; white-space: pre; ">udevinfo -a -p $(udevinfo -q path -n /dev/<em>your device</em>)</span></div>
<div><font class="Apple-style-span" face="Monaco, &#39;Courier New&#39;, Courier, monospace" size="3"><span class="Apple-style-span" style="border-collapse: collapse; font-size: 12px; white-space: pre;"><br></span></font></div>
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 &quot;sound&quot; or &quot;midi&quot; 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.<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div lang="DE" link="blue" vlink="purple"><div>

<p class="MsoNormal"><font size="2" face="Arial"><span lang="EN-GB" style="font-size:10.0pt;font-family:Arial">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.</span></font></p></div></div></blockquote><div>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.</div>
<div><br></div><div>Actually, perhaps you are right as it would be nice to have udev run aconnect whenever my midi device is plugged in.</div></div><br>-- <br>Dan Wilcox<br>danomatika<br><a href="http://www.robotcowboy.com">www.robotcowboy.com</a><br>