Control Surface  1.1.0
MIDI Control Surface library for Arduino
CCIncrementDecrementButtons.hpp
Go to the documentation of this file.
1 #pragma once
2 
6 
8 
9 /**
10  * @brief A class of MIDIOutputElement%s that read the input of **two
11  * momentary push buttons** to increment or decrement a **relative
12  * setting** using relative MIDI **Control Change** events.
13  * An optional note number can be provided to reset the setting.
14  *
15  * This version cannot be banked.
16  *
17  * @ingroup MIDIOutputElements
18  */
20  : public MIDIIncrementDecrementButtons<RelativeCCSender,
21  DigitalNoteSender> {
22  public:
23  /**
24  * @brief Construct a new CCIncrementDecrementButtons object.
25  *
26  * @param buttons
27  * The pins with the increment and decrement buttons connected.
28  * The internal pull-up resistors will be enabled.
29  * @param address
30  * The address to use for the relative events, containing the
31  * controller number [0, 119], channel [CHANNEL_1, CHANNEL_16], and
32  * optional cable number [0, 15].
33  * @param multiplier
34  * The multiplier for the relative events. When setting it to 2,
35  * it will scroll twice as fast, for example.
36  * @param resetNote
37  * The MIDI address to use to reset the setting, containing the
38  * note number [0, 119], channel [CHANNEL_1, CHANNEL_16], and
39  * optional cable number [0, 15]. It will be triggered when the
40  * increment and decrement buttons are pressed simultaneously.
41  * @param relativeSender
42  * The MIDI sender to use for the relative events.
43  * @param resetSender
44  * The MIDI sender to use for reset events.
45  */
48  uint8_t multiplier = 1,
49  const MIDICNChannelAddress &resetNote = {},
50  const RelativeCCSender &relativeSender = {},
51  const DigitalNoteSender &resetSender = {})
54 };
55 
MIDIIncrementDecrementButtons< RelativeCCSender, DigitalNoteSender >::resetSender
DigitalNoteSender resetSender
Definition: Abstract/MIDIIncrementDecrementButtons.hpp:73
AH::IncrementDecrementButtons
A class for buttons that increment and decrement some counter or setting.
Definition: IncrementDecrementButtons.hpp:25
MIDIIncrementDecrementButtons< RelativeCCSender, DigitalNoteSender >::relativeSender
RelativeCCSender relativeSender
Definition: Abstract/MIDIIncrementDecrementButtons.hpp:72
BEGIN_CS_NAMESPACE
#define BEGIN_CS_NAMESPACE
Definition: Settings/NamespaceSettings.hpp:9
END_CS_NAMESPACE
#define END_CS_NAMESPACE
Definition: Settings/NamespaceSettings.hpp:10
MIDIIncrementDecrementButtons
An abstract class for two buttons that send incremental MIDI events.
Definition: Abstract/MIDIIncrementDecrementButtons.hpp:15
MIDIIncrementDecrementButtons< RelativeCCSender, DigitalNoteSender >::multiplier
const uint8_t multiplier
Definition: Abstract/MIDIIncrementDecrementButtons.hpp:68
MIDICNChannelAddress
A type-safe utility class for saving a MIDI address consisting of a 7-bit address,...
Definition: MIDICNChannelAddress.hpp:82
CCIncrementDecrementButtons
A class of MIDIOutputElements that read the input of two momentary push buttons to increment or decre...
Definition: CCIncrementDecrementButtons.hpp:19
RelativeCCSender.hpp
DigitalNoteSender.hpp
DigitalNoteSender
Definition: DigitalNoteSender.hpp:7
RelativeCCSender
Definition: RelativeCCSender.hpp:65
MIDIIncrementDecrementButtons.hpp
CCIncrementDecrementButtons::CCIncrementDecrementButtons
CCIncrementDecrementButtons(const AH::IncrementDecrementButtons &buttons, const MIDICNChannelAddress &address, uint8_t multiplier=1, const MIDICNChannelAddress &resetNote={}, const RelativeCCSender &relativeSender={}, const DigitalNoteSender &resetSender={})
Construct a new CCIncrementDecrementButtons object.
Definition: CCIncrementDecrementButtons.hpp:46
MIDIIncrementDecrementButtons< RelativeCCSender, DigitalNoteSender >::buttons
AH::IncrementDecrementButtons buttons
Definition: Abstract/MIDIIncrementDecrementButtons.hpp:66
MIDIIncrementDecrementButtons< RelativeCCSender, DigitalNoteSender >::MIDIIncrementDecrementButtons
MIDIIncrementDecrementButtons(const AH::IncrementDecrementButtons &buttons, const MIDICNChannelAddress &address, uint8_t multiplier, const MIDICNChannelAddress &resetAddress, const RelativeCCSender &relativeSender, const DigitalNoteSender &resetSender)
Construct a new MIDIIncrementDecrementButtons.
Definition: Abstract/MIDIIncrementDecrementButtons.hpp:22
MIDIIncrementDecrementButtons< RelativeCCSender, DigitalNoteSender >::address
const MIDICNChannelAddress address
Definition: Abstract/MIDIIncrementDecrementButtons.hpp:67