Le 13 juin 05 à 17:05, Jay Vaughan a écrit :
Good to see
someone other than Grame' guys try to "push"
MidiShare.... ((:
well, i'm only pushing because i'm using it, and i can't use ALSA. :)
But Jay, MidiShare cannot help in terms of
synchronizing MIDI with
audio at the sample level..... MidiShare events are 1 millisecond
time stamped.
yes, i understand that now .. i initially mis-understood pd's idea
on this, since under OSX, MidiShare is 'sync'ed' using an Audio
timer..
You're right. On OSX the MidiShare interrupt source can be derived
from the audio timing, so that the MidiShare time will not drift
form the audio time in case an application has special needs of Midi
+ audio synchronization. A timer only mode is also available.
This "audio timer mode" is not available of other platforms where it
was difficult to get audio buffer size (like 64 frames) not "too far
form the 1 milliscond duration. On OSX with audio timer mode at 64
frames, the MidiShare interrupt handler is called every 1.45 ms with
a system that call the interrupt handler twice every n interrupt
(don't remember the precise value here...) so that is MidiShare time
remains correct.
but, it would in fact be interesting if MidiShare had a new 'Audio
Event' type added to it, from the standpoint of timestamp'ed
events .. thats feasible, i think .. of course, this would only be
relevant if one was already using MidiShare, but it would be a nice
addition to what I consider a very clean and productive API .. /me
goes off to prepare an "AudioShare" patch, heh heh ..
An idea we had some years ago... but even when MidiShare time is
synchronized with the audio time, a MIDI event still has a time-stamp
with this 1 interrupt time resolution. We would need a more precise
time-stamping to do sample level synchronization.
But well the Linux official API is now ALSA, and
the OSX official
API is CoreMidi..... and we have to live with that.
what makes an API 'official' under Linux, anyway? in my opinion,
the old maxim, "use what works" applies .. and ALSA has proven to
be a very difficult and annoying thing to get set up and working
(witness jwz' recent terror) .. while MidiShare has (for the most
part) been smooth and dreamy.
but .. ymmv, yo.
--
;
Jay Vaughan