triggerbox: use stretching() internally but change property name to stretchable (libardour)
This commit is contained in:
parent
4b26ce3f5f
commit
382f73fa51
@ -260,7 +260,7 @@ class LIBARDOUR_API Trigger : public PBD::Stateful {
|
||||
PBD::Property<float> _midi_velocity_effect;
|
||||
void* _ui;
|
||||
samplepos_t expected_end_sample;
|
||||
PBD::Property<bool> _stretching;
|
||||
PBD::Property<bool> _stretchable;
|
||||
bool _explicitly_stopped;
|
||||
|
||||
void set_region_internal (boost::shared_ptr<Region>);
|
||||
@ -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<float> velocity_effect;
|
||||
LIBARDOUR_API extern PBD::PropertyDescriptor<gain_t> gain;
|
||||
LIBARDOUR_API extern PBD::PropertyDescriptor<Trigger*> currently_playing;
|
||||
LIBARDOUR_API extern PBD::PropertyDescriptor<bool> stretching;
|
||||
LIBARDOUR_API extern PBD::PropertyDescriptor<bool> stretchable;
|
||||
}
|
||||
|
||||
|
||||
|
@ -56,7 +56,7 @@ namespace ARDOUR {
|
||||
PBD::PropertyDescriptor<int> follow_action_probability;
|
||||
PBD::PropertyDescriptor<float> velocity_effect;
|
||||
PBD::PropertyDescriptor<gain_t> gain;
|
||||
PBD::PropertyDescriptor<bool> stretching;
|
||||
PBD::PropertyDescriptor<bool> 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;
|
||||
|
Loading…
Reference in New Issue
Block a user