Synchronizing: Tempo data.
Alt 1: You adjust your internal "tempo" variable whenever
you get a TEMPO Control change. For every sample in
your inner loops, you add that value to your internal
"position" variable. The "position" variable now
corresponds to "free running musical time", tracking
the tempo of the timeline, but not locking to the
position.
good.
Alt 1: Maintain sync and local position as described
above.
When you get a POSITION_CHANGE Control change, adjust
your "position" to the new value. Now, "position" is
locked to the timeline position.
good.
Both of those are simple and elegant (once I get over the internal conflict
of using controls :).
Tim