Re: Newbie CoreMIDI question
Re: Newbie CoreMIDI question
- Subject: Re: Newbie CoreMIDI question
- From: Kurt Revis <email@hidden>
- Date: Tue, 23 Feb 2010 10:34:13 -0800
On Feb 23, 2010, at 10:04 AM, Paul J. Ascenzo wrote:
> I'm just trying to figure out how to gather the actual names (as seen in Audio MIDI Setup) of the synths attached to my system.
>
> After tons of reading of the CoreMIDI docs and the archives here, I'm able to get the names etc of Devices and Sources and MIDIEndPoints and Entities etc.(names, manufacturers, device IDs where relevent etc) but I can't seem to find the right call or function or property to get at the actual names of the synths attached to my interface (MOTU micro lite - 5 ports).
>
> In other words, I can get 'IAC BUS' and 'Network' and my MIDI interface, 'micro lite' - just not the names of what's connected to them.
>
> The micro lite ports just identify themselves as Port 1, Port 2 etc whether I get at them thru Entity calls, or Source calls or Endpoint calls or Destination calls etc. I can't seen to get any more detail past that.
The synths you created in Audio MIDI Setup are "external devices".
Given an endpoint, you need to find the external devices that are connected to it, then get each one of their names.
1. Get the value for kMIDIPropertyConnectionUniqueID to find the IDs of the connected objects.
Note that unpacking this can be a little tricky, since the value may be a single ID or a CFData containing several values.
2. Each connected object may be an external device, entity, or endpoint.
If necessary, follow the parents upwards until you get to an external device, using MIDIEntityGetDevice() and MIDIEndpointGetEntity().
3. Get the name of the external device.
In SnoizeMIDI the code is in -[SMEndpoint connectedExternalDevices].
1. -[SMEndpoint uniqueIDsOfConnectedThings]
2. -[SMEndpoint getDeviceRefFromConnectedUniqueID:]
3. -[SMEndpoint inputStreamSourceExternalDeviceNames]
In MIDI Monitor, search for -inputStreamSourceExternalDeviceNames and you'll see where I use it.
--
Kurt Revis
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden