22 lines
720 B
C++
22 lines
720 B
C++
#pragma once
|
|
|
|
#include <MIDI_Outputs/Abstract/MIDIButtons.hpp>
|
|
#include <MIDI_Senders/DigitalNoteSender.hpp>
|
|
|
|
BEGIN_CS_NAMESPACE
|
|
|
|
template <uint8_t NumButtons>
|
|
class NoteButtons : public MIDIButtons<DigitalNoteSender, NumButtons> {
|
|
public:
|
|
NoteButtons(const Array<AH::Button, NumButtons> &buttons,
|
|
MIDIAddress baseAddress, RelativeMIDIAddress incrementAddress,
|
|
uint8_t velocity = 0x7F)
|
|
: MIDIButtons<DigitalNoteSender, NumButtons> {
|
|
buttons, baseAddress, incrementAddress, {velocity}} {}
|
|
|
|
void setVelocity(uint8_t velocity) { this->sender.setVelocity(velocity); }
|
|
uint8_t getVelocity() const { return this->sender.getVelocity(); }
|
|
};
|
|
|
|
END_CS_NAMESPACE
|