diff --git a/libs/ardour/ardour/triggerbox.h b/libs/ardour/ardour/triggerbox.h index c409fb53c0..b996cca668 100644 --- a/libs/ardour/ardour/triggerbox.h +++ b/libs/ardour/ardour/triggerbox.h @@ -61,6 +61,8 @@ class MidiRegion; class TriggerBox; class SideChain; +typedef uint32_t color_t; + class LIBARDOUR_API Trigger : public PBD::Stateful { public: enum State { @@ -178,6 +180,9 @@ class LIBARDOUR_API Trigger : public PBD::Stateful { FollowAction follow_action (uint32_t n) const { assert (n < 2); return n ? _follow_action1 : _follow_action0; } void set_follow_action (FollowAction, uint32_t n); + color_t color() const { return _color; } + void set_color (color_t); + void set_region (boost::shared_ptr, bool use_thread = true); void clear_region (); virtual int set_region_in_worker_thread (boost::shared_ptr) = 0; @@ -280,6 +285,7 @@ class LIBARDOUR_API Trigger : public PBD::Stateful { PBD::Property _midi_velocity_effect; PBD::Property _stretchable; PBD::Property _isolated; + PBD::Property _color; /* computed from data */ diff --git a/libs/ardour/triggerbox.cc b/libs/ardour/triggerbox.cc index 25f6777ae6..67f182e823 100644 --- a/libs/ardour/triggerbox.cc +++ b/libs/ardour/triggerbox.cc @@ -90,6 +90,7 @@ Trigger::Trigger (uint32_t n, TriggerBox& b) , _midi_velocity_effect (Properties::velocity_effect, 0.) , _stretchable (Properties::stretchable, true) , _isolated (Properties::isolated, false) + , _color (Properties::color, 0xBEBEBEFF) , _barcnt (0.) , _apparent_tempo (0.) , expected_end_sample (0) @@ -108,6 +109,7 @@ Trigger::Trigger (uint32_t n, TriggerBox& b) add_property (_midi_velocity_effect); add_property (_stretchable); add_property (_isolated); + add_property (_color); } void @@ -152,6 +154,13 @@ Trigger::set_scene_isolated (bool i) PropertyChanged (ARDOUR::Properties::isolated); } +void +Trigger::set_color (color_t c) +{ + _color = c; + PropertyChanged (ARDOUR::Properties::color); +} + void Trigger::set_stretchable (bool s) {