Control Surface  1.2.0
MIDI Control Surface library for Arduino
ManyAddresses/NoteButtonMatrix.hpp
Go to the documentation of this file.
1 #pragma once
2 
6 
8 
9 namespace Bankable {
10 namespace ManyAddresses {
11 
32 template <setting_t NumBanks, uint8_t nb_rows, uint8_t nb_cols>
34  : public MIDIButtonMatrix<ManyMatrixAddresses<NumBanks, nb_rows, nb_cols>,
35  DigitalNoteSender, nb_rows, nb_cols> {
36  public:
63  const Bank<NumBanks> &bank, const PinList<nb_rows> &rowPins,
64  const PinList<nb_cols> &colPins,
65  const Array<AddressMatrix<nb_rows, nb_cols>, NumBanks> &notes,
66  const Array<MIDIChannelCN, NumBanks> &channelCNs,
67  uint8_t velocity = 0x7F)
68  : MIDIButtonMatrix<ManyMatrixAddresses<NumBanks, nb_rows, nb_cols>,
69  DigitalNoteSender, nb_rows, nb_cols>{
70  {bank, notes, channelCNs},
71  rowPins,
72  colPins,
73  {velocity},
74  } {}
75 
77  void setVelocity(uint8_t velocity) { this->sender.setVelocity(velocity); }
79  uint8_t getVelocity() const { return this->sender.getVelocity(); }
80 };
81 
82 } // namespace ManyAddresses
83 } // namespace Bankable
84 
Bank
A class that groups Bankable BankableMIDIOutputs and BankableMIDIInputs, and allows the user to chang...
Definition: Bank.hpp:75
Bankable::ManyAddresses::ManyMatrixAddresses
Definition: BankAddresses.hpp:147
Bankable
A namespace for MIDI elements that can be added to a Bank, to change their address or channel.
Definition: BankAddresses.hpp:7
Bankable::ManyAddresses::NoteButtonMatrix::NoteButtonMatrix
NoteButtonMatrix(const Bank< NumBanks > &bank, const PinList< nb_rows > &rowPins, const PinList< nb_cols > &colPins, const Array< AddressMatrix< nb_rows, nb_cols >, NumBanks > &notes, const Array< MIDIChannelCN, NumBanks > &channelCNs, uint8_t velocity=0x7F)
Create a new Bankable NoteButtonMatrix object with the given pins, controller numbers and channel.
Definition: ManyAddresses/NoteButtonMatrix.hpp:62
DigitalNoteSender::setVelocity
void setVelocity(uint8_t velocity)
Definition: DigitalNoteSender.hpp:25
Bankable::ManyAddresses::NoteButtonMatrix::setVelocity
void setVelocity(uint8_t velocity)
Set the velocity of the MIDI Note events.
Definition: ManyAddresses/NoteButtonMatrix.hpp:77
BEGIN_CS_NAMESPACE
#define BEGIN_CS_NAMESPACE
Definition: Settings/NamespaceSettings.hpp:9
BankAddresses.hpp
AH::ButtonMatrix::colPins
const PinList< nb_cols > colPins
Definition: ButtonMatrix.hpp:86
END_CS_NAMESPACE
#define END_CS_NAMESPACE
Definition: Settings/NamespaceSettings.hpp:10
MIDIButtonMatrix.hpp
AH::Array
An array wrapper for easy copying, comparing, and iterating.
Definition: Array.hpp:36
Bankable::ManyAddresses::NoteButtonMatrix
A class of MIDIOutputElements that read the input from a matrix of momentary push buttons or switches...
Definition: ManyAddresses/NoteButtonMatrix.hpp:35
AddressMatrix
Array2D< uint8_t, nb_rows, nb_cols > AddressMatrix
Definition: Def.hpp:27
DigitalNoteSender::getVelocity
uint8_t getVelocity() const
Definition: DigitalNoteSender.hpp:26
DigitalNoteSender.hpp
DigitalNoteSender
Class that sends MIDI note on and off messages.
Definition: DigitalNoteSender.hpp:12
AH::ButtonMatrix::rowPins
const PinList< nb_rows > rowPins
Definition: ButtonMatrix.hpp:85
Bankable::MIDIButtonMatrix
MIDIButtonMatrix.
Definition: Bankable/Abstract/MIDIButtonMatrix.hpp:30
Bankable::ManyAddresses::NoteButtonMatrix::getVelocity
uint8_t getVelocity() const
Get the velocity of the MIDI Note events.
Definition: ManyAddresses/NoteButtonMatrix.hpp:79
Bankable::MIDIButtonMatrix< ManyMatrixAddresses< NumBanks, nb_rows, nb_cols >, DigitalNoteSender, nb_rows, nb_cols >::sender
DigitalNoteSender sender
Definition: Bankable/Abstract/MIDIButtonMatrix.hpp:80