13
0

gain controls are supposed to be "gain-like"

This commit is contained in:
Paul Davis 2016-09-21 17:18:48 -05:00
parent a957d058e4
commit c21332df71
5 changed files with 20 additions and 12 deletions

View File

@ -58,7 +58,9 @@ class LIBARDOUR_API AutomationControl
const Evoral::Parameter& parameter,
const ParameterDescriptor& desc,
boost::shared_ptr<ARDOUR::AutomationList> l=boost::shared_ptr<ARDOUR::AutomationList>(),
const std::string& name="");
const std::string& name="",
PBD::Controllable::Flag flags=PBD::Controllable::Flag (0)
);
~AutomationControl ();

View File

@ -29,10 +29,12 @@ class LIBARDOUR_API SlavableAutomationControl : public AutomationControl
{
public:
SlavableAutomationControl(ARDOUR::Session&,
const Evoral::Parameter& parameter,
const ParameterDescriptor& desc,
boost::shared_ptr<ARDOUR::AutomationList> l=boost::shared_ptr<ARDOUR::AutomationList>(),
const std::string& name="");
const Evoral::Parameter& parameter,
const ParameterDescriptor& desc,
boost::shared_ptr<ARDOUR::AutomationList> l=boost::shared_ptr<ARDOUR::AutomationList>(),
const std::string& name="",
PBD::Controllable::Flag flags=PBD::Controllable::Flag (0)
);
double get_value () const;

View File

@ -49,8 +49,10 @@ AutomationControl::AutomationControl(ARDOUR::Session& s
const Evoral::Parameter& parameter,
const ParameterDescriptor& desc,
boost::shared_ptr<ARDOUR::AutomationList> list,
const string& name)
: Controllable (name.empty() ? EventTypeMap::instance().to_symbol(parameter) : name)
const string& name,
Controllable::Flag flags)
: Controllable (name.empty() ? EventTypeMap::instance().to_symbol(parameter) : name, flags)
, Evoral::Control(parameter, desc, list)
, _session(session)
, _desc(desc)
@ -123,7 +125,7 @@ AutomationControl::actually_set_value (double value, PBD::Controllable::GroupCon
Control::set_double (value, _session.transport_frame(), to_list);
//AutomationType at = (AutomationType) _parameter.type();
//std::cerr << "++++ Changed (" << enum_2_string (at) << ", " << enum_2_string (gcd) << ") = " << value
//std::cerr << "++++ Changed (" << enum_2_string (at) << ", " << enum_2_string (gcd) << ") = " << value
//<< " (was " << old_value << ") @ " << this << std::endl;
Changed (true, gcd);

View File

@ -35,8 +35,9 @@ using namespace std;
GainControl::GainControl (Session& session, const Evoral::Parameter &param, boost::shared_ptr<AutomationList> al)
: SlavableAutomationControl (session, param, ParameterDescriptor(param),
al ? al : boost::shared_ptr<AutomationList> (new AutomationList (param)),
param.type() == GainAutomation ? X_("gaincontrol") : X_("trimcontrol")) {
param.type() == GainAutomation ? X_("gaincontrol") : X_("trimcontrol"),
Controllable::GainLike)
{
alist()->reset_default (1.0);
lower_db = accurate_coefficient_to_dB (_desc.lower);

View File

@ -32,8 +32,9 @@ SlavableAutomationControl::SlavableAutomationControl(ARDOUR::Session& s,
const Evoral::Parameter& parameter,
const ParameterDescriptor& desc,
boost::shared_ptr<ARDOUR::AutomationList> l,
const std::string& name)
: AutomationControl (s, parameter, desc, l, name)
const std::string& name,
Controllable::Flag flags)
: AutomationControl (s, parameter, desc, l, name, flags)
{
}