mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-09 08:14:58 +01:00
remove semantic-free Panner::Changed signal; make mackie code pay attention to actual pan controls; make GUI watch PannerShell::Changed for news that the currently chosen panner has changed or changed configuration
git-svn-id: svn://localhost/ardour2/branches/3.0@8924 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
14277ff831
commit
75abb09f32
9 changed files with 33 additions and 30 deletions
|
|
@ -42,6 +42,7 @@
|
||||||
#include "ardour/location.h"
|
#include "ardour/location.h"
|
||||||
#include "ardour/pannable.h"
|
#include "ardour/pannable.h"
|
||||||
#include "ardour/panner.h"
|
#include "ardour/panner.h"
|
||||||
|
#include "ardour/panner_shell.h"
|
||||||
#include "ardour/playlist.h"
|
#include "ardour/playlist.h"
|
||||||
#include "ardour/processor.h"
|
#include "ardour/processor.h"
|
||||||
#include "ardour/profile.h"
|
#include "ardour/profile.h"
|
||||||
|
|
@ -108,8 +109,8 @@ AudioTimeAxisView::AudioTimeAxisView (PublicEditor& ed, Session* sess, boost::sh
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_route->panner()) {
|
if (_route->panner()) {
|
||||||
_route->panner()->Changed.connect (*this, invalidator (*this),
|
_route->panner_shell()->Changed.connect (*this, invalidator (*this),
|
||||||
boost::bind (&AudioTimeAxisView::ensure_pan_views, this, false), gui_context());
|
boost::bind (&AudioTimeAxisView::ensure_pan_views, this, false), gui_context());
|
||||||
}
|
}
|
||||||
|
|
||||||
/* map current state of the route */
|
/* map current state of the route */
|
||||||
|
|
|
||||||
|
|
@ -42,6 +42,7 @@
|
||||||
#include "ardour/audio_track.h"
|
#include "ardour/audio_track.h"
|
||||||
#include "ardour/pannable.h"
|
#include "ardour/pannable.h"
|
||||||
#include "ardour/panner.h"
|
#include "ardour/panner.h"
|
||||||
|
#include "ardour/panner_shell.h"
|
||||||
#include "ardour/send.h"
|
#include "ardour/send.h"
|
||||||
#include "ardour/processor.h"
|
#include "ardour/processor.h"
|
||||||
#include "ardour/profile.h"
|
#include "ardour/profile.h"
|
||||||
|
|
@ -436,7 +437,7 @@ MixerStrip::set_route (boost::shared_ptr<Route> rt)
|
||||||
_route->route_group_changed.connect (route_connections, invalidator (*this), boost::bind (&MixerStrip::route_group_changed, this), gui_context());
|
_route->route_group_changed.connect (route_connections, invalidator (*this), boost::bind (&MixerStrip::route_group_changed, this), gui_context());
|
||||||
|
|
||||||
if (_route->panner()) {
|
if (_route->panner()) {
|
||||||
_route->panner()->Changed.connect (route_connections, invalidator (*this), boost::bind (&MixerStrip::connect_to_pan, this), gui_context());
|
_route->panner_shell()->Changed.connect (route_connections, invalidator (*this), boost::bind (&MixerStrip::connect_to_pan, this), gui_context());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_audio_track()) {
|
if (is_audio_track()) {
|
||||||
|
|
@ -457,7 +458,6 @@ MixerStrip::set_route (boost::shared_ptr<Route> rt)
|
||||||
route_group_changed ();
|
route_group_changed ();
|
||||||
|
|
||||||
connect_to_pan ();
|
connect_to_pan ();
|
||||||
|
|
||||||
panners.setup_pan ();
|
panners.setup_pan ();
|
||||||
|
|
||||||
update_diskstream_display ();
|
update_diskstream_display ();
|
||||||
|
|
@ -929,7 +929,7 @@ MixerStrip::connect_to_pan ()
|
||||||
p->automation_state_changed.connect (panstate_connection, invalidator (*this), boost::bind (&PannerUI::pan_automation_state_changed, &panners), gui_context());
|
p->automation_state_changed.connect (panstate_connection, invalidator (*this), boost::bind (&PannerUI::pan_automation_state_changed, &panners), gui_context());
|
||||||
p->automation_style_changed.connect (panstyle_connection, invalidator (*this), boost::bind (&PannerUI::pan_automation_style_changed, &panners), gui_context());
|
p->automation_style_changed.connect (panstyle_connection, invalidator (*this), boost::bind (&PannerUI::pan_automation_style_changed, &panners), gui_context());
|
||||||
|
|
||||||
panners.panner_changed (this);
|
panners.panshell_changed ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1689,7 +1689,7 @@ MixerStrip::show_send (boost::shared_ptr<Send> send)
|
||||||
gain_meter().set_controls (_route, send->meter(), send->amp());
|
gain_meter().set_controls (_route, send->meter(), send->amp());
|
||||||
gain_meter().setup_meters ();
|
gain_meter().setup_meters ();
|
||||||
|
|
||||||
panner_ui().set_panner (_current_delivery->panner());
|
panner_ui().set_panner (_current_delivery->panner_shell(), _current_delivery->panner());
|
||||||
panner_ui().setup_pan ();
|
panner_ui().setup_pan ();
|
||||||
|
|
||||||
input_button.set_sensitive (false);
|
input_button.set_sensitive (false);
|
||||||
|
|
@ -1723,7 +1723,7 @@ MixerStrip::revert_to_default_display ()
|
||||||
gain_meter().set_controls (_route, _route->shared_peak_meter(), _route->amp());
|
gain_meter().set_controls (_route, _route->shared_peak_meter(), _route->amp());
|
||||||
gain_meter().setup_meters ();
|
gain_meter().setup_meters ();
|
||||||
|
|
||||||
panner_ui().set_panner (_route->main_outs()->panner());
|
panner_ui().set_panner (_route->main_outs()->panner_shell(), _route->main_outs()->panner());
|
||||||
panner_ui().setup_pan ();
|
panner_ui().setup_pan ();
|
||||||
|
|
||||||
reset_strip_style ();
|
reset_strip_style ();
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,6 @@ Panner2d::Panner2d (boost::shared_ptr<Panner> p, int32_t h)
|
||||||
: panner (p), width (0), height (h)
|
: panner (p), width (0), height (h)
|
||||||
{
|
{
|
||||||
panner->StateChanged.connect (connections, invalidator (*this), boost::bind (&Panner2d::handle_state_change, this), gui_context());
|
panner->StateChanged.connect (connections, invalidator (*this), boost::bind (&Panner2d::handle_state_change, this), gui_context());
|
||||||
panner->Changed.connect (connections, invalidator (*this), boost::bind (&Panner2d::handle_position_change, this), gui_context());
|
|
||||||
|
|
||||||
panner->pannable()->pan_azimuth_control->Changed.connect (connections, invalidator(*this), boost::bind (&Panner2d::handle_position_change, this), gui_context());
|
panner->pannable()->pan_azimuth_control->Changed.connect (connections, invalidator(*this), boost::bind (&Panner2d::handle_position_change, this), gui_context());
|
||||||
panner->pannable()->pan_width_control->Changed.connect (connections, invalidator(*this), boost::bind (&Panner2d::handle_position_change, this), gui_context());
|
panner->pannable()->pan_width_control->Changed.connect (connections, invalidator(*this), boost::bind (&Panner2d::handle_position_change, this), gui_context());
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,7 @@
|
||||||
#include "ardour/session.h"
|
#include "ardour/session.h"
|
||||||
#include "ardour/panner.h"
|
#include "ardour/panner.h"
|
||||||
#include "ardour/pannable.h"
|
#include "ardour/pannable.h"
|
||||||
|
#include "ardour/panner_shell.h"
|
||||||
#include "ardour/route.h"
|
#include "ardour/route.h"
|
||||||
|
|
||||||
#include "i18n.h"
|
#include "i18n.h"
|
||||||
|
|
@ -91,8 +92,11 @@ PannerUI::PannerUI (Session* s)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
PannerUI::set_panner (boost::shared_ptr<Panner> p)
|
PannerUI::set_panner (boost::shared_ptr<PannerShell> ps, boost::shared_ptr<Panner> p)
|
||||||
{
|
{
|
||||||
|
/* note that the panshell might not change here (i.e. ps == _panshell)
|
||||||
|
*/
|
||||||
|
|
||||||
connections.drop_connections ();
|
connections.drop_connections ();
|
||||||
|
|
||||||
delete pan_astyle_menu;
|
delete pan_astyle_menu;
|
||||||
|
|
@ -101,6 +105,7 @@ PannerUI::set_panner (boost::shared_ptr<Panner> p)
|
||||||
delete pan_astate_menu;
|
delete pan_astate_menu;
|
||||||
pan_astate_menu = 0;
|
pan_astate_menu = 0;
|
||||||
|
|
||||||
|
_panshell = ps;
|
||||||
_panner = p;
|
_panner = p;
|
||||||
|
|
||||||
delete twod_panner;
|
delete twod_panner;
|
||||||
|
|
@ -113,7 +118,7 @@ PannerUI::set_panner (boost::shared_ptr<Panner> p)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
_panner->Changed.connect (connections, invalidator (*this), boost::bind (&PannerUI::panner_changed, this, this), gui_context());
|
_panshell->Changed.connect (connections, invalidator (*this), boost::bind (&PannerUI::panshell_changed, this), gui_context());
|
||||||
_panner->StateChanged.connect (connections, invalidator (*this), boost::bind (&PannerUI::update_pan_state, this), gui_context());
|
_panner->StateChanged.connect (connections, invalidator (*this), boost::bind (&PannerUI::update_pan_state, this), gui_context());
|
||||||
|
|
||||||
/* new panner object, force complete reset of panner GUI
|
/* new panner object, force complete reset of panner GUI
|
||||||
|
|
@ -122,10 +127,9 @@ PannerUI::set_panner (boost::shared_ptr<Panner> p)
|
||||||
_current_nouts = 0;
|
_current_nouts = 0;
|
||||||
_current_nins = 0;
|
_current_nins = 0;
|
||||||
|
|
||||||
panner_changed (0);
|
setup_pan ();
|
||||||
update_pan_sensitive ();
|
update_pan_sensitive ();
|
||||||
pan_automation_state_changed ();
|
pan_automation_state_changed ();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -206,8 +210,9 @@ PannerUI::~PannerUI ()
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
PannerUI::panner_changed (void* src)
|
PannerUI::panshell_changed ()
|
||||||
{
|
{
|
||||||
|
set_panner (_panshell, _panshell->panner());
|
||||||
setup_pan ();
|
setup_pan ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -231,13 +236,16 @@ PannerUI::setup_pan ()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_current_nins = nins;
|
||||||
|
_current_nouts = nouts;
|
||||||
|
|
||||||
container_clear (pan_vbox);
|
container_clear (pan_vbox);
|
||||||
|
|
||||||
delete twod_panner;
|
delete twod_panner;
|
||||||
twod_panner = 0;
|
twod_panner = 0;
|
||||||
delete _stereo_panner;
|
delete _stereo_panner;
|
||||||
_stereo_panner = 0;
|
_stereo_panner = 0;
|
||||||
|
|
||||||
if (nouts == 0 || nouts == 1) {
|
if (nouts == 0 || nouts == 1) {
|
||||||
|
|
||||||
delete _stereo_panner;
|
delete _stereo_panner;
|
||||||
|
|
|
||||||
|
|
@ -44,6 +44,7 @@ class MonoPanner;
|
||||||
namespace ARDOUR {
|
namespace ARDOUR {
|
||||||
class Session;
|
class Session;
|
||||||
class Panner;
|
class Panner;
|
||||||
|
class PannerShell;
|
||||||
class Delivery;
|
class Delivery;
|
||||||
class AutomationControl;
|
class AutomationControl;
|
||||||
}
|
}
|
||||||
|
|
@ -63,9 +64,9 @@ class PannerUI : public Gtk::HBox, public ARDOUR::SessionHandlePtr
|
||||||
PannerUI (ARDOUR::Session*);
|
PannerUI (ARDOUR::Session*);
|
||||||
~PannerUI ();
|
~PannerUI ();
|
||||||
|
|
||||||
virtual void set_panner (boost::shared_ptr<ARDOUR::Panner>);
|
virtual void set_panner (boost::shared_ptr<ARDOUR::PannerShell>, boost::shared_ptr<ARDOUR::Panner>);
|
||||||
|
|
||||||
void panner_changed (void *);
|
void panshell_changed ();
|
||||||
|
|
||||||
void update_pan_sensitive ();
|
void update_pan_sensitive ();
|
||||||
void update_gain_sensitive ();
|
void update_gain_sensitive ();
|
||||||
|
|
@ -85,6 +86,7 @@ class PannerUI : public Gtk::HBox, public ARDOUR::SessionHandlePtr
|
||||||
private:
|
private:
|
||||||
friend class MixerStrip;
|
friend class MixerStrip;
|
||||||
|
|
||||||
|
boost::shared_ptr<ARDOUR::PannerShell> _panshell;
|
||||||
boost::shared_ptr<ARDOUR::Panner> _panner;
|
boost::shared_ptr<ARDOUR::Panner> _panner;
|
||||||
PBD::ScopedConnectionList connections;
|
PBD::ScopedConnectionList connections;
|
||||||
PBD::ScopedConnectionList _pan_control_connections;
|
PBD::ScopedConnectionList _pan_control_connections;
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ SendUI::SendUI (Gtk::Window* parent, boost::shared_ptr<Send> s, Session* session
|
||||||
{
|
{
|
||||||
assert (_send);
|
assert (_send);
|
||||||
|
|
||||||
_panners.set_panner (s->panner());
|
_panners.set_panner (s->panner_shell(), s->panner());
|
||||||
_gpm.set_controls (boost::shared_ptr<Route>(), s->meter(), s->amp());
|
_gpm.set_controls (boost::shared_ptr<Route>(), s->meter(), s->amp());
|
||||||
|
|
||||||
_hbox.pack_start (_gpm, true, true);
|
_hbox.pack_start (_gpm, true, true);
|
||||||
|
|
|
||||||
|
|
@ -140,8 +140,7 @@ class Panner : public PBD::Stateful, public PBD::ScopedConnectionList
|
||||||
framepos_t start, framepos_t end, pframes_t nframes,
|
framepos_t start, framepos_t end, pframes_t nframes,
|
||||||
pan_t** buffers);
|
pan_t** buffers);
|
||||||
|
|
||||||
PBD::Signal0<void> Changed; /* for positional info */
|
PBD::Signal0<void> StateChanged;
|
||||||
PBD::Signal0<void> StateChanged; /* for mute */
|
|
||||||
|
|
||||||
int set_state (const XMLNode&, int version);
|
int set_state (const XMLNode&, int version);
|
||||||
virtual XMLNode& state (bool full_state) = 0;
|
virtual XMLNode& state (bool full_state) = 0;
|
||||||
|
|
|
||||||
|
|
@ -85,13 +85,7 @@ PannerShell::configure_io (ChanCount in, ChanCount out)
|
||||||
the config hasn't changed, we're done.
|
the config hasn't changed, we're done.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
cerr << "PShell: reconfigure for in = " << in << " out = " << out;
|
if (_panner && (_panner->in().n_audio() == nins) && (_panner->out().n_audio() == nouts)) {
|
||||||
if (_panner) {
|
|
||||||
cerr << " current panner = " << _panner->in() << " and " << _panner->out();
|
|
||||||
}
|
|
||||||
cerr << endl;
|
|
||||||
|
|
||||||
if (_panner && _panner->in().n_audio() == nins && _panner->out().n_audio() == nouts) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -121,7 +115,6 @@ PannerShell::configure_io (ChanCount in, ChanCount out)
|
||||||
speakers.reset (s);
|
speakers.reset (s);
|
||||||
}
|
}
|
||||||
|
|
||||||
cerr << "Creating a new panner\n";
|
|
||||||
Panner* p = pi->descriptor.factory (_pannable, speakers);
|
Panner* p = pi->descriptor.factory (_pannable, speakers);
|
||||||
boost_debug_shared_ptr_mark_interesting (p, "Panner");
|
boost_debug_shared_ptr_mark_interesting (p, "Panner");
|
||||||
_panner.reset (p);
|
_panner.reset (p);
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
#include "ardour/route.h"
|
#include "ardour/route.h"
|
||||||
#include "ardour/track.h"
|
#include "ardour/track.h"
|
||||||
#include "ardour/midi_ui.h"
|
#include "ardour/midi_ui.h"
|
||||||
#include "ardour/panner.h"
|
#include "ardour/pannable.h"
|
||||||
#include "ardour/session_object.h" // for Properties::name
|
#include "ardour/session_object.h" // for Properties::name
|
||||||
|
|
||||||
#include "mackie_control_protocol.h"
|
#include "mackie_control_protocol.h"
|
||||||
|
|
@ -50,8 +50,9 @@ void RouteSignal::connect()
|
||||||
|
|
||||||
_route->PropertyChanged.connect (connections, MISSING_INVALIDATOR, ui_bind (&MackieControlProtocol::notify_property_changed, &_mcp, _1, this), midi_ui_context());
|
_route->PropertyChanged.connect (connections, MISSING_INVALIDATOR, ui_bind (&MackieControlProtocol::notify_property_changed, &_mcp, _1, this), midi_ui_context());
|
||||||
|
|
||||||
if (_route->panner()) {
|
if (_route->pannable()) {
|
||||||
_route->panner()->Changed.connect(connections, MISSING_INVALIDATOR, ui_bind (&MackieControlProtocol::notify_panner_changed, &_mcp, this, false), midi_ui_context());
|
_route->pannable()->pan_azimuth_control->Changed.connect(connections, MISSING_INVALIDATOR, ui_bind (&MackieControlProtocol::notify_panner_changed, &_mcp, this, false), midi_ui_context());
|
||||||
|
_route->pannable()->pan_width_control->Changed.connect(connections, MISSING_INVALIDATOR, ui_bind (&MackieControlProtocol::notify_panner_changed, &_mcp, this, false), midi_ui_context());
|
||||||
}
|
}
|
||||||
|
|
||||||
boost::shared_ptr<Track> trk = boost::dynamic_pointer_cast<ARDOUR::Track>(_route);
|
boost::shared_ptr<Track> trk = boost::dynamic_pointer_cast<ARDOUR::Track>(_route);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue