#include <utility>
#include "evoral/EventList.hpp"
+#include "evoral/Control.hpp"
#include "ardour/beats_frames_converter.h"
#include "ardour/debug.h"
};
framecnt_t
-MidiPlaylist::read (Evoral::EventSink<framepos_t>& dst, framepos_t start, framecnt_t dur, unsigned chan_n)
+MidiPlaylist::read (Evoral::EventSink<framepos_t>& dst,
+ framepos_t start,
+ framecnt_t dur,
+ unsigned chan_n,
+ MidiChannelFilter* filter)
{
typedef pair<MidiStateTracker*,framepos_t> TrackerInfo;
}
/* Read from region into target. */
- mr->read_at (tgt, start, dur, chan_n, _note_mode, &tracker->tracker);
+ mr->read_at (tgt, start, dur, chan_n, _note_mode, &tracker->tracker, filter);
DEBUG_TRACE (DEBUG::MidiPlaylistIO,
string_compose ("\tPost-read: %1 active notes\n", tracker->tracker.on()));
for (Automatable::Controls::iterator c = mr->model()->controls().begin();
c != mr->model()->controls().end(); ++c) {
- ret.insert(c->first);
+ if (c->second->list()->size() > 0) {
+ ret.insert(c->first);
+ }
}
}