MIDI clean fix
This commit is contained in:
parent
a1b851a4eb
commit
d283309d88
2 changed files with 14 additions and 3 deletions
|
@ -877,6 +877,7 @@ void ObxdAudioProcessorEditor::buttonClicked (Button* b)
|
||||||
auto toggleButton = dynamic_cast<TooglableButton*> (b);
|
auto toggleButton = dynamic_cast<TooglableButton*> (b);
|
||||||
if (toggleButton == midiUnlearnButton){
|
if (toggleButton == midiUnlearnButton){
|
||||||
if (midiUnlearnButton->getToggleState()){
|
if (midiUnlearnButton->getToggleState()){
|
||||||
|
countTimerForLed = 0;
|
||||||
processor.getMidiMap().reset();
|
processor.getMidiMap().reset();
|
||||||
processor.getMidiMap().set_default();
|
processor.getMidiMap().set_default();
|
||||||
processor.sendChangeMessage();
|
processor.sendChangeMessage();
|
||||||
|
@ -904,9 +905,10 @@ void ObxdAudioProcessorEditor::updateFromHost() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set to unlearn to false
|
// Set to unlearn to false
|
||||||
if ( midiUnlearnButton && midiUnlearnButton->getToggleState()) {
|
//if ( midiUnlearnButton && midiUnlearnButton->getToggleState()) {
|
||||||
midiUnlearnButton->setToggleState(false, NotificationType:: sendNotification);
|
// Thread::sleep(500);
|
||||||
}
|
// midiUnlearnButton->setToggleState(false, NotificationType:: sendNotification);
|
||||||
|
//}
|
||||||
|
|
||||||
repaint();
|
repaint();
|
||||||
}
|
}
|
||||||
|
|
|
@ -89,6 +89,12 @@ public:
|
||||||
needNotifytoHost= false;
|
needNotifytoHost= false;
|
||||||
processor.updateHostDisplay();
|
processor.updateHostDisplay();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
countTimerForLed++;
|
||||||
|
if (midiUnlearnButton && midiUnlearnButton->getToggleState() && countTimerForLed > 3) {
|
||||||
|
midiUnlearnButton->setToggleState(false, NotificationType::sendNotification);
|
||||||
|
countTimerForLed = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
ApplicationCommandTarget* getNextCommandTarget() override {
|
ApplicationCommandTarget* getNextCommandTarget() override {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
@ -276,8 +282,11 @@ private:
|
||||||
ApplicationCommandManager commandManager;
|
ApplicationCommandManager commandManager;
|
||||||
int countTimer =0;
|
int countTimer =0;
|
||||||
bool needNotifytoHost = false;
|
bool needNotifytoHost = false;
|
||||||
|
|
||||||
Array<String> midiFiles;
|
Array<String> midiFiles;
|
||||||
int menuMidiNum;
|
int menuMidiNum;
|
||||||
|
int countTimerForLed = 0;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // PLUGINEDITOR_H_INCLUDED
|
#endif // PLUGINEDITOR_H_INCLUDED
|
||||||
|
|
Loading…
Reference in a new issue