Deluge Firmware 1.3.0
Build date: 2025.04.16
Loading...
Searching...
No Matches
MIDIDeviceLumiKeys Class Referencefinal
Inheritance diagram for MIDIDeviceLumiKeys:
Collaboration diagram for MIDIDeviceLumiKeys:

Public Types

enum class  MIDIMode { MULTI = 0 , MPE , SINGLE }
 
enum class  MPEZone { LOWER = 0 , UPPER }
 
enum class  Scale {
  MAJOR = 0 , MINOR , HARMONIC_MINOR , PENTATONIC_NEUTRAL ,
  PENTATONIC_MAJOR , PENTATONIC_MINOR , BLUES , DORIAN ,
  PHRYGIAN , LYDIAN , MIXOLYDIAN , LOCRIAN ,
  WHOLE_TONE , ARABIC_A , ARABIC_B , JAPANESE ,
  RYUKYU , EIGHT_TONE_SPANISH , CHROMATIC
}
 
enum class  ColourZone { ROOT = 0 , GLOBAL }
 
enum class  Hook {
  HOOK_ON_CONNECTED = 0 , HOOK_ON_CHANGE_ROOT_NOTE , HOOK_ON_CHANGE_SCALE , HOOK_ON_ENTER_SCALE_MODE ,
  HOOK_ON_EXIT_SCALE_MODE , HOOK_ON_MIDI_LEARN , HOOK_ON_RECALCULATE_COLOUR , HOOK_ON_TRANSITION_TO_ARRANGER_VIEW ,
  HOOK_ON_TRANSITION_TO_CLIP_VIEW , HOOK_ON_TRANSITION_TO_SESSION_VIEW , HOOK_ON_WRITE_HOSTED_DEVICE_TO_FILE
}
 

Public Member Functions

void hookOnConnected () override
 
void hookOnChangeRootNote () override
 
void hookOnChangeScale () override
 
void hookOnEnterScaleMode () override
 
void hookOnExitScaleMode () override
 
void hookOnMIDILearn () override
 
void hookOnRecalculateColour () override
 
void hookOnTransitionToSessionView () override
 
void hookOnTransitionToClipView () override
 
void hookOnTransitionToArrangerView () override
 
void hookOnWriteHostedDeviceToFile () override
 
- Public Member Functions inherited from MIDICableUSBHosted
void writeReferenceAttributesToFile (Serializer &writer) override
 
void writeToFlash (uint8_t *memory) override
 
char const * getDisplayName () override
 
void callHook (Hook hook)
 
- Public Member Functions inherited from MIDICableUSB
 MIDICableUSB (uint8_t portNum=0)
 
bool wantsToOutputMIDIOnChannel (MIDIMessage message, int32_t filter) const override
 Used to decide if the given message should be output on a channel.
 
void sendMessage (MIDIMessage message) override
 Send a MIDI message.
 
void sendSysex (const uint8_t *data, int32_t len) override
 
size_t sendBufferSpace () const override
 Get the number of bytes available in the send buffer.
 
void connectedNow (int32_t midiDeviceNum)
 
void sendMCMsNowIfNeeded ()
 
- Public Member Functions inherited from MIDICable
void dataEntryMessageReceived (ModelStack *modelStack, int32_t channel, int32_t msb)
 
void writeReferenceToFile (Serializer &writer, char const *tagName="device")
 
void writeToFile (Serializer &writer, char const *tagName)
 
void readFromFile (Deserializer &reader)
 
bool worthWritingToFile ()
 
void writePorts (Serializer &writer)
 
void sendAllMCMs ()
 Send MPE control messages.
 
void sendCC (int32_t channel, int32_t cc, int32_t value)
 
void sendRPN (int32_t channel, int32_t rpnMSB, int32_t rpnLSB, int32_t valueMSB)
 
bool hasDefaultVelocityToLevelSet ()
 

Static Public Member Functions

static bool matchesVendorProduct (uint16_t vendorId, uint16_t productId)
 

Static Public Attributes

static constexpr uint16_t lumiKeysVendorProductPairs [MIDI_DEVICE_LUMI_KEYS_VP_COUNT][2] = {{0x2af4, 0xe00}}
 
static constexpr uint8_t sysexManufacturer [3] = {0x00, 0x21, 0x10}
 
static constexpr uint16_t scaleNotes [MIDI_DEVICE_LUMI_KEYS_SCALE_COUNT]
 

Private Member Functions

uint8_t sysexChecksum (uint8_t *chkBytes, uint8_t size)
 
void sendLumiCommand (uint8_t *command, uint8_t length)
 
void getCounterCodes (uint8_t *destination, int32_t index, uint8_t valueOffset=0)
 Fills the first 6 values at the pointer location with a 7-bit, offset representation of the 32-bit signed index.
 
void enumerateLumi ()
 Enumeration command - responds with Lumi topology dump.
 
void setMIDIMode (MIDIMode midiMode)
 
void setMPEZone (MPEZone mpeZone)
 
void setMPENumChannels (uint8_t numChannels)
 
void setRootNote (int16_t rootNote)
 
Scale determineScaleAndRootNoteOffsetFromNotes (NoteSet &modeNotes)
 
