Re: finding midi device Endpoints by External Devices names?
Re: finding midi device Endpoints by External Devices names?
- Subject: Re: finding midi device Endpoints by External Devices names?
- From: Ken Hawkins <email@hidden>
- Date: Wed, 11 Feb 2004 15:46:27 -0800
well i am still stuck;
CFStringRef pname, pmanuf, pmodel, puID;
n = MIDIGetNumberOfDevices();
MIDIDeviceRef dev = NULL;
for (i = 0; i < n; ++i) {
dev = MIDIGetDevice(i);
MIDIObjectGetStringProperty(dev, kMIDIPropertyName, &pname);
MIDIObjectGetStringProperty(dev, kMIDIPropertyManufacturer, &pmanuf);
MIDIObjectGetStringProperty(dev, kMIDIPropertyModel, &pmodel);
MIDIObjectGetStringProperty(dev, kMIDIPropertyConnectionUniqueID,
&puID);
...
tells me in the debugger that puID that is supposed to hold the value
for kMIDIPropertyConnectionUniqueID is always out of scope and hold
(0x0) for these calls.
this happens with all my devices that are connected and whether it is
using MIDIGetDevice(i) or MIDIGetExternalDevice(i) calls.
everything else works great. except......
thanks,
ken;
On Feb 11, 2004, at 1:29 PM, Luke Bellandi wrote:
>
Hi Ken,
>
>
> i am unclear as to how to connect to the device that i want to send it
>
> packets of midi data. how can i connect to the endpoint of a SPECIFIC
>
> midi device and send it data?
>
>
You can't interface with external devices directly. Assuming you've
>
got your MIDI Setup characterized correctly in Audio MIDI Setup (i.e.,
>
you've added your external devices, and made the appropriate
>
connections to your MIDI Interfaces), take the following steps to do
>
what you're asking:
>
>
1) For the particular endpoint on the external device you're
>
interested in, get property kMIDIPropertyConnectionUniqueID to find
>
out what it's connected to.
>
2) Use the MIDIObjectFindByUniqueID(...) API on the UniqueID you just
>
got to find the interface object it's connected to.
>
3) Send MIDI Data to *that* object.
>
>
MIDI I/O can only be done with MIDI Devices, not External Devices.
>
>
Best,
>
Luke
>
_______________________________________________
>
coreaudio-api mailing list | email@hidden
>
Help/Unsubscribe/Archives:
>
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
>
Do not post admin requests to the list. They will be ignored.
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.