diff --git a/libs/ardour/ardour/triggerbox.h b/libs/ardour/ardour/triggerbox.h index 8dc3197c72..2c2940bc15 100644 --- a/libs/ardour/ardour/triggerbox.h +++ b/libs/ardour/ardour/triggerbox.h @@ -260,7 +260,7 @@ class LIBARDOUR_API Trigger : public PBD::Stateful { PBD::Property _midi_velocity_effect; void* _ui; samplepos_t expected_end_sample; - PBD::Property _stretching; + PBD::Property _stretchable; bool _explicitly_stopped; void set_region_internal (boost::shared_ptr); @@ -300,7 +300,9 @@ class LIBARDOUR_API AudioTrigger : public Trigger { SegmentDescriptor get_segment_descriptor () const; void set_expected_end_sample (Temporal::TempoMap::SharedPtr const &, Temporal::BBT_Time const &); - void set_stretching (bool yn); + void set_stretchable (bool yn); + bool stretchable () const { return _stretchable; } + bool stretching () const; protected: @@ -614,7 +616,7 @@ namespace Properties { LIBARDOUR_API extern PBD::PropertyDescriptor velocity_effect; LIBARDOUR_API extern PBD::PropertyDescriptor gain; LIBARDOUR_API extern PBD::PropertyDescriptor currently_playing; - LIBARDOUR_API extern PBD::PropertyDescriptor stretching; + LIBARDOUR_API extern PBD::PropertyDescriptor stretchable; } diff --git a/libs/ardour/triggerbox.cc b/libs/ardour/triggerbox.cc index 1f8d75c01a..6b99874784 100644 --- a/libs/ardour/triggerbox.cc +++ b/libs/ardour/triggerbox.cc @@ -56,7 +56,7 @@ namespace ARDOUR { PBD::PropertyDescriptor follow_action_probability; PBD::PropertyDescriptor velocity_effect; PBD::PropertyDescriptor gain; - PBD::PropertyDescriptor stretching; + PBD::PropertyDescriptor stretchable; } } @@ -81,7 +81,7 @@ Trigger::Trigger (uint64_t n, TriggerBox& b) , _midi_velocity_effect (Properties::velocity_effect, 0.) , _ui (0) , expected_end_sample (0) - , _stretching (Properties::stretching, true) + , _stretchable (Properties::stretchable, true) , _explicitly_stopped (false) { add_property (_legato); @@ -89,7 +89,7 @@ Trigger::Trigger (uint64_t n, TriggerBox& b) add_property (_follow_count); add_property (_midi_velocity_effect); add_property (_follow_action_probability); - add_property (_stretching); + add_property (_stretchable); } void @@ -563,7 +563,7 @@ AudioTrigger::~AudioTrigger () bool AudioTrigger::stretching() const { - return (_apparent_tempo != .0) && _stretching; + return (_apparent_tempo != .0) && _stretchable; } void @@ -648,6 +648,13 @@ AudioTrigger::set_state (const XMLNode& node, int version) return 0; } +void +AudioTrigger::set_stretchable (bool s) +{ + _stretchable = s; + PropertyChanged (ARDOUR::Properties::stretchable); +} + void AudioTrigger::set_start (timepos_t const & s) { @@ -1579,8 +1586,8 @@ Trigger::make_property_quarks () DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for follow-action-0 = %1\n", Properties::follow_action0.property_id)); Properties::follow_action1.property_id = g_quark_from_static_string (X_("follow-action-1")); DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for follow-action-1 = %1\n", Properties::follow_action1.property_id)); - Properties::stretching.property_id = g_quark_from_static_string (X_("stretching")); - DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for stretching = %1\n", Properties::stretching.property_id)); + Properties::stretchable.property_id = g_quark_from_static_string (X_("stretchable")); + DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for stretchable = %1\n", Properties::stretchable.property_id)); } const int32_t TriggerBox::default_triggers_per_box = 8;