• 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: MIDI Object dictionary property kMIDIPropertyNameConfiguration
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: MIDI Object dictionary property kMIDIPropertyNameConfiguration


  • Subject: Re: MIDI Object dictionary property kMIDIPropertyNameConfiguration
  • From: Doug Wyatt <email@hidden>
  • Date: Mon, 26 Jan 2004 18:45:05 -0800

Hi Steve,

On Jan 26, 2004, at 6:49, Steve O'Connell wrote:
I'm trying to set the patch file for a client (or client endpoint) using the
function MIDIObjectSetDictionaryProperty with the property
kMIDIPropertyNameConfiguration. I'm using 10.3.2. The file name that the
dictionary points to is the MMA .midnam XML file.

The problem is that I get a crash when I call
MIDIObjectSetDictionaryProperty for either the client or client endpoint.

So it's crashing in your app's call to MIDIObjectSetDictionaryProperty, not in the MIDIServer?

I
can't find any example code anywhere, just the minimal documentation
included in the MIDIServices.h header file.

First, just to test the machinery here ... does this program crash for you? It doesn't for me.

int main(int argc, const char *argv[])
{
OSStatus err;
CFMutableDictionaryRef dict = CFDictionaryCreateMutable(NULL, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks);

CFDictionaryAddValue(dict, CFSTR("foo"), CFSTR("bar"));

MIDIDeviceRef aDevice = MIDIGetDevice(0);
if (aDevice == NULL)
return 1;

err = MIDIObjectSetDictionaryProperty(aDevice, CFSTR("com.example.property"), dict);
printf("err = %ld\n", err);
return 0;
}

Are you initializing your dictionary in some other way?

How do I attach a patch file for an endpoint? I assume I use
MIDIObjectSetDictionaryProperty as opposed to MIDIObjectSetDataProperty.

Yes, the property is documented as having a dictionary value. Set it on the highest-level object in the device/entity/endpoint hierarchy as is appropriate ... the lower ones will inherit.

I
see that the kMIDIPropertyNameConfiguration property dictionary also
supports a list of names ("banks" of the dictionary) in addition to an
explicit file reference ("master" of the dictionary).

To make a diagram out of the comments in the header:

kMIDIPropertyNameConfiguration dictionary:
"banks" -> dictionary:
<patch bank name> -> dictionary:
"file" -> CFData containing alias to document
"patchNameList" -> <PatchNameList element name>
etc.

Doug
_______________________________________________
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: 
 >MIDI Object dictionary property kMIDIPropertyNameConfiguration (From: "Steve O'Connell" <email@hidden>)

  • Prev by Date: MusicTrackCut
  • Next by Date: PostConstructor vs Initialize
  • Previous by thread: MIDI Object dictionary property kMIDIPropertyNameConfiguration
  • Next by thread: MusicTrackCut
  • Index(es):
    • Date
    • Thread