Can MIDIPackets be modified after they are sent?
Can MIDIPackets be modified after they are sent?
- Subject: Can MIDIPackets be modified after they are sent?
- From: Tom Jeffries <email@hidden>
- Date: Sat, 07 May 2011 08:36:36 -0700
Thanks to suggestions here I rebuilt my sequencer code using MIDIpackets and MIDISend. I may not have been clear about my exact needs. I want to change the actual events during playback. In other words, I don't have a set sequence to that plays each time, it is modified by the user in real time. Obviously by the nature of MIDI the user needs to provide input before the event is sent to the synthesizer, but I want the interval to be as narrow as possible.
If create a list of the pointers to the packets (yes, I checked to make sure that's working correctly) and I do this:
packetPtrs[24]->data[2] = 0; // changing a note on to a note off for test purposes
MIDISend(midiout, destPointRef, packetListPtr);
The MIDI data is changed for the 25th event, exactly as expected. However, if I write the code this way:
MIDISend(midiout, destPointRef, packetListPtr);
packetPtrs[24]->data[2] = 0; // changing a note on to a note off for test purposes
The output does not change. I was hoping CoreMIDI would work from the original MIDI packets, since it creates a pointer to them and returns the pointer, but apparently I'm wrong.
Is there a way to change the event data after playback has started, or am I back to trying to make this work with a clock?
Tom Jeffries
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden