summaryrefslogtreecommitdiff
path: root/libs/evoral
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2011-12-02 19:31:53 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2011-12-02 19:31:53 +0000
commit60e6b5d561db1ebcc15dd48f49350daa487e248a (patch)
tree7afe40a90054a631401fa34bcefa6c5d6e81a3ba /libs/evoral
parentebc0b882485b0160fc9ecab7430513d0e99c3bda (diff)
add 3 new is_foo() methods to MIDIEvent for testing for certain periodic MIDI messages
git-svn-id: svn://localhost/ardour2/branches/3.0@10862 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/evoral')
-rw-r--r--libs/evoral/evoral/MIDIEvent.hpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/libs/evoral/evoral/MIDIEvent.hpp b/libs/evoral/evoral/MIDIEvent.hpp
index c27a716a3e..79d013e00f 100644
--- a/libs/evoral/evoral/MIDIEvent.hpp
+++ b/libs/evoral/evoral/MIDIEvent.hpp
@@ -92,6 +92,12 @@ struct MIDIEvent : public Event<Time> {
inline bool is_smf_meta_event() const { return this->_buf[0] == 0xFF; }
inline bool is_sysex() const { return this->_buf[0] == 0xF0
|| this->_buf[0] == 0xF7; }
+ inline bool is_spp() const { return this->_buf[0] == 0xF2 && this->size() == 0; }
+ inline bool is_mtc_quarter() const { return this->_buf[0] == 0xF1 && this->size() == 0; }
+ inline bool is_mtc_full() const {
+ return this->size() == 10 && this->_buf[0] == 0xf0 && this->_buf[1] == 0x7f &&
+ this->_buf[3] == 0x01 && this->_buf[4] == 0x01;
+ }
};
} // namespace Evoral