Control Surface  1.1.1
MIDI Control Surface library for Arduino
VPotRingLEDs.hpp
Go to the documentation of this file.
1 #pragma once
2 
5 
7 
8 namespace MCU {
9 
11  public:
13 
14  template <class T>
15  void begin(const T &) {
16  leds.begin();
17  }
18 
19  template <class T>
20  void update(const T &t) {
21  leds.displayRange(t.getStartOn(), t.getStartOff());
22  }
23 
24  private:
26 };
27 
28 // -------------------------------------------------------------------------- //
29 
30 class VPotRingLEDs : public GenericVPotRing<VPotRingLEDsCallback> {
31  public:
32  VPotRingLEDs(const PinList<11> &ledPins, uint8_t track,
33  MIDICNChannel channelCN = CHANNEL_1)
34  : GenericVPotRing<VPotRingLEDsCallback>{track, channelCN, {ledPins}} {}
35 };
36 
37 namespace Bankable {
38 
39 template <setting_t NumBanks>
40 class VPotRingLEDs : public GenericVPotRing<NumBanks, VPotRingLEDsCallback> {
41  public:
42  VPotRingLEDs(BankConfig<NumBanks> config, const PinList<11> &ledPins,
43  uint8_t track, MIDICNChannel channelCN = CHANNEL_1)
45  config, track, channelCN, {ledPins}} {}
46 };
47 
48 } // namespace Bankable
49 
50 } // namespace MCU
51 
MCU::VPotRingLEDsCallback::update
void update(const T &t)
Definition: VPotRingLEDs.hpp:20
MCU::Bankable::GenericVPotRing
A class for MIDI input elements that represent Mackie Control Universal V-Pots.
Definition: VPotRing.hpp:177
Bankable
A namespace for MIDI elements that can be added to a Bank, to change their address or channel.
Definition: BankAddresses.hpp:7
AH::LEDs::begin
void begin() const
Initialize (set LED pins as outputs).
Definition: LEDs.hpp:34
MCU
Names and note and controller numbers for the Mackie Control Universal (MCU) protocol.
Definition: LCDDisplay.hpp:10
BEGIN_CS_NAMESPACE
#define BEGIN_CS_NAMESPACE
Definition: Settings/NamespaceSettings.hpp:9
END_CS_NAMESPACE
#define END_CS_NAMESPACE
Definition: Settings/NamespaceSettings.hpp:10
MCU::GenericVPotRing
A class for MIDI input elements that represent Mackie Control Universal V-Pots.
Definition: VPotRing.hpp:144
VPotRing.hpp
MIDICNChannel
A class for saving a MIDI channel and cable number.
Definition: MIDICNChannelAddress.hpp:19
LEDs.hpp
MCU::VPotRingLEDs
Definition: VPotRingLEDs.hpp:30
MCU::VPotRingLEDsCallback::begin
void begin(const T &)
Definition: VPotRingLEDs.hpp:15
AH::LEDs< 11 >
MCU::VPotRingLEDsCallback::leds
const AH::LEDs< 11 > leds
Definition: VPotRingLEDs.hpp:25
BankConfig
A struct for selecting the bank of BankableMIDIInputs and the bank type.
Definition: BankConfig.hpp:39
MCU::Bankable::VPotRingLEDs
Definition: VPotRingLEDs.hpp:40
CHANNEL_1
constexpr Channel CHANNEL_1
Definition: Channel.hpp:111
MCU::Bankable::VPotRingLEDs::VPotRingLEDs
VPotRingLEDs(BankConfig< NumBanks > config, const PinList< 11 > &ledPins, uint8_t track, MIDICNChannel channelCN=CHANNEL_1)
Definition: VPotRingLEDs.hpp:42
MCU::VPotRingLEDsCallback
Definition: VPotRingLEDs.hpp:10
MCU::VPotRingLEDsCallback::VPotRingLEDsCallback
VPotRingLEDsCallback(const AH::LEDs< 11 > &leds)
Definition: VPotRingLEDs.hpp:12
AH::LEDs::displayRange
void displayRange(uint8_t startOn, uint8_t startOff) const
Turn on a range of the LEDs.
Definition: LEDs.hpp:48
MCU::VPotRingLEDs::VPotRingLEDs
VPotRingLEDs(const PinList< 11 > &ledPins, uint8_t track, MIDICNChannel channelCN=CHANNEL_1)
Definition: VPotRingLEDs.hpp:32