enable very basic plugin boolean automation via Write and Read. no Touch. graphical editing is not allowed. a little crude but better than none at all
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@5564 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
0a570e0314
commit
3ffa60f5ec
|
@ -381,7 +381,7 @@
|
|||
<menuitem action='ToggleMaximalEditor'/>
|
||||
<menuitem action='show-editor-mixer'/>
|
||||
<menuitem action='ToggleMeasureVisibility'/>
|
||||
<menu action="Waveforms">
|
||||
<menu action="WaveformMenu">
|
||||
<menuitem action='toggle-waveform-visible'/>
|
||||
<menuitem action='toggle-waveform-rectified'/>
|
||||
<menuitem action='ToggleWaveformsWhileRecording'/>
|
||||
|
|
|
@ -229,7 +229,7 @@ AutomationLine::AutomationLine (const string & name, TimeAxisView& tv, ArdourCan
|
|||
points_visible = false;
|
||||
update_pending = false;
|
||||
_vc_uses_gain_mapping = false;
|
||||
no_draw = false;
|
||||
auto_is_boolean = false;
|
||||
_visible = true;
|
||||
terminal_points_can_slide = true;
|
||||
_height = 0;
|
||||
|
@ -1242,10 +1242,6 @@ AutomationLine::reset ()
|
|||
{
|
||||
update_pending = false;
|
||||
|
||||
if (no_draw) {
|
||||
return;
|
||||
}
|
||||
|
||||
alist.apply_to_points (*this, &AutomationLine::reset_callback);
|
||||
}
|
||||
|
||||
|
@ -1274,6 +1270,10 @@ AutomationLine::change_model_range (AutomationList::iterator start, AutomationLi
|
|||
void
|
||||
AutomationLine::show_all_control_points ()
|
||||
{
|
||||
if (auto_is_boolean) { //show the automation line but don't allow any control points
|
||||
return;
|
||||
}
|
||||
|
||||
points_visible = true;
|
||||
|
||||
for (vector<ControlPoint*>::iterator i = control_points.begin(); i != control_points.end(); ++i) {
|
||||
|
|
|
@ -172,7 +172,7 @@ class AutomationLine : public sigc::trackable, public PBD::StatefulThingWithGoin
|
|||
bool _vc_uses_gain_mapping : 1;
|
||||
bool terminal_points_can_slide : 1;
|
||||
bool update_pending : 1;
|
||||
bool no_draw : 1;
|
||||
bool auto_is_boolean : 1;
|
||||
bool points_visible : 1;
|
||||
bool did_push;
|
||||
|
||||
|
|
|
@ -448,7 +448,7 @@ GenericPluginUI::build_control_ui (guint32 port_index, PBD::Controllable* mcontr
|
|||
|
||||
control_ui->pack_start (control_ui->label, true, true);
|
||||
control_ui->pack_start (*control_ui->button, false, true);
|
||||
//control_ui->pack_start (control_ui->automate_button, false, false);
|
||||
control_ui->pack_start (control_ui->automate_button, false, false);
|
||||
|
||||
if(plugin->get_parameter (port_index) > 0.5){
|
||||
control_ui->button->set_active(true);
|
||||
|
@ -458,6 +458,11 @@ GenericPluginUI::build_control_ui (guint32 port_index, PBD::Controllable* mcontr
|
|||
|
||||
plugin->ParameterChanged.connect (bind (mem_fun(*this, &GenericPluginUI::toggle_parameter_changed), control_ui));
|
||||
|
||||
control_ui->automate_button.signal_clicked().connect (bind (mem_fun(*this, &GenericPluginUI::astate_clicked), control_ui, (uint32_t) port_index));
|
||||
automation_state_changed (control_ui);
|
||||
insert->automation_list (port_index).automation_state_changed.connect
|
||||
(bind (mem_fun(*this, &GenericPluginUI::automation_state_changed), control_ui));
|
||||
|
||||
return control_ui;
|
||||
}
|
||||
|
||||
|
|
|
@ -61,11 +61,11 @@ RedirectAutomationLine::RedirectAutomationLine (const string & name, Redirect& r
|
|||
range = upper - lower;
|
||||
|
||||
if (desc.toggled) {
|
||||
no_draw = true;
|
||||
auto_is_boolean = true;
|
||||
return;
|
||||
}
|
||||
|
||||
no_draw = false;
|
||||
auto_is_boolean = false;
|
||||
|
||||
/* XXX set min/max for underlying curve ??? */
|
||||
}
|
||||
|
|
|
@ -399,9 +399,15 @@ PluginInsert::set_parameter (uint32_t port, float val)
|
|||
{
|
||||
/* the others will be set from the event triggered by this */
|
||||
|
||||
float last_val = _plugins[0]->get_parameter (port);
|
||||
Plugin::ParameterDescriptor desc;
|
||||
_plugins[0]->get_parameter_descriptor(port, desc);
|
||||
|
||||
_plugins[0]->set_parameter (port, val);
|
||||
|
||||
if (automation_list (port).automation_write()) {
|
||||
if ( desc.toggled ) //store the previous value just before this so any interpolation works right
|
||||
automation_list (port).add (_session.audible_frame()-1, last_val);
|
||||
automation_list (port).add (_session.audible_frame(), val);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue