1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#ifndef MIDIMESSAGE_H_7EULNASF
#define MIDIMESSAGE_H_7EULNASF

#include <QString>
#include <QByteArray>
#include <QObject>

namespace interpreter {
    class MidiMessage : public QObject
    {
        public:
            MidiMessage(const QByteArray &message);
            virtual ~MidiMessage();

            virtual QString toString() const;

            const QByteArray &getMessage() const;
            size_t getLength() const;
            uint8_t getStatus() const;
            uint8_t getOpcode() const;
            uint8_t getMidiChannel() const;

        protected:
            const QByteArray &m_message;
            size_t m_length;
            uint8_t m_status;
            uint8_t m_op_code;
            uint8_t m_midi_channel;
    };
}

#endif /* end of include guard: MIDIMESSAGE_H_7EULNASF */