This is an old version of the documentation. View the latest version here.
Control Surface  1.0.0
MIDI Control Surface library for Arduino
ProgramChanger.hpp
Go to the documentation of this file.
1 #pragma once
2 
4 #include <Def/Def.hpp>
6 
8 
10 template <setting_t N>
11 class ProgramChanger : public Selectable<N> {
12  public:
15 
16  void select(setting_t setting) override {
17  setting = this->validateSetting(setting);
19  }
20 
21  private:
24 };
25 
Selectable::validateSetting
static setting_t validateSetting(setting_t setting)
Definition: Selectable.hpp:19
Def.hpp
ProgramChanger::programs
const Array< uint8_t, N > programs
Definition: ProgramChanger.hpp:22
Selectable.hpp
Array< uint8_t, N >
Selectable
Definition: Selectable.hpp:11
ProgramChanger::ProgramChanger
ProgramChanger(const Array< uint8_t, N > &programs, MIDICNChannel channelCN)
Definition: ProgramChanger.hpp:13
Control_Surface_::MIDI
MIDI_Interface & MIDI()
Get the MIDI interface of the Control Surface.
Definition: Control_Surface_Class.cpp:55
ProgramChanger
TODO: move to different folder?
Definition: ProgramChanger.hpp:11
Control_Surface_Class.hpp
BEGIN_CS_NAMESPACE
#define BEGIN_CS_NAMESPACE
Definition: NamespaceSettings.hpp:9
Control_Surface
Control_Surface_ & Control_Surface
A predefined instance of the Control Surface to use in the Arduino sketches.
Definition: Control_Surface_Class.cpp:171
MIDICNChannel
A class for saving a MIDI channel and cable number.
Definition: MIDICNChannelAddress.hpp:19
END_CS_NAMESPACE
#define END_CS_NAMESPACE
Definition: NamespaceSettings.hpp:10
setting_t
uint8_t setting_t
The type used for Selectors.
Definition: Def.hpp:63
ProgramChanger::select
void select(setting_t setting) override
Definition: ProgramChanger.hpp:16
MIDI_Interface::sendPC
void sendPC(MIDICNChannelAddress address)
Send a MIDI Program Change event.
Definition: MIDI_Interface.cpp:85
ProgramChanger::channelCN
const MIDICNChannel channelCN
Definition: ProgramChanger.hpp:23