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@iem.athttp://lists.puredata.info/listinfo/pd-dev