25 lines
877 B
C++
25 lines
877 B
C++
#pragma once
|
|
|
|
#include <MIDI_Outputs/Abstract/MIDIButtonMatrix.hpp>
|
|
#include <MIDI_Senders/DigitalNoteSender.hpp>
|
|
|
|
BEGIN_CS_NAMESPACE
|
|
|
|
template <uint8_t NumRows, uint8_t NumCols>
|
|
class NoteButtonMatrix
|
|
: public MIDIButtonMatrix<DigitalNoteSender, NumRows, NumCols> {
|
|
public:
|
|
NoteButtonMatrix(const PinList<NumRows> &rowPins,
|
|
const PinList<NumCols> &colPins,
|
|
const AddressMatrix<NumRows, NumCols> ¬es,
|
|
MIDIChannelCable channelCN = {Channel_1, Cable_1},
|
|
uint8_t velocity = 0x7F)
|
|
: MIDIButtonMatrix<DigitalNoteSender, NumRows, NumCols> {
|
|
rowPins, colPins, notes, channelCN, {velocity}} {}
|
|
|
|
void setVelocity(uint8_t velocity) { this->sender.setVelocity(velocity); }
|
|
uint8_t getVelocity() const { return this->sender.getVelocity(); }
|
|
};
|
|
|
|
END_CS_NAMESPACE
|