mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 07:14:56 +01:00
Allow to un/link foldback send panners
This commit is contained in:
parent
db8262bd7b
commit
5834728e2f
3 changed files with 28 additions and 5 deletions
|
|
@ -95,16 +95,14 @@ FoldbackSend::FoldbackSend (boost::shared_ptr<Send> snd, boost::shared_ptr<ARDOU
|
||||||
|
|
||||||
if (_foldback_route->input ()->n_ports ().n_audio () == 2) {
|
if (_foldback_route->input ()->n_ports ().n_audio () == 2) {
|
||||||
_button.set_layout_ellipsize_width (PX_SCALE (_width - 19) * PANGO_SCALE);
|
_button.set_layout_ellipsize_width (PX_SCALE (_width - 19) * PANGO_SCALE);
|
||||||
boost::shared_ptr<Pannable> pannable = _send_del->panner ()->pannable ();
|
boost::shared_ptr<Pannable> pannable = _send->panner ()->pannable ();
|
||||||
boost::shared_ptr<AutomationControl> ac;
|
|
||||||
ac = pannable->pan_azimuth_control;
|
|
||||||
_pan_control.set_size_request (PX_SCALE (19), PX_SCALE (19));
|
_pan_control.set_size_request (PX_SCALE (19), PX_SCALE (19));
|
||||||
_pan_control.set_tooltip_prefix (_("Pan: "));
|
_pan_control.set_tooltip_prefix (_("Pan: "));
|
||||||
_pan_control.set_name ("trim knob");
|
|
||||||
_pan_control.set_no_show_all (true);
|
_pan_control.set_no_show_all (true);
|
||||||
snd_but_pan->pack_start (_pan_control, false, false);
|
snd_but_pan->pack_start (_pan_control, false, false);
|
||||||
_pan_control.show ();
|
_pan_control.show ();
|
||||||
_pan_control.set_controllable (ac);
|
_pan_control.set_controllable (pannable->pan_azimuth_control);
|
||||||
|
_pan_control.set_name (_send->panner_linked_to_route () ? "trim knob" : "pan knob");
|
||||||
}
|
}
|
||||||
boost::shared_ptr<AutomationControl> lc;
|
boost::shared_ptr<AutomationControl> lc;
|
||||||
lc = _send->gain_control ();
|
lc = _send->gain_control ();
|
||||||
|
|
@ -123,7 +121,9 @@ FoldbackSend::FoldbackSend (boost::shared_ptr<Send> snd, boost::shared_ptr<ARDOU
|
||||||
_send_proc->ActiveChanged.connect (_connections, invalidator (*this), boost::bind (&FoldbackSend::send_state_changed, this), gui_context ());
|
_send_proc->ActiveChanged.connect (_connections, invalidator (*this), boost::bind (&FoldbackSend::send_state_changed, this), gui_context ());
|
||||||
_button.signal_button_press_event ().connect (sigc::mem_fun (*this, &FoldbackSend::button_press));
|
_button.signal_button_press_event ().connect (sigc::mem_fun (*this, &FoldbackSend::button_press));
|
||||||
_button.signal_button_release_event ().connect (sigc::mem_fun (*this, &FoldbackSend::button_release));
|
_button.signal_button_release_event ().connect (sigc::mem_fun (*this, &FoldbackSend::button_release));
|
||||||
|
_pan_control.signal_button_press_event().connect (sigc::mem_fun (*this, &FoldbackSend::pan_knob_press));
|
||||||
_send_route->PropertyChanged.connect (_connections, invalidator (*this), boost::bind (&FoldbackSend::route_property_changed, this, _1), gui_context ());
|
_send_route->PropertyChanged.connect (_connections, invalidator (*this), boost::bind (&FoldbackSend::route_property_changed, this, _1), gui_context ());
|
||||||
|
_send->panner_shell()->PannableChanged.connect (_connections, invalidator (*this), boost::bind (&FoldbackSend::send_pan_changed, this), gui_context ());
|
||||||
|
|
||||||
show ();
|
show ();
|
||||||
}
|
}
|
||||||
|
|
@ -169,6 +169,17 @@ FoldbackSend::led_clicked (GdkEventButton* ev)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool
|
||||||
|
FoldbackSend::pan_knob_press (GdkEventButton* ev)
|
||||||
|
{
|
||||||
|
if (Keyboard::is_context_menu_event (ev)) {
|
||||||
|
_send->set_panner_linked_to_route (!_send->panner_linked_to_route ());
|
||||||
|
_pan_control.set_name (_send->panner_linked_to_route () ? "trim knob" : "pan knob");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
FoldbackSend::button_press (GdkEventButton* ev)
|
FoldbackSend::button_press (GdkEventButton* ev)
|
||||||
{
|
{
|
||||||
|
|
@ -207,6 +218,13 @@ FoldbackSend::send_state_changed ()
|
||||||
_button.set_active (_send_proc->enabled ());
|
_button.set_active (_send_proc->enabled ());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
FoldbackSend::send_pan_changed ()
|
||||||
|
{
|
||||||
|
boost::shared_ptr<Pannable> pannable = _send->panner ()->pannable ();
|
||||||
|
_pan_control.set_controllable (pannable->pan_azimuth_control);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
FoldbackSend::level_adjusted ()
|
FoldbackSend::level_adjusted ()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -83,6 +83,7 @@ public:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void led_clicked (GdkEventButton*);
|
void led_clicked (GdkEventButton*);
|
||||||
|
bool pan_knob_press (GdkEventButton*);
|
||||||
bool button_press (GdkEventButton*);
|
bool button_press (GdkEventButton*);
|
||||||
bool button_release (GdkEventButton*);
|
bool button_release (GdkEventButton*);
|
||||||
void set_gain (float new_gain);
|
void set_gain (float new_gain);
|
||||||
|
|
@ -91,6 +92,7 @@ private:
|
||||||
void route_property_changed (const PBD::PropertyChange&);
|
void route_property_changed (const PBD::PropertyChange&);
|
||||||
void name_changed ();
|
void name_changed ();
|
||||||
void send_state_changed ();
|
void send_state_changed ();
|
||||||
|
void send_pan_changed ();
|
||||||
void level_adjusted ();
|
void level_adjusted ();
|
||||||
void level_changed ();
|
void level_changed ();
|
||||||
void set_tooltip ();
|
void set_tooltip ();
|
||||||
|
|
|
||||||
|
|
@ -458,6 +458,9 @@
|
||||||
<ColorAlias name="trim knob" alias="widget:bg"/>
|
<ColorAlias name="trim knob" alias="widget:bg"/>
|
||||||
<ColorAlias name="trim knob: arc end" alias="widget:blue"/>
|
<ColorAlias name="trim knob: arc end" alias="widget:blue"/>
|
||||||
<ColorAlias name="trim knob: arc start" alias="widget:blue"/>
|
<ColorAlias name="trim knob: arc start" alias="widget:blue"/>
|
||||||
|
<ColorAlias name="pan knob" alias="widget:bg"/>
|
||||||
|
<ColorAlias name="pan knob: arc end" alias="widget:orange"/>
|
||||||
|
<ColorAlias name="pan knob: arc start" alias="widget:orange"/>
|
||||||
<ColorAlias name="vca assign button: fill" alias="widget:bg"/>
|
<ColorAlias name="vca assign button: fill" alias="widget:bg"/>
|
||||||
<ColorAlias name="verbose canvas cursor" alias="theme:contrasting clock"/>
|
<ColorAlias name="verbose canvas cursor" alias="theme:contrasting clock"/>
|
||||||
<ColorAlias name="video timeline bar" alias="neutral:background2"/>
|
<ColorAlias name="video timeline bar" alias="neutral:background2"/>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue