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