Control Surface  1.2.0
MIDI Control Surface library for Arduino
DigitalCCSender.hpp
Go to the documentation of this file.
1 #pragma once
2 
4 
6 
14  public:
15  DigitalCCSender(uint8_t onValue = 0x7F, uint8_t offValue = 0x00)
17 
20  void sendOn(MIDIAddress address) {
21  Control_Surface.sendCC(address, onValue);
22  }
25  void sendOff(MIDIAddress address) {
27  }
28 
29  uint8_t getOnValue() const { return this->onValue; }
30  void setOnValue(uint8_t onValue) { this->onValue = onValue; }
31  uint8_t getOffValue() const { return this->offValue; }
32  void setOffValue(uint8_t offValue) { this->offValue = offValue; }
33 
34  private:
35  uint8_t onValue;
36  uint8_t offValue;
37 };
38 
MIDIAddress
A type-safe utility class for saving a MIDI address consisting of a 7-bit address,...
Definition: MIDIAddress.hpp:91
DigitalCCSender::setOffValue
void setOffValue(uint8_t offValue)
Definition: DigitalCCSender.hpp:32
DigitalCCSender::getOffValue
uint8_t getOffValue() const
Definition: DigitalCCSender.hpp:31
BEGIN_CS_NAMESPACE
#define BEGIN_CS_NAMESPACE
Definition: Settings/NamespaceSettings.hpp:9
DigitalCCSender::sendOff
void sendOff(MIDIAddress address)
Send a control change message to the given address, with offValue as value.
Definition: DigitalCCSender.hpp:25
DigitalCCSender
Class that sends MIDI control change messages signifying either "on" or "off".
Definition: DigitalCCSender.hpp:13
END_CS_NAMESPACE
#define END_CS_NAMESPACE
Definition: Settings/NamespaceSettings.hpp:10
DigitalCCSender::onValue
uint8_t onValue
Definition: DigitalCCSender.hpp:35
Control_Surface_Class.hpp
DigitalCCSender::DigitalCCSender
DigitalCCSender(uint8_t onValue=0x7F, uint8_t offValue=0x00)
Definition: DigitalCCSender.hpp:15
DigitalCCSender::sendOn
void sendOn(MIDIAddress address)
Send a control change message to the given address, with onValue as value.
Definition: DigitalCCSender.hpp:20
Control_Surface
Control_Surface_ & Control_Surface
A predefined instance of the Control Surface to use in the Arduino sketches.
Definition: Control_Surface_Class.cpp:203
DigitalCCSender::offValue
uint8_t offValue
Definition: DigitalCCSender.hpp:36
DigitalCCSender::getOnValue
uint8_t getOnValue() const
Definition: DigitalCCSender.hpp:29
MIDI_Sender::sendCC
void sendCC(MIDIAddress address, uint8_t value)
Send a MIDI Control Change event.
Definition: MIDI_Interface.ipp:67
DigitalCCSender::setOnValue
void setOnValue(uint8_t onValue)
Definition: DigitalCCSender.hpp:30