FastLED 3.9.15
Loading...
Searching...
No Matches
midi_Message.h
Go to the documentation of this file.
1
27
28#pragma once
29
30#include "midi_Namespace.h"
31#include "midi_Defs.h"
32#include "fl/memfill.h"
33
35
39template<unsigned SysExMaxSize>
40struct Message
41{
45 inline Message()
46 : channel(0)
48 , data1(0)
49 , data2(0)
50 , valid(false)
51 {
53 }
54
57 static const unsigned sSysExMaxSize = SysExMaxSize;
58
63
68
73
79
85
90 bool valid;
91
94 unsigned length;
95
96 inline unsigned getSysExSize() const
97 {
98 const unsigned size = unsigned(data2) << 8 | data1;
99 return size > sSysExMaxSize ? sSysExMaxSize : size;
100 }
101};
102
byte DataByte
Definition midi_Defs.h:57
MidiType
Definition midi_Defs.h:95
@ InvalidType
For notifying errors.
Definition midi_Defs.h:96
byte Channel
Definition midi_Defs.h:58
MIDI Library for the Arduino - Definitions.
#define MIDI_NAMESPACE
#define END_MIDI_NAMESPACE
#define BEGIN_MIDI_NAMESPACE
MIDI Library for the Arduino - Namespace declaration.
void * memfill(void *ptr, int value, fl::size num)
Definition memfill.h:11
static const unsigned sSysExMaxSize
DataByte sysexArray[sSysExMaxSize]
unsigned getSysExSize() const