- fixed unisono toggle

This commit is contained in:
2023-05-04 21:16:50 +02:00
parent 89502ec978
commit 63bb047c1e
+12 -12
View File
@@ -2384,7 +2384,7 @@ JaySynthAudioProcessorEditor::JaySynthAudioProcessorEditor (JaySynthAudioProcess
for (int i=0; i < SYNTH_NUM_PARAMS; i++)
{
Button *pButton;
pButton = (Button*)findChildWithID(String("BUTTON ") + String(i));
pButton = (Button*)findChildWithID(String("PARAM_BUTTON ") + String(i));
if (pButton)
pButton->addMouseListener (this, false);
}
@@ -4986,6 +4986,17 @@ void JaySynthAudioProcessorEditor::buttonClicked (Button* buttonThatWasClicked)
return;
}
if (buttonThatWasClicked->getComponentID().startsWith("PARAM"))
{
paramID = (int)(buttonThatWasClicked->getComponentID()).getTrailingIntValue();
value = (float)buttonThatWasClicked->getToggleState();
pParamInfo = getParamInfo(paramID);
if (pParamInfo)
{
getProcessor()->setParam(paramID, toParam(pParamInfo, (synth_float_t)value), true, true);
}
}
if (buttonThatWasClicked == m_button_humanize_enable)
{
getProcessor()->humanizeModeChanged();
@@ -5000,17 +5011,6 @@ void JaySynthAudioProcessorEditor::buttonClicked (Button* buttonThatWasClicked)
{
getProcessor()->unisonoModeChanged();
}
if (buttonThatWasClicked->getComponentID().startsWith("PARAM"))
{
paramID = (int)(buttonThatWasClicked->getComponentID()).getTrailingIntValue();
value = (float)buttonThatWasClicked->getToggleState();
pParamInfo = getParamInfo(paramID);
if (pParamInfo)
{
getProcessor()->setParam(paramID, toParam(pParamInfo, (synth_float_t)value), true, true);
}
}
}
void JaySynthAudioProcessorEditor::mouseDown (const MouseEvent &m)