Control Surface main
MIDI Control Surface library for Arduino
Loading...
Searching...
No Matches
DigitalNoteSender.hpp
Go to the documentation of this file.
1#pragma once
2
4
6
13 public:
17 void sendOn(MIDIAddress address) {
18 Control_Surface.sendNoteOn(address, getVelocity());
19 }
20
21 void sendOff(MIDIAddress address) {
22 Control_Surface.sendNoteOff(address, 0x7F);
23 }
24
25 void setVelocity(uint8_t velocity) { this->velocity = velocity; }
26 uint8_t getVelocity() const { return this->velocity; }
27
28 private:
29 uint8_t velocity;
30};
31
Control_Surface_ & Control_Surface
A predefined instance of the Control Surface to use in the Arduino sketches.
#define END_CS_NAMESPACE
#define BEGIN_CS_NAMESPACE
void setVelocity(uint8_t velocity)
uint8_t getVelocity() const
void sendOn(MIDIAddress address)
Send a note on message to the given address with this object's velocity as velocity.
void sendOff(MIDIAddress address)
Send a note off message to the given address with 0x7F as velocity.
DigitalNoteSender(uint8_t velocity=0x7F)
A type-safe utility class for saving a MIDI address consisting of a 7-bit address,...