Control Surface master
MIDI Control Surface library for Arduino
NoteButtonLatched.hpp
Go to the documentation of this file.
1/* ✔ */
2
3#pragma once
4
7
9
22class NoteButtonLatched : public MIDIButtonLatched<DigitalNoteSender> {
23 public:
38 NoteButtonLatched(pin_t pin, MIDIAddress address, uint8_t velocity = 0x7F)
40 pin,
41 address,
42 {velocity},
43 } {}
44
46 void setVelocity(uint8_t velocity) { this->sender.setVelocity(velocity); }
48 uint8_t getVelocity() const { return this->sender.getVelocity(); }
49};
50
#define END_CS_NAMESPACE
#define BEGIN_CS_NAMESPACE
A type-safe utility class for saving a MIDI address consisting of a 7-bit address,...
A class for momentary buttons and switches that send MIDI events.
A class of MIDIOutputElements that read the input of a momentary push button or toggle switch,...
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.
NoteButtonLatched(pin_t pin, MIDIAddress address, uint8_t velocity=0x7F)
Create a new NoteButtonLatched object on the given pin and with address.
uint16_t pin_t
The type for Arduino pins (and ExtendedIOElement pins).