13
0

triggerbox: revert gain() as a queued UISTate value

It's impractical/impossible to set the gain if you have to wait for a retrigger
This commit is contained in:
Ben Loftis 2022-02-18 11:15:43 -06:00
parent c09ffd4fcd
commit fbbe74a530
2 changed files with 15 additions and 2 deletions

View File

@ -219,7 +219,6 @@ class LIBARDOUR_API Trigger : public PBD::Stateful {
TRIGGERBOX_PROPERTY_DECL_CONST_REF (follow_length, Temporal::BBT_Offset);
TRIGGERBOX_PROPERTY_DECL (use_follow_length, bool);
TRIGGERBOX_PROPERTY_DECL (legato, bool);
TRIGGERBOX_PROPERTY_DECL (gain, gain_t);
TRIGGERBOX_PROPERTY_DECL (velocity_effect, float);
TRIGGERBOX_PROPERTY_DECL (stretchable, bool);
TRIGGERBOX_PROPERTY_DECL (cue_isolated, bool);
@ -346,6 +345,9 @@ class LIBARDOUR_API Trigger : public PBD::Stateful {
Temporal::Meter meter() const { return _meter; }
gain_t gain() {return _gain;}
void set_gain (gain_t g);
void set_velocity_gain (gain_t g) {_pending_velocity_gain=g;}
void set_pending (Trigger*);

View File

@ -411,7 +411,6 @@ Trigger::name () const \
TRIGGER_UI_SET (cue_isolated,bool)
TRIGGER_UI_SET (stretchable, bool)
TRIGGER_UI_SET (gain, gain_t)
TRIGGER_UI_SET (velocity_effect, float)
TRIGGER_UI_SET (follow_count, uint32_t)
TRIGGER_UI_SET_CONST_REF (follow_action0, FollowAction)
@ -462,6 +461,18 @@ Trigger::set_ui (void* p)
_ui = p;
}
void
Trigger::set_gain (gain_t g)
{
if (_gain == g) {
return;
}
_gain = g;
send_property_change (Properties::gain);
_box.session().set_dirty();
}
void
Trigger::bang ()
{