|
|
|
@ -43,6 +43,7 @@ |
|
|
|
|
#define LAST_USAGE_TIMER 5000 |
|
|
|
|
#define FORMAT_SPIFFS_IF_FAILED true |
|
|
|
|
#define MIDI_SOLO_VOLUME 100 |
|
|
|
|
#define MIDI_IGNORE_VOLUME_CC 150 |
|
|
|
|
|
|
|
|
|
void OSCToMidiCC(OSCMessage &msg, int offset); |
|
|
|
|
void OSCMixerMuteToMidiCC(OSCMessage &msg, int offset); |
|
|
|
@ -77,6 +78,7 @@ looper sched; |
|
|
|
|
bool write_state = false; |
|
|
|
|
uint32_t last_usage = millis(); |
|
|
|
|
bool broadcast_send = false; |
|
|
|
|
uint32_t midi_ignore_volume_cc = 0; |
|
|
|
|
|
|
|
|
|
MIDI_CREATE_INSTANCE(HardwareSerial, midi1, MIDI1); |
|
|
|
|
|
|
|
|
@ -350,7 +352,10 @@ void OSCMixerMuteToMidiCC(OSCMessage & msg, int offset) |
|
|
|
|
else |
|
|
|
|
MIDI1.sendControlChange(7, midistate_cc[(midichannel - 1) * 128 + 6], midichannel); |
|
|
|
|
|
|
|
|
|
midi_ignore_volume_cc = millis(); |
|
|
|
|
change_midistate_mute(midichannel, value); |
|
|
|
|
|
|
|
|
|
set_midi_solo_mode(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -375,6 +380,7 @@ void OSCMixerSoloToMidiCC(OSCMessage & msg, int offset) |
|
|
|
|
MIDI1.sendControlChange(7, midistate_cc[(midichannel - 1) * 128 + 6], midichannel); |
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
midi_ignore_volume_cc = millis(); |
|
|
|
|
change_midistate_solo(midichannel, value); |
|
|
|
|
set_midi_solo_mode(); |
|
|
|
|
} |
|
|
|
@ -390,6 +396,12 @@ void MidiCCToOSC(uint8_t channel, uint8_t number, uint8_t val) |
|
|
|
|
return; |
|
|
|
|
val = constrain(val, 0, 127); |
|
|
|
|
|
|
|
|
|
if (number == 7) |
|
|
|
|
if (millis() - MIDI_IGNORE_VOLUME_CC < midi_ignore_volume_cc) |
|
|
|
|
return; |
|
|
|
|
else |
|
|
|
|
DEBUG_MSG("\n!!!%d - %d!!!\n\n", millis() - MIDI_IGNORE_VOLUME_CC, midi_ignore_volume_cc); |
|
|
|
|
|
|
|
|
|
snprintf(buffer, sizeof(buffer), "/midi/cc/%d/%d", channel, number); |
|
|
|
|
|
|
|
|
|
DEBUG_MSG("MidiCCToOsc: %s %f\n", buffer, val); |
|
|
|
@ -1033,6 +1045,7 @@ void ping(OSCMessage & msg, int offset) |
|
|
|
|
broadcast_midistate(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void ConfigAPWeb(void) |
|
|
|
|
{ |
|
|
|
|
lcd.clear(); |
|
|
|
|