1 #include <gdkmm/pixbuf.h>
3 #include "pbd/compose.h"
6 #include "gtkmm2ext/bindable_button.h"
7 #include "gtkmm2ext/tearoff.h"
8 #include "gtkmm2ext/actions.h"
10 #include "ardour/dB.h"
11 #include "ardour/monitor_processor.h"
12 #include "ardour/route.h"
13 #include "ardour/utils.h"
15 #include "ardour_ui.h"
16 #include "gui_thread.h"
17 #include "monitor_section.h"
18 #include "public_editor.h"
20 #include "volume_controller.h"
24 using namespace ARDOUR;
26 using namespace Gtkmm2ext;
30 Glib::RefPtr<ActionGroup> MonitorSection::monitor_actions;
31 Glib::RefPtr<Gdk::Pixbuf> MonitorSection::big_knob_pixbuf;
32 Glib::RefPtr<Gdk::Pixbuf> MonitorSection::little_knob_pixbuf;
34 MonitorSection::MonitorSection (Session* s)
39 , gain_adjustment (0.781787, 0.0, 1.0, 0.01, 0.1) // initial value is unity gain
41 , dim_adjustment (0.2, 0.0, 1.0, 0.01, 0.1) // upper+lower will be reset to match model
43 , solo_boost_adjustment (1.0, 1.0, 3.0, 0.01, 0.1) // upper and lower will be reset to match model
44 , solo_boost_control (0)
45 , solo_cut_adjustment (0.0, 0.0, 1.0, 0.01, 0.1) // upper and lower will be reset to match model
46 , solo_cut_control (0)
47 , solo_in_place_button (solo_model_group, _("SiP"))
48 , afl_button (solo_model_group, _("AFL"))
49 , pfl_button (solo_model_group, _("PFL"))
50 , cut_all_button (_("MUTE"))
51 , dim_all_button (_("dim"))
52 , mono_button (_("mono"))
53 , rude_solo_button (_("soloing"))
56 Glib::RefPtr<Action> act;
58 if (!monitor_actions) {
60 /* do some static stuff */
73 dim_control = new VolumeController (little_knob_pixbuf, &dim_adjustment, false, 30, 30);
75 HBox* dim_packer = manage (new HBox);
78 spin_label = manage (new Label (_("Dim Cut")));
79 spin_packer = manage (new VBox);
81 spin_packer->set_spacing (6);
82 spin_packer->pack_start (*dim_control, false, false);
83 spin_packer->pack_start (*spin_label, false, false);
85 dim_packer->set_spacing (12);
86 dim_packer->pack_start (*spin_packer, true, true);
90 rude_solo_button.set_name ("TransportSoloAlert");
91 rude_solo_button.show ();
93 ARDOUR_UI::Blink.connect (sigc::mem_fun (*this, &MonitorSection::solo_blink));
94 rude_solo_button.signal_button_press_event().connect (sigc::mem_fun(*this, &MonitorSection::cancel_solo), false);
95 UI::instance()->set_tip (rude_solo_button, _("When active, something is soloed.\nClick to de-solo everything"));
98 solo_model_box.set_spacing (6);
99 solo_model_box.pack_start (solo_in_place_button, false, false);
100 solo_model_box.pack_start (afl_button, false, false);
101 solo_model_box.pack_start (pfl_button, false, false);
103 solo_in_place_button.show ();
106 solo_model_box.show ();
108 act = ActionManager::get_action (X_("Solo"), X_("solo-use-in-place"));
110 act->connect_proxy (solo_in_place_button);
113 act = ActionManager::get_action (X_("Solo"), X_("solo-use-afl"));
115 act->connect_proxy (afl_button);
118 act = ActionManager::get_action (X_("Solo"), X_("solo-use-pfl"));
120 act->connect_proxy (pfl_button);
126 solo_boost_control = new VolumeController (little_knob_pixbuf, &solo_boost_adjustment, false, 30, 30);
128 HBox* solo_packer = manage (new HBox);
129 solo_packer->set_spacing (12);
130 solo_packer->show ();
132 spin_label = manage (new Label (_("Solo Boost")));
133 spin_packer = manage (new VBox);
134 spin_packer->show ();
135 spin_packer->set_spacing (6);
136 spin_packer->pack_start (*solo_boost_control, false, false);
137 spin_packer->pack_start (*spin_label, false, false);
139 solo_packer->pack_start (*spin_packer, true, true);
143 solo_cut_control = new VolumeController (little_knob_pixbuf, &solo_cut_adjustment, false, 30, 30);
145 spin_label = manage (new Label (_("SiP Cut")));
146 spin_packer = manage (new VBox);
147 spin_packer->show ();
148 spin_packer->set_spacing (6);
149 spin_packer->pack_start (*solo_cut_control, false, false);
150 spin_packer->pack_start (*spin_label, false, false);
152 solo_packer->pack_start (*spin_packer, true, true);
154 upper_packer.set_spacing (12);
155 upper_packer.pack_start (rude_solo_button, false, false);
156 upper_packer.pack_start (solo_model_box, false, false);
157 upper_packer.pack_start (*solo_packer, false, false);
159 act = ActionManager::get_action (X_("Monitor"), X_("monitor-cut-all"));
161 act->connect_proxy (cut_all_button);
164 act = ActionManager::get_action (X_("Monitor"), X_("monitor-dim-all"));
166 act->connect_proxy (dim_all_button);
169 act = ActionManager::get_action (X_("Monitor"), X_("monitor-mono"));
171 act->connect_proxy (mono_button);
174 cut_all_button.set_name (X_("MonitorMuteButton"));
175 cut_all_button.unset_flags (Gtk::CAN_FOCUS);
176 cut_all_button.set_size_request (50,50);
177 cut_all_button.show ();
179 HBox* bbox = manage (new HBox);
181 bbox->set_spacing (12);
182 bbox->pack_start (mono_button, true, true);
183 bbox->pack_start (dim_all_button, true, true);
185 dim_all_button.set_name (X_("MonitorDimButton"));
186 dim_all_button.unset_flags (Gtk::CAN_FOCUS);
187 mono_button.set_name (X_("MonitorMonoButton"));
188 mono_button.unset_flags (Gtk::CAN_FOCUS);
190 lower_packer.set_spacing (12);
191 lower_packer.pack_start (*bbox, false, false);
192 lower_packer.pack_start (cut_all_button, false, false);
196 gain_control = new VolumeController (big_knob_pixbuf, &gain_adjustment, false, 80, 80);
198 spin_label = manage (new Label (_("Gain")));
199 spin_packer = manage (new VBox);
200 spin_packer->show ();
201 spin_packer->set_spacing (6);
202 spin_packer->pack_start (*gain_control, false, false);
203 spin_packer->pack_start (*spin_label, false, false);
205 lower_packer.pack_start (*spin_packer, true, true);
207 vpacker.set_border_width (12);
208 vpacker.set_spacing (12);
209 vpacker.pack_start (upper_packer, false, false);
210 vpacker.pack_start (*dim_packer, false, false);
211 vpacker.pack_start (main_table, false, false);
212 vpacker.pack_start (lower_packer, false, false);
214 hpacker.set_border_width (12);
215 hpacker.set_spacing (12);
216 hpacker.pack_start (vpacker, true, true);
218 gain_control->show_all ();
219 dim_control->show_all ();
220 solo_boost_control->show_all ();
224 upper_packer.show ();
225 lower_packer.show ();
230 assign_controllables ();
232 _tearoff = new TearOff (hpacker);
234 /* if torn off, make this a normal window */
235 _tearoff->tearoff_window().set_type_hint (Gdk::WINDOW_TYPE_HINT_NORMAL);
236 _tearoff->tearoff_window().set_title (X_("Monitor"));
237 _tearoff->tearoff_window().signal_key_press_event().connect (sigc::ptr_fun (forward_key_press), false);
239 /* catch changes that affect us */
241 Config->ParameterChanged.connect (config_connection, invalidator (*this), ui_bind (&MonitorSection::parameter_changed, this, _1), gui_context());
244 MonitorSection::~MonitorSection ()
246 for (ChannelButtons::iterator i = _channel_buttons.begin(); i != _channel_buttons.end(); ++i) {
250 _channel_buttons.clear ();
254 delete solo_boost_control;
259 MonitorSection::set_session (Session* s)
261 AxisView::set_session (s);
265 _route = _session->monitor_out ();
268 /* session with control outs */
269 _monitor = _route->monitor_control ();
270 assign_controllables ();
272 /* session with no control outs */
282 control_connections.drop_connections ();
285 /* both might be null */
288 MonitorSection::ChannelButtonSet::ChannelButtonSet ()
294 cut.set_name (X_("MonitorMuteButton"));
295 dim.set_name (X_("MonitorDimButton"));
296 solo.set_name (X_("MixerSoloButton"));
297 invert.set_name (X_("MonitorInvertButton"));
299 gtk_activatable_set_use_action_appearance (GTK_ACTIVATABLE (cut.gobj()), false);
300 gtk_activatable_set_use_action_appearance (GTK_ACTIVATABLE (dim.gobj()), false);
301 gtk_activatable_set_use_action_appearance (GTK_ACTIVATABLE (invert.gobj()), false);
302 gtk_activatable_set_use_action_appearance (GTK_ACTIVATABLE (solo.gobj()), false);
304 cut.unset_flags (Gtk::CAN_FOCUS);
305 dim.unset_flags (Gtk::CAN_FOCUS);
306 solo.unset_flags (Gtk::CAN_FOCUS);
307 invert.unset_flags (Gtk::CAN_FOCUS);
311 MonitorSection::populate_buttons ()
317 Glib::RefPtr<Action> act;
318 uint32_t nchans = _monitor->output_streams().n_audio();
320 main_table.resize (nchans+1, 5);
321 main_table.set_col_spacings (6);
322 main_table.set_row_spacings (6);
323 main_table.set_homogeneous (true);
325 Label* l1 = manage (new Label (X_("out")));
326 main_table.attach (*l1, 0, 1, 0, 1, SHRINK|FILL, SHRINK|FILL);
327 l1 = manage (new Label (X_("cut")));
328 main_table.attach (*l1, 1, 2, 0, 1, SHRINK|FILL, SHRINK|FILL);
329 l1 = manage (new Label (X_("dim")));
330 main_table.attach (*l1, 2, 3, 0, 1, SHRINK|FILL, SHRINK|FILL);
331 l1 = manage (new Label (X_("solo")));
332 main_table.attach (*l1, 3, 4, 0, 1, SHRINK|FILL, SHRINK|FILL);
333 l1 = manage (new Label (X_("inv")));
334 main_table.attach (*l1, 4, 5, 0, 1, SHRINK|FILL, SHRINK|FILL);
336 const uint32_t row_offset = 1;
338 for (uint32_t i = 0; i < nchans; ++i) {
351 snprintf (buf, sizeof (buf), "%d", i+1);
355 Label* label = manage (new Label (l));
356 main_table.attach (*label, 0, 1, i+row_offset, i+row_offset+1, SHRINK|FILL, SHRINK|FILL);
358 ChannelButtonSet* cbs = new ChannelButtonSet;
360 _channel_buttons.push_back (cbs);
362 main_table.attach (cbs->cut, 1, 2, i+row_offset, i+row_offset+1, SHRINK|FILL, SHRINK|FILL);
363 main_table.attach (cbs->dim, 2, 3, i+row_offset, i+row_offset+1, SHRINK|FILL, SHRINK|FILL);
364 main_table.attach (cbs->solo, 3, 4, i+row_offset, i+row_offset+1, SHRINK|FILL, SHRINK|FILL);
365 main_table.attach (cbs->invert, 4, 5, i+row_offset, i+row_offset+1, SHRINK|FILL, SHRINK|FILL);
367 snprintf (buf, sizeof (buf), "monitor-cut-%u", i+1);
368 act = ActionManager::get_action (X_("Monitor"), buf);
370 act->connect_proxy (cbs->cut);
373 snprintf (buf, sizeof (buf), "monitor-dim-%u", i+1);
374 act = ActionManager::get_action (X_("Monitor"), buf);
376 act->connect_proxy (cbs->dim);
379 snprintf (buf, sizeof (buf), "monitor-solo-%u", i+1);
380 act = ActionManager::get_action (X_("Monitor"), buf);
382 act->connect_proxy (cbs->solo);
385 snprintf (buf, sizeof (buf), "monitor-invert-%u", i+1);
386 act = ActionManager::get_action (X_("Monitor"), buf);
388 act->connect_proxy (cbs->invert);
392 main_table.show_all ();
396 MonitorSection::set_button_names ()
398 rec_enable_button_label.set_text ("rec");
399 mute_button_label.set_text ("rec");
400 solo_button_label.set_text ("rec");
404 MonitorSection::dim_all ()
410 Glib::RefPtr<Action> act = ActionManager::get_action (X_("Monitor"), "monitor-dim-all");
412 Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
413 _monitor->set_dim_all (tact->get_active());
419 MonitorSection::cut_all ()
425 Glib::RefPtr<Action> act = ActionManager::get_action (X_("Monitor"), "monitor-cut-all");
427 Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
428 _monitor->set_cut_all (tact->get_active());
433 MonitorSection::mono ()
439 Glib::RefPtr<Action> act = ActionManager::get_action (X_("Monitor"), "monitor-mono");
441 Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
442 _monitor->set_mono (tact->get_active());
447 MonitorSection::cut_channel (uint32_t chn)
454 snprintf (buf, sizeof (buf), "monitor-cut-%u", chn);
456 --chn; // 0-based in backend
458 Glib::RefPtr<Action> act = ActionManager::get_action (X_("Monitor"), buf);
460 Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
461 _monitor->set_cut (chn, tact->get_active());
466 MonitorSection::dim_channel (uint32_t chn)
473 snprintf (buf, sizeof (buf), "monitor-dim-%u", chn);
475 --chn; // 0-based in backend
477 Glib::RefPtr<Action> act = ActionManager::get_action (X_("Monitor"), buf);
479 Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
480 _monitor->set_dim (chn, tact->get_active());
486 MonitorSection::solo_channel (uint32_t chn)
493 snprintf (buf, sizeof (buf), "monitor-solo-%u", chn);
495 --chn; // 0-based in backend
497 Glib::RefPtr<Action> act = ActionManager::get_action (X_("Monitor"), buf);
499 Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
500 _monitor->set_solo (chn, tact->get_active());
506 MonitorSection::invert_channel (uint32_t chn)
513 snprintf (buf, sizeof (buf), "monitor-invert-%u", chn);
515 --chn; // 0-based in backend
517 Glib::RefPtr<Action> act = ActionManager::get_action (X_("Monitor"), buf);
519 Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
520 _monitor->set_polarity (chn, tact->get_active());
525 MonitorSection::register_actions ()
530 monitor_actions = ActionGroup::create (X_("Monitor"));
531 ActionManager::add_action_group (monitor_actions);
533 ActionManager::register_toggle_action (monitor_actions, "monitor-mono", "",
534 sigc::mem_fun (*this, &MonitorSection::mono));
536 ActionManager::register_toggle_action (monitor_actions, "monitor-cut-all", "",
537 sigc::mem_fun (*this, &MonitorSection::cut_all));
539 ActionManager::register_toggle_action (monitor_actions, "monitor-dim-all", "",
540 sigc::mem_fun (*this, &MonitorSection::dim_all));
542 /* note the 1-based counting (for naming - backend uses 0-based) */
544 for (uint32_t chn = 1; chn <= 16; ++chn) {
546 /* for the time being, do not use the action description because it always
547 shows up in the buttons, which is undesirable.
550 action_name = string_compose (X_("monitor-cut-%1"), chn);
551 action_descr = string_compose (_("Cut Monitor Chn %1"), chn);
552 ActionManager::register_toggle_action (monitor_actions, action_name.c_str(), "",
553 sigc::bind (sigc::mem_fun (*this, &MonitorSection::cut_channel), chn));
555 action_name = string_compose (X_("monitor-dim-%1"), chn);
556 action_descr = string_compose (_("Dim Monitor Chn %1"), chn+1);
557 ActionManager::register_toggle_action (monitor_actions, action_name.c_str(), "",
558 sigc::bind (sigc::mem_fun (*this, &MonitorSection::dim_channel), chn));
560 action_name = string_compose (X_("monitor-solo-%1"), chn);
561 action_descr = string_compose (_("Solo Monitor Chn %1"), chn);
562 ActionManager::register_toggle_action (monitor_actions, action_name.c_str(), "",
563 sigc::bind (sigc::mem_fun (*this, &MonitorSection::solo_channel), chn));
565 action_name = string_compose (X_("monitor-invert-%1"), chn);
566 action_descr = string_compose (_("Invert Monitor Chn %1"), chn);
567 ActionManager::register_toggle_action (monitor_actions, action_name.c_str(), "",
568 sigc::bind (sigc::mem_fun (*this, &MonitorSection::invert_channel), chn));
573 Glib::RefPtr<ActionGroup> solo_actions = ActionGroup::create (X_("Solo"));
574 RadioAction::Group solo_group;
576 ActionManager::register_radio_action (solo_actions, solo_group, "solo-use-in-place", "",
577 sigc::mem_fun (*this, &MonitorSection::solo_use_in_place));
578 ActionManager::register_radio_action (solo_actions, solo_group, "solo-use-afl", "",
579 sigc::mem_fun (*this, &MonitorSection::solo_use_afl));
580 ActionManager::register_radio_action (solo_actions, solo_group, "solo-use-pfl", "",
581 sigc::mem_fun (*this, &MonitorSection::solo_use_pfl));
583 ActionManager::add_action_group (solo_actions);
587 MonitorSection::solo_use_in_place ()
589 /* this is driven by a toggle on a radio group, and so is invoked twice,
590 once for the item that became inactive and once for the one that became
594 Glib::RefPtr<Action> act = ActionManager::get_action (X_("Solo"), X_("solo-use-in-place"));
597 Glib::RefPtr<RadioAction> ract = Glib::RefPtr<RadioAction>::cast_dynamic (act);
599 Config->set_solo_control_is_listen_control (!ract->get_active());
605 MonitorSection::solo_use_afl ()
607 /* this is driven by a toggle on a radio group, and so is invoked twice,
608 once for the item that became inactive and once for the one that became
612 Glib::RefPtr<Action> act = ActionManager::get_action (X_("Solo"), X_("solo-use-afl"));
614 Glib::RefPtr<RadioAction> ract = Glib::RefPtr<RadioAction>::cast_dynamic (act);
616 if (ract->get_active()) {
617 Config->set_listen_position (AfterFaderListen);
618 Config->set_solo_control_is_listen_control (true);
625 MonitorSection::solo_use_pfl ()
627 /* this is driven by a toggle on a radio group, and so is invoked twice,
628 once for the item that became inactive and once for the one that became
632 Glib::RefPtr<Action> act = ActionManager::get_action (X_("Solo"), X_("solo-use-afl"));
634 Glib::RefPtr<RadioAction> ract = Glib::RefPtr<RadioAction>::cast_dynamic (act);
636 if (ract->get_active()) {
637 Config->set_listen_position (PreFaderListen);
638 Config->set_solo_control_is_listen_control (true);
645 MonitorSection::setup_knob_images ()
649 big_knob_pixbuf = ::get_icon ("bigknob");
653 error << "No knob image found (or not loadable) at "
656 throw failed_constructor ();
661 little_knob_pixbuf = ::get_icon ("littleknob");
665 error << "No knob image found (or not loadable) at "
668 throw failed_constructor ();
673 MonitorSection::nonlinear_gain_printer (SpinButton* button)
675 double val = button->get_adjustment()->get_value();
677 snprintf (buf, sizeof (buf), "%.1f", accurate_coefficient_to_dB (slider_position_to_gain (val)));
678 button->set_text (buf);
683 MonitorSection::linear_gain_printer (SpinButton* button)
685 double val = button->get_adjustment()->get_value();
687 snprintf (buf, sizeof (buf), "%.1f", accurate_coefficient_to_dB (val));
688 button->set_text (buf);
693 MonitorSection::update_solo_model ()
695 const char* action_name;
696 Glib::RefPtr<Action> act;
698 if (Config->get_solo_control_is_listen_control()) {
699 switch (Config->get_listen_position()) {
700 case AfterFaderListen:
701 action_name = X_("solo-use-afl");
704 action_name = X_("solo-use-pfl");
708 action_name = X_("solo-use-in-place");
711 act = ActionManager::get_action (X_("Solo"), action_name);
713 Glib::RefPtr<RadioAction> ract = Glib::RefPtr<RadioAction>::cast_dynamic (act);
715 ract->set_active (true);
721 MonitorSection::map_state ()
723 if (!_route || !_monitor) {
727 gain_control->get_adjustment()->set_value (gain_to_slider_position (_route->gain_control()->get_value()));
728 dim_control->get_adjustment()->set_value (_monitor->dim_level());
729 solo_boost_control->get_adjustment()->set_value (_monitor->solo_boost_level());
731 Glib::RefPtr<Action> act;
733 update_solo_model ();
735 act = ActionManager::get_action (X_("Monitor"), "monitor-cut-all");
737 Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic (act);
739 cerr << "Set monitor cut all action to " << _monitor->cut_all () << endl;
740 tact->set_active (_monitor->cut_all());
742 cerr << " no global cut action\n";
745 cerr << " no global cut action2\n";
748 act = ActionManager::get_action (X_("Monitor"), "monitor-dim-all");
750 Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic (act);
752 tact->set_active (_monitor->dim_all());
756 act = ActionManager::get_action (X_("Monitor"), "monitor-mono");
758 Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic (act);
760 tact->set_active (_monitor->mono());
764 uint32_t nchans = _monitor->output_streams().n_audio();
766 assert (nchans == _channel_buttons.size ());
768 for (uint32_t n = 0; n < nchans; ++n) {
770 char action_name[32];
772 snprintf (action_name, sizeof (action_name), "monitor-cut-%u", n+1);
773 act = ActionManager::get_action (X_("Monitor"), action_name);
775 Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic (act);
777 tact->set_active (_monitor->cut (n));
781 snprintf (action_name, sizeof (action_name), "monitor-dim-%u", n+1);
782 act = ActionManager::get_action (X_("Monitor"), action_name);
784 Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic (act);
786 tact->set_active (_monitor->dimmed (n));
790 snprintf (action_name, sizeof (action_name), "monitor-solo-%u", n+1);
791 act = ActionManager::get_action (X_("Monitor"), action_name);
793 Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic (act);
795 tact->set_active (_monitor->soloed (n));
799 snprintf (action_name, sizeof (action_name), "monitor-invert-%u", n+1);
800 act = ActionManager::get_action (X_("Monitor"), action_name);
802 Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic (act);
804 tact->set_active (_monitor->inverted (n));
811 MonitorSection::solo_blink (bool onoff)
817 if (_session->soloing() || _session->listening()) {
819 rude_solo_button.set_state (STATE_ACTIVE);
821 rude_solo_button.set_state (STATE_NORMAL);
824 // rude_solo_button.set_active (false);
825 rude_solo_button.set_state (STATE_NORMAL);
830 MonitorSection::cancel_solo (GdkEventButton* ev)
833 if (_session->soloing()) {
834 _session->set_solo (_session->get_routes(), false);
835 } else if (_session->listening()) {
836 _session->set_listen (_session->get_routes(), false);
844 MonitorSection::solo_cut_changed ()
846 Config->set_solo_mute_gain (slider_position_to_gain (solo_cut_adjustment.get_value()));
850 MonitorSection::parameter_changed (std::string name)
852 if (name == "solo-control-is-listen-control" ||
853 name == "listen-position") {
854 update_solo_model ();
855 } else if (name == "solo-mute-gain") {
856 solo_cut_adjustment.set_value (gain_to_slider_position (Config->get_solo_mute_gain()));
861 MonitorSection::assign_controllables ()
863 boost::shared_ptr<Controllable> none;
866 /* too early - GUI controls not set up yet */
871 gain_control->set_controllable (_route->gain_control());
872 control_link (control_connections, _route->gain_control(), gain_adjustment);
874 gain_control->set_controllable (none);
879 cut_all_button.set_controllable (_monitor->cut_control());
880 cut_all_button.watch ();
881 dim_all_button.set_controllable (_monitor->dim_control());
882 dim_all_button.watch ();
883 mono_button.set_controllable (_monitor->mono_control());
884 mono_button.watch ();
886 boost::shared_ptr<Controllable> c (_monitor->dim_level_control ());
888 dim_control->set_controllable (c);
889 dim_adjustment.set_lower (c->lower());
890 dim_adjustment.set_upper (c->upper());
891 control_link (control_connections, c, dim_adjustment);
893 c = _monitor->solo_boost_control ();
894 solo_boost_control->set_controllable (c);
895 solo_boost_adjustment.set_lower (c->lower());
896 solo_boost_adjustment.set_upper (c->upper());
897 control_link (control_connections, c, solo_boost_adjustment);
901 cut_all_button.set_controllable (none);
902 dim_all_button.set_controllable (none);
903 mono_button.set_controllable (none);
905 dim_control->set_controllable (none);
906 solo_boost_control->set_controllable (none);