Follow MIDI control values with automation faders.
authorDavid Robillard <d@drobilla.net>
Thu, 26 Mar 2015 04:47:34 +0000 (00:47 -0400)
committerDavid Robillard <d@drobilla.net>
Thu, 26 Mar 2015 04:47:34 +0000 (00:47 -0400)
commit7e2c8ace4bf30ce8e27f1089370d63d7ef604cfa
treefe6812cf1b5abc337db5a2395fe1945881c32f7c
parenta53bd7269797969bfb182a4caebc9361cac45795
Follow MIDI control values with automation faders.

Fixes bug #6166 (except record).

This attempts to follow the "current" control value somewhat aggressively:

* On locate, slider is set to the value from the top region at the new
  transport position.

* Playback or MIDI input is followed "live".

* Whenever the slider is moved (including automatically), that value is emitted
  as an immediate event to keep external gear in sync.

General idea is that the Ardour slider should act as a mirror of an external
hardware knob, and both should be synced to whatever the control is at the
current transport position.  Since we lack real playback/touch/etc modes for
these for now, we must choose one behaviour, and this seems like the most
reasonable one.

Follow is handled in the audio thread, which is probably not ideal, but since
these controls have no lists and do not record, should be fine.  Probably.
libs/ardour/ardour/midi_track.h
libs/ardour/ardour/parameter_types.h
libs/ardour/midi_track.cc
libs/evoral/evoral/MIDIEvent.hpp