I’ve been doing a lot of reading on how to convert a string to a hex value. Here is what I found to accomplish this:
NSString * hexString = [NSString stringWithFormat:@"%x", midiValue];
This returned some “interesting” results and upon reading a little further I found a post that mentioned this
“You’re passing a pointer to an object representing a numeric value, not the numeric value proper.”
So I substituted 192 instead of “midiValue” and it did what I expected.
How would I pass the string value and not the pointer?
Decleration of midiValue:
NSString *dMidiInfo = [object valueForKey:@"midiInformation"];
int midiValue = dMidiInfo;
You probably need to do something like this:
also, I think there is some example code in the xcode documentation for converting to and from a hex value, in the QTMetadataEditor sample. in the MyValueFormatter class.
Hopefully this helps.