|
|
@ -79,7 +79,7 @@ void Ctrl::sliderValueChanged(Slider* moved) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void Ctrl::buttonClicked(Button* clicked) { |
|
|
|
void Ctrl::buttonClicked(Button* clicked) { |
|
|
|
publishValue(clicked->getToggleStateValue() == 1 ? 1 : 0); |
|
|
|
publishValue(clicked->getToggleState()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void Ctrl::comboBoxChanged(ComboBox* combo) { |
|
|
|
void Ctrl::comboBoxChanged(ComboBox* combo) { |
|
|
@ -160,10 +160,11 @@ String CtrlDX::getValueDisplay() { |
|
|
|
|
|
|
|
|
|
|
|
void CtrlDX::publishValue(float value) { |
|
|
|
void CtrlDX::publishValue(float value) { |
|
|
|
Ctrl::publishValue(value / steps); |
|
|
|
Ctrl::publishValue(value / steps); |
|
|
|
|
|
|
|
|
|
|
|
DexedAudioProcessorEditor *editor = (DexedAudioProcessorEditor *) parent->getActiveEditor(); |
|
|
|
DexedAudioProcessorEditor *editor = (DexedAudioProcessorEditor *) parent->getActiveEditor(); |
|
|
|
if ( editor == NULL ) |
|
|
|
if ( editor == NULL ) { |
|
|
|
return; |
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
String msg; |
|
|
|
String msg; |
|
|
|
msg << label << " = " << getValueDisplay(); |
|
|
|
msg << label << " = " << getValueDisplay(); |
|
|
|
editor->global.setParamMessage(msg); |
|
|
|
editor->global.setParamMessage(msg); |
|
|
@ -177,6 +178,10 @@ void CtrlDX::comboBoxChanged(ComboBox* combo) { |
|
|
|
publishValue(combo->getSelectedId() - 1); |
|
|
|
publishValue(combo->getSelectedId() - 1); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void CtrlDX::buttonClicked(Button *button) { |
|
|
|
|
|
|
|
publishValue((int) button->getToggleState()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void CtrlDX::updateComponent() { |
|
|
|
void CtrlDX::updateComponent() { |
|
|
|
if (slider != NULL) { |
|
|
|
if (slider != NULL) { |
|
|
|
slider->setValue(getValue() + displayValue, |
|
|
|
slider->setValue(getValue() + displayValue, |
|
|
@ -185,11 +190,9 @@ void CtrlDX::updateComponent() { |
|
|
|
|
|
|
|
|
|
|
|
if (button != NULL) { |
|
|
|
if (button != NULL) { |
|
|
|
if (getValue() == 0) { |
|
|
|
if (getValue() == 0) { |
|
|
|
button->setToggleState(false, |
|
|
|
button->setToggleState(false, dontSendNotification); |
|
|
|
dontSendNotification); |
|
|
|
|
|
|
|
} else { |
|
|
|
} else { |
|
|
|
button->setToggleState(true, |
|
|
|
button->setToggleState(true, dontSendNotification); |
|
|
|
dontSendNotification); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -418,6 +421,13 @@ void DexedAudioProcessor::setCurrentProgram(int index) { |
|
|
|
lfo.reset(data + 137); |
|
|
|
lfo.reset(data + 137); |
|
|
|
currentProgram = index; |
|
|
|
currentProgram = index; |
|
|
|
triggerAsyncUpdate(); |
|
|
|
triggerAsyncUpdate(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// reset parameter display
|
|
|
|
|
|
|
|
DexedAudioProcessorEditor *editor = (DexedAudioProcessorEditor *) getActiveEditor(); |
|
|
|
|
|
|
|
if ( editor == NULL ) { |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
editor->global.setParamMessage(""); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const String DexedAudioProcessor::getProgramName(int index) { |
|
|
|
const String DexedAudioProcessor::getProgramName(int index) { |
|
|
|