Triggerbox: save and recall the follow_count property (lib part)

This commit is contained in:
Ben Loftis 2021-12-14 09:32:06 -06:00
parent a07750faa1
commit 977f6aec94
2 changed files with 5 additions and 2 deletions

View File

@ -245,7 +245,7 @@ class LIBARDOUR_API Trigger : public PBD::Stateful {
FollowAction _follow_action[2];
int _follow_action_probability;
uint32_t _loop_cnt; /* how many times in a row has this played */
uint32_t _follow_count;
PBD::Property<int> _follow_count;
Temporal::BBT_Offset _quantization;
PBD::Property<bool> _legato;
std::string _name;

View File

@ -70,7 +70,7 @@ Trigger::Trigger (uint64_t n, TriggerBox& b)
, _follow_action { NextTrigger, Stop }
, _follow_action_probability (100)
, _loop_cnt (0)
, _follow_count (1)
, _follow_count (Properties::follow_count, 1)
, _quantization (Temporal::BBT_Offset (0, 1, 0))
, _legato (Properties::legato, false)
, _barcnt (0.)
@ -83,6 +83,7 @@ Trigger::Trigger (uint64_t n, TriggerBox& b)
{
add_property (_legato);
add_property (_use_follow);
add_property (_follow_count);
}
void
@ -1492,6 +1493,8 @@ Trigger::make_property_quarks ()
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for running = %1\n", Properties::running.property_id));
Properties::passthru.property_id = g_quark_from_static_string (X_("passthru"));
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for passthru = %1\n", Properties::passthru.property_id));
Properties::follow_count.property_id = g_quark_from_static_string (X_("follow-count"));
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for follow_count = %1\n", Properties::follow_count.property_id));
Properties::legato.property_id = g_quark_from_static_string (X_("legato"));
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for legato = %1\n", Properties::legato.property_id));
Properties::use_follow.property_id = g_quark_from_static_string (X_("use-follow"));