mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 06:44:57 +01:00
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:
parent
b75977920e
commit
593b421180
22 changed files with 285 additions and 96 deletions
|
|
@ -237,14 +237,28 @@ AutomationStreamView::has_automation () const
|
|||
return false;
|
||||
}
|
||||
|
||||
/** Our parent AutomationTimeAxisView calls this when the user requests a particular
|
||||
* InterpolationStyle; tell the AutomationLists in our regions.
|
||||
*/
|
||||
void
|
||||
AutomationStreamView::set_interpolation (AutomationList::InterpolationStyle s)
|
||||
{
|
||||
for (list<RegionView*>::iterator i = region_views.begin(); i != region_views.end(); ++i) {
|
||||
for (list<RegionView*>::const_iterator i = region_views.begin(); i != region_views.end(); ++i) {
|
||||
AutomationRegionView* arv = dynamic_cast<AutomationRegionView*> (*i);
|
||||
assert (arv);
|
||||
if (arv->line()) {
|
||||
arv->line()->set_interpolation (s);
|
||||
}
|
||||
arv->line()->the_list()->set_interpolation (s);
|
||||
}
|
||||
}
|
||||
|
||||
AutomationList::InterpolationStyle
|
||||
AutomationStreamView::interpolation () const
|
||||
{
|
||||
if (region_views.empty()) {
|
||||
return AutomationList::Linear;
|
||||
}
|
||||
|
||||
AutomationRegionView* v = dynamic_cast<AutomationRegionView*> (region_views.front());
|
||||
assert (v);
|
||||
|
||||
return v->line()->the_list()->interpolation ();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue