Control Surface  1.2.0
MIDI Control Surface library for Arduino
DigitalNoteSender.hpp
Go to the documentation of this file.
1 #pragma once
2 
4 
6 
13  public:
17  void sendOn(MIDIAddress address) {
19  }
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 
MIDIAddress
A type-safe utility class for saving a MIDI address consisting of a 7-bit address,...
Definition: MIDIAddress.hpp:91
DigitalNoteSender::sendOff
void sendOff(MIDIAddress address)
Send a note off message to the given address with 0x7F as velocity.
Definition: DigitalNoteSender.hpp:21
DigitalNoteSender::setVelocity
void setVelocity(uint8_t velocity)
Definition: DigitalNoteSender.hpp:25
MIDI_Sender::sendNoteOn
void sendNoteOn(MIDIAddress address, uint8_t velocity)
Send a MIDI Note On event.
Definition: MIDI_Interface.ipp:49
DigitalNoteSender::velocity
uint8_t velocity
Definition: DigitalNoteSender.hpp:29
BEGIN_CS_NAMESPACE
#define BEGIN_CS_NAMESPACE
Definition: Settings/NamespaceSettings.hpp:9
END_CS_NAMESPACE
#define END_CS_NAMESPACE
Definition: Settings/NamespaceSettings.hpp:10
Control_Surface_Class.hpp
Control_Surface
Control_Surface_ & Control_Surface
A predefined instance of the Control Surface to use in the Arduino sketches.
Definition: Control_Surface_Class.cpp:203
DigitalNoteSender::getVelocity
uint8_t getVelocity() const
Definition: DigitalNoteSender.hpp:26
DigitalNoteSender
Class that sends MIDI note on and off messages.
Definition: DigitalNoteSender.hpp:12
MIDI_Sender::sendNoteOff
void sendNoteOff(MIDIAddress address, uint8_t velocity)
Send a MIDI Note Off event.
Definition: MIDI_Interface.ipp:55
DigitalNoteSender::sendOn
void sendOn(MIDIAddress address)
Send a note on message to the given address with this object's velocity as velocity.
Definition: DigitalNoteSender.hpp:17
DigitalNoteSender::DigitalNoteSender
DigitalNoteSender(uint8_t velocity=0x7F)
Definition: DigitalNoteSender.hpp:14