General CoreMIDI Newbie-Questions
General CoreMIDI Newbie-Questions
- Subject: General CoreMIDI Newbie-Questions
- From: Oliver Jaun <email@hidden>
- Date: Sat, 28 Dec 2002 17:49:36 +0100
Hello
I started programming with CoreMIDI yesterday and I have absolutely no
experience in this field (MIDI Programming in general). My Programming
skills aren't very impressive at all and so my question is rather
simple (I think).
I'd like to write an application to manage my Sampler over Sysex. I
wrote a small Test Application and I sent a Device Inquiry Message to
my sampler and even got a response.
So far so good. Then I started to write a Class in C++. My idea is to
use it like that:
DeviceInquiryMessage msg = myclass->getDeviceInquiryMessage();
or: myclass->renamePreset(1, "blabla");
My Question is now: What is the best way to do that? It is not a
problem to send a sysex message. But then how do I get the response? I
know that I can specify a completionProc in the MIDISysexSendRequest
struct. But then how do I wait for the answer? Imagine the following
code:
DeviceInquiryMessage DataProvider::getDeviceInquiryMessage() {
Byte data[] = { _SYSEX_MSG, 0x7E, _deviceId, 0x06, 0x01, _EOX };
// create MIDISysexSendRequest struct here.
OSStatus status = MIDISendSysex(&sysx);
// wait for completion... but how? while(sysx.complete == false);
???
// get the result... but how????
// create DeviceInquiryMessage Object
return DeviceInquiryMessage;
}
I hope someone can give me a hint or some example code.
Thanks a lot!
Greetings
Oliver Jaun
_______________________________________________
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.