Control Surface
main
MIDI Control Surface library for Arduino
Toggle main menu visibility
Loading...
Searching...
No Matches
src
MIDI_Senders
DigitalCCSender.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include <
Control_Surface/Control_Surface_Class.hpp
>
4
5
BEGIN_CS_NAMESPACE
6
13
class
DigitalCCSender
{
14
public
:
15
DigitalCCSender
(uint8_t
onValue
= 0x7F, uint8_t
offValue
= 0x00)
16
:
onValue
(
onValue
),
offValue
(
offValue
) {}
17
20
void
sendOn
(
MIDIAddress
address) {
21
Control_Surface
.sendControlChange(address,
onValue
);
22
}
23
25
void
sendOff
(
MIDIAddress
address) {
26
Control_Surface
.sendControlChange(address,
offValue
);
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
39
END_CS_NAMESPACE
Control_Surface
Control_Surface_ & Control_Surface
A predefined instance of the Control Surface to use in the Arduino sketches.
Definition
Control_Surface_Class.cpp:338
Control_Surface_Class.hpp
END_CS_NAMESPACE
#define END_CS_NAMESPACE
Definition
Settings/NamespaceSettings.hpp:14
BEGIN_CS_NAMESPACE
#define BEGIN_CS_NAMESPACE
Definition
Settings/NamespaceSettings.hpp:11
DigitalCCSender::getOnValue
uint8_t getOnValue() const
Definition
DigitalCCSender.hpp:29
DigitalCCSender::sendOn
void sendOn(MIDIAddress address)
Send a control change message to the given address, with onValue as value.
Definition
DigitalCCSender.hpp:20
DigitalCCSender::getOffValue
uint8_t getOffValue() const
Definition
DigitalCCSender.hpp:31
DigitalCCSender::setOffValue
void setOffValue(uint8_t offValue)
Definition
DigitalCCSender.hpp:32
DigitalCCSender::DigitalCCSender
DigitalCCSender(uint8_t onValue=0x7F, uint8_t offValue=0x00)
Definition
DigitalCCSender.hpp:15
DigitalCCSender::onValue
uint8_t onValue
Definition
DigitalCCSender.hpp:35
DigitalCCSender::sendOff
void sendOff(MIDIAddress address)
Send a control change message to the given address, with offValue as value.
Definition
DigitalCCSender.hpp:25
DigitalCCSender::offValue
uint8_t offValue
Definition
DigitalCCSender.hpp:36
DigitalCCSender::setOnValue
void setOnValue(uint8_t onValue)
Definition
DigitalCCSender.hpp:30
MIDIAddress
A type-safe utility class for saving a MIDI address consisting of a 7-bit address,...
Definition
MIDIAddress.hpp:145
Generated by
1.17.0