Control Surface
main
MIDI Control Surface library for Arduino
Toggle main menu visibility
Loading...
Searching...
No Matches
src
MIDI_Outputs
ManyAddresses
ManyAddresses/NoteButtonMatrix.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include <
Banks/BankAddresses.hpp
>
4
#include <
MIDI_Outputs/Bankable/Abstract/MIDIButtonMatrix.hpp
>
5
#include <
MIDI_Senders/DigitalNoteSender.hpp
>
6
7
BEGIN_CS_NAMESPACE
8
9
namespace
Bankable
{
10
namespace
ManyAddresses
{
11
32
template
<setting_t NumBanks, u
int
8_t NumRows, u
int
8_t NumCols>
33
class
NoteButtonMatrix
34
:
public
MIDIButtonMatrix
<ManyMatrixAddresses<NumBanks, NumRows, NumCols>,
35
DigitalNoteSender, NumRows, NumCols> {
36
public
:
62
NoteButtonMatrix
(
63
const
Bank<NumBanks>
&bank,
const
PinList<NumRows>
&
rowPins
,
64
const
PinList<NumCols>
&
colPins
,
65
const
Array
<
AddressMatrix<NumRows, NumCols>
, NumBanks> ¬es,
66
const
Array<MIDIChannelCable, NumBanks>
&channelCNs,
67
uint8_t velocity = 0x7F)
68
:
MIDIButtonMatrix
<
ManyMatrixAddresses
<NumBanks, NumRows, NumCols>,
69
DigitalNoteSender
, NumRows, NumCols> {
70
{bank, notes, channelCNs},
71
rowPins
,
72
colPins
,
73
{velocity},
74
} {}
75
77
void
setVelocity
(uint8_t velocity) { this->
sender
.setVelocity(velocity); }
79
uint8_t
getVelocity
()
const
{
return
this->
sender
.getVelocity(); }
80
};
81
82
}
// namespace ManyAddresses
83
}
// namespace Bankable
84
85
END_CS_NAMESPACE
BankAddresses.hpp
MIDIButtonMatrix.hpp
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
Bankable::MIDIButtonMatrix< ManyMatrixAddresses< NumBanks, NumRows, NumCols >, DigitalNoteSender, NumRows, NumCols >::rowPins
const PinList< NumRows > rowPins
Definition
ButtonMatrix.hpp:88
Bankable::MIDIButtonMatrix< ManyMatrixAddresses< NumBanks, NumRows, NumCols >, DigitalNoteSender, NumRows, NumCols >::colPins
const PinList< NumCols > colPins
Definition
ButtonMatrix.hpp:89
Bank
A class that groups Bankable MIDI Output Elements and Bankable MIDI Input Elements,...
Definition
Bank.hpp:94
Bankable::MIDIButtonMatrix< ManyMatrixAddresses< NumBanks, NumRows, NumCols >, DigitalNoteSender, NumRows, NumCols >::sender
DigitalNoteSender sender
Definition
Bankable/Abstract/MIDIButtonMatrix.hpp:85
Bankable::MIDIButtonMatrix< ManyMatrixAddresses< NumBanks, NumRows, NumCols >, DigitalNoteSender, NumRows, NumCols >::MIDIButtonMatrix
MIDIButtonMatrix(ManyMatrixAddresses< NumBanks, NumRows, NumCols > bankAddress, const PinList< NumRows > &rowPins, const PinList< NumCols > &colPins, const DigitalNoteSender &sender)
Definition
Bankable/Abstract/MIDIButtonMatrix.hpp:55
Bankable::ManyAddresses::ManyMatrixAddresses
Definition
BankAddresses.hpp:148
Bankable::ManyAddresses::NoteButtonMatrix::setVelocity
void setVelocity(uint8_t velocity)
Set the velocity of the MIDI Note events.
Definition
ManyAddresses/NoteButtonMatrix.hpp:77
Bankable::ManyAddresses::NoteButtonMatrix::getVelocity
uint8_t getVelocity() const
Get the velocity of the MIDI Note events.
Definition
ManyAddresses/NoteButtonMatrix.hpp:79
Bankable::ManyAddresses::NoteButtonMatrix::NoteButtonMatrix
NoteButtonMatrix(const Bank< NumBanks > &bank, const PinList< NumRows > &rowPins, const PinList< NumCols > &colPins, const Array< AddressMatrix< NumRows, NumCols >, NumBanks > ¬es, const Array< MIDIChannelCable, NumBanks > &channelCNs, uint8_t velocity=0x7F)
Create a new Bankable NoteButtonMatrix object with the given pins, controller numbers and channel.
Definition
ManyAddresses/NoteButtonMatrix.hpp:62
DigitalNoteSender
Class that sends MIDI note on and off messages.
Definition
DigitalNoteSender.hpp:12
AH::PinList
Array< pin_t, N > PinList
An easy alias for arrays of pins.
Definition
Hardware-Types.hpp:100
Bankable::ManyAddresses
Definition
BankAddresses.hpp:99
Bankable
A namespace for MIDI elements that can be added to a Bank, to change their address or channel.
Definition
BankAddresses.hpp:7
AH::Array
An array wrapper for easy copying, comparing, and iterating.
Definition
Array.hpp:32
Generated by
1.17.0