Re: MIDI data with timestamps in the future?
Re: MIDI data with timestamps in the future?
- Subject: Re: MIDI data with timestamps in the future?
- From: Thomas Hudson <email@hidden>
- Date: Tue, 23 Jul 2002 09:53:11 -0500
On Tuesday, July 23, 2002, at 03:20 AM, Pete Yandell wrote:
According to the documentation for MIDISend:
"Events with future timestamps are scheduled for future delivery"
Unfortunately this doesn't seem to be true in practice.
I've had a report from somebody using CoreMIDI to send data through a
virtual endpoint to my application (SimpleSynth) that packets injected
with future timestamps are played immediately by SimpleSynth.
Internally SimpleSynth simply passes incoming MIDI data to the built-in
synth audio unit.
MIDISend does schedule in the future, however it can only be used to send
events to a single specified destination. To send to all destinations
connected to
a virtual source, one must use MIDIReceived, which passes everything
immediately.
So you have to expect that for a virtual source that you will receive
events in the
future. It would be nice to be able to mark a virtual destination as
wanting to
only receive things at some "max future" time.
What I have been doing (which is probably a kluge, but until someone
suggests
something better...) is to resend any events scheduled for the future
back to
the same destination using MIDISend in the receiving callback.
For sending things out on time, I create a destination in my app and
MIDISend events to
that single destination, which then calls MIDIReceived in the callback
thread
to distribute events to all the virtual destinations connected to that
source.
Thomas
_______________________________________________
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.