Control Surface
1.1.0
MIDI Control Surface library for Arduino
src
MIDI_Outputs
CCButtonLatched.hpp
Go to the documentation of this file.
1
/* ✔ */
2
3
#pragma once
4
5
#include <
MIDI_Outputs/Abstract/MIDIButtonLatched.hpp
>
6
#include <
MIDI_Senders/DigitalCCSender.hpp
>
7
8
BEGIN_CS_NAMESPACE
9
10
/**
11
* @brief A class of MIDIOutputElement%s that read the input of a **momentary
12
* push button or toggle switch**, and send out MIDI **Controller
13
* Change** events.
14
*
15
* It latches the input, so press once to enable, press again to
16
* disable (toggle).
17
*
18
* The switch is debounced in software.
19
* This version cannot be banked.
20
*
21
* @ingroup MIDIOutputElements
22
*/
23
class
CCButtonLatched
:
public
MIDIButtonLatched
<DigitalCCSender> {
24
public
:
25
/**
26
* @brief Create a new CCButtonLatched object on the given pin and with
27
* address.
28
*
29
* @param pin
30
* The digital input pin to read from.
31
* The internal pull-up resistor will be enabled.
32
* @param address
33
* The MIDI address containing the controller number [0, 119],
34
* channel [CHANNEL_1, CHANNEL_16], and optional cable number
35
* [0, 15].
36
* @param sender
37
* The MIDI sender to use.
38
*/
39
CCButtonLatched
(
pin_t
pin,
const
MIDICNChannelAddress
&
address
,
40
const
DigitalCCSender
&
sender
= {})
41
:
MIDIButtonLatched
{pin,
address
,
sender
} {}
42
};
43
44
END_CS_NAMESPACE
MIDIButtonLatched< DigitalCCSender >::sender
DigitalCCSender sender
Definition:
Abstract/MIDIButtonLatched.hpp:76
DigitalCCSender.hpp
BEGIN_CS_NAMESPACE
#define BEGIN_CS_NAMESPACE
Definition:
Settings/NamespaceSettings.hpp:9
DigitalCCSender
Definition:
DigitalCCSender.hpp:7
END_CS_NAMESPACE
#define END_CS_NAMESPACE
Definition:
Settings/NamespaceSettings.hpp:10
MIDICNChannelAddress
A type-safe utility class for saving a MIDI address consisting of a 7-bit address,...
Definition:
MIDICNChannelAddress.hpp:82
MIDIButtonLatched< DigitalCCSender >::address
const MIDICNChannelAddress address
Definition:
Abstract/MIDIButtonLatched.hpp:72
AH::pin_t
uint16_t pin_t
The type for Arduino pins (and ExtendedIOElement pins).
Definition:
Hardware-Types.hpp:17
MIDIButtonLatched.hpp
CCButtonLatched
A class of MIDIOutputElements that read the input of a momentary push button or toggle switch,...
Definition:
CCButtonLatched.hpp:23
CCButtonLatched::CCButtonLatched
CCButtonLatched(pin_t pin, const MIDICNChannelAddress &address, const DigitalCCSender &sender={})
Create a new CCButtonLatched object on the given pin and with address.
Definition:
CCButtonLatched.hpp:39
MIDIButtonLatched
A class for momentary buttons and switches that send MIDI events.
Definition:
Abstract/MIDIButtonLatched.hpp:20
Generated by
1.8.16