Hi everybody, I will first explain the context and then explain my problem.
So, I, the class, receive a set of raw midi data. The data is sent time to time, byte per byte. The data themself have no timestamp or any other information. It's just a byte that needs to be sent to a device. (As it is raw data, it's not sent to a channel but to an interface).
The destination is a Roland MT-32 connected to an M4U on port 1.
For now I have been able to find interfaces and, eventualy, send data to the first one. (following the example SampleTools)
I made a set of procedure to connect to the device and then send the data to the interface.
Here's the code I use to send data :
void sendMessage(Byte value) { MIDIPacket *packet; MIDIPacketList *listOfPacket; packet->timeStamp = 0; packet->length = 1; packet->data[0] = value; //MIDIPacketListAdd(listOfPacket, sizeof(mBufferSize), packet, timeSt, sizeof(char), value); MIDISend(gOutPort, gDest, listOfPacket); }
Some of the variables are set inScope but not within the function. ;)
Could you confirm that, initializing packet is set correctly.
As MIDISend requiere to send a MIDIPacketList I had to add a variable named listOfPacket (strange name ;))
Using the function MIDIPacketListAdd is not clear to me and the only sample I found was not clear enough to me. My skills are so poor. ;)
Anyway, thank you very much for your kind help.
Regards
Alex Rouge
|