Control Surface  1.1.1
MIDI Control Surface library for Arduino
Static Public Member Functions | Static Private Attributes | List of all members
RelativeCCSender Class Reference

#include <MIDI_Senders/RelativeCCSender.hpp>

Collaboration diagram for RelativeCCSender:

Static Public Member Functions

static uint8_t toTwosComplement7bit (int8_t value)
 Convert an 8-bit two's complement integer to a 7-bit two's complement integer. More...
 
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. More...
 
static uint8_t toSignedMagnitude7bit (int8_t value)
 Convert an 8-bit two's complement integer to 7-bit sign-magnitude format. More...
 
static uint8_t mapRelativeCC (int8_t value)
 Convert an 8-bit two's complement integer to a 7-bit value to send over MIDI. More...
 
static void send (long delta, MIDICNChannelAddress address)
 
static void setMode (relativeCCmode mode)
 

Static Private Attributes

static relativeCCmode mode = TWOS_COMPLEMENT
 

Detailed Description

Definition at line 65 of file RelativeCCSender.hpp.

Member Function Documentation

◆ toTwosComplement7bit()

static uint8_t toTwosComplement7bit ( int8_t  value)
inlinestatic

Convert an 8-bit two's complement integer to a 7-bit two's complement integer.

Definition at line 69 of file RelativeCCSender.hpp.

◆ toBinaryOffset7bit()

static uint8_t toBinaryOffset7bit ( int8_t  value)
inlinestatic

Convert an 8-bit two's complement integer to a 7-bit integer with a binary offset of 64.

In other words, a value of 0 corresponds to -64, a value of 64 corresponds to 0, and a value of 127 corresponds to 63.

Definition at line 73 of file RelativeCCSender.hpp.

◆ toSignedMagnitude7bit()

static uint8_t toSignedMagnitude7bit ( int8_t  value)
inlinestatic

Convert an 8-bit two's complement integer to 7-bit sign-magnitude format.

Definition at line 76 of file RelativeCCSender.hpp.

◆ mapRelativeCC()

static uint8_t mapRelativeCC ( int8_t  value)
inlinestatic

Convert an 8-bit two's complement integer to a 7-bit value to send over MIDI.

Definition at line 84 of file RelativeCCSender.hpp.

◆ send()

static void send ( long  delta,
MIDICNChannelAddress  address 
)
inlinestatic

Definition at line 93 of file RelativeCCSender.hpp.

◆ setMode()

static void setMode ( relativeCCmode  mode)
inlinestatic

Member Data Documentation

◆ mode

relativeCCmode mode = TWOS_COMPLEMENT
staticprivate

Definition at line 108 of file RelativeCCSender.hpp.


The documentation for this class was generated from the following files: