s/ParamID/Parameter/
git-svn-id: svn://localhost/ardour2/trunk@2098 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
0da2977027
commit
133a66920b
|
@ -62,11 +62,11 @@ AddMidiCCTrackDialog::AddMidiCCTrackDialog ()
|
|||
}
|
||||
|
||||
|
||||
ARDOUR::ParamID
|
||||
ARDOUR::Parameter
|
||||
AddMidiCCTrackDialog::parameter ()
|
||||
{
|
||||
int cc_num = _cc_num_spinner.get_value_as_int();
|
||||
|
||||
return ParamID(MidiCCAutomation, cc_num);
|
||||
return Parameter(MidiCCAutomation, cc_num);
|
||||
}
|
||||
|
||||
|
|
|
@ -27,14 +27,14 @@
|
|||
#include <gtkmm/spinbutton.h>
|
||||
#include <ardour/types.h>
|
||||
#include <ardour/data_type.h>
|
||||
#include <ardour/param_id.h>
|
||||
#include <ardour/parameter.h>
|
||||
|
||||
class AddMidiCCTrackDialog : public Gtk::Dialog
|
||||
{
|
||||
public:
|
||||
AddMidiCCTrackDialog ();
|
||||
|
||||
ARDOUR::ParamID parameter ();
|
||||
ARDOUR::Parameter parameter ();
|
||||
|
||||
private:
|
||||
Gtk::Adjustment _cc_num_adjustment;
|
||||
|
|
|
@ -279,7 +279,7 @@ AudioTimeAxisView::set_waveform_scale (WaveformScale scale)
|
|||
}
|
||||
|
||||
void
|
||||
AudioTimeAxisView::create_automation_child (ParamID param)
|
||||
AudioTimeAxisView::create_automation_child (Parameter param)
|
||||
{
|
||||
if (param.type() == GainAutomation) {
|
||||
|
||||
|
@ -295,9 +295,9 @@ AudioTimeAxisView::create_automation_child (ParamID param)
|
|||
*this,
|
||||
parent_canvas,
|
||||
_route->describe_parameter(param),
|
||||
c->list()->param_id().to_string() /* FIXME: correct state name? */));
|
||||
c->list()->parameter().to_string() /* FIXME: correct state name? */));
|
||||
|
||||
add_automation_child(ParamID(GainAutomation), gain_track);
|
||||
add_automation_child(Parameter(GainAutomation), gain_track);
|
||||
|
||||
} else if (param.type() == PanAutomation) {
|
||||
|
||||
|
@ -338,7 +338,7 @@ AudioTimeAxisView::update_pans ()
|
|||
for (p = _route->panner().begin(); p != _route->panner().end(); ++p) {
|
||||
boost::shared_ptr<AutomationControl> pan_control = (*p)->pan_control();
|
||||
|
||||
if (pan_control->list()->param_id().type() == NullAutomation) {
|
||||
if (pan_control->list()->parameter().type() == NullAutomation) {
|
||||
error << "Pan control has NULL automation type!" << endmsg;
|
||||
continue;
|
||||
}
|
||||
|
@ -348,9 +348,9 @@ AudioTimeAxisView::update_pans ()
|
|||
editor,
|
||||
*this,
|
||||
parent_canvas,
|
||||
_route->describe_parameter(pan_control->list()->param_id()),
|
||||
pan_control->list()->param_id().to_string()/* FIXME: correct state name? */));
|
||||
add_automation_child(ParamID(PanAutomation, i), pan_track);
|
||||
_route->describe_parameter(pan_control->list()->parameter()),
|
||||
pan_control->list()->parameter().to_string()/* FIXME: correct state name? */));
|
||||
add_automation_child(Parameter(PanAutomation, i), pan_track);
|
||||
++i;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -82,7 +82,7 @@ class AudioTimeAxisView : public RouteTimeAxisView
|
|||
guint32 show_at (double y, int& nth, Gtk::VBox *parent);
|
||||
void hide ();
|
||||
|
||||
void create_automation_child (ARDOUR::ParamID param);
|
||||
void create_automation_child (ARDOUR::Parameter param);
|
||||
|
||||
private:
|
||||
friend class AudioStreamView;
|
||||
|
|
|
@ -65,7 +65,7 @@ AutomationController::create(Session& s, boost::shared_ptr<AutomationList> al, b
|
|||
{
|
||||
Gtk::Adjustment* adjustment = manage(new Gtk::Adjustment(al->default_value(), al->get_min_y(), al->get_max_y()));
|
||||
if (!ac) {
|
||||
PBD::warning << "Creating AutomationController for " << al->param_id().to_string() << endmsg;
|
||||
PBD::warning << "Creating AutomationController for " << al->parameter().to_string() << endmsg;
|
||||
ac = boost::shared_ptr<AutomationControl>(new AutomationControl(s, al));
|
||||
}
|
||||
return boost::shared_ptr<AutomationController>(new AutomationController(ac, adjustment));
|
||||
|
@ -76,7 +76,7 @@ AutomationController::update_label(char* label, int label_len)
|
|||
{
|
||||
if (label && label_len)
|
||||
// Hack to display CC rounded to int
|
||||
if (_controllable->list()->param_id().type() == MidiCCAutomation)
|
||||
if (_controllable->list()->parameter().type() == MidiCCAutomation)
|
||||
snprintf(label, label_len, "%d", (int)_controllable->get_value());
|
||||
else
|
||||
snprintf(label, label_len, "%.3f", _controllable->get_value());
|
||||
|
|
|
@ -249,7 +249,7 @@ AutomationLine::AutomationLine (const string & name, TimeAxisView& tv, ArdourCan
|
|||
|
||||
trackview.session().register_with_memento_command_factory(alist->id(), this);
|
||||
|
||||
if (alist->param_id().type() == GainAutomation)
|
||||
if (alist->parameter().type() == GainAutomation)
|
||||
set_verbose_cursor_uses_gain_mapping (true);
|
||||
}
|
||||
|
||||
|
@ -1297,14 +1297,14 @@ AutomationLine::set_state (const XMLNode &node)
|
|||
void
|
||||
AutomationLine::view_to_model_y (double& y)
|
||||
{
|
||||
if (alist->param_id().type() == GainAutomation) {
|
||||
if (alist->parameter().type() == GainAutomation) {
|
||||
y = slider_position_to_gain (y);
|
||||
y = max (0.0, y);
|
||||
y = min (2.0, y);
|
||||
} else if (alist->param_id().type() == PanAutomation) {
|
||||
} else if (alist->parameter().type() == PanAutomation) {
|
||||
// vertical coordinate axis reversal
|
||||
y = 1.0 - y;
|
||||
} else if (alist->param_id().type() == MidiCCAutomation) {
|
||||
} else if (alist->parameter().type() == MidiCCAutomation) {
|
||||
y = (int)(y * 127.0);
|
||||
}
|
||||
}
|
||||
|
@ -1312,14 +1312,14 @@ AutomationLine::view_to_model_y (double& y)
|
|||
void
|
||||
AutomationLine::model_to_view_y (double& y)
|
||||
{
|
||||
if (alist->param_id().type() == GainAutomation) {
|
||||
if (alist->parameter().type() == GainAutomation) {
|
||||
y = gain_to_slider_position (y);
|
||||
} else if (alist->param_id().type() == PanAutomation) {
|
||||
} else if (alist->parameter().type() == PanAutomation) {
|
||||
// vertical coordinate axis reversal
|
||||
y = 1.0 - y;
|
||||
} else if (alist->param_id().type() == MidiCCAutomation) {
|
||||
} else if (alist->parameter().type() == MidiCCAutomation) {
|
||||
y = y / 127.0;
|
||||
} else if (alist->param_id().type() == PluginAutomation) {
|
||||
} else if (alist->parameter().type() == PluginAutomation) {
|
||||
y = (y - alist->get_min_y()) / (double)(alist->get_max_y()- alist->get_min_y());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -194,7 +194,7 @@ AutomationTimeAxisView::AutomationTimeAxisView (Session& s, boost::shared_ptr<Ro
|
|||
}
|
||||
|
||||
boost::shared_ptr<AutomationLine> line(new AutomationLine (
|
||||
_control->list()->param_id().to_string(),
|
||||
_control->list()->parameter().to_string(),
|
||||
*this,
|
||||
*canvas_display,
|
||||
_control->list()));
|
||||
|
@ -247,7 +247,7 @@ AutomationTimeAxisView::set_automation_state (AutoState state)
|
|||
if (!ignore_state_request) {
|
||||
if (_route == _automatable) { // FIXME: ew
|
||||
_route->set_parameter_automation_state (
|
||||
_control->list()->param_id(),
|
||||
_control->list()->parameter(),
|
||||
state);
|
||||
}
|
||||
|
||||
|
@ -869,7 +869,7 @@ AutomationTimeAxisView::set_state (const XMLNode& node)
|
|||
//snprintf (buf, sizeof(buf), "Port_%" PRIu32, param.id());
|
||||
|
||||
for (iter = kids.begin(); iter != kids.end(); ++iter) {
|
||||
if ((*iter)->name() == _control->list()->param_id().to_string()) {
|
||||
if ((*iter)->name() == _control->list()->parameter().to_string()) {
|
||||
|
||||
XMLProperty *shown = (*iter)->property("shown_editor");
|
||||
|
||||
|
@ -929,7 +929,7 @@ AutomationTimeAxisView::update_extra_xml_shown (bool editor_shown)
|
|||
|
||||
for (i = nlist.begin(); i != nlist.end(); ++i) {
|
||||
/* FIXME: legacy session loading */
|
||||
if ((*i)->name() == _control->list()->param_id().to_string()) {
|
||||
if ((*i)->name() == _control->list()->parameter().to_string()) {
|
||||
port_node = (*i);
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -65,8 +65,8 @@ CrossfadeEditor::Presets* CrossfadeEditor::fade_out_presets = 0;
|
|||
|
||||
CrossfadeEditor::Half::Half ()
|
||||
: line (0),
|
||||
normative_curve (ParamID(GainAutomation), 0.0, 1.0, 1.0), // FIXME: GainAutomation?
|
||||
gain_curve (ParamID(GainAutomation), 0.0, 2.0, 1.0)
|
||||
normative_curve (Parameter(GainAutomation), 0.0, 1.0, 1.0), // FIXME: GainAutomation?
|
||||
gain_curve (Parameter(GainAutomation), 0.0, 2.0, 1.0)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ curvetest (string filename)
|
|||
{
|
||||
ifstream in (filename.c_str());
|
||||
stringstream line;
|
||||
AutomationList al (ParamID(), -1.0, +1.0, 0);
|
||||
AutomationList al (Parameter(), -1.0, +1.0, 0);
|
||||
double minx = DBL_MAX;
|
||||
double maxx = DBL_MIN;
|
||||
|
||||
|
|
|
@ -167,16 +167,16 @@ GainMeter::GainMeter (boost::shared_ptr<IO> io, Session& s)
|
|||
|
||||
gain_astate_menu.items().push_back (MenuElem (_("Manual"),
|
||||
bind (mem_fun (*_io, &IO::set_parameter_automation_state),
|
||||
ParamID(GainAutomation), (AutoState) Off)));
|
||||
Parameter(GainAutomation), (AutoState) Off)));
|
||||
gain_astate_menu.items().push_back (MenuElem (_("Play"),
|
||||
bind (mem_fun (*_io, &IO::set_parameter_automation_state),
|
||||
ParamID(GainAutomation), (AutoState) Play)));
|
||||
Parameter(GainAutomation), (AutoState) Play)));
|
||||
gain_astate_menu.items().push_back (MenuElem (_("Write"),
|
||||
bind (mem_fun (*_io, &IO::set_parameter_automation_state),
|
||||
ParamID(GainAutomation), (AutoState) Write)));
|
||||
Parameter(GainAutomation), (AutoState) Write)));
|
||||
gain_astate_menu.items().push_back (MenuElem (_("Touch"),
|
||||
bind (mem_fun (*_io, &IO::set_parameter_automation_state),
|
||||
ParamID(GainAutomation), (AutoState) Touch)));
|
||||
Parameter(GainAutomation), (AutoState) Touch)));
|
||||
|
||||
gain_astyle_menu.items().push_back (MenuElem (_("Trim")));
|
||||
gain_astyle_menu.items().push_back (MenuElem (_("Abs")));
|
||||
|
|
|
@ -182,7 +182,7 @@ LadspaPluginUI::build ()
|
|||
|
||||
/* Don't show latency control ports */
|
||||
|
||||
if (plugin->describe_parameter (ParamID(PluginAutomation, i)) == X_("latency")) {
|
||||
if (plugin->describe_parameter (Parameter(PluginAutomation, i)) == X_("latency")) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -206,7 +206,7 @@ LadspaPluginUI::build ()
|
|||
}
|
||||
}
|
||||
|
||||
if ((cui = build_control_ui (i, insert->control(ParamID(PluginAutomation, i)))) == 0) {
|
||||
if ((cui = build_control_ui (i, insert->control(Parameter(PluginAutomation, i)))) == 0) {
|
||||
error << string_compose(_("Plugin Editor: could not build control element for port %1"), i) << endmsg;
|
||||
continue;
|
||||
}
|
||||
|
@ -325,7 +325,7 @@ LadspaPluginUI::automation_state_changed (ControlUI* cui)
|
|||
|
||||
// don't lock to avoid deadlock because we're triggered by
|
||||
// AutomationControl::Changed() while the automation lock is taken
|
||||
switch (insert->get_parameter_automation_state (cui->param_id(), false)
|
||||
switch (insert->get_parameter_automation_state (cui->parameter(), false)
|
||||
& (Off|Play|Touch|Write)) {
|
||||
case Off:
|
||||
cui->automate_button.set_label (_("Manual"));
|
||||
|
@ -586,7 +586,7 @@ LadspaPluginUI::astate_clicked (ControlUI* cui, uint32_t port)
|
|||
void
|
||||
LadspaPluginUI::set_automation_state (AutoState state, ControlUI* cui)
|
||||
{
|
||||
insert->set_parameter_automation_state (cui->param_id(), state);
|
||||
insert->set_parameter_automation_state (cui->parameter(), state);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -643,7 +643,7 @@ void
|
|||
LadspaPluginUI::control_port_toggled (ControlUI* cui)
|
||||
{
|
||||
if (!cui->ignore_change) {
|
||||
insert->set_parameter (cui->param_id(), cui->button->get_active());
|
||||
insert->set_parameter (cui->parameter(), cui->button->get_active());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -653,7 +653,7 @@ LadspaPluginUI::control_combo_changed (ControlUI* cui)
|
|||
if (!cui->ignore_change) {
|
||||
string value = cui->combo->get_active_text();
|
||||
std::map<string,float> mapping = *cui->combo_map;
|
||||
insert->set_parameter (cui->param_id(), mapping[value]);
|
||||
insert->set_parameter (cui->parameter(), mapping[value]);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -692,7 +692,7 @@ void
|
|||
LadspaPluginUI::output_update ()
|
||||
{
|
||||
for (vector<ControlUI*>::iterator i = output_controls.begin(); i != output_controls.end(); ++i) {
|
||||
float val = plugin->get_parameter ((*i)->param_id().id());
|
||||
float val = plugin->get_parameter ((*i)->parameter().id());
|
||||
char buf[32];
|
||||
snprintf (buf, sizeof(buf), "%.2f", val);
|
||||
(*i)->display_label->set_text (buf);
|
||||
|
|
|
@ -167,7 +167,7 @@ void
|
|||
MidiTimeAxisView::add_controller_track()
|
||||
{
|
||||
int response;
|
||||
ParamID param;
|
||||
Parameter param;
|
||||
|
||||
{
|
||||
AddMidiCCTrackDialog dialog;
|
||||
|
@ -183,7 +183,7 @@ MidiTimeAxisView::add_controller_track()
|
|||
}
|
||||
|
||||
void
|
||||
MidiTimeAxisView::create_automation_child (ParamID param)
|
||||
MidiTimeAxisView::create_automation_child (Parameter param)
|
||||
{
|
||||
if (param.type() == MidiCCAutomation) {
|
||||
|
||||
|
@ -203,7 +203,7 @@ MidiTimeAxisView::create_automation_child (ParamID param)
|
|||
*this,
|
||||
parent_canvas,
|
||||
_route->describe_parameter(param),
|
||||
c->list()->param_id().to_string() /* FIXME: correct state name? */));
|
||||
c->list()->parameter().to_string() /* FIXME: correct state name? */));
|
||||
|
||||
add_automation_child(param, track);
|
||||
|
||||
|
|
|
@ -61,7 +61,7 @@ class MidiTimeAxisView : public RouteTimeAxisView
|
|||
void hide ();
|
||||
|
||||
void add_controller_track ();
|
||||
void create_automation_child (ARDOUR::ParamID param);
|
||||
void create_automation_child (ARDOUR::Parameter param);
|
||||
|
||||
private:
|
||||
|
||||
|
|
|
@ -144,7 +144,7 @@ class LadspaPluginUI : public PlugUIBase, public Gtk::VBox
|
|||
|
||||
boost::shared_ptr<ARDOUR::AutomationControl> control;
|
||||
|
||||
ARDOUR::ParamID param_id() { return control->list()->param_id(); }
|
||||
ARDOUR::Parameter parameter() { return control->list()->parameter(); }
|
||||
|
||||
/* input */
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@
|
|||
#include <ardour/session.h>
|
||||
#include <ardour/session_playlist.h>
|
||||
#include <ardour/utils.h>
|
||||
#include <ardour/param_id.h>
|
||||
#include <ardour/parameter.h>
|
||||
|
||||
#include "ardour_ui.h"
|
||||
#include "route_time_axis.h"
|
||||
|
@ -277,7 +277,7 @@ RouteTimeAxisView::set_state (const XMLNode& node)
|
|||
for (niter = nlist.begin(); niter != nlist.end(); ++niter) {
|
||||
child_node = *niter;
|
||||
|
||||
ParamID param(child_node->name());
|
||||
Parameter param(child_node->name());
|
||||
|
||||
if (param) {
|
||||
|
||||
|
@ -287,7 +287,7 @@ RouteTimeAxisView::set_state (const XMLNode& node)
|
|||
create_automation_child(param);
|
||||
|
||||
if (prop != 0 && prop->value() == "yes")
|
||||
_show_automation.insert(ParamID(GainAutomation));
|
||||
_show_automation.insert(Parameter(GainAutomation));
|
||||
|
||||
} else {
|
||||
warning << "GUI info exists, but no parameter " << child_node->name() << " found." << endmsg;
|
||||
|
@ -439,7 +439,7 @@ RouteTimeAxisView::build_automation_action_menu ()
|
|||
|
||||
automation_items.push_back (MenuElem (_("Plugins"), subplugin_menu));
|
||||
|
||||
map<ARDOUR::ParamID, RouteAutomationNode*>::iterator i;
|
||||
map<ARDOUR::Parameter, RouteAutomationNode*>::iterator i;
|
||||
for (i = _automation_tracks.begin(); i != _automation_tracks.end(); ++i) {
|
||||
|
||||
automation_items.push_back (SeparatorElem());
|
||||
|
@ -1162,7 +1162,7 @@ RouteTimeAxisView::get_inverted_selectables (Selection& sel, list<Selectable*>&
|
|||
}
|
||||
|
||||
bool
|
||||
RouteTimeAxisView::show_automation(ParamID param)
|
||||
RouteTimeAxisView::show_automation(Parameter param)
|
||||
{
|
||||
return (_show_automation.find(param) != _show_automation.end());
|
||||
}
|
||||
|
@ -1170,9 +1170,9 @@ RouteTimeAxisView::show_automation(ParamID param)
|
|||
/** Retuns NULL if track for \a param doesn't exist.
|
||||
*/
|
||||
RouteTimeAxisView::RouteAutomationNode*
|
||||
RouteTimeAxisView::automation_track(ParamID param)
|
||||
RouteTimeAxisView::automation_track(Parameter param)
|
||||
{
|
||||
map<ARDOUR::ParamID, RouteAutomationNode*>::iterator i = _automation_tracks.find(param);
|
||||
map<ARDOUR::Parameter, RouteAutomationNode*>::iterator i = _automation_tracks.find(param);
|
||||
|
||||
if (i != _automation_tracks.end())
|
||||
return i->second;
|
||||
|
@ -1185,7 +1185,7 @@ RouteTimeAxisView::automation_track(ParamID param)
|
|||
RouteTimeAxisView::RouteAutomationNode*
|
||||
RouteTimeAxisView::automation_track(AutomationType type)
|
||||
{
|
||||
return automation_track(ParamID(type));
|
||||
return automation_track(Parameter(type));
|
||||
}
|
||||
|
||||
RouteGroup*
|
||||
|
@ -1476,7 +1476,7 @@ RouteTimeAxisView::color_handler ()
|
|||
}
|
||||
|
||||
void
|
||||
RouteTimeAxisView::toggle_automation_track (ParamID param)
|
||||
RouteTimeAxisView::toggle_automation_track (Parameter param)
|
||||
{
|
||||
RouteAutomationNode* node = automation_track(param);
|
||||
|
||||
|
@ -1505,7 +1505,7 @@ RouteTimeAxisView::toggle_automation_track (ParamID param)
|
|||
}
|
||||
|
||||
void
|
||||
RouteTimeAxisView::automation_track_hidden (ParamID param)
|
||||
RouteTimeAxisView::automation_track_hidden (Parameter param)
|
||||
{
|
||||
RouteAutomationNode* ran = automation_track(param);
|
||||
if (!ran)
|
||||
|
@ -1529,7 +1529,7 @@ RouteTimeAxisView::show_all_automation ()
|
|||
|
||||
/* Show our automation */
|
||||
|
||||
map<ARDOUR::ParamID, RouteAutomationNode*>::iterator i;
|
||||
map<ARDOUR::Parameter, RouteAutomationNode*>::iterator i;
|
||||
for (i = _automation_tracks.begin(); i != _automation_tracks.end(); ++i) {
|
||||
i->second->track->set_marked_for_display (true);
|
||||
i->second->track->canvas_display->show();
|
||||
|
@ -1565,7 +1565,7 @@ RouteTimeAxisView::show_existing_automation ()
|
|||
|
||||
/* Show our automation */
|
||||
|
||||
map<ARDOUR::ParamID, RouteAutomationNode*>::iterator i;
|
||||
map<ARDOUR::Parameter, RouteAutomationNode*>::iterator i;
|
||||
for (i = _automation_tracks.begin(); i != _automation_tracks.end(); ++i) {
|
||||
if (i->second->track->line() && i->second->track->line()->npoints() > 0) {
|
||||
i->second->track->set_marked_for_display (true);
|
||||
|
@ -1649,7 +1649,7 @@ RouteTimeAxisView::remove_processor_automation_node (ProcessorAutomationNode* pa
|
|||
}
|
||||
|
||||
RouteTimeAxisView::ProcessorAutomationNode*
|
||||
RouteTimeAxisView::find_processor_automation_node (boost::shared_ptr<Processor> processor, ParamID what)
|
||||
RouteTimeAxisView::find_processor_automation_node (boost::shared_ptr<Processor> processor, Parameter what)
|
||||
{
|
||||
for (list<ProcessorAutomationInfo*>::iterator i = processor_automation.begin(); i != processor_automation.end(); ++i) {
|
||||
|
||||
|
@ -1686,7 +1686,7 @@ legalize_for_xml_node (string str)
|
|||
|
||||
|
||||
void
|
||||
RouteTimeAxisView::add_processor_automation_curve (boost::shared_ptr<Processor> processor, ParamID what)
|
||||
RouteTimeAxisView::add_processor_automation_curve (boost::shared_ptr<Processor> processor, Parameter what)
|
||||
{
|
||||
string name;
|
||||
ProcessorAutomationNode* pan;
|
||||
|
@ -1751,12 +1751,12 @@ RouteTimeAxisView::processor_automation_track_hidden (RouteTimeAxisView::Process
|
|||
void
|
||||
RouteTimeAxisView::add_existing_processor_automation_curves (boost::shared_ptr<Processor> processor)
|
||||
{
|
||||
set<ParamID> s;
|
||||
set<Parameter> s;
|
||||
boost::shared_ptr<AutomationLine> al;
|
||||
|
||||
processor->what_has_visible_automation (s);
|
||||
|
||||
for (set<ParamID>::iterator i = s.begin(); i != s.end(); ++i) {
|
||||
for (set<Parameter>::iterator i = s.begin(); i != s.end(); ++i) {
|
||||
|
||||
if ((al = find_processor_automation_curve (processor, *i)) != 0) {
|
||||
al->queue_reset ();
|
||||
|
@ -1767,7 +1767,7 @@ RouteTimeAxisView::add_existing_processor_automation_curves (boost::shared_ptr<P
|
|||
}
|
||||
|
||||
void
|
||||
RouteTimeAxisView::add_automation_child(ParamID param, boost::shared_ptr<AutomationTimeAxisView> track)
|
||||
RouteTimeAxisView::add_automation_child(Parameter param, boost::shared_ptr<AutomationTimeAxisView> track)
|
||||
{
|
||||
using namespace Menu_Helpers;
|
||||
|
||||
|
@ -1809,8 +1809,8 @@ RouteTimeAxisView::add_processor_to_subplugin_menu (boost::shared_ptr<Processor>
|
|||
ProcessorAutomationInfo *rai;
|
||||
list<ProcessorAutomationInfo*>::iterator x;
|
||||
|
||||
const std::set<ParamID>& automatable = processor->what_can_be_automated ();
|
||||
std::set<ParamID> has_visible_automation;
|
||||
const std::set<Parameter>& automatable = processor->what_can_be_automated ();
|
||||
std::set<Parameter> has_visible_automation;
|
||||
|
||||
processor->what_has_visible_automation(has_visible_automation);
|
||||
|
||||
|
@ -1845,7 +1845,7 @@ RouteTimeAxisView::add_processor_to_subplugin_menu (boost::shared_ptr<Processor>
|
|||
|
||||
items.clear ();
|
||||
|
||||
for (std::set<ParamID>::const_iterator i = automatable.begin(); i != automatable.end(); ++i) {
|
||||
for (std::set<Parameter>::const_iterator i = automatable.begin(); i != automatable.end(); ++i) {
|
||||
|
||||
ProcessorAutomationNode* pan;
|
||||
CheckMenuItem* mitem;
|
||||
|
@ -1959,7 +1959,7 @@ RouteTimeAxisView::processors_changed ()
|
|||
}
|
||||
|
||||
boost::shared_ptr<AutomationLine>
|
||||
RouteTimeAxisView::find_processor_automation_curve (boost::shared_ptr<Processor> processor, ParamID what)
|
||||
RouteTimeAxisView::find_processor_automation_curve (boost::shared_ptr<Processor> processor, Parameter what)
|
||||
{
|
||||
ProcessorAutomationNode* pan;
|
||||
|
||||
|
|
|
@ -78,7 +78,7 @@ public:
|
|||
void set_selected_regionviews (RegionSelection&);
|
||||
void get_selectables (nframes_t start, nframes_t end, double top, double bot, list<Selectable *>&);
|
||||
void get_inverted_selectables (Selection&, list<Selectable*>&);
|
||||
bool show_automation(ARDOUR::ParamID param);
|
||||
bool show_automation(ARDOUR::Parameter param);
|
||||
|
||||
boost::shared_ptr<ARDOUR::Region> find_next_region (nframes_t pos, ARDOUR::RegionPoint, int32_t dir);
|
||||
|
||||
|
@ -95,7 +95,7 @@ public:
|
|||
|
||||
void build_playlist_menu (Gtk::Menu *);
|
||||
|
||||
virtual void create_automation_child (ARDOUR::ParamID param) = 0;
|
||||
virtual void create_automation_child (ARDOUR::Parameter param) = 0;
|
||||
|
||||
string name() const;
|
||||
StreamView* view() const { return _view; }
|
||||
|
@ -106,21 +106,21 @@ protected:
|
|||
friend class StreamView;
|
||||
|
||||
struct RouteAutomationNode {
|
||||
ARDOUR::ParamID param;
|
||||
ARDOUR::Parameter param;
|
||||
Gtk::CheckMenuItem* menu_item;
|
||||
boost::shared_ptr<AutomationTimeAxisView> track;
|
||||
|
||||
RouteAutomationNode (ARDOUR::ParamID par, Gtk::CheckMenuItem* mi, boost::shared_ptr<AutomationTimeAxisView> tr)
|
||||
RouteAutomationNode (ARDOUR::Parameter par, Gtk::CheckMenuItem* mi, boost::shared_ptr<AutomationTimeAxisView> tr)
|
||||
: param (par), menu_item (mi), track (tr) {}
|
||||
};
|
||||
|
||||
struct ProcessorAutomationNode {
|
||||
ARDOUR::ParamID what;
|
||||
ARDOUR::Parameter what;
|
||||
Gtk::CheckMenuItem* menu_item;
|
||||
boost::shared_ptr<AutomationTimeAxisView> view;
|
||||
RouteTimeAxisView& parent;
|
||||
|
||||
ProcessorAutomationNode (ARDOUR::ParamID w, Gtk::CheckMenuItem* mitem, RouteTimeAxisView& p)
|
||||
ProcessorAutomationNode (ARDOUR::Parameter w, Gtk::CheckMenuItem* mitem, RouteTimeAxisView& p)
|
||||
: what (w), menu_item (mitem), parent (p) {}
|
||||
|
||||
~ProcessorAutomationNode ();
|
||||
|
@ -155,21 +155,21 @@ protected:
|
|||
void processor_automation_track_hidden (ProcessorAutomationNode*,
|
||||
boost::shared_ptr<ARDOUR::Processor>);
|
||||
|
||||
void automation_track_hidden (ARDOUR::ParamID param);
|
||||
void automation_track_hidden (ARDOUR::Parameter param);
|
||||
|
||||
RouteAutomationNode* automation_track(ARDOUR::ParamID param);
|
||||
RouteAutomationNode* automation_track(ARDOUR::Parameter param);
|
||||
RouteAutomationNode* automation_track(ARDOUR::AutomationType type);
|
||||
|
||||
ProcessorAutomationNode*
|
||||
find_processor_automation_node (boost::shared_ptr<ARDOUR::Processor> i, ARDOUR::ParamID);
|
||||
find_processor_automation_node (boost::shared_ptr<ARDOUR::Processor> i, ARDOUR::Parameter);
|
||||
|
||||
boost::shared_ptr<AutomationLine>
|
||||
find_processor_automation_curve (boost::shared_ptr<ARDOUR::Processor> i, ARDOUR::ParamID);
|
||||
find_processor_automation_curve (boost::shared_ptr<ARDOUR::Processor> i, ARDOUR::Parameter);
|
||||
|
||||
void add_processor_automation_curve (boost::shared_ptr<ARDOUR::Processor> r, ARDOUR::ParamID);
|
||||
void add_processor_automation_curve (boost::shared_ptr<ARDOUR::Processor> r, ARDOUR::Parameter);
|
||||
void add_existing_processor_automation_curves (boost::shared_ptr<ARDOUR::Processor>);
|
||||
|
||||
void add_automation_child(ARDOUR::ParamID param, boost::shared_ptr<AutomationTimeAxisView> track);
|
||||
void add_automation_child(ARDOUR::Parameter param, boost::shared_ptr<AutomationTimeAxisView> track);
|
||||
|
||||
void reset_processor_automation_curves ();
|
||||
|
||||
|
@ -204,7 +204,7 @@ protected:
|
|||
void rename_current_playlist ();
|
||||
|
||||
void automation_click ();
|
||||
void toggle_automation_track (ARDOUR::ParamID param);
|
||||
void toggle_automation_track (ARDOUR::Parameter param);
|
||||
virtual void show_all_automation ();
|
||||
virtual void show_existing_automation ();
|
||||
virtual void hide_all_automation ();
|
||||
|
@ -262,9 +262,9 @@ protected:
|
|||
ProcessorAutomationCurves processor_automation_curves;
|
||||
|
||||
// Set from XML so context menu automation buttons can be correctly initialized
|
||||
set<ARDOUR::ParamID> _show_automation;
|
||||
set<ARDOUR::Parameter> _show_automation;
|
||||
|
||||
typedef map<ARDOUR::ParamID, RouteAutomationNode*> AutomationTracks;
|
||||
typedef map<ARDOUR::Parameter, RouteAutomationNode*> AutomationTracks;
|
||||
AutomationTracks _automation_tracks;
|
||||
|
||||
sigc::connection modified_connection;
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#include <ardour/session_object.h>
|
||||
#include <ardour/automation_event.h>
|
||||
#include <ardour/automation_control.h>
|
||||
#include <ardour/param_id.h>
|
||||
#include <ardour/parameter.h>
|
||||
|
||||
namespace ARDOUR {
|
||||
|
||||
|
@ -43,13 +43,13 @@ public:
|
|||
// shorthand for gain, pan, etc
|
||||
inline boost::shared_ptr<AutomationControl>
|
||||
control(AutomationType type, bool create_if_missing=false) {
|
||||
return control(ParamID(type), create_if_missing);
|
||||
return control(Parameter(type), create_if_missing);
|
||||
}
|
||||
|
||||
virtual boost::shared_ptr<AutomationControl> control(ParamID id, bool create_if_missing=false);
|
||||
virtual boost::shared_ptr<const AutomationControl> control(ParamID id) const;
|
||||
virtual boost::shared_ptr<AutomationControl> control(Parameter id, bool create_if_missing=false);
|
||||
virtual boost::shared_ptr<const AutomationControl> control(Parameter id) const;
|
||||
|
||||
typedef std::map<ParamID,boost::shared_ptr<AutomationControl> > Controls;
|
||||
typedef std::map<Parameter,boost::shared_ptr<AutomationControl> > Controls;
|
||||
Controls controls() { return _controls; }
|
||||
|
||||
virtual void add_control(boost::shared_ptr<AutomationControl>);
|
||||
|
@ -59,32 +59,32 @@ public:
|
|||
|
||||
virtual bool find_next_event(nframes_t start, nframes_t end, ControlEvent& ev) const;
|
||||
|
||||
virtual string describe_parameter(ParamID param);
|
||||
virtual float default_parameter_value(ParamID param) { return 1.0f; }
|
||||
virtual string describe_parameter(Parameter param);
|
||||
virtual float default_parameter_value(Parameter param) { return 1.0f; }
|
||||
|
||||
virtual void clear_automation();
|
||||
|
||||
AutoState get_parameter_automation_state (ParamID param, bool lock = true);
|
||||
virtual void set_parameter_automation_state (ParamID param, AutoState);
|
||||
AutoState get_parameter_automation_state (Parameter param, bool lock = true);
|
||||
virtual void set_parameter_automation_state (Parameter param, AutoState);
|
||||
|
||||
AutoStyle get_parameter_automation_style (ParamID param);
|
||||
void set_parameter_automation_style (ParamID param, AutoStyle);
|
||||
AutoStyle get_parameter_automation_style (Parameter param);
|
||||
void set_parameter_automation_style (Parameter param, AutoStyle);
|
||||
|
||||
void protect_automation ();
|
||||
|
||||
void what_has_automation(std::set<ParamID>&) const;
|
||||
void what_has_visible_automation(std::set<ParamID>&) const;
|
||||
const std::set<ParamID>& what_can_be_automated() const { return _can_automate_list; }
|
||||
void what_has_automation(std::set<Parameter>&) const;
|
||||
void what_has_visible_automation(std::set<Parameter>&) const;
|
||||
const std::set<Parameter>& what_can_be_automated() const { return _can_automate_list; }
|
||||
|
||||
void mark_automation_visible(ParamID, bool);
|
||||
void mark_automation_visible(Parameter, bool);
|
||||
|
||||
protected:
|
||||
|
||||
void can_automate(ParamID);
|
||||
void can_automate(Parameter);
|
||||
|
||||
virtual void auto_state_changed (ParamID which) {}
|
||||
virtual void auto_state_changed (Parameter which) {}
|
||||
|
||||
int set_automation_state(const XMLNode&, ParamID default_param);
|
||||
int set_automation_state(const XMLNode&, Parameter default_param);
|
||||
XMLNode& get_automation_state();
|
||||
|
||||
int load_automation (const std::string& path);
|
||||
|
@ -93,8 +93,8 @@ protected:
|
|||
mutable Glib::Mutex _automation_lock;
|
||||
|
||||
Controls _controls;
|
||||
std::set<ParamID> _visible_controls;
|
||||
std::set<ParamID> _can_automate_list;
|
||||
std::set<Parameter> _visible_controls;
|
||||
std::set<Parameter> _can_automate_list;
|
||||
|
||||
nframes_t _last_automation_snapshot;
|
||||
};
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
#include <pbd/statefuldestructible.h>
|
||||
|
||||
#include <ardour/ardour.h>
|
||||
#include <ardour/param_id.h>
|
||||
#include <ardour/parameter.h>
|
||||
|
||||
namespace ARDOUR {
|
||||
|
||||
|
@ -63,8 +63,8 @@ class AutomationList : public PBD::StatefulDestructible
|
|||
typedef EventList::iterator iterator;
|
||||
typedef EventList::const_iterator const_iterator;
|
||||
|
||||
AutomationList (ParamID id, double min_val, double max_val, double default_val);
|
||||
AutomationList (const XMLNode&, ParamID id);
|
||||
AutomationList (Parameter id, double min_val, double max_val, double default_val);
|
||||
AutomationList (const XMLNode&, Parameter id);
|
||||
~AutomationList();
|
||||
|
||||
AutomationList (const AutomationList&);
|
||||
|
@ -72,8 +72,8 @@ class AutomationList : public PBD::StatefulDestructible
|
|||
AutomationList& operator= (const AutomationList&);
|
||||
bool operator== (const AutomationList&);
|
||||
|
||||
ParamID param_id() const { return _param_id; }
|
||||
void set_param_id(ParamID id) { _param_id = id; }
|
||||
Parameter parameter() const { return _param_id; }
|
||||
void set_param_id(Parameter id) { _param_id = id; }
|
||||
|
||||
void freeze();
|
||||
void thaw ();
|
||||
|
@ -232,7 +232,7 @@ class AutomationList : public PBD::StatefulDestructible
|
|||
|
||||
mutable LookupCache _lookup_cache;
|
||||
|
||||
ParamID _param_id;
|
||||
Parameter _param_id;
|
||||
EventList _events;
|
||||
mutable Glib::Mutex _lock;
|
||||
int8_t _frozen;
|
||||
|
|
|
@ -37,7 +37,7 @@ class Curve
|
|||
~Curve ();
|
||||
Curve (const Curve& other);
|
||||
//Curve (const Curve& other, double start, double end);
|
||||
/*Curve (const XMLNode&, ParamID id);*/
|
||||
/*Curve (const XMLNode&, Parameter id);*/
|
||||
|
||||
bool rt_safe_get_vector (double x0, double x1, float *arg, int32_t veclen);
|
||||
void get_vector (double x0, double x1, float *arg, int32_t veclen);
|
||||
|
|
|
@ -237,7 +237,7 @@ class IO : public Automatable, public Latent
|
|||
|
||||
void clear_automation ();
|
||||
|
||||
void set_parameter_automation_state (ParamID, AutoState);
|
||||
void set_parameter_automation_state (Parameter, AutoState);
|
||||
|
||||
virtual void transport_stopped (nframes_t now); // interface: matches Insert
|
||||
void automation_snapshot (nframes_t now); // interface: matches Automatable
|
||||
|
|
|
@ -63,7 +63,7 @@ class LadspaPlugin : public ARDOUR::Plugin
|
|||
void set_parameter (uint32_t port, float val);
|
||||
float get_parameter (uint32_t port) const;
|
||||
int get_parameter_descriptor (uint32_t which, ParameterDescriptor&) const;
|
||||
std::set<ParamID> automatable() const;
|
||||
std::set<Parameter> automatable() const;
|
||||
uint32_t nth_parameter (uint32_t port, bool& ok) const;
|
||||
void activate () {
|
||||
if (descriptor->activate) {
|
||||
|
@ -85,7 +85,7 @@ class LadspaPlugin : public ARDOUR::Plugin
|
|||
int connect_and_run (BufferSet& bufs, uint32_t& in, uint32_t& out, nframes_t nframes, nframes_t offset);
|
||||
void store_state (ARDOUR::PluginState&);
|
||||
void restore_state (ARDOUR::PluginState&);
|
||||
string describe_parameter (ParamID);
|
||||
string describe_parameter (Parameter);
|
||||
string state_node_name() const { return "ladspa"; }
|
||||
void print_parameter (uint32_t, char*, uint32_t len) const;
|
||||
|
||||
|
|
|
@ -76,7 +76,7 @@ public:
|
|||
|
||||
struct MidiControl : public AutomationControl {
|
||||
MidiControl(boost::shared_ptr<MidiTrack> route, boost::shared_ptr<AutomationList> al)
|
||||
: AutomationControl (route->session(), al, al->param_id().to_string())
|
||||
: AutomationControl (route->session(), al, al->parameter().to_string())
|
||||
, _route (route)
|
||||
{}
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ class AudioBuffer;
|
|||
class StreamPanner : public sigc::trackable, public PBD::Stateful
|
||||
{
|
||||
public:
|
||||
StreamPanner (Panner& p, ParamID param);
|
||||
StreamPanner (Panner& p, Parameter param);
|
||||
~StreamPanner ();
|
||||
|
||||
void set_muted (bool yn);
|
||||
|
@ -104,7 +104,7 @@ class StreamPanner : public sigc::trackable, public PBD::Stateful
|
|||
bool _muted;
|
||||
|
||||
struct PanControllable : public AutomationControl {
|
||||
PanControllable (Session& s, std::string name, StreamPanner& p, ParamID param)
|
||||
PanControllable (Session& s, std::string name, StreamPanner& p, Parameter param)
|
||||
: AutomationControl (s, boost::shared_ptr<AutomationList>(new AutomationList(
|
||||
param, 0.0, 1.0, 0.5)), name)
|
||||
, panner (p) { assert(param.type() != NullAutomation); }
|
||||
|
@ -125,7 +125,7 @@ class StreamPanner : public sigc::trackable, public PBD::Stateful
|
|||
class BaseStereoPanner : public StreamPanner
|
||||
{
|
||||
public:
|
||||
BaseStereoPanner (Panner&, ParamID param);
|
||||
BaseStereoPanner (Panner&, Parameter param);
|
||||
~BaseStereoPanner ();
|
||||
|
||||
/* this class just leaves the pan law itself to be defined
|
||||
|
@ -152,7 +152,7 @@ class BaseStereoPanner : public StreamPanner
|
|||
class EqualPowerStereoPanner : public BaseStereoPanner
|
||||
{
|
||||
public:
|
||||
EqualPowerStereoPanner (Panner&, ParamID param);
|
||||
EqualPowerStereoPanner (Panner&, Parameter param);
|
||||
~EqualPowerStereoPanner ();
|
||||
|
||||
void distribute_automated (AudioBuffer& src, BufferSet& obufs,
|
||||
|
@ -161,7 +161,7 @@ class EqualPowerStereoPanner : public BaseStereoPanner
|
|||
void get_current_coefficients (pan_t*) const;
|
||||
void get_desired_coefficients (pan_t*) const;
|
||||
|
||||
static StreamPanner* factory (Panner&, ParamID param);
|
||||
static StreamPanner* factory (Panner&, Parameter param);
|
||||
static string name;
|
||||
|
||||
XMLNode& state (bool full_state);
|
||||
|
@ -175,14 +175,14 @@ class EqualPowerStereoPanner : public BaseStereoPanner
|
|||
class Multi2dPanner : public StreamPanner
|
||||
{
|
||||
public:
|
||||
Multi2dPanner (Panner& parent, ParamID);
|
||||
Multi2dPanner (Panner& parent, Parameter);
|
||||
~Multi2dPanner ();
|
||||
|
||||
void distribute (AudioBuffer& src, BufferSet& obufs, gain_t gain_coeff, nframes_t nframes);
|
||||
void distribute_automated (AudioBuffer& src, BufferSet& obufs,
|
||||
nframes_t start, nframes_t end, nframes_t nframes, pan_t** buffers);
|
||||
|
||||
static StreamPanner* factory (Panner&, ParamID);
|
||||
static StreamPanner* factory (Panner&, Parameter);
|
||||
static string name;
|
||||
|
||||
XMLNode& state (bool full_state);
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
Copyright (C) 2007 Paul Davis
|
||||
Author: Dave Robillard
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the Free
|
||||
|
@ -16,8 +17,8 @@
|
|||
675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#ifndef __ardour_param_id_h__
|
||||
#define __ardour_param_id_h__
|
||||
#ifndef __ardour_parameter_h__
|
||||
#define __ardour_parameter_h__
|
||||
|
||||
#include <string>
|
||||
#include <pbd/compose.h>
|
||||
|
@ -44,15 +45,15 @@ namespace ARDOUR {
|
|||
* comparable anything may be added. ints are best as these should be fast to
|
||||
* copy and compare with one another.
|
||||
*/
|
||||
class ParamID
|
||||
class Parameter
|
||||
{
|
||||
public:
|
||||
inline ParamID(AutomationType type = NullAutomation, uint32_t id=0) : _type(type), _id(id) {}
|
||||
inline Parameter(AutomationType type = NullAutomation, uint32_t id=0) : _type(type), _id(id) {}
|
||||
|
||||
/** Construct an ParamID from a string returned from ParamID::to_string
|
||||
/** Construct an Parameter from a string returned from Parameter::to_string
|
||||
* (AutomationList automation-id property)
|
||||
*/
|
||||
ParamID(const std::string& str) : _type(NullAutomation), _id(0) {
|
||||
Parameter(const std::string& str) : _type(NullAutomation), _id(0) {
|
||||
if (str == "gain") {
|
||||
_type = GainAutomation;
|
||||
} else if (str == "solo") {
|
||||
|
@ -77,21 +78,21 @@ public:
|
|||
_type = MidiCCAutomation;
|
||||
_id = atoi(str.c_str()+7);
|
||||
} else {
|
||||
PBD::warning << "Unknown ParamID '" << str << "'" << endmsg;
|
||||
PBD::warning << "Unknown Parameter '" << str << "'" << endmsg;
|
||||
}
|
||||
}
|
||||
|
||||
inline AutomationType type() const { return _type; }
|
||||
inline uint32_t id() const { return _id; }
|
||||
|
||||
inline bool operator==(const ParamID& id) const
|
||||
inline bool operator==(const Parameter& id) const
|
||||
{ return (_type == id._type && _id == id._id); }
|
||||
|
||||
/** Arbitrary but fixed ordering, so we're comparable (usable in std::map) */
|
||||
inline bool operator<(const ParamID& id) const {
|
||||
inline bool operator<(const Parameter& id) const {
|
||||
// FIXME: branch a performance problem? #ifdef DEBUG?
|
||||
if (_type == NullAutomation)
|
||||
PBD::warning << "Uninitialized ParamID compared." << endmsg;
|
||||
PBD::warning << "Uninitialized Parameter compared." << endmsg;
|
||||
return (_type < id._type || _id < id._id);
|
||||
}
|
||||
|
||||
|
@ -121,7 +122,7 @@ public:
|
|||
return string_compose("midicc-%1", _id);
|
||||
} else {
|
||||
assert(false);
|
||||
PBD::warning << "Uninitialized ParamID to_string() called." << endmsg;
|
||||
PBD::warning << "Uninitialized Parameter to_string() called." << endmsg;
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
@ -135,5 +136,5 @@ private:
|
|||
|
||||
} // namespace ARDOUR
|
||||
|
||||
#endif // __ardour_param_id_h__
|
||||
#endif // __ardour_parameter_h__
|
||||
|
|
@ -32,7 +32,7 @@
|
|||
#include <ardour/plugin_state.h>
|
||||
#include <ardour/cycles.h>
|
||||
#include <ardour/latent.h>
|
||||
#include <ardour/param_id.h>
|
||||
#include <ardour/parameter.h>
|
||||
|
||||
#include <vector>
|
||||
#include <set>
|
||||
|
@ -121,10 +121,10 @@ class Plugin : public PBD::StatefulDestructible, public Latent
|
|||
|
||||
virtual int connect_and_run (BufferSet& bufs, uint32_t& in, uint32_t& out, nframes_t nframes, nframes_t offset) = 0;
|
||||
|
||||
virtual std::set<ParamID> automatable() const = 0;
|
||||
virtual std::set<Parameter> automatable() const = 0;
|
||||
virtual void store_state (ARDOUR::PluginState&) = 0;
|
||||
virtual void restore_state (ARDOUR::PluginState&) = 0;
|
||||
virtual string describe_parameter (ParamID) = 0;
|
||||
virtual string describe_parameter (Parameter) = 0;
|
||||
virtual string state_node_name() const = 0;
|
||||
virtual void print_parameter (uint32_t, char*, uint32_t len) const = 0;
|
||||
|
||||
|
|
|
@ -76,10 +76,10 @@ class PluginInsert : public Processor
|
|||
|
||||
bool is_generator() const;
|
||||
|
||||
void set_parameter (ParamID param, float val);
|
||||
float get_parameter (ParamID param);
|
||||
void set_parameter (Parameter param, float val);
|
||||
float get_parameter (Parameter param);
|
||||
|
||||
float default_parameter_value (ParamID param);
|
||||
float default_parameter_value (Parameter param);
|
||||
|
||||
struct PluginControl : public AutomationControl {
|
||||
PluginControl (PluginInsert& p, boost::shared_ptr<AutomationList> list);
|
||||
|
@ -104,13 +104,13 @@ class PluginInsert : public Processor
|
|||
|
||||
PluginType type ();
|
||||
|
||||
string describe_parameter (ParamID param);
|
||||
string describe_parameter (Parameter param);
|
||||
|
||||
nframes_t signal_latency() const;
|
||||
|
||||
private:
|
||||
|
||||
void parameter_changed (ParamID, float);
|
||||
void parameter_changed (Parameter, float);
|
||||
|
||||
std::vector<boost::shared_ptr<Plugin> > _plugins;
|
||||
|
||||
|
@ -119,7 +119,7 @@ class PluginInsert : public Processor
|
|||
|
||||
void init ();
|
||||
void set_automatable ();
|
||||
void auto_state_changed (ParamID which);
|
||||
void auto_state_changed (Parameter which);
|
||||
|
||||
int32_t count_for_configuration (ChanCount in, ChanCount out) const;
|
||||
|
||||
|
|
|
@ -93,7 +93,7 @@ namespace ARDOUR {
|
|||
OverlapType coverage (nframes_t start_a, nframes_t end_a,
|
||||
nframes_t start_b, nframes_t end_b);
|
||||
|
||||
/** See param_id.h
|
||||
/** See parameter.h
|
||||
* XXX: I don't think/hope these hex values matter anymore.
|
||||
*/
|
||||
enum AutomationType {
|
||||
|
|
|
@ -73,9 +73,9 @@ AudioRegion::init ()
|
|||
/* constructor for use by derived types only */
|
||||
AudioRegion::AudioRegion (nframes_t start, nframes_t length, string name)
|
||||
: Region (start, length, name, DataType::AUDIO)
|
||||
, _fade_in (new AutomationList(ParamID(FadeInAutomation), 0.0, 2.0, 1.0))
|
||||
, _fade_out (new AutomationList(ParamID(FadeOutAutomation), 0.0, 2.0, 1.0))
|
||||
, _envelope (new AutomationList(ParamID(EnvelopeAutomation), 0.0, 2.0, 1.0))
|
||||
, _fade_in (new AutomationList(Parameter(FadeInAutomation), 0.0, 2.0, 1.0))
|
||||
, _fade_out (new AutomationList(Parameter(FadeOutAutomation), 0.0, 2.0, 1.0))
|
||||
, _envelope (new AutomationList(Parameter(EnvelopeAutomation), 0.0, 2.0, 1.0))
|
||||
{
|
||||
init ();
|
||||
}
|
||||
|
@ -83,9 +83,9 @@ AudioRegion::AudioRegion (nframes_t start, nframes_t length, string name)
|
|||
/** Basic AudioRegion constructor (one channel) */
|
||||
AudioRegion::AudioRegion (boost::shared_ptr<AudioSource> src, nframes_t start, nframes_t length)
|
||||
: Region (src, start, length, PBD::basename_nosuffix(src->name()), DataType::AUDIO, 0, Region::Flag(Region::DefaultFlags|Region::External))
|
||||
, _fade_in (new AutomationList(ParamID(FadeInAutomation), 0.0, 2.0, 1.0))
|
||||
, _fade_out (new AutomationList(ParamID(FadeOutAutomation), 0.0, 2.0, 1.0))
|
||||
, _envelope (new AutomationList(ParamID(EnvelopeAutomation), 0.0, 2.0, 1.0))
|
||||
, _fade_in (new AutomationList(Parameter(FadeInAutomation), 0.0, 2.0, 1.0))
|
||||
, _fade_out (new AutomationList(Parameter(FadeOutAutomation), 0.0, 2.0, 1.0))
|
||||
, _envelope (new AutomationList(Parameter(EnvelopeAutomation), 0.0, 2.0, 1.0))
|
||||
{
|
||||
boost::shared_ptr<AudioFileSource> afs = boost::dynamic_pointer_cast<AudioFileSource> (src);
|
||||
if (afs) {
|
||||
|
@ -98,9 +98,9 @@ AudioRegion::AudioRegion (boost::shared_ptr<AudioSource> src, nframes_t start, n
|
|||
/* Basic AudioRegion constructor (one channel) */
|
||||
AudioRegion::AudioRegion (boost::shared_ptr<AudioSource> src, nframes_t start, nframes_t length, const string& name, layer_t layer, Flag flags)
|
||||
: Region (src, start, length, name, DataType::AUDIO, layer, flags)
|
||||
, _fade_in (new AutomationList(ParamID(FadeInAutomation), 0.0, 2.0, 1.0))
|
||||
, _fade_out (new AutomationList(ParamID(FadeOutAutomation), 0.0, 2.0, 1.0))
|
||||
, _envelope (new AutomationList(ParamID(EnvelopeAutomation), 0.0, 2.0, 1.0))
|
||||
, _fade_in (new AutomationList(Parameter(FadeInAutomation), 0.0, 2.0, 1.0))
|
||||
, _fade_out (new AutomationList(Parameter(FadeOutAutomation), 0.0, 2.0, 1.0))
|
||||
, _envelope (new AutomationList(Parameter(EnvelopeAutomation), 0.0, 2.0, 1.0))
|
||||
{
|
||||
boost::shared_ptr<AudioFileSource> afs = boost::dynamic_pointer_cast<AudioFileSource> (src);
|
||||
if (afs) {
|
||||
|
@ -113,9 +113,9 @@ AudioRegion::AudioRegion (boost::shared_ptr<AudioSource> src, nframes_t start, n
|
|||
/* Basic AudioRegion constructor (many channels) */
|
||||
AudioRegion::AudioRegion (SourceList& srcs, nframes_t start, nframes_t length, const string& name, layer_t layer, Flag flags)
|
||||
: Region (srcs, start, length, name, DataType::AUDIO, layer, flags)
|
||||
, _fade_in (new AutomationList(ParamID(FadeInAutomation), 0.0, 2.0, 1.0))
|
||||
, _fade_out (new AutomationList(ParamID(FadeOutAutomation), 0.0, 2.0, 1.0))
|
||||
, _envelope (new AutomationList(ParamID(EnvelopeAutomation), 0.0, 2.0, 1.0))
|
||||
, _fade_in (new AutomationList(Parameter(FadeInAutomation), 0.0, 2.0, 1.0))
|
||||
, _fade_out (new AutomationList(Parameter(FadeOutAutomation), 0.0, 2.0, 1.0))
|
||||
, _envelope (new AutomationList(Parameter(EnvelopeAutomation), 0.0, 2.0, 1.0))
|
||||
{
|
||||
init ();
|
||||
}
|
||||
|
@ -124,9 +124,9 @@ AudioRegion::AudioRegion (SourceList& srcs, nframes_t start, nframes_t length, c
|
|||
/** Create a new AudioRegion, that is part of an existing one */
|
||||
AudioRegion::AudioRegion (boost::shared_ptr<const AudioRegion> other, nframes_t offset, nframes_t length, const string& name, layer_t layer, Flag flags)
|
||||
: Region (other, offset, length, name, layer, flags)
|
||||
, _fade_in (new AutomationList(ParamID(FadeInAutomation), 0.0, 2.0, 1.0))
|
||||
, _fade_out (new AutomationList(ParamID(FadeOutAutomation), 0.0, 2.0, 1.0))
|
||||
, _envelope (new AutomationList(ParamID(EnvelopeAutomation), 0.0, 2.0, 1.0))
|
||||
, _fade_in (new AutomationList(Parameter(FadeInAutomation), 0.0, 2.0, 1.0))
|
||||
, _fade_out (new AutomationList(Parameter(FadeOutAutomation), 0.0, 2.0, 1.0))
|
||||
, _envelope (new AutomationList(Parameter(EnvelopeAutomation), 0.0, 2.0, 1.0))
|
||||
{
|
||||
/* return to default fades if the existing ones are too long */
|
||||
_fade_in_disabled = 0;
|
||||
|
@ -162,9 +162,9 @@ AudioRegion::AudioRegion (boost::shared_ptr<const AudioRegion> other, nframes_t
|
|||
|
||||
AudioRegion::AudioRegion (boost::shared_ptr<const AudioRegion> other)
|
||||
: Region (other)
|
||||
, _fade_in (new AutomationList(ParamID(FadeInAutomation), 0.0, 2.0, 1.0))
|
||||
, _fade_out (new AutomationList(ParamID(FadeOutAutomation), 0.0, 2.0, 1.0))
|
||||
, _envelope (new AutomationList(ParamID(EnvelopeAutomation), 0.0, 2.0, 1.0))
|
||||
, _fade_in (new AutomationList(Parameter(FadeInAutomation), 0.0, 2.0, 1.0))
|
||||
, _fade_out (new AutomationList(Parameter(FadeOutAutomation), 0.0, 2.0, 1.0))
|
||||
, _envelope (new AutomationList(Parameter(EnvelopeAutomation), 0.0, 2.0, 1.0))
|
||||
{
|
||||
_scale_amplitude = other->_scale_amplitude;
|
||||
_envelope = other->_envelope;
|
||||
|
@ -179,9 +179,9 @@ AudioRegion::AudioRegion (boost::shared_ptr<const AudioRegion> other)
|
|||
|
||||
AudioRegion::AudioRegion (boost::shared_ptr<AudioSource> src, const XMLNode& node)
|
||||
: Region (src, node)
|
||||
, _fade_in (new AutomationList(ParamID(FadeInAutomation), 0.0, 2.0, 1.0))
|
||||
, _fade_out (new AutomationList(ParamID(FadeOutAutomation), 0.0, 2.0, 1.0))
|
||||
, _envelope (new AutomationList(ParamID(EnvelopeAutomation), 0.0, 2.0, 1.0))
|
||||
, _fade_in (new AutomationList(Parameter(FadeInAutomation), 0.0, 2.0, 1.0))
|
||||
, _fade_out (new AutomationList(Parameter(FadeOutAutomation), 0.0, 2.0, 1.0))
|
||||
, _envelope (new AutomationList(Parameter(EnvelopeAutomation), 0.0, 2.0, 1.0))
|
||||
{
|
||||
boost::shared_ptr<AudioFileSource> afs = boost::dynamic_pointer_cast<AudioFileSource> (src);
|
||||
if (afs) {
|
||||
|
@ -201,9 +201,9 @@ AudioRegion::AudioRegion (boost::shared_ptr<AudioSource> src, const XMLNode& nod
|
|||
|
||||
AudioRegion::AudioRegion (SourceList& srcs, const XMLNode& node)
|
||||
: Region (srcs, node)
|
||||
, _fade_in (new AutomationList(ParamID(FadeInAutomation), 0.0, 2.0, 1.0))
|
||||
, _fade_out (new AutomationList(ParamID(FadeOutAutomation), 0.0, 2.0, 1.0))
|
||||
, _envelope (new AutomationList(ParamID(EnvelopeAutomation), 0.0, 2.0, 1.0))
|
||||
, _fade_in (new AutomationList(Parameter(FadeInAutomation), 0.0, 2.0, 1.0))
|
||||
, _fade_out (new AutomationList(Parameter(FadeOutAutomation), 0.0, 2.0, 1.0))
|
||||
, _envelope (new AutomationList(Parameter(EnvelopeAutomation), 0.0, 2.0, 1.0))
|
||||
{
|
||||
set_default_fades ();
|
||||
_scale_amplitude = 1.0;
|
||||
|
|
|
@ -62,7 +62,7 @@ Automatable::old_set_automation_state (const XMLNode& node)
|
|||
if (sstr.fail()) {
|
||||
break;
|
||||
}
|
||||
mark_automation_visible (ParamID(PluginAutomation, what), true);
|
||||
mark_automation_visible (Parameter(PluginAutomation, what), true);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -90,7 +90,7 @@ Automatable::load_automation (const string& path)
|
|||
}
|
||||
|
||||
Glib::Mutex::Lock lm (_automation_lock);
|
||||
set<ParamID> tosave;
|
||||
set<Parameter> tosave;
|
||||
_controls.clear ();
|
||||
|
||||
_last_automation_snapshot = 0;
|
||||
|
@ -105,9 +105,9 @@ Automatable::load_automation (const string& path)
|
|||
in >> value; if (!in) goto bad;
|
||||
|
||||
/* FIXME: this is legacy and only used for plugin inserts? I think? */
|
||||
boost::shared_ptr<AutomationControl> c = control (ParamID(PluginAutomation, port), true);
|
||||
boost::shared_ptr<AutomationControl> c = control (Parameter(PluginAutomation, port), true);
|
||||
c->list()->add (when, value);
|
||||
tosave.insert (ParamID(PluginAutomation, port));
|
||||
tosave.insert (Parameter(PluginAutomation, port));
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -121,7 +121,7 @@ Automatable::load_automation (const string& path)
|
|||
void
|
||||
Automatable::add_control(boost::shared_ptr<AutomationControl> ac)
|
||||
{
|
||||
ParamID param = ac->list()->param_id();
|
||||
Parameter param = ac->list()->parameter();
|
||||
|
||||
_controls[param] = ac;
|
||||
|
||||
|
@ -134,7 +134,7 @@ Automatable::add_control(boost::shared_ptr<AutomationControl> ac)
|
|||
}
|
||||
|
||||
void
|
||||
Automatable::what_has_automation (set<ParamID>& s) const
|
||||
Automatable::what_has_automation (set<Parameter>& s) const
|
||||
{
|
||||
Glib::Mutex::Lock lm (_automation_lock);
|
||||
Controls::const_iterator li;
|
||||
|
@ -146,10 +146,10 @@ Automatable::what_has_automation (set<ParamID>& s) const
|
|||
}
|
||||
|
||||
void
|
||||
Automatable::what_has_visible_automation (set<ParamID>& s) const
|
||||
Automatable::what_has_visible_automation (set<Parameter>& s) const
|
||||
{
|
||||
Glib::Mutex::Lock lm (_automation_lock);
|
||||
set<ParamID>::const_iterator li;
|
||||
set<Parameter>::const_iterator li;
|
||||
|
||||
for (li = _visible_controls.begin(); li != _visible_controls.end(); ++li) {
|
||||
s.insert (*li);
|
||||
|
@ -159,7 +159,7 @@ Automatable::what_has_visible_automation (set<ParamID>& s) const
|
|||
/** Returns NULL if we don't have an AutomationList for \a parameter.
|
||||
*/
|
||||
boost::shared_ptr<AutomationControl>
|
||||
Automatable::control (ParamID parameter, bool create_if_missing)
|
||||
Automatable::control (Parameter parameter, bool create_if_missing)
|
||||
{
|
||||
Controls::iterator i = _controls.find(parameter);
|
||||
|
||||
|
@ -181,7 +181,7 @@ Automatable::control (ParamID parameter, bool create_if_missing)
|
|||
}
|
||||
|
||||
boost::shared_ptr<const AutomationControl>
|
||||
Automatable::control (ParamID parameter) const
|
||||
Automatable::control (Parameter parameter) const
|
||||
{
|
||||
Controls::const_iterator i = _controls.find(parameter);
|
||||
|
||||
|
@ -195,11 +195,11 @@ Automatable::control (ParamID parameter) const
|
|||
|
||||
|
||||
string
|
||||
Automatable::describe_parameter (ParamID param)
|
||||
Automatable::describe_parameter (Parameter param)
|
||||
{
|
||||
/* derived classes like PluginInsert should override this */
|
||||
|
||||
if (param == ParamID(GainAutomation))
|
||||
if (param == Parameter(GainAutomation))
|
||||
return _("Fader");
|
||||
else if (param.type() == PanAutomation)
|
||||
return (string_compose(_("Pan %1"), param.id()));
|
||||
|
@ -210,18 +210,18 @@ Automatable::describe_parameter (ParamID param)
|
|||
}
|
||||
|
||||
void
|
||||
Automatable::can_automate (ParamID what)
|
||||
Automatable::can_automate (Parameter what)
|
||||
{
|
||||
_can_automate_list.insert (what);
|
||||
}
|
||||
|
||||
void
|
||||
Automatable::mark_automation_visible (ParamID what, bool yn)
|
||||
Automatable::mark_automation_visible (Parameter what, bool yn)
|
||||
{
|
||||
if (yn) {
|
||||
_visible_controls.insert (what);
|
||||
} else {
|
||||
set<ParamID>::iterator i;
|
||||
set<Parameter>::iterator i;
|
||||
|
||||
if ((i = _visible_controls.find (what)) != _visible_controls.end()) {
|
||||
_visible_controls.erase (i);
|
||||
|
@ -265,7 +265,7 @@ Automatable::find_next_event (nframes_t now, nframes_t end, ControlEvent& next_e
|
|||
* pass that type and it will be used for the untyped AutomationList found.
|
||||
*/
|
||||
int
|
||||
Automatable::set_automation_state (const XMLNode& node, ParamID legacy_param)
|
||||
Automatable::set_automation_state (const XMLNode& node, Parameter legacy_param)
|
||||
{
|
||||
Glib::Mutex::Lock lm (_automation_lock);
|
||||
|
||||
|
@ -287,7 +287,7 @@ Automatable::set_automation_state (const XMLNode& node, ParamID legacy_param)
|
|||
|
||||
const XMLProperty* id_prop = (*niter)->property("automation-id");
|
||||
|
||||
ParamID param = (id_prop ? ParamID(id_prop->value()) : legacy_param);
|
||||
Parameter param = (id_prop ? Parameter(id_prop->value()) : legacy_param);
|
||||
|
||||
boost::shared_ptr<AutomationList> al (new AutomationList(**niter, param));
|
||||
|
||||
|
@ -340,7 +340,7 @@ Automatable::clear_automation ()
|
|||
}
|
||||
|
||||
void
|
||||
Automatable::set_parameter_automation_state (ParamID param, AutoState s)
|
||||
Automatable::set_parameter_automation_state (Parameter param, AutoState s)
|
||||
{
|
||||
Glib::Mutex::Lock lm (_automation_lock);
|
||||
|
||||
|
@ -353,7 +353,7 @@ Automatable::set_parameter_automation_state (ParamID param, AutoState s)
|
|||
}
|
||||
|
||||
AutoState
|
||||
Automatable::get_parameter_automation_state (ParamID param, bool lock)
|
||||
Automatable::get_parameter_automation_state (Parameter param, bool lock)
|
||||
{
|
||||
AutoState result = Off;
|
||||
|
||||
|
@ -372,7 +372,7 @@ Automatable::get_parameter_automation_state (ParamID param, bool lock)
|
|||
}
|
||||
|
||||
void
|
||||
Automatable::set_parameter_automation_style (ParamID param, AutoStyle s)
|
||||
Automatable::set_parameter_automation_style (Parameter param, AutoStyle s)
|
||||
{
|
||||
Glib::Mutex::Lock lm (_automation_lock);
|
||||
|
||||
|
@ -385,7 +385,7 @@ Automatable::set_parameter_automation_style (ParamID param, AutoStyle s)
|
|||
}
|
||||
|
||||
AutoStyle
|
||||
Automatable::get_parameter_automation_style (ParamID param)
|
||||
Automatable::get_parameter_automation_style (Parameter param)
|
||||
{
|
||||
Glib::Mutex::Lock lm (_automation_lock);
|
||||
|
||||
|
@ -401,11 +401,11 @@ Automatable::get_parameter_automation_style (ParamID param)
|
|||
void
|
||||
Automatable::protect_automation ()
|
||||
{
|
||||
set<ParamID> automated_params;
|
||||
set<Parameter> automated_params;
|
||||
|
||||
what_has_automation (automated_params);
|
||||
|
||||
for (set<ParamID>::iterator i = automated_params.begin(); i != automated_params.end(); ++i) {
|
||||
for (set<Parameter>::iterator i = automated_params.begin(); i != automated_params.end(); ++i) {
|
||||
|
||||
boost::shared_ptr<AutomationControl> c = control(*i);
|
||||
|
||||
|
|
|
@ -29,12 +29,12 @@ using namespace PBD;
|
|||
|
||||
|
||||
AutomationControl::AutomationControl(Session& session, boost::shared_ptr<AutomationList> list, string name)
|
||||
: Controllable((name == "unnamed controllable") ? list->param_id().to_string() : name)
|
||||
: Controllable((name == "unnamed controllable") ? list->parameter().to_string() : name)
|
||||
, _session(session)
|
||||
, _list(list)
|
||||
, _user_value(list->default_value())
|
||||
{
|
||||
cerr << "Created AutomationControl " << name << "(" << list->param_id().to_string() << ")" << endl;
|
||||
cerr << "Created AutomationControl " << name << "(" << list->parameter().to_string() << ")" << endl;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#include <sstream>
|
||||
#include <algorithm>
|
||||
#include <sigc++/bind.h>
|
||||
#include <ardour/param_id.h>
|
||||
#include <ardour/parameter.h>
|
||||
#include <ardour/automation_event.h>
|
||||
#include <ardour/curve.h>
|
||||
#include <pbd/stacktrace.h>
|
||||
|
@ -54,7 +54,7 @@ static void dumpit (const AutomationList& al, string prefix = "")
|
|||
}
|
||||
#endif
|
||||
|
||||
AutomationList::AutomationList (ParamID id, double min_val, double max_val, double default_val)
|
||||
AutomationList::AutomationList (Parameter id, double min_val, double max_val, double default_val)
|
||||
: _param_id(id)
|
||||
, _curve(new Curve(*this))
|
||||
{
|
||||
|
@ -143,7 +143,7 @@ AutomationList::AutomationList (const AutomationList& other, double start, doubl
|
|||
/** \a id is used for legacy sessions where the type is not present
|
||||
* in or below the <AutomationList> node. It is used if \a id is non-null.
|
||||
*/
|
||||
AutomationList::AutomationList (const XMLNode& node, ParamID id)
|
||||
AutomationList::AutomationList (const XMLNode& node, Parameter id)
|
||||
: _curve(new Curve(*this))
|
||||
{
|
||||
_frozen = 0;
|
||||
|
@ -1368,7 +1368,7 @@ AutomationList::set_state (const XMLNode& node)
|
|||
}
|
||||
|
||||
if ((prop = node.property (X_("automation-id"))) != 0){
|
||||
_param_id = ParamID(prop->value());
|
||||
_param_id = Parameter(prop->value());
|
||||
} else {
|
||||
warning << "Legacy session: automation list has no automation-id property.";
|
||||
}
|
||||
|
|
|
@ -78,8 +78,8 @@ Crossfade::Crossfade (boost::shared_ptr<AudioRegion> in, boost::shared_ptr<Audio
|
|||
nframes_t position,
|
||||
AnchorPoint ap)
|
||||
: AudioRegion (position, length, "foobar"),
|
||||
_fade_in (ParamID(FadeInAutomation), 0.0, 2.0, 1.0), // linear (gain coefficient) => -inf..+6dB
|
||||
_fade_out (ParamID(FadeOutAutomation), 0.0, 2.0, 1.0) // linear (gain coefficient) => -inf..+6dB
|
||||
_fade_in (Parameter(FadeInAutomation), 0.0, 2.0, 1.0), // linear (gain coefficient) => -inf..+6dB
|
||||
_fade_out (Parameter(FadeOutAutomation), 0.0, 2.0, 1.0) // linear (gain coefficient) => -inf..+6dB
|
||||
|
||||
{
|
||||
_in = in;
|
||||
|
@ -96,8 +96,8 @@ Crossfade::Crossfade (boost::shared_ptr<AudioRegion> in, boost::shared_ptr<Audio
|
|||
|
||||
Crossfade::Crossfade (boost::shared_ptr<AudioRegion> a, boost::shared_ptr<AudioRegion> b, CrossfadeModel model, bool act)
|
||||
: AudioRegion (0, 0, "foobar"),
|
||||
_fade_in (ParamID(FadeInAutomation), 0.0, 2.0, 1.0), // linear (gain coefficient) => -inf..+6dB
|
||||
_fade_out (ParamID(FadeOutAutomation), 0.0, 2.0, 1.0) // linear (gain coefficient) => -inf..+6dB
|
||||
_fade_in (Parameter(FadeInAutomation), 0.0, 2.0, 1.0), // linear (gain coefficient) => -inf..+6dB
|
||||
_fade_out (Parameter(FadeOutAutomation), 0.0, 2.0, 1.0) // linear (gain coefficient) => -inf..+6dB
|
||||
{
|
||||
_in_update = false;
|
||||
_fixed = false;
|
||||
|
@ -115,8 +115,8 @@ Crossfade::Crossfade (boost::shared_ptr<AudioRegion> a, boost::shared_ptr<AudioR
|
|||
|
||||
Crossfade::Crossfade (const Playlist& playlist, XMLNode& node)
|
||||
: AudioRegion (0, 0, "foobar"),
|
||||
_fade_in (ParamID(FadeInAutomation), 0.0, 2.0, 1.0), // linear (gain coefficient) => -inf..+6dB
|
||||
_fade_out (ParamID(FadeOutAutomation), 0.0, 2.0, 1.0) // linear (gain coefficient) => -inf..+6dB
|
||||
_fade_in (Parameter(FadeInAutomation), 0.0, 2.0, 1.0), // linear (gain coefficient) => -inf..+6dB
|
||||
_fade_out (Parameter(FadeOutAutomation), 0.0, 2.0, 1.0) // linear (gain coefficient) => -inf..+6dB
|
||||
|
||||
{
|
||||
boost::shared_ptr<Region> r;
|
||||
|
|
|
@ -64,7 +64,7 @@ Curve::Curve (const Curve& other, double start, double end)
|
|||
/** \a id is used for legacy sessions where the type is not present
|
||||
* in or below the <AutomationList> node. It is used if \a id is non-null.
|
||||
*/
|
||||
Curve::Curve (const XMLNode& node, ParamID id)
|
||||
Curve::Curve (const XMLNode& node, Parameter id)
|
||||
: AutomationList (node, id)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
using namespace ARDOUR;
|
||||
|
||||
Gain::Gain ()
|
||||
: AutomationList (ParamID(GainAutomation), 0.0, 2.0, 1.0f) /* XXX yuck; clamps gain to -inf .. +6db */
|
||||
: AutomationList (Parameter(GainAutomation), 0.0, 2.0, 1.0f) /* XXX yuck; clamps gain to -inf .. +6db */
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -134,7 +134,7 @@ IO::IO (Session& s, const string& name,
|
|||
deferred_state = 0;
|
||||
|
||||
boost::shared_ptr<AutomationList> gl(
|
||||
new AutomationList(ParamID(GainAutomation), 0.0, 2.0, 1.0));
|
||||
new AutomationList(Parameter(GainAutomation), 0.0, 2.0, 1.0));
|
||||
|
||||
_gain_control = boost::shared_ptr<GainControl>(
|
||||
new GainControl(X_("gaincontrol"), *this, gl));
|
||||
|
@ -174,7 +174,7 @@ IO::IO (Session& s, const XMLNode& node, DataType dt)
|
|||
apply_gain_automation = false;
|
||||
|
||||
boost::shared_ptr<AutomationList> gl(
|
||||
new AutomationList(ParamID(GainAutomation), 0.0, 2.0, 1.0));
|
||||
new AutomationList(Parameter(GainAutomation), 0.0, 2.0, 1.0));
|
||||
|
||||
_gain_control = boost::shared_ptr<GainControl>(
|
||||
new GainControl(X_("gaincontrol"), *this, gl));
|
||||
|
@ -1360,7 +1360,7 @@ IO::set_state (const XMLNode& node)
|
|||
|
||||
if ((*iter)->name() == X_("Automation")) {
|
||||
|
||||
set_automation_state (*(*iter), ParamID(GainAutomation));
|
||||
set_automation_state (*(*iter), Parameter(GainAutomation));
|
||||
}
|
||||
|
||||
if ((*iter)->name() == X_("controllable")) {
|
||||
|
@ -2193,7 +2193,7 @@ IO::clear_automation ()
|
|||
}
|
||||
|
||||
void
|
||||
IO::set_parameter_automation_state (ParamID param, AutoState state)
|
||||
IO::set_parameter_automation_state (Parameter param, AutoState state)
|
||||
{
|
||||
// XXX: would be nice to get rid of this special hack
|
||||
|
||||
|
|
|
@ -317,7 +317,7 @@ LadspaPlugin::set_parameter (uint32_t which, float val)
|
|||
if (which < descriptor->PortCount) {
|
||||
shadow_data[which] = (LADSPA_Data) val;
|
||||
#if 0
|
||||
ParameterChanged (ParamID(PluginAutomation, which), val); /* EMIT SIGNAL */
|
||||
ParameterChanged (Parameter(PluginAutomation, which), val); /* EMIT SIGNAL */
|
||||
|
||||
if (which < parameter_count() && controls[which]) {
|
||||
controls[which]->Changed ();
|
||||
|
@ -492,7 +492,7 @@ LadspaPlugin::get_parameter_descriptor (uint32_t which, ParameterDescriptor& des
|
|||
}
|
||||
|
||||
string
|
||||
LadspaPlugin::describe_parameter (ParamID which)
|
||||
LadspaPlugin::describe_parameter (Parameter which)
|
||||
{
|
||||
if (which.type() == PluginAutomation && which.id() < parameter_count()) {
|
||||
return port_names()[which.id()];
|
||||
|
@ -515,16 +515,16 @@ LadspaPlugin::signal_latency () const
|
|||
}
|
||||
}
|
||||
|
||||
set<ParamID>
|
||||
set<Parameter>
|
||||
LadspaPlugin::automatable () const
|
||||
{
|
||||
set<ParamID> ret;
|
||||
set<Parameter> ret;
|
||||
|
||||
for (uint32_t i = 0; i < parameter_count(); ++i){
|
||||
if (LADSPA_IS_PORT_INPUT(port_descriptor (i)) &&
|
||||
LADSPA_IS_PORT_CONTROL(port_descriptor (i))){
|
||||
|
||||
ret.insert (ret.end(), ParamID(PluginAutomation, i));
|
||||
ret.insert (ret.end(), Parameter(PluginAutomation, i));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -643,7 +643,7 @@ MidiTrack::MidiControl::set_value(float val)
|
|||
boost::shared_ptr<MidiTrack> midi_track = _route.lock();
|
||||
|
||||
if (midi_track && !_list->automation_playback()) {
|
||||
Byte ev[3] = { MIDI_CMD_CONTROL, _list->param_id().id(), (int)val };
|
||||
Byte ev[3] = { MIDI_CMD_CONTROL, _list->parameter().id(), (int)val };
|
||||
midi_track->write_immediate_event(3, ev);
|
||||
}
|
||||
|
||||
|
|
|
@ -69,7 +69,7 @@ static double direct_pan_to_control (pan_t val) {
|
|||
return val;
|
||||
}
|
||||
|
||||
StreamPanner::StreamPanner (Panner& p, ParamID param)
|
||||
StreamPanner::StreamPanner (Panner& p, Parameter param)
|
||||
: parent (p)
|
||||
, _control (new PanControllable(p.session(), X_("panner"), *this, param))
|
||||
{
|
||||
|
@ -191,7 +191,7 @@ StreamPanner::add_state (XMLNode& node)
|
|||
|
||||
/*---------------------------------------------------------------------- */
|
||||
|
||||
BaseStereoPanner::BaseStereoPanner (Panner& p, ParamID param)
|
||||
BaseStereoPanner::BaseStereoPanner (Panner& p, Parameter param)
|
||||
: StreamPanner (p, param)
|
||||
{
|
||||
}
|
||||
|
@ -348,7 +348,7 @@ BaseStereoPanner::distribute (AudioBuffer& srcbuf, BufferSet& obufs, gain_t gain
|
|||
|
||||
/*---------------------------------------------------------------------- */
|
||||
|
||||
EqualPowerStereoPanner::EqualPowerStereoPanner (Panner& p, ParamID param)
|
||||
EqualPowerStereoPanner::EqualPowerStereoPanner (Panner& p, Parameter param)
|
||||
: BaseStereoPanner (p, param)
|
||||
{
|
||||
update ();
|
||||
|
@ -463,7 +463,7 @@ EqualPowerStereoPanner::distribute_automated (AudioBuffer& srcbuf, BufferSet& ob
|
|||
}
|
||||
|
||||
StreamPanner*
|
||||
EqualPowerStereoPanner::factory (Panner& parent, ParamID param)
|
||||
EqualPowerStereoPanner::factory (Panner& parent, Parameter param)
|
||||
{
|
||||
return new EqualPowerStereoPanner (parent, param);
|
||||
}
|
||||
|
@ -532,7 +532,7 @@ EqualPowerStereoPanner::set_state (const XMLNode& node)
|
|||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
Multi2dPanner::Multi2dPanner (Panner& p, ParamID param)
|
||||
Multi2dPanner::Multi2dPanner (Panner& p, Parameter param)
|
||||
: StreamPanner (p, param)
|
||||
{
|
||||
update ();
|
||||
|
@ -650,7 +650,7 @@ Multi2dPanner::distribute_automated (AudioBuffer& src, BufferSet& obufs,
|
|||
}
|
||||
|
||||
StreamPanner*
|
||||
Multi2dPanner::factory (Panner& p, ParamID param)
|
||||
Multi2dPanner::factory (Panner& p, Parameter param)
|
||||
{
|
||||
return new Multi2dPanner (p, param);
|
||||
}
|
||||
|
@ -800,7 +800,7 @@ Panner::reset (uint32_t nouts, uint32_t npans)
|
|||
outputs.push_back (Output (1.0, 0));
|
||||
|
||||
for (n = 0; n < npans; ++n) {
|
||||
push_back (new EqualPowerStereoPanner (*this, ParamID(PanAutomation, n)));
|
||||
push_back (new EqualPowerStereoPanner (*this, Parameter(PanAutomation, n)));
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -810,7 +810,7 @@ Panner::reset (uint32_t nouts, uint32_t npans)
|
|||
outputs.push_back (Output (1.0, 1.0));
|
||||
|
||||
for (n = 0; n < npans; ++n) {
|
||||
push_back (new Multi2dPanner (*this, ParamID(PanAutomation, n)));
|
||||
push_back (new Multi2dPanner (*this, Parameter(PanAutomation, n)));
|
||||
}
|
||||
|
||||
break;
|
||||
|
@ -822,7 +822,7 @@ Panner::reset (uint32_t nouts, uint32_t npans)
|
|||
outputs.push_back (Output (0, 1.0));
|
||||
|
||||
for (n = 0; n < npans; ++n) {
|
||||
push_back (new Multi2dPanner (*this, ParamID(PanAutomation, n)));
|
||||
push_back (new Multi2dPanner (*this, Parameter(PanAutomation, n)));
|
||||
}
|
||||
|
||||
break;
|
||||
|
@ -835,7 +835,7 @@ Panner::reset (uint32_t nouts, uint32_t npans)
|
|||
outputs.push_back (Output (0.5, 0.75));
|
||||
|
||||
for (n = 0; n < npans; ++n) {
|
||||
push_back (new Multi2dPanner (*this, ParamID(PanAutomation, n)));
|
||||
push_back (new Multi2dPanner (*this, Parameter(PanAutomation, n)));
|
||||
}
|
||||
|
||||
break;
|
||||
|
@ -847,7 +847,7 @@ Panner::reset (uint32_t nouts, uint32_t npans)
|
|||
}
|
||||
|
||||
for (n = 0; n < npans; ++n) {
|
||||
push_back (new Multi2dPanner (*this, ParamID(PanAutomation, n)));
|
||||
push_back (new Multi2dPanner (*this, Parameter(PanAutomation, n)));
|
||||
}
|
||||
|
||||
break;
|
||||
|
@ -981,7 +981,7 @@ Panner::clear_automation ()
|
|||
struct PanPlugins {
|
||||
string name;
|
||||
uint32_t nouts;
|
||||
StreamPanner* (*factory)(Panner&, ParamID);
|
||||
StreamPanner* (*factory)(Panner&, Parameter);
|
||||
};
|
||||
|
||||
PanPlugins pan_plugins[] = {
|
||||
|
@ -1083,7 +1083,7 @@ Panner::set_state (const XMLNode& node)
|
|||
assumption, but its still an assumption.
|
||||
*/
|
||||
|
||||
sp = pan_plugins[i].factory (*this, ParamID(PanAutomation, 0));
|
||||
sp = pan_plugins[i].factory (*this, Parameter(PanAutomation, 0));
|
||||
|
||||
if (sp->set_state (**niter) == 0) {
|
||||
push_back (sp);
|
||||
|
|
|
@ -143,7 +143,7 @@ PluginInsert::~PluginInsert ()
|
|||
}
|
||||
|
||||
void
|
||||
PluginInsert::auto_state_changed (ParamID which)
|
||||
PluginInsert::auto_state_changed (Parameter which)
|
||||
{
|
||||
if (which.type() != PluginAutomation)
|
||||
return;
|
||||
|
@ -198,11 +198,11 @@ PluginInsert::is_generator() const
|
|||
void
|
||||
PluginInsert::set_automatable ()
|
||||
{
|
||||
set<ParamID> a = _plugins.front()->automatable ();
|
||||
set<Parameter> a = _plugins.front()->automatable ();
|
||||
|
||||
Plugin::ParameterDescriptor desc;
|
||||
|
||||
for (set<ParamID>::iterator i = a.begin(); i != a.end(); ++i) {
|
||||
for (set<Parameter>::iterator i = a.begin(); i != a.end(); ++i) {
|
||||
if (i->type() == PluginAutomation) {
|
||||
can_automate (*i);
|
||||
_plugins.front()->get_parameter_descriptor(i->id(), desc);
|
||||
|
@ -220,7 +220,7 @@ PluginInsert::set_automatable ()
|
|||
}
|
||||
|
||||
void
|
||||
PluginInsert::parameter_changed (ParamID which, float val)
|
||||
PluginInsert::parameter_changed (Parameter which, float val)
|
||||
{
|
||||
if (which.type() != PluginAutomation)
|
||||
return;
|
||||
|
@ -279,7 +279,7 @@ PluginInsert::connect_and_run (BufferSet& bufs, nframes_t nframes, nframes_t off
|
|||
|
||||
boost::shared_ptr<AutomationControl> c = li->second;
|
||||
|
||||
if (c->list()->param_id().type() == PluginAutomation && c->list()->automation_playback()) {
|
||||
if (c->list()->parameter().type() == PluginAutomation && c->list()->automation_playback()) {
|
||||
bool valid;
|
||||
|
||||
const float val = c->list()->rt_safe_eval (now, valid);
|
||||
|
@ -343,7 +343,7 @@ PluginInsert::run (BufferSet& bufs, nframes_t start_frame, nframes_t end_frame,
|
|||
}
|
||||
|
||||
void
|
||||
PluginInsert::set_parameter (ParamID param, float val)
|
||||
PluginInsert::set_parameter (Parameter param, float val)
|
||||
{
|
||||
if (param.type() != PluginAutomation)
|
||||
return;
|
||||
|
@ -361,7 +361,7 @@ PluginInsert::set_parameter (ParamID param, float val)
|
|||
}
|
||||
|
||||
float
|
||||
PluginInsert::get_parameter (ParamID param)
|
||||
PluginInsert::get_parameter (Parameter param)
|
||||
{
|
||||
if (param.type() != PluginAutomation)
|
||||
return 0.0;
|
||||
|
@ -415,7 +415,7 @@ PluginInsert::automation_run (BufferSet& bufs, nframes_t nframes, nframes_t offs
|
|||
}
|
||||
|
||||
float
|
||||
PluginInsert::default_parameter_value (ParamID param)
|
||||
PluginInsert::default_parameter_value (Parameter param)
|
||||
{
|
||||
if (param.type() != PluginAutomation)
|
||||
return 1.0;
|
||||
|
@ -622,9 +622,9 @@ PluginInsert::state (bool full)
|
|||
|
||||
/* add port automation state */
|
||||
XMLNode *autonode = new XMLNode(port_automation_node_name);
|
||||
set<ParamID> automatable = _plugins[0]->automatable();
|
||||
set<Parameter> automatable = _plugins[0]->automatable();
|
||||
|
||||
for (set<ParamID>::iterator x = automatable.begin(); x != automatable.end(); ++x) {
|
||||
for (set<Parameter>::iterator x = automatable.begin(); x != automatable.end(); ++x) {
|
||||
|
||||
/*XMLNode* child = new XMLNode("port");
|
||||
snprintf(buf, sizeof(buf), "%" PRIu32, *x);
|
||||
|
@ -764,7 +764,7 @@ PluginInsert::set_state(const XMLNode& node)
|
|||
}
|
||||
|
||||
if (!child->children().empty()) {
|
||||
control (ParamID(PluginAutomation, port_id), true)->list()->set_state (*child->children().front());
|
||||
control (Parameter(PluginAutomation, port_id), true)->list()->set_state (*child->children().front());
|
||||
} else {
|
||||
if ((cprop = child->property("auto")) != 0) {
|
||||
|
||||
|
@ -772,13 +772,13 @@ PluginInsert::set_state(const XMLNode& node)
|
|||
|
||||
int x;
|
||||
sscanf (cprop->value().c_str(), "0x%x", &x);
|
||||
control (ParamID(PluginAutomation, port_id), true)->list()->set_automation_state (AutoState (x));
|
||||
control (Parameter(PluginAutomation, port_id), true)->list()->set_automation_state (AutoState (x));
|
||||
|
||||
} else {
|
||||
|
||||
/* missing */
|
||||
|
||||
control (ParamID(PluginAutomation, port_id), true)->list()->set_automation_state (Off);
|
||||
control (Parameter(PluginAutomation, port_id), true)->list()->set_automation_state (Off);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -800,7 +800,7 @@ PluginInsert::set_state(const XMLNode& node)
|
|||
}
|
||||
|
||||
string
|
||||
PluginInsert::describe_parameter (ParamID param)
|
||||
PluginInsert::describe_parameter (Parameter param)
|
||||
{
|
||||
if (param.type() != PluginAutomation)
|
||||
return Automatable::describe_parameter(param);
|
||||
|
@ -848,12 +848,12 @@ PluginInsert::type ()
|
|||
}
|
||||
|
||||
PluginInsert::PluginControl::PluginControl (PluginInsert& p, boost::shared_ptr<AutomationList> list)
|
||||
: AutomationControl (p.session(), list, p.describe_parameter(list->param_id()))
|
||||
: AutomationControl (p.session(), list, p.describe_parameter(list->parameter()))
|
||||
, _plugin (p)
|
||||
, _list (list)
|
||||
{
|
||||
Plugin::ParameterDescriptor desc;
|
||||
p.plugin(0)->get_parameter_descriptor (list->param_id().id(), desc);
|
||||
p.plugin(0)->get_parameter_descriptor (list->parameter().id(), desc);
|
||||
_logarithmic = desc.logarithmic;
|
||||
_toggled = desc.toggled;
|
||||
}
|
||||
|
@ -889,7 +889,7 @@ PluginInsert::PluginControl::set_value (float val)
|
|||
|
||||
for (vector<boost::shared_ptr<Plugin> >::iterator i = _plugin._plugins.begin();
|
||||
i != _plugin._plugins.end(); ++i) {
|
||||
(*i)->set_parameter (_list->param_id().id(), val);
|
||||
(*i)->set_parameter (_list->parameter().id(), val);
|
||||
}
|
||||
|
||||
AutomationControl::set_value(val);
|
||||
|
@ -900,7 +900,7 @@ PluginInsert::PluginControl::get_value (void) const
|
|||
{
|
||||
/* FIXME: probably should be taking out some lock here.. */
|
||||
|
||||
float val = _plugin.get_parameter (_list->param_id());
|
||||
float val = _plugin.get_parameter (_list->parameter());
|
||||
|
||||
return val;
|
||||
|
||||
|
|
|
@ -157,7 +157,7 @@ Processor::state (bool full_state)
|
|||
|
||||
XMLNode& automation = Automatable::get_automation_state();
|
||||
|
||||
for (set<ParamID>::iterator x = _visible_controls.begin(); x != _visible_controls.end(); ++x) {
|
||||
for (set<Parameter>::iterator x = _visible_controls.begin(); x != _visible_controls.end(); ++x) {
|
||||
if (x != _visible_controls.begin()) {
|
||||
sstr << ' ';
|
||||
}
|
||||
|
@ -195,7 +195,7 @@ Processor::set_state (const XMLNode& node)
|
|||
if ((prop = (*niter)->property ("path")) != 0) {
|
||||
old_set_automation_state (*(*niter));
|
||||
} else {
|
||||
set_automation_state (*(*niter), ParamID(PluginAutomation));
|
||||
set_automation_state (*(*niter), Parameter(PluginAutomation));
|
||||
}
|
||||
|
||||
if ((prop = (*niter)->property ("visible")) != 0) {
|
||||
|
@ -211,7 +211,7 @@ Processor::set_state (const XMLNode& node)
|
|||
break;
|
||||
}
|
||||
// FIXME: other automation types?
|
||||
mark_automation_visible (ParamID(PluginAutomation, what), true);
|
||||
mark_automation_visible (Parameter(PluginAutomation, what), true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -103,7 +103,7 @@ Send::set_state(const XMLNode& node)
|
|||
if ((*niter)->name() == "IOProcessor") {
|
||||
insert_node = *niter;
|
||||
} else if ((*niter)->name() == X_("Automation")) {
|
||||
_io->set_automation_state (*(*niter), ParamID(GainAutomation));
|
||||
_io->set_automation_state (*(*niter), Parameter(GainAutomation));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user