void setScale (Scale scale)
 
void setColour (ColourZone zone, RGB rgb)
 

Additional Inherited Members

- Public Attributes inherited from MIDICableUSBHosted
uint16_t vendorId {}
 
uint16_t productId {}
 
bool freshly_connected = true
 
String name
 
- Public Attributes inherited from MIDICableUSB
uint8_t needsToSendMCMs
 
uint8_t portNumber
 
MIDIPort ports [2]
 
uint8_t mpeZoneBendRanges [2][2]
 
MIDIInputChannel inputChannels [16]
 
int32_t defaultVelocityToLevel
 
uint8_t connectionFlags
 
bool sendClock
 
uint8_t incomingSysexBuffer [1024]
 
int32_t incomingSysexPos = 0
 
void writeDefinitionAttributesToFile (Serializer &writer)
 

Member Function Documentation

◆ getCounterCodes()

void MIDIDeviceLumiKeys::getCounterCodes ( uint8_t * destination,
int32_t index,
uint8_t valueOffset = 0 )
private

Fills the first 6 values at the pointer location with a 7-bit, offset representation of the 32-bit signed index.

Parameters
destinationA pointer with space for 6 bytes
indexThe index of the value we want to generate
value_offsetThe offset for the resultant values (eg: 0x00 + value_offset, 0x20 + value_offset, etc.)

◆ hookOnChangeRootNote()

void MIDIDeviceLumiKeys::hookOnChangeRootNote ( )
overridevirtual

Reimplemented from MIDICableUSBHosted.

◆ hookOnChangeScale()

void MIDIDeviceLumiKeys::hookOnChangeScale ( )
overridevirtual

Reimplemented from MIDICableUSBHosted.

◆ hookOnConnected()

void MIDIDeviceLumiKeys::hookOnConnected ( )
overridevirtual

Reimplemented from MIDICableUSBHosted.

◆ hookOnEnterScaleMode()

void MIDIDeviceLumiKeys::hookOnEnterScaleMode ( )
overridevirtual

Reimplemented from MIDICableUSBHosted.

◆ hookOnExitScaleMode()

void MIDIDeviceLumiKeys::hookOnExitScaleMode ( )
overridevirtual

Reimplemented from MIDICableUSBHosted.

◆ hookOnMIDILearn()

void MIDIDeviceLumiKeys::hookOnMIDILearn ( )
overridevirtual

Reimplemented from MIDICableUSBHosted.

◆ hookOnRecalculateColour()

void MIDIDeviceLumiKeys::hookOnRecalculateColour ( )
overridevirtual

Reimplemented from MIDICableUSBHosted.

◆ hookOnTransitionToArrangerView()

void MIDIDeviceLumiKeys::hookOnTransitionToArrangerView ( )
overridevirtual

Reimplemented from MIDICableUSBHosted.

◆ hookOnTransitionToClipView()

void MIDIDeviceLumiKeys::hookOnTransitionToClipView ( )
overridevirtual

Reimplemented from MIDICableUSBHosted.

◆ hookOnTransitionToSessionView()

void MIDIDeviceLumiKeys::hookOnTransitionToSessionView ( )
overridevirtual

Reimplemented from MIDICableUSBHosted.

◆ hookOnWriteHostedDeviceToFile()

void MIDIDeviceLumiKeys::hookOnWriteHostedDeviceToFile ( )
overridevirtual

Reimplemented from MIDICableUSBHosted.

Member Data Documentation

◆ scaleNotes

uint16_t MIDIDeviceLumiKeys::scaleNotes[MIDI_DEVICE_LUMI_KEYS_SCALE_COUNT]
staticconstexpr
Initial value:
= {
MIDI_DEVICE_LUMI_SCALE_MAJOR,
MIDI_DEVICE_LUMI_SCALE_MINOR,
MIDI_DEVICE_LUMI_SCALE_HARMONIC_MINOR,
MIDI_DEVICE_LUMI_SCALE_PENTATONIC_NEUTRAL,
MIDI_DEVICE_LUMI_SCALE_PENTATONIC_MAJOR,
MIDI_DEVICE_LUMI_SCALE_PENTATONIC_MINOR,
MIDI_DEVICE_LUMI_SCALE_BLUES,
MIDI_DEVICE_LUMI_SCALE_DORIAN,
MIDI_DEVICE_LUMI_SCALE_PHRYGIAN,
MIDI_DEVICE_LUMI_SCALE_LYDIAN,
MIDI_DEVICE_LUMI_SCALE_MIXOLYDIAN,
MIDI_DEVICE_LUMI_SCALE_LOCRIAN,
MIDI_DEVICE_LUMI_SCALE_WHOLE_TONE,
MIDI_DEVICE_LUMI_SCALE_ARABIC_A,
MIDI_DEVICE_LUMI_SCALE_ARABIC_B,
MIDI_DEVICE_LUMI_SCALE_JAPANESE,
MIDI_DEVICE_LUMI_SCALE_RYUKYU,
MIDI_DEVICE_LUMI_SCALE_8TONE_SPANISH,
MIDI_DEVICE_LUMI_SCALE_CHROMATIC}

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