• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: MIDIConstants.kMIDIPropertyName
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: MIDIConstants.kMIDIPropertyName


  • Subject: Re: MIDIConstants.kMIDIPropertyName
  • From: Doug Wyatt <email@hidden>
  • Date: Fri, 27 Sep 2002 10:28:22 -0700

It's best to ask for most properties on endpoints so you don't rely on knowledge of where in the inheritence chain they were set.

If you get an error back when asking for a property, the API is telling you that the property has not been set on that object. You need to treat the response as "don't know" and a conservative approach to UI would say, I'd better display that device as a potential destination.

You'll probably very rarely see kMIDIPropertyReceivesNotes set on a driver-owned device/entity/endpoint. You're more likely (but not guaranteed) to see it on an external device when you follow the connection property from a driver-owned object to its external device -- which will only be there if the user set things up in AMS, and here too you should be conservative and treat the absence of an external device connection as a cue to treat the port as being capable of anything.

To try to sum this all up: use the informational properties to limit the user's view of endpoints to one's which make sense, but err on the side of caution and only eliminate endpoints where you have explicit knowledge that the desired functionality is not there.

Doug


On Friday, Sep 27, 2002, at 06:26 US/Pacific, Craig Bakalian wrote:

Hi Luke,
This is working fine. I do have one more problem if you don't mind. I need
to check the device or endpoint to see if it transmits or receives midi data (notes,
channels, whatever) before I set it to my gui for the user to select as an input or
output. I don't want the user selecting a device that can't receive midi messages
for an output. Likewise, the same for input. I have tried

MidiDevice.getDevice(i).getStringProperty(MIDIConstants.kMIDIPropertyRe ceivesNotes)

with no result. I get a error message stating that I am using the wrong property. Any
Idea to who to get a devices or endpoints properties?

Craig Bakalian

On Thursday, September 26, 2002, at 05:07 PM, Luke Bellandi wrote:


For what you're doing, you'll probably want to look up the chain a bit
to get a string that would be interesting to the user.

If you have any interest in working in C, you can check out the
functions:

OSStatus MIDIEndpointGetEntity( MIDIEndpointRef inEndpoint,
MIDIEntityRef * outEntity);

And...

OSStatus MIDIEntityGetDevice( MIDIEntityRef inEntity, MIDIDeviceRef
* outDevice);

And then get the name property for the device and/or entity, and use that
string to name/label your endpoint.

In Java you should use the

Int MIDIDevice.getNumberOfDevices();
MIDIDevice MIDIDevice.getDevice(int index);

Methods, and traverse the hierarchy down through entities and endpoints to
then match up your source/destination endpoints with their parent devices
and those properties.
_______________________________________________
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.


--
Doug Wyatt
work: email@hidden (CoreAudio)
personal: email@hidden http://www.sonosphere.com
_______________________________________________
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.

References: 
 >Re: MIDIConstants.kMIDIPropertyName (From: Craig Bakalian <email@hidden>)

  • Prev by Date: Re: OT: developer.apple.com web delivery
  • Next by Date: Re: using Cocoa for AU views ?
  • Previous by thread: Re: MIDIConstants.kMIDIPropertyName
  • Next by thread: Re: MIDIConstants.kMIDIPropertyName
  • Index(es):
    • Date
    • Thread