2
0
Fork 0

Update PluginGui.cpp

This commit is contained in:
George Reales 2020-12-10 21:08:52 +01:00
parent e7c820caf4
commit 3e720f32a8

View file

@ -88,12 +88,34 @@ void PluginGui::updateFromParameters()
case 5: hiHatButton->setToggleState(true, dontSendNotification); break;
}
frequencyComboBox->setSelectedItemIndex (
processor->getEnumParameter("Modulator Frequency Multiplier"),
sendNotificationAsync);
frequencyComboBox2->setSelectedItemIndex (
processor->getEnumParameter("Carrier Frequency Multiplier"),
sendNotificationAsync);
//DBG(" multipler " << processor->getEnumParameter("Modulator Frequency Multiplier"));
int val = processor->getEnumParameter("Modulator Frequency Multiplier");
if (val <=10 ){
frequencyComboBox->setSelectedItemIndex (val,
sendNotificationAsync);
}
else if (val == 12){
frequencyComboBox->setSelectedItemIndex (11,
sendNotificationAsync);
}
else if (val == 15){
frequencyComboBox->setSelectedItemIndex (12,
sendNotificationAsync);
}
val = processor->getEnumParameter("Carrier Frequency Multiplier");
if (val <=10 ){
frequencyComboBox2->setSelectedItemIndex (val,
sendNotificationAsync);
}
else if (val == 12){
frequencyComboBox2->setSelectedItemIndex (11,
sendNotificationAsync);
}
else if (val == 15){
frequencyComboBox2->setSelectedItemIndex (12,
sendNotificationAsync);
}
attenuationSlider->setValue(processor->getEnumParameter("Modulator Attenuation") * -0.75, juce::NotificationType::dontSendNotification);
attenuationSlider2->setValue(processor->getEnumParameter("Carrier Attenuation") * -0.75, juce::NotificationType::dontSendNotification);