Control Surface main
MIDI Control Surface library for Arduino
Loading...
Searching...
No Matches
PitchBendSender.hpp
Go to the documentation of this file.
1#pragma once
2
5
7
19template <uint8_t INPUT_PRECISION_BITS>
21 public:
25 static void send(uint16_t value, MIDIAddress address) {
27 // ignore address byte, just use channel and cable numbers
28 MIDIChannelCable channelCN = address.getChannelCable();
29 Control_Surface.sendPitchBend(channelCN, value);
30 }
31
33 constexpr static uint8_t precision() {
34 static_assert(INPUT_PRECISION_BITS <= 14,
35 "Maximum pitch bend resolution is 14 bits");
37 }
38};
39
Control_Surface_ & Control_Surface
A predefined instance of the Control Surface to use in the Arduino sketches.
#define END_CS_NAMESPACE
#define BEGIN_CS_NAMESPACE
A type-safe utility class for saving a MIDI address consisting of a 7-bit address,...
constexpr MIDIChannelCable getChannelCable() const
Get the channel and cable number.
A class for saving a MIDI channel and cable number.
void sendPitchBend(MIDIChannelCable address, uint16_t value)
Send a MIDI Pitch Bend event.
Class that sends continuous MIDI pitch bend messages with a resolution of 14 bits.
static constexpr uint8_t precision()
Get this sender's precision.
static void send(uint16_t value, MIDIAddress address)
Send a MIDI pitch bend message with the given value and channel+cable.
An array wrapper for easy copying, comparing, and iterating.
Definition Array.hpp:32