Control Surface pin-t-adl
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
9template <setting_t N>
10class ProgramChanger : public Selectable<N> {
11 public:
15
16 void select(setting_t setting) override {
17 setting = this->validateSetting(setting);
19 }
20
21 private:
24};
25
Control_Surface_ & Control_Surface
A predefined instance of the Control Surface to use in the Arduino sketches.
uint8_t setting_t
The type used for Selectors.
Definition: Def.hpp:53
#define END_CS_NAMESPACE
#define BEGIN_CS_NAMESPACE
A class for saving a MIDI channel and cable number.
Definition: MIDIAddress.hpp:24
void sendProgramChange(MIDIAddress address)
Send a MIDI Program Change event.
Definition: MIDI_Sender.ipp:78
ProgramChanger(const Array< uint8_t, N > &programs, MIDIChannelCable channelCN)
void select(setting_t setting) override
MIDIChannelCable channelCN
Array< uint8_t, N > programs
static setting_t validateSetting(setting_t setting)
Definition: Selectable.hpp:19
An array wrapper for easy copying, comparing, and iterating.
Definition: Array.hpp:36