Control Surface
main
MIDI Control Surface library for Arduino
Toggle main menu visibility
Loading...
Searching...
No Matches
src
MIDI_Outputs
NoteButtons.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include <
MIDI_Outputs/Abstract/MIDIButtons.hpp
>
4
#include <
MIDI_Senders/DigitalNoteSender.hpp
>
5
6
BEGIN_CS_NAMESPACE
7
23
template
<u
int
8_t NumButtons>
24
class
NoteButtons
:
public
MIDIButtons
<DigitalNoteSender, NumButtons> {
25
public
:
45
NoteButtons
(
const
Array<AH::Button, NumButtons>
&
buttons
,
46
MIDIAddress
baseAddress
,
RelativeMIDIAddress
incrementAddress
,
47
uint8_t velocity = 0x7F)
48
:
MIDIButtons
<
DigitalNoteSender
, NumButtons> {
49
buttons
,
50
baseAddress
,
51
incrementAddress
,
52
{velocity},
53
} {}
54
56
void
setVelocity
(uint8_t velocity) { this->
sender
.setVelocity(velocity); }
58
uint8_t
getVelocity
()
const
{
return
this->
sender
.getVelocity(); }
59
};
60
61
END_CS_NAMESPACE
MIDIButtons.hpp
DigitalNoteSender.hpp
END_CS_NAMESPACE
#define END_CS_NAMESPACE
Definition
Settings/NamespaceSettings.hpp:14
BEGIN_CS_NAMESPACE
#define BEGIN_CS_NAMESPACE
Definition
Settings/NamespaceSettings.hpp:11
DigitalNoteSender
Class that sends MIDI note on and off messages.
Definition
DigitalNoteSender.hpp:12
MIDIAddress
A type-safe utility class for saving a MIDI address consisting of a 7-bit address,...
Definition
MIDIAddress.hpp:145
MIDIButtons< DigitalNoteSender, NumButtons >::incrementAddress
RelativeMIDIAddress incrementAddress
Definition
Abstract/MIDIButtons.hpp:80
MIDIButtons< DigitalNoteSender, NumButtons >::sender
DigitalNoteSender sender
Definition
Abstract/MIDIButtons.hpp:83
MIDIButtons< DigitalNoteSender, NumButtons >::buttons
Array< AH::Button, NumButtons > buttons
Definition
Abstract/MIDIButtons.hpp:78
MIDIButtons< DigitalNoteSender, NumButtons >::baseAddress
MIDIAddress baseAddress
Definition
Abstract/MIDIButtons.hpp:79
MIDIButtons< DigitalNoteSender, NumButtons >::MIDIButtons
MIDIButtons(const Array< AH::Button, NumButtons > &buttons, MIDIAddress baseAddress, RelativeMIDIAddress incrementAddress, const DigitalNoteSender &sender)
Definition
Abstract/MIDIButtons.hpp:24
NoteButtons::setVelocity
void setVelocity(uint8_t velocity)
Set the velocity of the MIDI Note events.
Definition
NoteButtons.hpp:56
NoteButtons::getVelocity
uint8_t getVelocity() const
Get the velocity of the MIDI Note events.
Definition
NoteButtons.hpp:58
NoteButtons::NoteButtons
NoteButtons(const Array< AH::Button, NumButtons > &buttons, MIDIAddress baseAddress, RelativeMIDIAddress incrementAddress, uint8_t velocity=0x7F)
Create a new NoteButtons object with the given pins, the given controller number and channel.
Definition
NoteButtons.hpp:45
RelativeMIDIAddress
A class for saving an offset to a MIDI address.
Definition
MIDIAddress.hpp:113
AH::Array
An array wrapper for easy copying, comparing, and iterating.
Definition
Array.hpp:32
Generated by
1.17.0