From 9e3299f97da874a48f67dc5ff0e0f87a6a54768a Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Sat, 2 Jan 2016 04:58:23 -0500 Subject: change Controllable::set_value() API to include grouped control consideration. This also removes Route::group_gain_control() and associated machinery. Not yet tested with Mackie or other surfaces. More work to done to start using the group capabilities, and also potentially to add or derive more controls as RouteAutomationControls --- gtk2_ardour/automation_controller.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'gtk2_ardour/automation_controller.cc') diff --git a/gtk2_ardour/automation_controller.cc b/gtk2_ardour/automation_controller.cc index dd2d71d9cd..3ae1b2184f 100644 --- a/gtk2_ardour/automation_controller.cc +++ b/gtk2_ardour/automation_controller.cc @@ -40,6 +40,8 @@ using namespace ARDOUR; using namespace Gtk; +using PBD::Controllable; + AutomationBarController::AutomationBarController ( boost::shared_ptr printer, boost::shared_ptr ac, @@ -153,7 +155,7 @@ void AutomationController::value_adjusted () { if (!_ignore_change) { - _controllable->set_value (_controllable->interface_to_internal(_adjustment->get_value())); + _controllable->set_value (_controllable->interface_to_internal(_adjustment->get_value()), Controllable::NoGroup); } /* A bar controller will automatically follow the adjustment, but for a @@ -248,7 +250,7 @@ AutomationController::run_note_select_dialog() const double value = ((_controllable->desc().unit == ARDOUR::ParameterDescriptor::HZ) ? midi_note_to_hz(dialog->note_number()) : dialog->note_number()); - _controllable->set_value(clamp(value, desc.lower, desc.upper)); + _controllable->set_value(clamp(value, desc.lower, desc.upper), Controllable::NoGroup); } delete dialog; } @@ -263,7 +265,7 @@ AutomationController::set_freq_beats(double beats) const double bpm = tempo.beats_per_minute(); const double bps = bpm / 60.0; const double freq = bps / beats; - _controllable->set_value(clamp(freq, desc.lower, desc.upper)); + _controllable->set_value(clamp(freq, desc.lower, desc.upper), Controllable::NoGroup); } void @@ -271,7 +273,7 @@ AutomationController::set_ratio(double ratio) { const ARDOUR::ParameterDescriptor& desc = _controllable->desc(); const double value = _controllable->get_value() * ratio; - _controllable->set_value(clamp(value, desc.lower, desc.upper)); + _controllable->set_value(clamp(value, desc.lower, desc.upper), Controllable::NoGroup); } bool -- cgit v1.2.3