Control Surface
main
MIDI Control Surface library for Arduino
Toggle main menu visibility
Loading...
Searching...
No Matches
src
MIDI_Outputs
Bankable
Bankable/NoteButtonMatrix.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include <
Banks/BankAddresses.hpp
>
4
#include <
MIDI_Outputs/Bankable/Abstract/MIDIButtonMatrix.hpp
>
5
#include <
MIDI_Senders/DigitalNoteSender.hpp
>
6
7
BEGIN_CS_NAMESPACE
8
9
namespace
Bankable
{
10
28
template
<u
int
8_t NumRows, u
int
8_t NumCols>
29
class
NoteButtonMatrix
30
:
public
MIDIButtonMatrix
<MatrixAddress<NumRows, NumCols>,
31
DigitalNoteSender, NumRows, NumCols> {
32
public
:
58
NoteButtonMatrix
(
OutputBankConfig<>
config,
const
PinList<NumRows>
&
rowPins
,
59
const
PinList<NumCols>
&
colPins
,
60
const
AddressMatrix<NumRows, NumCols>
¬es,
61
MIDIChannelCable
channelCN = {
Channel_1
,
Cable_1
},
62
uint8_t velocity = 0x7F)
63
:
MIDIButtonMatrix
<
MatrixAddress
<NumRows, NumCols>,
DigitalNoteSender
,
64
NumRows, NumCols> {
65
{config, notes, channelCN},
66
rowPins
,
67
colPins
,
68
{velocity},
69
} {}
70
72
void
setVelocity
(uint8_t velocity) { this->
sender
.setVelocity(velocity); }
74
uint8_t
getVelocity
()
const
{
return
this->
sender
.getVelocity(); }
75
};
76
77
}
// namespace Bankable
78
79
END_CS_NAMESPACE
BankAddresses.hpp
MIDIButtonMatrix.hpp
Cable_1
constexpr Cable Cable_1
Definition
Cable.hpp:118
Channel_1
constexpr Channel Channel_1
Definition
Channel.hpp:118
AddressMatrix
Array2D< uint8_t, NumRows, NumCols > AddressMatrix
Definition
Def.hpp:30
DigitalNoteSender.hpp
END_CS_NAMESPACE
#define END_CS_NAMESPACE
Definition
Settings/NamespaceSettings.hpp:14
BEGIN_CS_NAMESPACE
#define BEGIN_CS_NAMESPACE
Definition
Settings/NamespaceSettings.hpp:11
Bankable::MIDIButtonMatrix< MatrixAddress< NumRows, NumCols >, DigitalNoteSender, NumRows, NumCols >::rowPins
const PinList< NumRows > rowPins
Definition
ButtonMatrix.hpp:88
Bankable::MIDIButtonMatrix< MatrixAddress< NumRows, NumCols >, DigitalNoteSender, NumRows, NumCols >::colPins
const PinList< NumCols > colPins
Definition
ButtonMatrix.hpp:89
Bankable::MIDIButtonMatrix
MIDIButtonMatrix.
Definition
Bankable/Abstract/MIDIButtonMatrix.hpp:33
Bankable::MIDIButtonMatrix< MatrixAddress< NumRows, NumCols >, DigitalNoteSender, NumRows, NumCols >::sender
DigitalNoteSender sender
Definition
Bankable/Abstract/MIDIButtonMatrix.hpp:85
Bankable::MIDIButtonMatrix< MatrixAddress< NumRows, NumCols >, DigitalNoteSender, NumRows, NumCols >::MIDIButtonMatrix
MIDIButtonMatrix(MatrixAddress< NumRows, NumCols > bankAddress, const PinList< NumRows > &rowPins, const PinList< NumCols > &colPins, const DigitalNoteSender &sender)
Definition
Bankable/Abstract/MIDIButtonMatrix.hpp:55
Bankable::MatrixAddress
Definition
BankAddresses.hpp:77
Bankable::NoteButtonMatrix::setVelocity
void setVelocity(uint8_t velocity)
Set the velocity of the MIDI Note events.
Definition
Bankable/NoteButtonMatrix.hpp:72
Bankable::NoteButtonMatrix::getVelocity
uint8_t getVelocity() const
Get the velocity of the MIDI Note events.
Definition
Bankable/NoteButtonMatrix.hpp:74
Bankable::NoteButtonMatrix::NoteButtonMatrix
NoteButtonMatrix(OutputBankConfig<> config, const PinList< NumRows > &rowPins, const PinList< NumCols > &colPins, const AddressMatrix< NumRows, NumCols > ¬es, MIDIChannelCable channelCN={Channel_1, Cable_1}, uint8_t velocity=0x7F)
Create a new Bankable NoteButtonMatrix object with the given pins, note numbers and channel.
Definition
Bankable/NoteButtonMatrix.hpp:58
DigitalNoteSender
Class that sends MIDI note on and off messages.
Definition
DigitalNoteSender.hpp:12
MIDIChannelCable
A class for saving a MIDI channel and cable number.
Definition
MIDIAddress.hpp:24
AH::PinList
Array< pin_t, N > PinList
An easy alias for arrays of pins.
Definition
Hardware-Types.hpp:100
Bankable
A namespace for MIDI elements that can be added to a Bank, to change their address or channel.
Definition
BankAddresses.hpp:7
OutputBankConfig
Definition
BankConfig.hpp:79
Generated by
1.17.0