Control Surface pin-t-adl
MIDI Control Surface library for Arduino
Bankable/NoteButtonMatrix.hpp
Go to the documentation of this file.
1#pragma once
2
6
8
9namespace Bankable {
10
28template <uint8_t NumRows, uint8_t NumCols>
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,
61 MIDIChannelCable channelCN = {CHANNEL_1, CABLE_1},
62 uint8_t velocity = 0x7F)
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
constexpr Cable CABLE_1
Definition: Cable.hpp:118
constexpr Channel CHANNEL_1
Definition: Channel.hpp:118
Array2D< uint8_t, NumRows, NumCols > AddressMatrix
Definition: Def.hpp:30
#define END_CS_NAMESPACE
#define BEGIN_CS_NAMESPACE
A class of MIDIOutputElements that read the input from a matrix of momentary push buttons or switches...
void setVelocity(uint8_t velocity)
Set the velocity of the MIDI Note events.
uint8_t getVelocity() const
Get the velocity of the MIDI Note events.
NoteButtonMatrix(OutputBankConfig<> config, const PinList< NumRows > &rowPins, const PinList< NumCols > &colPins, const AddressMatrix< NumRows, NumCols > &notes, MIDIChannelCable channelCN={CHANNEL_1, CABLE_1}, uint8_t velocity=0x7F)
Create a new Bankable NoteButtonMatrix object with the given pins, note numbers and channel.
Class that sends MIDI note on and off messages.
void setVelocity(uint8_t velocity)
uint8_t getVelocity() const
A class for saving a MIDI channel and cable number.
Definition: MIDIAddress.hpp:24
A namespace for MIDI elements that can be added to a Bank, to change their address or channel.