13
0

triggerbox: add 3 additional property descriptors for Triggers

This commit is contained in:
Paul Davis 2021-12-06 08:47:29 -07:00
parent c7b70c6318
commit 86f239f185
2 changed files with 9 additions and 0 deletions

View File

@ -587,6 +587,9 @@ namespace Properties {
LIBARDOUR_API extern PBD::PropertyDescriptor<Trigger::LaunchStyle> launch_style;
LIBARDOUR_API extern PBD::PropertyDescriptor<Trigger::FollowAction> follow_action0;
LIBARDOUR_API extern PBD::PropertyDescriptor<Trigger::FollowAction> follow_action1;
LIBARDOUR_API extern PBD::PropertyDescriptor<int> follow_count;
LIBARDOUR_API extern PBD::PropertyDescriptor<float> velocity_effect;
LIBARDOUR_API extern PBD::PropertyDescriptor<gain_t> gain;
}

View File

@ -50,6 +50,9 @@ namespace ARDOUR {
PBD::PropertyDescriptor<Trigger::LaunchStyle> launch_style;
PBD::PropertyDescriptor<Trigger::FollowAction> follow_action0;
PBD::PropertyDescriptor<Trigger::FollowAction> follow_action1;
PBD::PropertyDescriptor<int> follow_count;
PBD::PropertyDescriptor<float> velocity_effect;
PBD::PropertyDescriptor<gain_t> gain;
}
}
@ -122,18 +125,21 @@ void
Trigger::set_gain (gain_t g)
{
_pending_gain = g;
PropertyChanged (Properties::gain);
}
void
Trigger::set_midi_velocity_effect (float mve)
{
_midi_velocity_effect = std::min (1.f, std::max (0.f, mve));
PropertyChanged (Properties::velocity_effect);
}
void
Trigger::set_follow_count (uint32_t n)
{
_follow_count = n;
PropertyChanged (Properties::follow_count);
}
void