Control Surface main
MIDI Control Surface library for Arduino
Loading...
Searching...
No Matches
NoteButtonMatrix.hpp
Go to the documentation of this file.
1#pragma once
2
5
7
25template <uint8_t NumRows, uint8_t NumCols>
27 : public MIDIButtonMatrix<DigitalNoteSender, NumRows, NumCols> {
28 public:
50 NoteButtonMatrix(const PinList<NumRows> &rowPins,
51 const PinList<NumCols> &colPins,
53 MIDIChannelCable channelCN = {Channel_1, Cable_1},
54 uint8_t velocity = 0x7F)
55 : MIDIButtonMatrix<DigitalNoteSender, NumRows, NumCols> {
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
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
const PinList< NumRows > rowPins
const PinList< NumCols > colPins
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.
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(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 NoteButtonMatrix object with the given pins, note numbers and channel.