Control Surface
main
MIDI Control Surface library for Arduino
Toggle main menu visibility
Loading...
Searching...
No Matches
src
MIDI_Outputs
Bankable
Bankable/NoteButton.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include <
Banks/BankAddresses.hpp
>
4
#include <
MIDI_Outputs/Bankable/Abstract/MIDIButton.hpp
>
5
#include <
MIDI_Senders/DigitalNoteSender.hpp
>
6
7
BEGIN_CS_NAMESPACE
8
9
namespace
Bankable
{
10
22
class
NoteButton
:
public
MIDIButton
<SingleAddress, DigitalNoteSender> {
23
public
:
41
NoteButton
(
OutputBankConfig<>
config,
pin_t
pin,
MIDIAddress
address
,
42
uint8_t velocity = 0x7F)
43
:
MIDIButton
<
SingleAddress
,
DigitalNoteSender
> {
44
{config,
address
},
45
pin,
46
{velocity},
47
} {}
48
50
void
setVelocity
(uint8_t velocity) { this->
sender
.setVelocity(velocity); }
52
uint8_t
getVelocity
()
const
{
return
this->
sender
.getVelocity(); }
53
};
54
55
}
// namespace Bankable
56
57
END_CS_NAMESPACE
BankAddresses.hpp
MIDIButton.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
Bankable::MIDIButton< SingleAddress, DigitalNoteSender >::MIDIButton
MIDIButton(SingleAddress bankAddress, pin_t pin, const DigitalNoteSender &sender)
Definition
Bankable/Abstract/MIDIButton.hpp:33
Bankable::MIDIButton< SingleAddress, DigitalNoteSender >::address
SingleAddress address
Definition
Bankable/Abstract/MIDIButton.hpp:54
Bankable::MIDIButton< SingleAddress, DigitalNoteSender >::sender
DigitalNoteSender sender
Definition
Bankable/Abstract/MIDIButton.hpp:58
Bankable::NoteButton::setVelocity
void setVelocity(uint8_t velocity)
Set the velocity of the MIDI Note events.
Definition
Bankable/NoteButton.hpp:50
Bankable::NoteButton::getVelocity
uint8_t getVelocity() const
Get the velocity of the MIDI Note events.
Definition
Bankable/NoteButton.hpp:52
Bankable::NoteButton::NoteButton
NoteButton(OutputBankConfig<> config, pin_t pin, MIDIAddress address, uint8_t velocity=0x7F)
Create a new Bankable NoteButton object with the given pin, note number and channel.
Definition
Bankable/NoteButton.hpp:41
Bankable::SingleAddress
Definition
BankAddresses.hpp:9
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
Bankable
A namespace for MIDI elements that can be added to a Bank, to change their address or channel.
Definition
BankAddresses.hpp:7
AH::ExtIO::pin_t
Type for storing pin numbers of Extended Input/Output elements.
Definition
Hardware-Types.hpp:25
OutputBankConfig
Definition
BankConfig.hpp:79
Generated by
1.17.0