Arduino MIDI Library
Version 5.0.1
midi_Message.h
Go to the documentation of this file.
1
28
#pragma once
29
30
#include "
midi_Namespace.h
"
31
#include "
midi_Defs.h
"
32
#ifndef ARDUINO
33
#include <string.h>
34
#endif
35
36
BEGIN_MIDI_NAMESPACE
37
41
template
<
unsigned
SysExMaxSize>
42
struct
Message
43
{
47
inline
Message
()
48
:
channel
(0)
49
,
type
(
MIDI_NAMESPACE
::
InvalidType
)
50
,
data1
(0)
51
,
data2
(0)
52
,
valid
(false)
53
{
54
memset(
sysexArray
, 0,
sSysExMaxSize
*
sizeof
(
DataByte
));
55
}
56
59
static
const
unsigned
sSysExMaxSize
= SysExMaxSize;
60
64
Channel
channel
;
65
69
MidiType
type
;
70
74
DataByte
data1
;
75
80
DataByte
data2
;
81
86
DataByte
sysexArray
[
sSysExMaxSize
];
87
92
bool
valid
;
93
96
unsigned
length
;
97
98
inline
unsigned
getSysExSize
()
const
99
{
100
const
unsigned
size = unsigned(
data2
) << 8 |
data1
;
101
return
size >
sSysExMaxSize
?
sSysExMaxSize
: size;
102
}
103
};
104
105
END_MIDI_NAMESPACE
Message::getSysExSize
unsigned getSysExSize() const
Definition:
midi_Message.h:98
midi_Defs.h
MIDI Library for the Arduino - Definitions.
MIDI_NAMESPACE
#define MIDI_NAMESPACE
Definition:
midi_Namespace.h:30
Message::sysexArray
DataByte sysexArray[sSysExMaxSize]
Definition:
midi_Message.h:86
END_MIDI_NAMESPACE
#define END_MIDI_NAMESPACE
Definition:
midi_Namespace.h:32
InvalidType
@ InvalidType
For notifying errors.
Definition:
midi_Defs.h:96
Message::sSysExMaxSize
static const unsigned sSysExMaxSize
Definition:
midi_Message.h:59
Message::valid
bool valid
Definition:
midi_Message.h:92
Message::length
unsigned length
Definition:
midi_Message.h:96
midi_Namespace.h
MIDI Library for the Arduino - Namespace declaration.
Message::Message
Message()
Definition:
midi_Message.h:47
Message::data2
DataByte data2
Definition:
midi_Message.h:80
Message::type
MidiType type
Definition:
midi_Message.h:69
MidiType
MidiType
Definition:
midi_Defs.h:95
BEGIN_MIDI_NAMESPACE
#define BEGIN_MIDI_NAMESPACE
Definition:
midi_Namespace.h:31
Message::channel
Channel channel
Definition:
midi_Message.h:64
Channel
byte Channel
Definition:
midi_Defs.h:58
Message::data1
DataByte data1
Definition:
midi_Message.h:74
Message
Definition:
midi_Message.h:43
DataByte
byte DataByte
Definition:
midi_Defs.h:57
franky
dev
playground
FortySevenEffects
arduino_midi_library
src
midi_Message.h
Generated on Fri Apr 24 2020 06:55:33 for Arduino MIDI Library by
1.8.18