[PD-dev] alsa midi device numbers

Jonathan Wilkes jancsika at yahoo.com
Fri Jun 7 20:52:52 CEST 2013





________________________________
 From: IOhannes zmölnig <zmoelnig at iem.at>
To: pd-dev at iem.at 
Sent: Friday, June 7, 2013 3:40 AM
Subject: Re: [PD-dev] alsa midi device numbers
 

On 06/07/2013 06:34 AM, Jonathan Wilkes wrote:
>> I'm trying to track down a bug in my preferences dialog code for midi.
>>
>> In Pd Vanilla 0.43:
>> If I choose Media -> Hardware-Midi it brings up a dialog

>what's "Hardware-Midi"?

Sorry, in Pd Vanilla it is default-MIDI, not Hardware-Midi...

"HARDWARE-MIDI" is what is listed in Pd-l2ork.  I checked to see
if these weird device numbers manifest themselves there-- instead Pd-l2ork
gives me an error with sane device numbers when switching between midi
apis:
couldn't open MIDI input device 0
couldn't open MIDI output device 0

>>
>> If I choose Media -> Alsa-Midi it brings up a dialog
>>
>> If I choose Media -> Hardware-Midi, close the dialog, then choose
>> Media -> Alsa-Midi I get insane device numbers in errors to the Pd console:

>i don't see this error with Pd-vanilla. how does the "vanilla" property 
box handle device numbers differently than yours?

Well, I was lazy and just did [.combobox current $index], whereas Vanilla's
original code calls a proc and essentially does an [lindex $devlist $index]. 
Luckily the former gives an explicit error whereas the latter returns empty string.
That means my revised code gets a big red error to the Pd console, and Pd
Vanilla gets an empty button and empty popup menu, plus the "couldn't open
MIDI" error I quoted above.

>> couldn't open MIDI input device 2054
>> couldn't open MIDI output device 1836017711
>> opened 0 MIDI input device(s) and 0 MIDI output device(s).
>>
>> 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.
>>
>> Unfortunately I don't have a midi device so I can't test it.
>>
>if your "hardware MIDI" device is OSS, you can load a loopback driver to 
get a software device.

Ok, thanks.

-Jonathan

fmasdr
IOhannes


_______________________________________________
Pd-dev mailing list
Pd-dev at iem.at
http://lists.puredata.info/listinfo/pd-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-dev/attachments/20130607/9b0ffe25/attachment.htm>


More information about the Pd-dev mailing list