This is an old version of the documentation. View the latest version here.
Control Surface  1.0.0
MIDI Control Surface library for Arduino
NoteButtonMatrix.hpp
Go to the documentation of this file.
1 #pragma once
2 
5 
7 
25 template <uint8_t nb_rows, uint8_t nb_cols>
27  : public MIDIButtonMatrix<DigitalNoteSender, nb_rows, nb_cols> {
28  public:
53  MIDICNChannel channelCN = {CHANNEL_1, 0},
54  uint8_t velocity = 0x7F)
56  rowPins, colPins, notes, channelCN, {velocity},
57  } {}
58 
60  void setVelocity(uint8_t velocity) { this->sender.setVelocity(velocity); }
62  uint8_t getVelocity() const { return this->sender.getVelocity(); }
63 };
64 
MIDIButtonMatrix.hpp
NoteButtonMatrix::setVelocity
void setVelocity(uint8_t velocity)
Set the velocity of the MIDI Note events.
Definition: NoteButtonMatrix.hpp:60
Array< pin_t, N >
NoteButtonMatrix
A class of MIDIOutputElements that read the input from a matrix of momentary push buttons or switches...
Definition: NoteButtonMatrix.hpp:26
MIDIButtonMatrix< DigitalNoteSender, nb_rows, nb_cols >::sender
DigitalNoteSender sender
Definition: Abstract/MIDIButtonMatrix.hpp:48
NoteButtonMatrix::NoteButtonMatrix
NoteButtonMatrix(const PinList< nb_rows > &rowPins, const PinList< nb_cols > &colPins, const AddressMatrix< nb_rows, nb_cols > &notes, MIDICNChannel channelCN={CHANNEL_1, 0}, uint8_t velocity=0x7F)
Create a new NoteButtonMatrix object with the given pins, note numbers and channel.
Definition: NoteButtonMatrix.hpp:50
BEGIN_CS_NAMESPACE
#define BEGIN_CS_NAMESPACE
Definition: NamespaceSettings.hpp:9
MIDIButtonMatrix
MIDIButtonMatrix.
Definition: Abstract/MIDIButtonMatrix.hpp:15
MIDICNChannel
A class for saving a MIDI channel and cable number.
Definition: MIDICNChannelAddress.hpp:19
END_CS_NAMESPACE
#define END_CS_NAMESPACE
Definition: NamespaceSettings.hpp:10
DigitalNoteSender::getVelocity
uint8_t getVelocity() const
Definition: DigitalNoteSender.hpp:18
NoteButtonMatrix::getVelocity
uint8_t getVelocity() const
Get the velocity of the MIDI Note events.
Definition: NoteButtonMatrix.hpp:62
DigitalNoteSender.hpp
DigitalNoteSender::setVelocity
void setVelocity(uint8_t velocity)
Definition: DigitalNoteSender.hpp:17
ButtonMatrix::rowPins
const PinList< nb_rows > rowPins
Definition: ButtonMatrix.hpp:76
CHANNEL_1
constexpr Channel CHANNEL_1
Definition: Channel.hpp:111
ButtonMatrix::colPins
const PinList< nb_cols > colPins
Definition: ButtonMatrix.hpp:77