MIDI Control Surface library for Arduino
|
Go to the documentation of this file.
77 uint8_t mask = value >> 7;
78 uint8_t abs = (value + mask) ^ mask;
79 uint8_t sign = mask & 0b01000000;
80 return (abs & 0b00111111) | sign;
97 long thisDelta = constrain(delta, -15, 15);
Relative mode used by the Mackie Control Universal protocol.
Encode negative MIDI CC values as 7-bit two's complement.
#define BEGIN_CS_NAMESPACE
MIDI_Interface & MIDI()
Get the MIDI interface of the Control Surface.
void sendCC(MIDICNChannelAddress address, uint8_t value)
Send a MIDI Control Change event.
static uint8_t toBinaryOffset7bit(int8_t value)
Convert an 8-bit two's complement integer to a 7-bit integer with a binary offset of 64.
A type-safe utility class for saving a MIDI address consisting of a 7-bit address,...
static void setMode(relativeCCmode mode)
Control_Surface_ & Control_Surface
A predefined instance of the Control Surface to use in the Arduino sketches.
static relativeCCmode mode
Encode negative MIDI CC values by adding a fixed offset of .
static uint8_t toTwosComplement7bit(int8_t value)
Convert an 8-bit two's complement integer to a 7-bit two's complement integer.
static uint8_t mapRelativeCC(int8_t value)
Convert an 8-bit two's complement integer to a 7-bit value to send over MIDI.
Relative mode in Tracktion.
Second relative mode in Reaper.
First relative mode in Reaper.
Third relative mode in Reaper.
static uint8_t toSignedMagnitude7bit(int8_t value)
Convert an 8-bit two's complement integer to 7-bit sign-magnitude format.
relativeCCmode
The encoding to use for relative control change value.
static void send(long delta, MIDICNChannelAddress address)
Encode negative MIDI CC values by using the most significant bit as a sign bit, and the six least sig...