[linux-audio-dev] MVC - multiple CV

From: fons adriaensen <fons.adriaensen@email-addr-hidden>
Date: Tue Oct 04 2005 - 01:12:16 EEST

Hi all,

working on the strict MVC-fication of Aeolus (a precondition
for its OSC-fication), I'm again confronted with a problem
that has been discussed a number of times on this list.

It has been stated that the model should send updates to
all clients except the one that originated a parameter change.
While this will work if all communication is synchronous,
it will go wrong easily when there are delays, e.g. over
a network.

Imagine an M and to CV clients, A and B. There are two
transmission paths: A -> M -> B, and B- > M -> A. If the
two ever intersect in time, the originator of the final
value used by M will end up displaying the other one.

So the only solution seems to echo parameter updates to
all clients, including the one that requested them. In that
way (and assuming messages remain in order), all clients
will have the value used by M. If messages do not remain
in order, the solution is to have a serial number set by
M on each update and included in all messages. Finally,
if the communication is unreliable as well, M should
broadcast periodic updates of its state, or at least
of those parts that have recently changed.

Of course this may create some problems, e.g. when a GUI
client's slider is being dragged, and it receives 'old'
update values while this is happening. The solution seems
to be simple: while dragging, ignore all updates but keep
the most recent one. Execute this one when the slider is
released. It may be a good idea to extend the 'ignore state'
by a small time (e.g. 0.1 s) after release.

Another approach would be have an originating client id in
each message, and some mark to indicate the final request
(upon release). Then, while dragging, ignore other clients,
and always only act on marked messages from yourself.

Anyone having any experience with this ?

-- 
FA
Received on Tue Oct 4 04:15:05 2005

This archive was generated by hypermail 2.1.8 : Tue Oct 04 2005 - 04:15:06 EEST