A few fixes to interpolation of MIDI controller data. Don't interpolate

when writing these data back to a source, otherwise surprising new
interpolated points appear in MIDI automation.  Similarly don't interpolate
when reading the model during MIDI stretch.  Fix handling of interpolation state;
controllers that have been set by the user to use a different interpolation style
are noted in the <Source> tag of the session file and this state is sprayed around
to MidiModel and the GUI as necessary.


git-svn-id: svn://localhost/ardour2/branches/3.0@7409 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington 2010-07-14 00:58:15 +00:00
parent b75977920e
commit 593b421180
22 changed files with 285 additions and 96 deletions

View file

@ -16,6 +16,7 @@
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <iostream>
#include <limits>
#include "evoral/ControlSet.hpp"
#include "evoral/ControlList.hpp"
@ -43,6 +44,10 @@ ControlSet::add_control(boost::shared_ptr<Control> ac)
_controls[ac->parameter()] = ac;
ac->ListMarkedDirty.connect_same_thread (_control_connections, boost::bind (&ControlSet::control_list_marked_dirty, this));
ac->list()->InterpolationChanged.connect_same_thread (
_list_connections, boost::bind (&ControlSet::control_list_interpolation_changed, this, ac->parameter(), _1)
);
}
void
@ -111,10 +116,10 @@ ControlSet::clear_controls ()
Glib::Mutex::Lock lm (_control_lock);
_control_connections.drop_connections ();
_list_connections.drop_connections ();
for (Controls::iterator li = _controls.begin(); li != _controls.end(); ++li)
li->second->list()->clear();
}
} // namespace Evoral