Control Surface
main
MIDI Control Surface library for Arduino
Toggle main menu visibility
Loading...
Searching...
No Matches
src
MIDI_Outputs
NoteButtonMatrix.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include <
MIDI_Outputs/Abstract/MIDIButtonMatrix.hpp
>
4
#include <
MIDI_Senders/DigitalNoteSender.hpp
>
5
6
BEGIN_CS_NAMESPACE
7
25
template
<u
int
8_t NumRows, u
int
8_t NumCols>
26
class
NoteButtonMatrix
27
:
public
MIDIButtonMatrix
<DigitalNoteSender, NumRows, NumCols> {
28
public
:
50
NoteButtonMatrix
(
const
PinList<NumRows>
&
rowPins
,
51
const
PinList<NumCols>
&
colPins
,
52
const
AddressMatrix<NumRows, NumCols>
¬es,
53
MIDIChannelCable
channelCN = {
Channel_1
,
Cable_1
},
54
uint8_t velocity = 0x7F)
55
:
MIDIButtonMatrix
<
DigitalNoteSender
, NumRows, NumCols> {
56
rowPins
,
colPins
, notes, channelCN, {velocity},
57
} {}
58
60
void
setVelocity
(uint8_t velocity) { this->
sender
.setVelocity(velocity); }
62
uint8_t
getVelocity
()
const
{
return
this->
sender
.getVelocity(); }
63
};
64
65
END_CS_NAMESPACE
MIDIButtonMatrix.hpp
Cable_1
constexpr Cable Cable_1
Definition
Cable.hpp:118
Channel_1
constexpr Channel Channel_1
Definition
Channel.hpp:118
AddressMatrix
Array2D< uint8_t, NumRows, NumCols > AddressMatrix
Definition
Def.hpp:30
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
MIDIButtonMatrix< DigitalNoteSender, NumRows, NumCols >::rowPins
const PinList< NumRows > rowPins
Definition
ButtonMatrix.hpp:88
MIDIButtonMatrix< DigitalNoteSender, NumRows, NumCols >::colPins
const PinList< NumCols > colPins
Definition
ButtonMatrix.hpp:89
DigitalNoteSender
Class that sends MIDI note on and off messages.
Definition
DigitalNoteSender.hpp:12
MIDIButtonMatrix
MIDIButtonMatrix.
Definition
Abstract/MIDIButtonMatrix.hpp:18
MIDIButtonMatrix< DigitalNoteSender, NumRows, NumCols >::sender
DigitalNoteSender sender
Definition
Abstract/MIDIButtonMatrix.hpp:86
MIDIButtonMatrix< DigitalNoteSender, NumRows, NumCols >::MIDIButtonMatrix
MIDIButtonMatrix(const PinList< NumRows > &rowPins, const PinList< NumCols > &colPins, const AddressMatrix< NumRows, NumCols > &addresses, MIDIChannelCable channelCN, const DigitalNoteSender &sender)
Definition
Abstract/MIDIButtonMatrix.hpp:42
MIDIChannelCable
A class for saving a MIDI channel and cable number.
Definition
MIDIAddress.hpp:24
NoteButtonMatrix::setVelocity
void setVelocity(uint8_t velocity)
Set the velocity of the MIDI Note events.
Definition
NoteButtonMatrix.hpp:60
NoteButtonMatrix::getVelocity
uint8_t getVelocity() const
Get the velocity of the MIDI Note events.
Definition
NoteButtonMatrix.hpp:62
NoteButtonMatrix::NoteButtonMatrix
NoteButtonMatrix(const PinList< NumRows > &rowPins, const PinList< NumCols > &colPins, const AddressMatrix< NumRows, NumCols > ¬es, MIDIChannelCable channelCN={Channel_1, Cable_1}, uint8_t velocity=0x7F)
Create a new NoteButtonMatrix object with the given pins, note numbers and channel.
Definition
NoteButtonMatrix.hpp:50
AH::PinList
Array< pin_t, N > PinList
An easy alias for arrays of pins.
Definition
Hardware-Types.hpp:100
Generated by
1.17.0