after so many days i found the solution, the problem is that MIDI.setHandleControlChange has not to be set in the ( void setup() ), because is automatically send the information to the correspond function. you need to set up the MIDI.setHandleControlChange in ( void loop() )
so when you press the button it choose the appropriate name and send the fanction.
void setup() {
Serial.begin(115000);
MIDI.turnThruOff();
pinMode(inputPin, INPUT_PULLUP);
/////////////////////////////////////////////
//MIDI.setHandleControlChange(VUmeter_decks);
// MIDI.setHandleControlChange(VUmeter_main);
void loop() {
MIDI.read();
currentState = digitalRead(inputPin);
if (currentState != previousState & currentState == LOW) //button became pressed
// delay(50);
{
state = !state;
}
if (state == 0) {
MIDI.setHandleControlChange(VUmeter_decks);
} else {
MIDI.setHandleControlChange(VUmeter_main);
}
previousState = currentState;
}