Control Surface main
MIDI Control Surface library for Arduino
Loading...
Searching...
No Matches
MIDI_Parser.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <stddef.h>
4#include <stdint.h>
5#include <stdlib.h>
6
7#include <Def/Def.hpp>
8#include <Settings/SettingsWrapper.hpp>
9
10#include "MIDIReadEvent.hpp"
11#include "MIDI_MessageTypes.hpp"
12
14
17 public:
26#if IGNORE_SYSEX
28 SysExMessage getSysExMessage() const { return {nullptr, 0, Cable_1}; }
29#endif
30
31 protected:
32 MIDIMessage midimsg = {0x00, 0x00, 0x00};
34
35 public:
37 static bool isStatus(uint8_t data) { return data & (1 << 7); }
39 static bool isData(uint8_t data) { return (data & (1 << 7)) == 0; }
40};
41
constexpr Cable Cable_1
Definition Cable.hpp:118
#define END_CS_NAMESPACE
#define BEGIN_CS_NAMESPACE
Base class for MIDI parsers.
ChannelMessage getChannelMessage() const
Get the latest MIDI channel voice message.
RealTimeMessage getRealTimeMessage() const
Get the latest MIDI real-time message.
static bool isData(uint8_t data)
Check if the given byte is a MIDI data byte.
static bool isStatus(uint8_t data)
Check if the given byte is a MIDI header/status byte.
SysCommonMessage getSysCommonMessage() const
Get the latest MIDI system common message.
MIDIMessage midimsg
RealTimeMessage rtmsg
An array wrapper for easy copying, comparing, and iterating.
Definition Array.hpp:32