<html><body><div style="color:#000; background-color:#fff; font-family:arial, helvetica, sans-serif;font-size:12pt"><div><span><br></span></div><div><br></div> <div style="font-family: arial, helvetica, sans-serif; font-size: 12pt;"> <div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <div dir="ltr"> <hr size="1"> <font size="2" face="Arial"> <b><span style="font-weight:bold;">From:</span></b> IOhannes zmölnig <zmoelnig@iem.at><br> <b><span style="font-weight: bold;">To:</span></b> pd-dev@iem.at <br> <b><span style="font-weight: bold;">Sent:</span></b> Friday, June 7, 2013 3:40 AM<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [PD-dev] alsa midi device numbers<br> </font> </div> <div class="y_msg_container"><br>On 06/07/2013 06:34 AM, Jonathan Wilkes wrote:<br>>> I'm trying to track down a bug in my preferences dialog code for midi.<br>>><br>>> In Pd Vanilla 0.43:<br>>> If
I choose Media -> Hardware-Midi it brings up a dialog<br><br>>what's "Hardware-Midi"?<br><br>Sorry, in Pd Vanilla it is default-MIDI, not Hardware-Midi...<br><br>"HARDWARE-MIDI" is what is listed in Pd-l2ork. I checked to see<br>if these weird device numbers manifest themselves there-- instead Pd-l2ork<br>gives me an error with sane device numbers when switching between midi<br>apis:<br>couldn't open MIDI input device 0<br>couldn't open MIDI output device 0<br><br>>><br>>> If I choose Media -> Alsa-Midi it brings up a dialog<br>>><br>>> If I choose Media -> Hardware-Midi, close the dialog, then choose<br>>> Media -> Alsa-Midi I get insane device numbers in errors to the Pd console:<br><br>>i don't see this error with Pd-vanilla. how does the "vanilla" property <br>box handle device numbers differently than yours?<br><br>Well, I was lazy and just did [.combobox current $index], whereas
Vanilla's<br>original code calls a proc and essentially does an [lindex $devlist $index]. <br>Luckily the former gives an explicit error whereas the latter returns empty string.<br>That means my revised code gets a big red error to the Pd console, and Pd<br>Vanilla gets an empty button and empty popup menu, plus the "couldn't open<br>MIDI" error I quoted above.<br><br>>> couldn't open MIDI input device 2054<br>>> couldn't open MIDI output device 1836017711<br>>> opened 0 MIDI input device(s) and 0 MIDI output device(s).<br>>><br>>> I suppose to be on the safe side, for both audio and midi I should not assume that devices will be numbered contiguously from 0-n. Still, these weird device numbers will probably cause errors.<br>>><br>>> Unfortunately I don't have a midi device so I can't test it.<br>>><br>>if your "hardware MIDI" device is OSS, you can load a loopback driver to <br>get a software
device.<br><br>Ok, thanks.<br><br>-Jonathan<br><br>fmasdr<br>IOhannes<br><br><br>_______________________________________________<br>Pd-dev mailing list<br><a ymailto="mailto:Pd-dev@iem.at" href="mailto:Pd-dev@iem.at">Pd-dev@iem.at</a><br><a href="http://lists.puredata.info/listinfo/pd-dev" target="_blank">http://lists.puredata.info/listinfo/pd-dev</a><br><br><br></div> </div> </div> </div></body></html>