23 #include <glibmm/threads.h>
30 template <
typename T>
class EventSink;
31 template <
typename T>
class EventList;
47 virtual void track (
const uint8_t* evbuf);
48 virtual void dump (std::ostream&)
const;
52 void add (uint8_t note, uint8_t chn);
53 void remove (uint8_t note, uint8_t chn);
60 bool empty()
const {
return _on == 0; }
61 uint16_t
on()
const {
return _on; }
62 bool active (uint8_t note, uint8_t channel)
const {
63 return _active_notes[(channel*128)+note] > 0;
66 template<
typename Time>
72 uint8_t _active_notes[128*16];
85 void track (
const uint8_t* evbuf);
86 void dump (std::ostream&)
const;
96 uint16_t pressure[16];
97 uint8_t control[16][127];
void track(const Evoral::Event< Time > &ev)
void resolve_notes(MidiSource &src, const Source::WriterLock &lock, Temporal::Beats time)
void track(const MidiBuffer::const_iterator &from, const MidiBuffer::const_iterator &to)
virtual void dump(std::ostream &) const
bool active(uint8_t note, uint8_t channel) const
void push_notes(MidiBuffer &dst, samplepos_t time, bool reset, int cmd, int velocity)
void resolve_notes(MidiBuffer &buffer, samplepos_t time, bool reset=true)
virtual ~MidiNoteTracker()
void flush_notes(MidiBuffer &buffer, samplepos_t time, bool reset=true)
void resolve_notes(Evoral::EventSink< samplepos_t > &buffer, samplepos_t time)
void remove(uint8_t note, uint8_t chn)
virtual void track(const uint8_t *evbuf)
void add(uint8_t note, uint8_t chn)
void resolve_state(Evoral::EventSink< samplepos_t > &, Evoral::EventList< samplepos_t > const &, samplepos_t time, bool reset=true)
void track(const uint8_t *evbuf)
void resolve_diff(MidiStateTracker const &other, Evoral::EventSink< samplepos_t > &, samplepos_t time, bool reset=true)
void dump(std::ostream &) const
void flush(MidiBuffer &, samplepos_t, bool reset)
Glib::Threads::RWLock::WriterLock WriterLock
const uint8_t * buffer() const
Temporal::samplepos_t samplepos_t