mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-09 16:24:57 +01:00
Add Inline Control Port Property
This allows to indicate that a control should by default be displayed inline in the mixer-strip. Previously that was hard-coded for and enabled for send-level controls only.
This commit is contained in:
parent
d4ad9e3486
commit
93180ceea9
6 changed files with 23 additions and 6 deletions
|
|
@ -112,6 +112,7 @@ struct LIBARDOUR_API ParameterDescriptor : public Evoral::ParameterDescriptor
|
||||||
bool integer_step;
|
bool integer_step;
|
||||||
bool sr_dependent;
|
bool sr_dependent;
|
||||||
bool enumeration;
|
bool enumeration;
|
||||||
|
bool inline_ctrl;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace ARDOUR
|
} // namespace ARDOUR
|
||||||
|
|
|
||||||
|
|
@ -213,6 +213,7 @@ public:
|
||||||
LilvNode* auto_automation_controlled; // lv2:portProperty
|
LilvNode* auto_automation_controlled; // lv2:portProperty
|
||||||
LilvNode* auto_automation_controller; // lv2:portProperty
|
LilvNode* auto_automation_controller; // lv2:portProperty
|
||||||
LilvNode* inline_display_in_gui; // lv2:optionalFeature
|
LilvNode* inline_display_in_gui; // lv2:optionalFeature
|
||||||
|
LilvNode* inline_mixer_control; // lv2:PortProperty
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
@ -2279,6 +2280,10 @@ LV2Plugin::get_parameter_descriptor(uint32_t which, ParameterDescriptor& desc) c
|
||||||
desc.enumeration = lilv_port_has_property(_impl->plugin, port, _world.lv2_enumeration);
|
desc.enumeration = lilv_port_has_property(_impl->plugin, port, _world.lv2_enumeration);
|
||||||
desc.scale_points = get_scale_points(which);
|
desc.scale_points = get_scale_points(which);
|
||||||
|
|
||||||
|
#ifdef LV2_EXTENDED
|
||||||
|
desc.inline_ctrl = lilv_port_has_property(_impl->plugin, port, _world.inline_mixer_control);
|
||||||
|
#endif
|
||||||
|
|
||||||
if (steps) {
|
if (steps) {
|
||||||
desc.rangesteps = lilv_node_as_float (steps);
|
desc.rangesteps = lilv_node_as_float (steps);
|
||||||
}
|
}
|
||||||
|
|
@ -3323,6 +3328,7 @@ LV2World::LV2World()
|
||||||
auto_automation_controlled = lilv_new_uri(world, LV2_AUTOMATE_URI__controlled);
|
auto_automation_controlled = lilv_new_uri(world, LV2_AUTOMATE_URI__controlled);
|
||||||
auto_automation_controller = lilv_new_uri(world, LV2_AUTOMATE_URI__controller);
|
auto_automation_controller = lilv_new_uri(world, LV2_AUTOMATE_URI__controller);
|
||||||
inline_display_in_gui = lilv_new_uri(world, LV2_INLINEDISPLAY__in_gui);
|
inline_display_in_gui = lilv_new_uri(world, LV2_INLINEDISPLAY__in_gui);
|
||||||
|
inline_mixer_control = lilv_new_uri(world, "http://ardour.org/lv2/ext#inlineMixerControl");
|
||||||
#endif
|
#endif
|
||||||
bufz_powerOf2BlockLength = lilv_new_uri(world, LV2_BUF_SIZE__powerOf2BlockLength);
|
bufz_powerOf2BlockLength = lilv_new_uri(world, LV2_BUF_SIZE__powerOf2BlockLength);
|
||||||
bufz_fixedBlockLength = lilv_new_uri(world, LV2_BUF_SIZE__fixedBlockLength);
|
bufz_fixedBlockLength = lilv_new_uri(world, LV2_BUF_SIZE__fixedBlockLength);
|
||||||
|
|
@ -3346,6 +3352,8 @@ LV2World::~LV2World()
|
||||||
lilv_node_free(auto_automation_control);
|
lilv_node_free(auto_automation_control);
|
||||||
lilv_node_free(auto_automation_controlled);
|
lilv_node_free(auto_automation_controlled);
|
||||||
lilv_node_free(auto_automation_controller);
|
lilv_node_free(auto_automation_controller);
|
||||||
|
lilv_node_free(inline_display_in_gui);
|
||||||
|
lilv_node_free(inline_mixer_control);
|
||||||
#endif
|
#endif
|
||||||
lilv_node_free(patch_Message);
|
lilv_node_free(patch_Message);
|
||||||
lilv_node_free(opts_requiredOptions);
|
lilv_node_free(opts_requiredOptions);
|
||||||
|
|
|
||||||
|
|
@ -53,8 +53,10 @@ ParameterDescriptor::ParameterDescriptor(const Evoral::Parameter& parameter)
|
||||||
/* Note: defaults in Evoral::ParameterDescriptor */
|
/* Note: defaults in Evoral::ParameterDescriptor */
|
||||||
|
|
||||||
switch((AutomationType)parameter.type()) {
|
switch((AutomationType)parameter.type()) {
|
||||||
case GainAutomation:
|
|
||||||
case BusSendLevel:
|
case BusSendLevel:
|
||||||
|
inline_ctrl = true;
|
||||||
|
/* fallthrough */
|
||||||
|
case GainAutomation:
|
||||||
upper = Config->get_max_gain();
|
upper = Config->get_max_gain();
|
||||||
normal = 1.0f;
|
normal = 1.0f;
|
||||||
break;
|
break;
|
||||||
|
|
@ -150,6 +152,7 @@ ParameterDescriptor::ParameterDescriptor()
|
||||||
, integer_step(false)
|
, integer_step(false)
|
||||||
, sr_dependent(false)
|
, sr_dependent(false)
|
||||||
, enumeration(false)
|
, enumeration(false)
|
||||||
|
, inline_ctrl(false)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
||||||
|
|
@ -486,9 +486,12 @@ PluginInsert::create_automatable_parameters ()
|
||||||
|
|
||||||
boost::shared_ptr<AutomationList> list(new AutomationList(param, desc));
|
boost::shared_ptr<AutomationList> list(new AutomationList(param, desc));
|
||||||
boost::shared_ptr<AutomationControl> c (new PluginControl(this, param, desc, list));
|
boost::shared_ptr<AutomationControl> c (new PluginControl(this, param, desc, list));
|
||||||
if (!automatable || (limit_automatables > 0 && i > limit_automatables)) {
|
if (!automatable || (limit_automatables > 0 && what_can_be_automated ().size() > limit_automatables)) {
|
||||||
c->set_flags (Controllable::Flag ((int)c->flags() | Controllable::NotAutomatable));
|
c->set_flags (Controllable::Flag ((int)c->flags() | Controllable::NotAutomatable));
|
||||||
}
|
}
|
||||||
|
if (desc.inline_ctrl) {
|
||||||
|
c->set_flags (Controllable::Flag ((int)c->flags() | Controllable::InlineControl));
|
||||||
|
}
|
||||||
add_control (c);
|
add_control (c);
|
||||||
plugin->set_automation_control (i, c);
|
plugin->set_automation_control (i, c);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -102,6 +102,7 @@ Send::Send (Session& s, boost::shared_ptr<Pannable> p, boost::shared_ptr<MuteMas
|
||||||
|
|
||||||
boost::shared_ptr<AutomationList> gl (new AutomationList (Evoral::Parameter (GainAutomation)));
|
boost::shared_ptr<AutomationList> gl (new AutomationList (Evoral::Parameter (GainAutomation)));
|
||||||
_gain_control = boost::shared_ptr<GainControl> (new GainControl (_session, Evoral::Parameter(BusSendLevel), gl));
|
_gain_control = boost::shared_ptr<GainControl> (new GainControl (_session, Evoral::Parameter(BusSendLevel), gl));
|
||||||
|
_gain_control->set_flags (Controllable::Flag ((int)_gain_control->flags() | Controllable::InlineControl));
|
||||||
add_control (_gain_control);
|
add_control (_gain_control);
|
||||||
|
|
||||||
_amp.reset (new Amp (_session, _("Fader"), _gain_control, true));
|
_amp.reset (new Amp (_session, _("Fader"), _gain_control, true));
|
||||||
|
|
|
||||||
|
|
@ -73,10 +73,11 @@ class LIBPBD_API Controllable : public PBD::StatefulDestructible, public boost::
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
enum Flag {
|
enum Flag {
|
||||||
Toggle = 0x1,
|
Toggle = 0x01,
|
||||||
GainLike = 0x2,
|
GainLike = 0x02,
|
||||||
RealTime = 0x4,
|
RealTime = 0x04,
|
||||||
NotAutomatable = 0x8,
|
NotAutomatable = 0x08,
|
||||||
|
InlineControl = 0x10,
|
||||||
};
|
};
|
||||||
|
|
||||||
Controllable (const std::string& name, Flag f = Flag (0));
|
Controllable (const std::string& name, Flag f = Flag (0));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue