mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 23:05:04 +01:00
Pan: remove/consolidate parameter-descriptor
This commit is contained in:
parent
efb63e1bf2
commit
60bcefd03d
14 changed files with 9 additions and 65 deletions
|
|
@ -928,7 +928,7 @@ Panner2dWindow::Panner2dWindow (boost::shared_ptr<PannerShell> p, int32_t h, uin
|
||||||
left_side.pack_start (button_box, false, false);
|
left_side.pack_start (button_box, false, false);
|
||||||
|
|
||||||
Gtk::Label* l = manage (new Label (
|
Gtk::Label* l = manage (new Label (
|
||||||
p->panner()->describe_parameter(PanWidthAutomation),
|
p->pannable()->describe_parameter(PanWidthAutomation),
|
||||||
Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER, false));
|
Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER, false));
|
||||||
spinner_box.pack_start (*l, false, false);
|
spinner_box.pack_start (*l, false, false);
|
||||||
spinner_box.pack_start (width_spinner, false, false);
|
spinner_box.pack_start (width_spinner, false, false);
|
||||||
|
|
|
||||||
|
|
@ -1829,7 +1829,7 @@ RouteTimeAxisView::ensure_pan_views (bool show)
|
||||||
|
|
||||||
/* we don't already have an AutomationTimeAxisView for this parameter */
|
/* we don't already have an AutomationTimeAxisView for this parameter */
|
||||||
|
|
||||||
std::string const name = _route->panner()->describe_parameter (pan_control->parameter ());
|
std::string const name = _route->pannable()->describe_parameter (pan_control->parameter ());
|
||||||
|
|
||||||
boost::shared_ptr<AutomationTimeAxisView> t (
|
boost::shared_ptr<AutomationTimeAxisView> t (
|
||||||
new AutomationTimeAxisView (_session,
|
new AutomationTimeAxisView (_session,
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,6 @@ public:
|
||||||
return ((_auto_state & Write) || ((_auto_state & (Touch | Latch)) && touching()));
|
return ((_auto_state & Write) || ((_auto_state & (Touch | Latch)) && touching()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void start_touch (double when);
|
void start_touch (double when);
|
||||||
void stop_touch (double when);
|
void stop_touch (double when);
|
||||||
bool touching() const { return g_atomic_int_get (const_cast<gint*>(&_touching)); }
|
bool touching() const { return g_atomic_int_get (const_cast<gint*>(&_touching)); }
|
||||||
|
|
|
||||||
|
|
@ -111,7 +111,6 @@ public:
|
||||||
AutoState automation_state() const;
|
AutoState automation_state() const;
|
||||||
|
|
||||||
virtual std::set<Evoral::Parameter> what_can_be_automated() const;
|
virtual std::set<Evoral::Parameter> what_can_be_automated() const;
|
||||||
virtual std::string describe_parameter (Evoral::Parameter);
|
|
||||||
|
|
||||||
bool touching() const;
|
bool touching() const;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -198,6 +198,12 @@ Automatable::describe_parameter (Evoral::Parameter param)
|
||||||
return _("Trim");
|
return _("Trim");
|
||||||
} else if (param.type() == MuteAutomation) {
|
} else if (param.type() == MuteAutomation) {
|
||||||
return _("Mute");
|
return _("Mute");
|
||||||
|
} else if (param.type() == PanAzimuthAutomation) {
|
||||||
|
return _("Azimuth");
|
||||||
|
} else if (param.type() == PanWidthAutomation) {
|
||||||
|
return _("Width");
|
||||||
|
} else if (param.type() == PanElevationAutomation) {
|
||||||
|
return _("Elevation");
|
||||||
} else if (param.type() == MidiCCAutomation) {
|
} else if (param.type() == MidiCCAutomation) {
|
||||||
return string_compose("Controller %1 [%2]", param.id(), int(param.channel()) + 1);
|
return string_compose("Controller %1 [%2]", param.id(), int(param.channel()) + 1);
|
||||||
} else if (param.type() == MidiPgmChangeAutomation) {
|
} else if (param.type() == MidiPgmChangeAutomation) {
|
||||||
|
|
@ -553,7 +559,7 @@ Automatable::control_factory(const Evoral::Parameter& param)
|
||||||
} else if (param.type() == PanAzimuthAutomation || param.type() == PanWidthAutomation || param.type() == PanElevationAutomation) {
|
} else if (param.type() == PanAzimuthAutomation || param.type() == PanWidthAutomation || param.type() == PanElevationAutomation) {
|
||||||
Pannable* pannable = dynamic_cast<Pannable*>(this);
|
Pannable* pannable = dynamic_cast<Pannable*>(this);
|
||||||
if (pannable) {
|
if (pannable) {
|
||||||
control = new PanControllable (_a_session, pannable->describe_parameter (param), pannable, param);
|
control = new PanControllable (_a_session, describe_parameter (param), pannable, param);
|
||||||
} else {
|
} else {
|
||||||
warning << "PanAutomation for non-Pannable" << endl;
|
warning << "PanAutomation for non-Pannable" << endl;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -92,12 +92,6 @@ Panner::what_can_be_automated() const
|
||||||
return _pannable->what_can_be_automated ();
|
return _pannable->what_can_be_automated ();
|
||||||
}
|
}
|
||||||
|
|
||||||
string
|
|
||||||
Panner::describe_parameter (Evoral::Parameter p)
|
|
||||||
{
|
|
||||||
return _pannable->describe_parameter (p);
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
int
|
||||||
Panner::set_state (XMLNode const &, int)
|
Panner::set_state (XMLNode const &, int)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -351,17 +351,6 @@ Panner1in2out::what_can_be_automated() const
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
string
|
|
||||||
Panner1in2out::describe_parameter (Evoral::Parameter p)
|
|
||||||
{
|
|
||||||
switch (p.type()) {
|
|
||||||
case PanAzimuthAutomation:
|
|
||||||
return _("L/R");
|
|
||||||
default:
|
|
||||||
return _pannable->describe_parameter (p);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
string
|
string
|
||||||
Panner1in2out::value_as_string (boost::shared_ptr<const AutomationControl> ac) const
|
Panner1in2out::value_as_string (boost::shared_ptr<const AutomationControl> ac) const
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,6 @@ class Panner1in2out : public Panner
|
||||||
|
|
||||||
static Panner* factory (boost::shared_ptr<Pannable>, boost::shared_ptr<Speakers>);
|
static Panner* factory (boost::shared_ptr<Pannable>, boost::shared_ptr<Speakers>);
|
||||||
|
|
||||||
std::string describe_parameter (Evoral::Parameter);
|
|
||||||
std::string value_as_string (boost::shared_ptr<const AutomationControl>) const;
|
std::string value_as_string (boost::shared_ptr<const AutomationControl>) const;
|
||||||
|
|
||||||
XMLNode& get_state ();
|
XMLNode& get_state ();
|
||||||
|
|
|
||||||
|
|
@ -495,19 +495,6 @@ Panner2in2out::what_can_be_automated() const
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
string
|
|
||||||
Panner2in2out::describe_parameter (Evoral::Parameter p)
|
|
||||||
{
|
|
||||||
switch (p.type()) {
|
|
||||||
case PanAzimuthAutomation:
|
|
||||||
return _("L/R");
|
|
||||||
case PanWidthAutomation:
|
|
||||||
return _("Width");
|
|
||||||
default:
|
|
||||||
return _pannable->describe_parameter (p);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
string
|
string
|
||||||
Panner2in2out::value_as_string (boost::shared_ptr<const AutomationControl> ac) const
|
Panner2in2out::value_as_string (boost::shared_ptr<const AutomationControl> ac) const
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,6 @@ class Panner2in2out : public Panner
|
||||||
|
|
||||||
static Panner* factory (boost::shared_ptr<Pannable>, boost::shared_ptr<Speakers>);
|
static Panner* factory (boost::shared_ptr<Pannable>, boost::shared_ptr<Speakers>);
|
||||||
|
|
||||||
std::string describe_parameter (Evoral::Parameter);
|
|
||||||
std::string value_as_string (boost::shared_ptr<const AutomationControl>) const;
|
std::string value_as_string (boost::shared_ptr<const AutomationControl>) const;
|
||||||
|
|
||||||
XMLNode& get_state ();
|
XMLNode& get_state ();
|
||||||
|
|
|
||||||
|
|
@ -283,17 +283,6 @@ Pannerbalance::what_can_be_automated() const
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
string
|
|
||||||
Pannerbalance::describe_parameter (Evoral::Parameter p)
|
|
||||||
{
|
|
||||||
switch (p.type()) {
|
|
||||||
case PanAzimuthAutomation:
|
|
||||||
return _("L/R");
|
|
||||||
default:
|
|
||||||
return _pannable->describe_parameter (p);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
string
|
string
|
||||||
Pannerbalance::value_as_string (boost::shared_ptr<const AutomationControl> ac) const
|
Pannerbalance::value_as_string (boost::shared_ptr<const AutomationControl> ac) const
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,6 @@ class Pannerbalance : public Panner
|
||||||
|
|
||||||
static Panner* factory (boost::shared_ptr<Pannable>, boost::shared_ptr<Speakers>);
|
static Panner* factory (boost::shared_ptr<Pannable>, boost::shared_ptr<Speakers>);
|
||||||
|
|
||||||
std::string describe_parameter (Evoral::Parameter);
|
|
||||||
std::string value_as_string (boost::shared_ptr<const AutomationControl>) const;
|
std::string value_as_string (boost::shared_ptr<const AutomationControl>) const;
|
||||||
|
|
||||||
XMLNode& get_state ();
|
XMLNode& get_state ();
|
||||||
|
|
|
||||||
|
|
@ -406,21 +406,6 @@ VBAPanner::what_can_be_automated() const
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
string
|
|
||||||
VBAPanner::describe_parameter (Evoral::Parameter p)
|
|
||||||
{
|
|
||||||
switch (p.type()) {
|
|
||||||
case PanAzimuthAutomation:
|
|
||||||
return _("Azimuth");
|
|
||||||
case PanWidthAutomation:
|
|
||||||
return _("Width");
|
|
||||||
case PanElevationAutomation:
|
|
||||||
return _("Elevation");
|
|
||||||
default:
|
|
||||||
return _pannable->describe_parameter (p);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
string
|
string
|
||||||
VBAPanner::value_as_string (boost::shared_ptr<const AutomationControl> ac) const
|
VBAPanner::value_as_string (boost::shared_ptr<const AutomationControl> ac) const
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,6 @@ public:
|
||||||
|
|
||||||
void set_azimuth_elevation (double azimuth, double elevation);
|
void set_azimuth_elevation (double azimuth, double elevation);
|
||||||
|
|
||||||
std::string describe_parameter (Evoral::Parameter);
|
|
||||||
std::string value_as_string (boost::shared_ptr<const AutomationControl>) const;
|
std::string value_as_string (boost::shared_ptr<const AutomationControl>) const;
|
||||||
|
|
||||||
XMLNode& get_state ();
|
XMLNode& get_state ();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue