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