MIDI Control Surface library for Arduino
|
Go to the documentation of this file.
6 #include <AH/Hardware/ExtendedInputOutput/ExtendedInputOutput.hpp>
14 template <u
int8_t NumLEDs>
41 template <u
int8_t NumLEDs>
53 uint8_t value = AH::increaseBitDepth<8, 7, uint8_t>(t.
getValue(index));
84 template <u
int8_t RangeLen>
86 NoteCCLED<RangeLen>> {
144 template <u
int8_t RangeLen>
146 NoteCCLED<RangeLen>> {
197 template <u
int8_t RangeLen, u
int8_t BankSize>
199 BankSize, NoteCCLED<RangeLen>> {
211 template <u
int8_t BankSize>
213 BankSize, NoteCCLED<1>> {
225 template <u
int8_t BankSize>
229 template <u
int8_t RangeLen, u
int8_t BankSize>
231 BankSize, NoteCCLED<RangeLen>> {
243 template <u
int8_t BankSize>
273 template <u
int8_t RangeLen>
276 NoteCCLEDPWM<RangeLen>> {
328 template <u
int8_t RangeLen>
330 NoteCCLEDPWM<RangeLen>> {
381 template <u
int8_t RangeLen, u
int8_t BankSize>
384 NoteCCLEDPWM<RangeLen>> {
387 const PinList<RangeLen> &ledPins,
397 template <u
int8_t BankSize>
399 BankSize, NoteCCLEDPWM<1>> {
411 template <u
int8_t RangeLen, u
int8_t BankSize>
414 NoteCCLEDPWM<RangeLen>> {
426 template <u
int8_t BankSize>
void analogWrite(pin_t pin, analog_t val)
An ExtIO version of the Arduino function.
A type-safe utility class for saving a MIDI address consisting of a 7-bit address,...
CCRangeLEDs(BankConfig< BankSize > config, const PinList< RangeLen > &ledPins, const MIDIAddress &address)
A namespace for MIDI elements that can be added to a Bank, to change their address or channel.
PinList< NumLEDs > ledPins
virtual void updateAll(const INoteCCValue ¬eccval)
Update all values: called when a bank change causes all values to (possibly) change,...
NoteValueLED(pin_t ledPin, MIDIAddress address)
Construct a new NoteValueLED object.
CCValueLED(pin_t ledPin, MIDIAddress address)
Construct a new CCValueLED object.
Interface for NoteCCValue objects: provides getters for the velocity or controller values.
uint16_t pin_t
The type for Arduino pins (and ExtendedIOElement pins).
A callback for NoteCCRange with an action that can be implemented by the user.
NoteRangeLEDsPWM(BankConfig< BankSize > config, const PinList< RangeLen > &ledPins, const MIDIAddress &address)
NoteRangeLEDs(const PinList< RangeLen > &ledPins, MIDIAddress address)
Construct a new NoteRangeLEDs object.
#define BEGIN_CS_NAMESPACE
void begin(const INoteCCValue &t) override
Initialize: called once.
#define AH_DIAGNOSTIC_POP()
CCValueLED(BankConfig< BankSize > config, pin_t ledPin, const MIDIAddress &address)
void digitalWrite(pin_t pin, PinStatus_t val)
An ExtIO version of the Arduino function.
NoteCCLEDPWM(const PinList< NumLEDs > &ledPins)
NoteRangeLEDs(BankConfig< BankSize > config, const PinList< RangeLen > &ledPins, MIDIAddress address)
NoteValueLED(BankConfig< BankSize > config, pin_t ledPin, MIDIAddress address)
CCRangeLEDsPWM(const PinList< RangeLen > &ledPins, MIDIAddress address)
Construct a new CCRangeLEDsPWM object.
void update(const INoteCCValue &t, uint8_t index) override
Update the given index: called when a new message is received for this index.
CCRangeLEDs(const PinList< RangeLen > &ledPins, MIDIAddress address)
Construct a new CCRangeLEDs object.
MIDI Input Element that listens for MIDI Note messages for the given note, and displays its value by ...
PinList< NumLEDs > ledPins
NoteRangeLEDsPWM(const PinList< RangeLen > &ledPins, MIDIAddress address)
Construct a new NoteRangeLEDsPWM object.
NoteCCLED(const PinList< NumLEDs > &ledPins)
CCValueLEDPWM(BankConfig< BankSize > config, pin_t ledPin, const MIDIAddress &address)
Callback for Note or CC range or value input that displays the value to a normal on/off LED.
virtual uint8_t getValue(uint8_t index) const =0
Get the velocity or controller value for the given index in the range.
MIDI Input Element that listens for MIDI Control Change messages in a given range,...
Callback for Note or CC range or value input that displays the value to a PWM LED.
MIDI Input Element that listens for MIDI Control Change messages in a given range,...
void pinMode(pin_t pin, PinMode_t mode)
An ExtIO version of the Arduino function.
void setThreshold(uint8_t threshold)
#define AH_DIAGNOSTIC_WERROR()
MIDI Input Element that listens for MIDI Control Change messages for the given controller,...
MIDI Input Element that listens for MIDI Control Change messages for the given controller,...
MIDI Input Element that listens for MIDI Note messages in a given range, and displays their velocity ...
CCRangeLEDsPWM(BankConfig< BankSize > config, const PinList< RangeLen > &ledPins, const MIDIAddress &address)
MIDI Input Element that listens for MIDI Note messages for the given note, and displays its velocity ...
void begin(const INoteCCValue &t) override
Initialize: called once.
MIDI Input Element that listens for MIDI Note messages in a given range, and displays their values by...
NoteValueLEDPWM(BankConfig< BankSize > config, pin_t ledPin, const MIDIAddress &address)
NoteValueLEDPWM(pin_t ledPin, MIDIAddress address)
Construct a new NoteValueLEDPWM object.
void update(const INoteCCValue &t, uint8_t index) override
Update the given index: called when a new message is received for this index.
uint8_t getThreshold() const
CCValueLEDPWM(pin_t ledPin, MIDIAddress address)
Construct a new CCValueLEDPWM object.