Am 19.09.2012 10:16, schrieb Robert Jonsson:
> Making ALSA optional, to remove a dependency is well and all, but I worryi still don't fully get the reason why we need such a timer, as long
> it means changing the internals in a way that we loose timing, both latency
> and jitter.
> This is mostly just a fear and it's not necessarily true, I just wish us to
> be aware of this risk.
we're only using jack devices.
is there nowadays any need for ALSA devices? i mean, for audio we use
jack. for midi we are able to use jack as well. jack-midi doesn't give
us any disadvantages as far as i see this, right?
thus we can muse fully run as jack-only client (which may or may not
provide _additional_ alsa/ffado/whatever support).
that means that we mainly orient ourselves on the process()-calls we're
getting from jack. (jack does all the timing stuff for us)
there is no need for a timer, we just rely on jack to a) call us with
exact, constant rate, and b) to not jitter our buffers. both are fulfilled.
my point is that both (midi-)sequencer-code AND audio code belong in a
jack-process()-callback. then we can relax and don't have to worry about
timers. PLUS, we finally can freewheel with midi!
alsa support does not need to be dropped. we can still offer to use alsa
devices, possibly implementing a timer again. but my point is, this is
freeBSD users would just turn off alsa support, then they have a
jack-only application which runs on every OS jack runs on. (which is:
i don't exactly know. but read this:
> I'm not sure how this is implemented in jack but running with big buffers
> won't that directly incur a latency penalty that we are completely immune
> to with the alsa sequencer support?
MIDI and audio are not fundamentally different for jack. both are
"streams" which are routed around. (just MIDI is discrete, not
continous, but that's functionally equivalent).
that is, for MIDI, exactly the same restrictions apply as for audio:
theres exactly $latency added. not more. not less.
does MusE in its current way add latency to MIDI as well? i'm not sure,
but i think it does.
(my thought for this: we want to keep audio and midi in sync. so we
anyway WANT the same latency for MIDI like we have for audio.)
so, we can choose between having jack-latency for audio and alsa-latency
for MIDI, which we need to synchronize somehow, and having jack-latency
for both. no need to synchronize.
please correct me if i'm wrong, but i still think jack is the way to go.
and if there are disadvantages of jack-midi vs alsa-midi: tell me!