MIDI Control Surface library for Arduino
|
Go to the documentation of this file.
10 const static char NoteOff[] PROGMEM =
"Note Off ";
11 const static char NoteOn[] PROGMEM =
"Note On ";
16 const static char PitchBend[] PROGMEM =
"Pitch Bend ";
31 "Note Off\t",
"Note On\t\t",
"Key Pressure\t",
32 "Control Change\t",
"Program Change\t",
"Channel Pressure",
41 while (
stream.available() > 0) {
60 if (parseResult != MIDIReadEvent::NO_MESSAGE)
62 }
else if (!isxdigit(data) &&
firstChar) {
67 if (parseResult != MIDIReadEvent::NO_MESSAGE)
74 return MIDIReadEvent::NO_MESSAGE;
79 uint8_t messageType = (header >> 4) - 8;
82 uint8_t c = header & 0x0F;
84 <<
F(
"\tChannel: ") << (c + 1) <<
F(
"\tData 1: 0x") <<
hex << d1
85 <<
F(
"\tData 2: 0x") << d2 <<
dec <<
F(
"\tCable: ") << (cn + 1)
92 uint8_t messageType = (header >> 4) - 8;
95 uint8_t c = header & 0x0F;
97 <<
F(
"\tChannel: ") << (c + 1) <<
F(
"\tData 1: 0x") <<
hex << d1
98 <<
dec <<
F(
"\tCable: ") << (cn + 1) <<
endl;
106 stream << (*data++) <<
' ';
107 stream <<
dec <<
F(
"\tCable: ") << (cn + 1) <<
"\r\n";
112 stream <<
F(
"Real-Time: 0x") <<
hex << rt <<
dec <<
F(
"\tCable: ") << cn
void sendImpl(uint8_t header, uint8_t d1, uint8_t d2, uint8_t cn) override
Low-level function for sending a 3-byte MIDI message.
static const char ProgramChange[]
static const char NoteOn[]
static uint8_t hexCharToNibble(char hex)
Convert a hexadecimal character to a 4-bit nibble.
static const char ChannelPressure[]
Print & dec(Print &printer)
#define BEGIN_CS_NAMESPACE
static const char NoteOff[]
static const char PitchBend[]
Print & uppercase(Print &printer)
static const char ControlChange[]
static const FlashString_t MIDIStatusTypeNames[]
std::remove_reference< decltype(*F(""))>::type * FlashString_t
Print & hex(Print &printer)
MIDIReadEvent read() override
Try reading and parsing a single incoming MIDI message.
MIDIReadEvent parse(uint8_t midibyte)
MIDIReadEvent
Result of the MIDI interface read methods.
static const char KeyPressure[]
Print & endl(Print &printer)