MIDI Elements
Library to simplify handling of components for MIDI controllers
 All Classes Files Functions Variables Macros
MIDIEncoder Class Reference

Class for handling endless encoders. More...

#include <MIDIEncoder.h>

Public Member Functions

 MIDIEncoder (uint8_t pin1, uint8_t pin2)
 
 MIDIEncoder (uint8_t pin1, uint8_t pin2, byte c, byte n)
 
 MIDIEncoder (uint8_t pin1, uint8_t pin2, byte c, byte n, bool a)
 
 MIDIEncoder (uint8_t pin1, uint8_t pin2, byte c, byte n, bool a, bool d)
 
int32_t read ()
 
void write (int32_t p)
 

Static Public Attributes

static
MIDIEncoder_internal_state_t * 
interruptArgs [ENCODER_ARGLIST_SIZE]
 

Detailed Description

Class for handling endless encoders.

Reused Paul Stoffregen's Encoder Library code. Debugging will enable output to the serial instead of MIDI. Enable Ableton mode for optimized use of encoders in Ableton. When mapping in Ableton set to BinOffset.

Constructor & Destructor Documentation

MIDIEncoder::MIDIEncoder ( uint8_t  pin1,
uint8_t  pin2 
)
inline

constructor with pin numbers.

Parameters
pin1encoder pin number A
pin2encoder pin number B
MIDIEncoder::MIDIEncoder ( uint8_t  pin1,
uint8_t  pin2,
byte  c,
byte  n 
)
inline

constructor with pin numbers, midi channel and cc number.

Parameters
pin1encoder pin number A
pin2encoder pin number B
cmidi channel
ncc number
MIDIEncoder::MIDIEncoder ( uint8_t  pin1,
uint8_t  pin2,
byte  c,
byte  n,
bool  a 
)
inline

constructor with pin numbers, midi channel, cc number and ableton mode.

Parameters
pin1encoder pin number A
pin2encoder pin number B
cmidi channel
ncc number
aenable ableton mode
MIDIEncoder::MIDIEncoder ( uint8_t  pin1,
uint8_t  pin2,
byte  c,
byte  n,
bool  a,
bool  d 
)
inline

constructor with pin numbers, midi channel, cc number, ableton mode and debugging.

Parameters
pin1encoder pin number A
pin2encoder pin number B
cmidi channel
ncc number
aenable ableton mode
denable debugging

Member Function Documentation

int32_t MIDIEncoder::read ( )
inline

read the values and send a midi message if the encoder changed. use in main loop

void MIDIEncoder::write ( int32_t  p)
inline

write the encoder position manually

Parameters
pposition number

Member Data Documentation

MIDIEncoder_internal_state_t * MIDIEncoder::interruptArgs
static

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