gain controls are supposed to be "gain-like"
This commit is contained in:
parent
a957d058e4
commit
c21332df71
@ -58,7 +58,9 @@ class LIBARDOUR_API AutomationControl
|
|||||||
const Evoral::Parameter& parameter,
|
const Evoral::Parameter& parameter,
|
||||||
const ParameterDescriptor& desc,
|
const ParameterDescriptor& desc,
|
||||||
boost::shared_ptr<ARDOUR::AutomationList> l=boost::shared_ptr<ARDOUR::AutomationList>(),
|
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 ();
|
~AutomationControl ();
|
||||||
|
|
||||||
|
@ -29,10 +29,12 @@ class LIBARDOUR_API SlavableAutomationControl : public AutomationControl
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
SlavableAutomationControl(ARDOUR::Session&,
|
SlavableAutomationControl(ARDOUR::Session&,
|
||||||
const Evoral::Parameter& parameter,
|
const Evoral::Parameter& parameter,
|
||||||
const ParameterDescriptor& desc,
|
const ParameterDescriptor& desc,
|
||||||
boost::shared_ptr<ARDOUR::AutomationList> l=boost::shared_ptr<ARDOUR::AutomationList>(),
|
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)
|
||||||
|
);
|
||||||
|
|
||||||
double get_value () const;
|
double get_value () const;
|
||||||
|
|
||||||
|
@ -49,8 +49,10 @@ AutomationControl::AutomationControl(ARDOUR::Session& s
|
|||||||
const Evoral::Parameter& parameter,
|
const Evoral::Parameter& parameter,
|
||||||
const ParameterDescriptor& desc,
|
const ParameterDescriptor& desc,
|
||||||
boost::shared_ptr<ARDOUR::AutomationList> list,
|
boost::shared_ptr<ARDOUR::AutomationList> list,
|
||||||
const string& name)
|
const string& name,
|
||||||
: Controllable (name.empty() ? EventTypeMap::instance().to_symbol(parameter) : name)
|
Controllable::Flag flags)
|
||||||
|
|
||||||
|
: Controllable (name.empty() ? EventTypeMap::instance().to_symbol(parameter) : name, flags)
|
||||||
, Evoral::Control(parameter, desc, list)
|
, Evoral::Control(parameter, desc, list)
|
||||||
, _session(session)
|
, _session(session)
|
||||||
, _desc(desc)
|
, _desc(desc)
|
||||||
@ -123,7 +125,7 @@ AutomationControl::actually_set_value (double value, PBD::Controllable::GroupCon
|
|||||||
Control::set_double (value, _session.transport_frame(), to_list);
|
Control::set_double (value, _session.transport_frame(), to_list);
|
||||||
|
|
||||||
//AutomationType at = (AutomationType) _parameter.type();
|
//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;
|
//<< " (was " << old_value << ") @ " << this << std::endl;
|
||||||
|
|
||||||
Changed (true, gcd);
|
Changed (true, gcd);
|
||||||
|
@ -35,8 +35,9 @@ using namespace std;
|
|||||||
GainControl::GainControl (Session& session, const Evoral::Parameter ¶m, boost::shared_ptr<AutomationList> al)
|
GainControl::GainControl (Session& session, const Evoral::Parameter ¶m, boost::shared_ptr<AutomationList> al)
|
||||||
: SlavableAutomationControl (session, param, ParameterDescriptor(param),
|
: SlavableAutomationControl (session, param, ParameterDescriptor(param),
|
||||||
al ? al : boost::shared_ptr<AutomationList> (new AutomationList (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);
|
alist()->reset_default (1.0);
|
||||||
|
|
||||||
lower_db = accurate_coefficient_to_dB (_desc.lower);
|
lower_db = accurate_coefficient_to_dB (_desc.lower);
|
||||||
|
@ -32,8 +32,9 @@ SlavableAutomationControl::SlavableAutomationControl(ARDOUR::Session& s,
|
|||||||
const Evoral::Parameter& parameter,
|
const Evoral::Parameter& parameter,
|
||||||
const ParameterDescriptor& desc,
|
const ParameterDescriptor& desc,
|
||||||
boost::shared_ptr<ARDOUR::AutomationList> l,
|
boost::shared_ptr<ARDOUR::AutomationList> l,
|
||||||
const std::string& name)
|
const std::string& name,
|
||||||
: AutomationControl (s, parameter, desc, l, name)
|
Controllable::Flag flags)
|
||||||
|
: AutomationControl (s, parameter, desc, l, name, flags)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user