This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void Storage::SysExSendAllCCs(uint8_t part) | |
{ | |
//uint_8 part = location.part; | |
uint8_t midi_channel; | |
const Parameter& parameter = parameter_manager.parameter(59); | |
uint8_t instance_index = 0; | |
/* | |
for (instance_index = 0; | |
instance_index < parameter.num_instances && instance_index < part; | |
++instance_index) { | |
} | |
*/ | |
instance_index = part; | |
midi_channel = parameter_manager.GetValue(parameter, part, instance_index); | |
if (midi_channel) | |
--midi_channel; //? | |
for (uint8_t index=0; index<kNumParameters; ++index) { | |
const Parameter& parameter = parameter_manager.parameter(index); | |
uint8_t midi_cc = parameter.midi_cc; | |
if(parameter.level==PARAMETER_LEVEL_PATCH || parameter.level==PARAMETER_LEVEL_PART) { | |
// Some ranges of MIDI CC might point to the same parameter ID, for | |
// different instances of the same object (for example a LFO). | |
//uint8_t instance_index = 0; | |
for (instance_index = 0; | |
instance_index < parameter.num_instances; | |
++instance_index) { | |
uint8_t value = parameter_manager.GetValue(parameter, part, instance_index); | |
if ( (midi_cc < 1) || (midi_cc > 120)) continue; | |
midi_dispatcher.Send3(0xb0 | midi_channel, midi_cc, value & 0x7f); | |
midi_cc += parameter.stride; | |
midi_dispatcher.Flush(); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment