Control Surface
1.1.0
MIDI Control Surface library for Arduino
src
MIDI_Outputs
Bankable
Bankable/CCPotentiometer.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include <
Banks/BankAddresses.hpp
>
4
#include <
MIDI_Outputs/Bankable/Abstract/MIDIFilteredAnalog.hpp
>
5
#include <
MIDI_Senders/ContinuousCCSender.hpp
>
6
7
BEGIN_CS_NAMESPACE
8
9
namespace
Bankable
{
10
11
/**
12
* @brief A class of MIDIOutputElement%s that read the analog input from a
13
* **potentiometer or fader**, and send out 7-bit MIDI **Control
14
* Change** events.
15
*
16
* The analog input is filtered and hysteresis is applied for maximum
17
* stability.
18
* This version can be banked.
19
*
20
* @ingroup BankableMIDIOutputElements
21
*/
22
class
CCPotentiometer
23
:
public
MIDIFilteredAnalogAddressable
<SingleAddress, ContinuousCCSender> {
24
public
:
25
/**
26
* @brief Create a new Bankable CCPotentiometer object with the given
27
* analog pin, controller number and channel.
28
*
29
* @param config
30
* The bank configuration to use: the bank to add this element to,
31
* and whether to change the address, channel or cable number.
32
* @param analogPin
33
* The analog input pin to read from.
34
* @param address
35
* The MIDI address containing the controller number [0, 119],
36
* channel [CHANNEL_1, CHANNEL_16], and optional cable number
37
* [0, 15].
38
* @param sender
39
* The MIDI sender to use.
40
*/
41
CCPotentiometer
(
const
OutputBankConfig
&config,
pin_t
analogPin,
42
const
MIDICNChannelAddress
&
address
,
43
const
ContinuousCCSender
&
sender
= {})
44
:
MIDIFilteredAnalogAddressable
(
SingleAddress
{config,
address
}, analogPin,
sender
) {}
45
};
46
47
}
// namespace Bankable
48
49
END_CS_NAMESPACE
Bankable
A namespace for MIDI elements that can be added to a Bank, to change their address or channel.
Definition:
BankAddresses.hpp:7
Bankable::MIDIFilteredAnalogAddressable< SingleAddress, ContinuousCCSender >::address
SingleAddress address
Definition:
Bankable/Abstract/MIDIFilteredAnalog.hpp:75
Bankable::MIDIFilteredAnalogAddressable< SingleAddress, ContinuousCCSender >::sender
ContinuousCCSender sender
Definition:
Bankable/Abstract/MIDIFilteredAnalog.hpp:79
BEGIN_CS_NAMESPACE
#define BEGIN_CS_NAMESPACE
Definition:
Settings/NamespaceSettings.hpp:9
BankAddresses.hpp
Bankable::CCPotentiometer::CCPotentiometer
CCPotentiometer(const OutputBankConfig &config, pin_t analogPin, const MIDICNChannelAddress &address, const ContinuousCCSender &sender={})
Create a new Bankable CCPotentiometer object with the given analog pin, controller number and channel...
Definition:
Bankable/CCPotentiometer.hpp:41
END_CS_NAMESPACE
#define END_CS_NAMESPACE
Definition:
Settings/NamespaceSettings.hpp:10
Bankable::CCPotentiometer
A class of MIDIOutputElements that read the analog input from a potentiometer or fader,...
Definition:
Bankable/CCPotentiometer.hpp:22
MIDICNChannelAddress
A type-safe utility class for saving a MIDI address consisting of a 7-bit address,...
Definition:
MIDICNChannelAddress.hpp:82
Bankable::MIDIFilteredAnalogAddressable< SingleAddress, ContinuousCCSender >::MIDIFilteredAnalogAddressable
MIDIFilteredAnalogAddressable(const SingleAddress &bankAddress, pin_t analogPin, const ContinuousCCSender &sender)
Construct a new MIDIFilteredAnalog.
Definition:
Bankable/Abstract/MIDIFilteredAnalog.hpp:34
MIDIFilteredAnalog.hpp
AH::pin_t
uint16_t pin_t
The type for Arduino pins (and ExtendedIOElement pins).
Definition:
Hardware-Types.hpp:17
Bankable::SingleAddress
Definition:
BankAddresses.hpp:9
ContinuousCCSender.hpp
Bankable::MIDIFilteredAnalogAddressable
A class for potentiometers and faders that send MIDI events and that can be added to a Bank.
Definition:
Bankable/Abstract/MIDIFilteredAnalog.hpp:21
ContinuousCCSender
Definition:
ContinuousCCSender.hpp:7
OutputBankConfig
A struct for selecting the bank of BankableMIDIOutputs and the bank type.
Definition:
BankConfig.hpp:50
Generated by
1.8.16