MIDI Control Surface library for Arduino
|
Go to the documentation of this file. 1 #if defined(ARDUINO) && defined(FASTLED_VERSION)
5 #include <Settings/NamespaceSettings.hpp>
15 #ifdef FASTLED_VERSION
16 explicit operator CRGB()
const {
return CRGB{
r,
g,
b}; }
29 #ifdef FASTLED_VERSION
37 template <
class ColorMapper>
79 template <u
int8_t RangeLen,
class ColorMapper = DefaultColorMapper>
82 NoteCCFastLED<ColorMapper>> {
86 const ColorMapper &colormapper = {})
95 const ColorMapper &colormapper = {})
99 {leds.
data, colormapper},
103 const ColorMapper &colormapper = {})
112 this->
callback.setBrightness(brightness);
118 template <
class ColorMapper = DefaultColorMapper>
120 NoteCCFastLED<ColorMapper>> {
123 const ColorMapper &colormapper = {})
132 this->
callback.setBrightness(brightness);
138 template <u
int8_t RangeLen,
class ColorMapper = DefaultColorMapper>
140 NoteCCFastLED<ColorMapper>> {
145 const ColorMapper &colormapper = {})
154 const ColorMapper &colormapper = {})
158 {leds.
data, colormapper},
162 const ColorMapper &colormapper = {})
171 this->
callback.setBrightness(brightness);
177 template <
class ColorMapper = DefaultColorMapper>
179 NoteCCFastLED<ColorMapper>> {
182 const ColorMapper &colormapper = {})
190 this->
callback.setBrightness(brightness);
203 template <uint8_t RangeLen, uint8_t BankSize,
207 NoteCCFastLED<ColorMapper>> {
212 const ColorMapper &colormapper = {})
223 const ColorMapper &colormapper = {})
228 {leds.
data, colormapper},
233 const ColorMapper &colormapper = {})
243 this->
callback.setBrightness(brightness);
249 template <u
int8_t BankSize,
class ColorMapper = DefaultColorMapper>
252 NoteCCFastLED<ColorMapper>> {
256 const ColorMapper &colormapper = {})
266 this->
callback.setBrightness(brightness);
272 template <uint8_t RangeLen, uint8_t BankSize,
276 NoteCCFastLED<ColorMapper>> {
281 const ColorMapper &colormapper = {})
292 const ColorMapper &colormapper = {})
297 {leds.
data, colormapper},
302 const ColorMapper &colormapper = {})
312 this->
callback.setBrightness(brightness);
318 template <u
int8_t BankSize,
class ColorMapper = DefaultColorMapper>
321 NoteCCFastLED<ColorMapper>> {
325 const ColorMapper &colormapper = {})
335 this->
callback.setBrightness(brightness);
The default mapping from a 7-bit MIDI value to an RGB color.
Callback for Note or CC range or value input that displays the value to a FastLED strip.
uint8_t getBrightness() const
Get the maximum brightness of the LEDs.
CCValueFastLED(CRGB &led, MIDICNChannelAddress address, const ColorMapper &colormapper={})
NoteValueFastLED(CRGB &led, MIDICNChannelAddress address, const ColorMapper &colormapper={})
A namespace for MIDI elements that can be added to a Bank, to change their address or channel.
uint8_t getBrightness() const
Get the maximum brightness of the LEDs.
void setBrightness(uint8_t brightness)
Set the maximum brightness of the LEDs.
void update(const INoteCCValue &t, uint8_t index) override
NoteCCFastLED< ColorMapper > callback
void setBrightness(uint8_t brightness)
Set the maximum brightness of the LEDs.
uint8_t getBrightness() const
Get the maximum brightness of the LEDs.
#define BEGIN_CS_NAMESPACE
NoteValueFastLED(BankConfig< BankSize > config, CRGB &led, MIDICNChannelAddress address, const ColorMapper &colormapper={})
uint8_t getBrightness() const
Get the maximum brightness of the LEDs.
void setBrightness(uint8_t brightness)
Set the maximum brightness of the LEDs.
CCValueFastLED(BankConfig< BankSize > config, CRGB &led, MIDICNChannelAddress address, const ColorMapper &colormapper={})
void setBrightness(uint8_t brightness)
Set the maximum brightness of the LEDs.
A type-safe utility class for saving a MIDI address consisting of a 7-bit address,...
An array wrapper for easy copying, comparing, and iterating.
void setBrightness(uint8_t brightness)
Set the maximum brightness of the LEDs.
NoteRangeFastLED(CRGB *leds, MIDICNChannelAddress address, const ColorMapper &colormapper={})
void begin(const INoteCCValue &t) override
Color operator()(uint8_t value, uint8_t index) const
Map from a 7-bit MIDI value to an RGB color.
uint8_t getBrightness() const
Get the maximum brightness of the LEDs.
void setBrightness(uint8_t brightness)
Set the maximum brightness of the LEDs.
NoteRangeFastLED(BankConfig< BankSize > config, CRGB *leds, MIDICNChannelAddress address, const ColorMapper &colormapper={})
NoteRangeFastLED(BankConfig< BankSize > config, Array< CRGB, RangeLen > &leds, MIDICNChannelAddress address, const ColorMapper &colormapper={})
CCRangeFastLED(BankConfig< BankSize > config, CRGB *leds, MIDICNChannelAddress address, const ColorMapper &colormapper={})
uint8_t getBrightness() const
Get the maximum brightness of the LEDs.
CCRangeFastLED(CRGB *leds, MIDICNChannelAddress address, const ColorMapper &colormapper={})
A struct for selecting the bank of BankableMIDIInputs and the bank type.
void setBrightness(uint8_t brightness)
Set the maximum brightness of the LEDs.
NoteRangeFastLED(Array< CRGB, RangeLen > &leds, MIDICNChannelAddress address, const ColorMapper &colormapper={})
virtual uint8_t getValue(uint8_t index) const =0
uint8_t getBrightness() const
Get the maximum brightness of the LEDs.
NoteCCFastLED(CRGB *ledcolors, const ColorMapper &colormapper)
uint8_t getBrightness() const
Get the maximum brightness of the LEDs.
CCRangeFastLED(BankConfig< BankSize > config, Array< CRGB, RangeLen > &leds, MIDICNChannelAddress address, const ColorMapper &colormapper={})
uint8_t getBrightness() const
Get the maximum brightness of the LEDs.
void setBrightness(uint8_t brightness)
Set the maximum brightness of the LEDs.
CCRangeFastLED(Array< CRGB, RangeLen > &leds, MIDICNChannelAddress address, const ColorMapper &colormapper={})
A structure for RGB colors.
void setBrightness(uint8_t brightness)
Set the maximum brightness of the LEDs.
virtual void updateAll(const INoteCCValue ¬eccval)