Control Surface pin-t-adl
MIDI Control Surface library for Arduino
Classes | Enumerations
RelativeCCSender.hpp File Reference
#include <Control_Surface/Control_Surface_Class.hpp>
#include <AH/Arduino-Wrapper.h>
+ Include dependency graph for RelativeCCSender.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  RelativeCCSender
 Class that sends relative/incremental MIDI control change messages. More...
 

Enumerations

enum  relativeCCmode {
  TWOS_COMPLEMENT , BINARY_OFFSET , SIGN_MAGNITUDE , NEXT_ADDRESS = 4 ,
  REAPER_RELATIVE_1 = TWOS_COMPLEMENT , REAPER_RELATIVE_2 = BINARY_OFFSET , REAPER_RELATIVE_3 = SIGN_MAGNITUDE , TRACKTION_RELATIVE = TWOS_COMPLEMENT ,
  MACKIE_CONTROL_RELATIVE = SIGN_MAGNITUDE , KORG_KONTROL_INC_DEC_1 = NEXT_ADDRESS
}
 The encoding to use for relative control change value. More...
 

Enumeration Type Documentation

◆ relativeCCmode

The encoding to use for relative control change value.

Enumerator
TWOS_COMPLEMENT 

Encode negative MIDI CC values as 7-bit two's complement.

Encoded Value
000'0000 0
000'0001 +1
011'1111 +63
100'0000 -64
100'0001 -63
111'1111 -1
BINARY_OFFSET 

Encode negative MIDI CC values by adding a fixed offset of \( 2^6 = 64 \).

Encoded Value
000'0000 -64
000'0001 -63
011'1111 -1
100'0000 0
100'0001 +1
111'1111 +63
SIGN_MAGNITUDE 

Encode negative MIDI CC values by using the most significant bit as a sign bit, and the six least significant bits as the absolute value.

Encoded Value
000'0000 +0
000'0001 +1
011'1111 +63
100'0000 -0
100'0001 -1
111'1111 -63
NEXT_ADDRESS 

Encode negative MIDI CC values by incrementing the address if the number is negative, the MIDI value that's sent is always the absolute value of the relative delta.

For example, if the base address is 0x10, a delta value of +4 will be sent as a value of 4 to address 0x10, and a delta value of -8 will be sent as a value of 8 to address 0x11.

REAPER_RELATIVE_1 

First relative mode in Reaper.

REAPER_RELATIVE_2 

Second relative mode in Reaper.

REAPER_RELATIVE_3 

Third relative mode in Reaper.

TRACKTION_RELATIVE 

Relative mode in Tracktion.

MACKIE_CONTROL_RELATIVE 

Relative mode used by the Mackie Control Universal protocol.

KORG_KONTROL_INC_DEC_1 

Korg KONTROL in Inc/Dec mode 1.

Definition at line 10 of file RelativeCCSender.hpp.