This is an old version of the documentation. View the latest version here.
Control Surface  1.0.0
MIDI Control Surface library for Arduino
DigitalNoteSender.hpp
Go to the documentation of this file.
1 #pragma once
2 
4 
6 
8  public:
10  void sendOn(MIDICNChannelAddress address) {
12  }
13  void sendOff(MIDICNChannelAddress address) {
14  Control_Surface.MIDI().sendNoteOff(address, 0x7F);
15  }
16 
17  void setVelocity(uint8_t velocity) { this->velocity = velocity; }
18  uint8_t getVelocity() const { return this->velocity; }
19 
20  private:
21  uint8_t velocity;
22 };
23 
Control_Surface_::MIDI
MIDI_Interface & MIDI()
Get the MIDI interface of the Control Surface.
Definition: Control_Surface_Class.cpp:55
DigitalNoteSender::sendOn
void sendOn(MIDICNChannelAddress address)
Definition: DigitalNoteSender.hpp:10
Control_Surface_Class.hpp
BEGIN_CS_NAMESPACE
#define BEGIN_CS_NAMESPACE
Definition: NamespaceSettings.hpp:9
MIDICNChannelAddress
A type-safe utility class for saving a MIDI address consisting of a 7-bit address,...
Definition: MIDICNChannelAddress.hpp:82
Control_Surface
Control_Surface_ & Control_Surface
A predefined instance of the Control Surface to use in the Arduino sketches.
Definition: Control_Surface_Class.cpp:171
MIDI_Interface::sendNoteOff
void sendNoteOff(MIDICNChannelAddress address, uint8_t velocity)
Send a MIDI Note Off event.
Definition: MIDI_Interface.cpp:64
END_CS_NAMESPACE
#define END_CS_NAMESPACE
Definition: NamespaceSettings.hpp:10
DigitalNoteSender::getVelocity
uint8_t getVelocity() const
Definition: DigitalNoteSender.hpp:18
DigitalNoteSender::DigitalNoteSender
DigitalNoteSender(uint8_t velocity=0x7F)
Definition: DigitalNoteSender.hpp:9
MIDI_Interface::sendNoteOn
void sendNoteOn(MIDICNChannelAddress address, uint8_t velocity)
Send a MIDI Note On event.
Definition: MIDI_Interface.cpp:58
DigitalNoteSender
Definition: DigitalNoteSender.hpp:7
DigitalNoteSender::setVelocity
void setVelocity(uint8_t velocity)
Definition: DigitalNoteSender.hpp:17
DigitalNoteSender::sendOff
void sendOff(MIDICNChannelAddress address)
Definition: DigitalNoteSender.hpp:13
DigitalNoteSender::velocity
uint8_t velocity
Definition: DigitalNoteSender.hpp:21