From 593b421180290f46f39efcb21ed8192b624bbc73 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Wed, 14 Jul 2010 00:58:15 +0000 Subject: 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 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 --- libs/ardour/smf_source.cc | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'libs/ardour/smf_source.cc') diff --git a/libs/ardour/smf_source.cc b/libs/ardour/smf_source.cc index fe5a0f7c8f..bbdf958815 100644 --- a/libs/ardour/smf_source.cc +++ b/libs/ardour/smf_source.cc @@ -257,10 +257,6 @@ SMFSource::write_unlocked (MidiRingBuffer& source, sframes_t position append_event_unlocked_frames(ev, position); } - if (_model) { - set_default_controls_interpolation(); - } - Evoral::SMF::flush(); free(buf); @@ -471,8 +467,6 @@ SMFSource::load_model (bool lock, bool force_reload) _length_beats = max(_length_beats, ev.time()); } - set_default_controls_interpolation(); - _model->end_write(false); _model->set_edited(false); @@ -481,18 +475,6 @@ SMFSource::load_model (bool lock, bool force_reload) free(buf); } -void -SMFSource::set_default_controls_interpolation () -{ - // set interpolation style to defaults, can be changed by the GUI later - Evoral::ControlSet::Controls controls = _model->controls(); - for (Evoral::ControlSet::Controls::iterator c = controls.begin(); c != controls.end(); ++c) { - (*c).second->list()->set_interpolation( - EventTypeMap::instance().interpolation_of((*c).first)); - } -} - - void SMFSource::destroy_model () { -- cgit v1.2.3