I ran into an interesting MIDI-Audio synchronization problem (in Audacity) where PortMidi wants the audio to start first (so it can have a time reference) and the audio really needs Midi to start first (so control and program changes can be sent out in advance of playback). I added a new call: Pm_Synchronize(stream). The way it works is you open a stream and send as many messages as you want with timestamp 0 (immediate). Then start the audio (or whatever you do so that the time_proc will return valid timestamps). Then call Pm_Synchronize() and begin sending time_stamped MIDI messages. Pm_Synchronize() forces PortMidi to observe the difference between time_proc time and local MIDI stream time and make adjustments to timestamps so that future messages are delivered properly.
It's unlikely that you need to call Pm_Synchronize() -- if you didn't need it before, it's not going to do anything for you now. I'm hoping the addition of a function to the API will not break anything. I plan to make new download files for PortMidi next week unless I find something else to fix. -Roger _______________________________________________ media_api mailing list media_api@create.ucsb.edu http://lists.create.ucsb.edu/mailman/listinfo/media_api