mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-06 05:35:47 +01:00
Somewhat working gain automation.
This probably isn't correct in several ways, but it works more than it did, so I figure it's push worthy. Still not working: * Saving mute automation list * Dragged control points are not snapped to model restrictions (boolean, in this case, but general problem) * Line goes funny if you record mute automation (as opposed to drawing it which works)
This commit is contained in:
parent
f190e630ab
commit
ed1bbefd19
4 changed files with 29 additions and 4 deletions
|
|
@ -1187,7 +1187,7 @@ AutomationLine::view_to_model_coord_y (double& y) const
|
|||
}
|
||||
|
||||
void
|
||||
AutomationLine::model_to_view_coord (double& x, double& y) const
|
||||
AutomationLine::model_to_view_coord_y (double& y) const
|
||||
{
|
||||
/* TODO: This should be more generic (use ParameterDescriptor) */
|
||||
if (alist->parameter().type() == GainAutomation ||
|
||||
|
|
@ -1201,7 +1201,12 @@ AutomationLine::model_to_view_coord (double& x, double& y) const
|
|||
} else {
|
||||
y = (y - alist->get_min_y()) / (double)(alist->get_max_y() - alist->get_min_y());
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
AutomationLine::model_to_view_coord (double& x, double& y) const
|
||||
{
|
||||
model_to_view_coord_y (y);
|
||||
x = _time_converter->to (x) - _offset;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue