summaryrefslogtreecommitdiff
path: root/libs/evoral
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2010-06-25 20:47:09 +0000
committerCarl Hetherington <carl@carlh.net>2010-06-25 20:47:09 +0000
commitecb0cd5d119d28092a8f48e4521ac5eba197bb54 (patch)
tree57d7bcff09ab6d6382af929212ff4a4adeea2658 /libs/evoral
parentad81fd40d22f63f0f9e7a247164b6b367fabb2fd (diff)
Make MIDI region `automation' respect the automation mode so that it is
only played back if the automation mode is set to "Play". Munge AutoState for AutomationRegionViews so that they reflect their AutomationTimeAxisView's setting. Fixes #3135. git-svn-id: svn://localhost/ardour2/branches/3.0@7304 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/evoral')
-rw-r--r--libs/evoral/evoral/Sequence.hpp6
-rw-r--r--libs/evoral/src/Sequence.cpp12
2 files changed, 13 insertions, 5 deletions
diff --git a/libs/evoral/evoral/Sequence.hpp b/libs/evoral/evoral/Sequence.hpp
index 79a4181f67..1ad456b302 100644
--- a/libs/evoral/evoral/Sequence.hpp
+++ b/libs/evoral/evoral/Sequence.hpp
@@ -184,7 +184,7 @@ public:
class const_iterator {
public:
const_iterator();
- const_iterator(const Sequence<Time>& seq, Time t);
+ const_iterator(const Sequence<Time>& seq, Time t, std::set<Evoral::Parameter> const &);
~const_iterator();
inline bool valid() const { return !_is_end && _event; }
@@ -221,7 +221,9 @@ public:
ControlIterators::iterator _control_iter;
};
- const_iterator begin(Time t=0) const { return const_iterator(*this, t); }
+ const_iterator begin (Time t=0, std::set<Evoral::Parameter> const & f = std::set<Evoral::Parameter> ()) const {
+ return const_iterator (*this, t, f);
+ }
const const_iterator& end() const { return _end_iter; }
typename Notes::const_iterator note_lower_bound (Time t) const;
diff --git a/libs/evoral/src/Sequence.cpp b/libs/evoral/src/Sequence.cpp
index ddd978fefa..add32fb9bd 100644
--- a/libs/evoral/src/Sequence.cpp
+++ b/libs/evoral/src/Sequence.cpp
@@ -53,7 +53,7 @@ Sequence<Time>::const_iterator::const_iterator()
}
template<typename Time>
-Sequence<Time>::const_iterator::const_iterator(const Sequence<Time>& seq, Time t)
+Sequence<Time>::const_iterator::const_iterator(const Sequence<Time>& seq, Time t, std::set<Evoral::Parameter> const & filtered)
: _seq(&seq)
, _type(NIL)
, _is_end((t == DBL_MAX) || seq.empty())
@@ -90,6 +90,12 @@ Sequence<Time>::const_iterator::const_iterator(const Sequence<Time>& seq, Time t
bool found = false;
size_t earliest_control_index = 0;
for (Controls::const_iterator i = seq._controls.begin(); i != seq._controls.end(); ++i) {
+
+ if (filtered.find (i->first) != filtered.end()) {
+ /* this parameter is filtered, so don't bother setting up an iterator for it */
+ continue;
+ }
+
DEBUG_TRACE (DEBUG::Sequence, string_compose ("Iterator: control: %1\n", seq._type_map.to_symbol(i->first)));
double x, y;
bool ret = i->second->list()->rt_safe_earliest_event_unlocked(t, DBL_MAX, x, y, true);
@@ -385,7 +391,7 @@ Sequence<Time>::Sequence(const TypeMap& type_map)
, _overlap_pitch_resolution (FirstOnFirstOff)
, _writing(false)
, _type_map(type_map)
- , _end_iter(*this, DBL_MAX)
+ , _end_iter(*this, DBL_MAX, std::set<Evoral::Parameter> ())
, _percussive(false)
, _lowest_note(127)
, _highest_note(0)
@@ -403,7 +409,7 @@ Sequence<Time>::Sequence(const Sequence<Time>& other)
, _overlap_pitch_resolution (other._overlap_pitch_resolution)
, _writing(false)
, _type_map(other._type_map)
- , _end_iter(*this, DBL_MAX)
+ , _end_iter(*this, DBL_MAX, std::set<Evoral::Parameter> ())
, _percussive(other._percussive)
, _lowest_note(other._lowest_note)
, _highest_note(other._highest_note)