Control Surface
main
MIDI Control Surface library for Arduino
Loading...
Searching...
No Matches
src
MIDI_Inputs
LEDs
NoteCCKPRangeFastLED.cpp
Go to the documentation of this file.
1
#include "
NoteCCKPRangeFastLED.hpp
"
2
#include "
NovationLaunchpadColorLUT.hpp
"
3
#include <
AH/Arduino-Wrapper.h
>
// pgm_read_byte_near
4
5
BEGIN_CS_NAMESPACE
6
7
Color
velocityToNovationColor
(uint8_t value) {
8
value &= 0x7F;
9
uint8_t r = pgm_read_byte_near(&
NovationLaunchpadColorLUT
[value][2]);
10
uint8_t g = pgm_read_byte_near(&
NovationLaunchpadColorLUT
[value][1]);
11
uint8_t b = pgm_read_byte_near(&
NovationLaunchpadColorLUT
[value][0]);
12
return
Color
{r, g, b};
13
}
14
15
END_CS_NAMESPACE
Arduino-Wrapper.h
velocityToNovationColor
Color velocityToNovationColor(uint8_t value)
The default mapping from a 7-bit MIDI value to an RGB color, using the Novation Launchpad mapping.
Definition
NoteCCKPRangeFastLED.cpp:7
NoteCCKPRangeFastLED.hpp
NovationLaunchpadColorLUT.hpp
NovationLaunchpadColorLUT
static const uint8_t NovationLaunchpadColorLUT[][3]
Lookup table for the colors of the LEDs used by Novation Launchpad control surfaces.
Definition
NovationLaunchpadColorLUT.hpp:7
END_CS_NAMESPACE
#define END_CS_NAMESPACE
Definition
Settings/NamespaceSettings.hpp:14
BEGIN_CS_NAMESPACE
#define BEGIN_CS_NAMESPACE
Definition
Settings/NamespaceSettings.hpp:11
Color
A structure for RGB colors.
Definition
NoteCCKPRangeFastLED.hpp:12
Generated by
1.10.0