|
@@ -1052,8 +1052,7 @@ void KlangFalterEditor::buttonClicked (Button* buttonThatWasClicked) |
|
|
else if (buttonThatWasClicked == _autogainButton)
|
|
|
else if (buttonThatWasClicked == _autogainButton)
|
|
|
{
|
|
|
{
|
|
|
//[UserButtonCode__autogainButton] -- add your button handler code here..
|
|
|
//[UserButtonCode__autogainButton] -- add your button handler code here..
|
|
|
if (_autogainButton->getToggleState())
|
|
|
|
|
|
_autogainButton->setToggleState(false, juce::dontSendNotification);
|
|
|
|
|
|
|
|
|
_processor.setParameterNotifyingHost(Parameters::AutoGainOn, _autogainButton->getToggleState());
|
|
|
//[/UserButtonCode__autogainButton]
|
|
|
//[/UserButtonCode__autogainButton]
|
|
|
}
|
|
|
}
|
|
|
else if (buttonThatWasClicked == _reverseButton)
|
|
|
else if (buttonThatWasClicked == _reverseButton)
|
|
@@ -1101,7 +1100,7 @@ void KlangFalterEditor::updateUI() |
|
|
_stretchSlider->setEnabled(irAvailable);
|
|
|
_stretchSlider->setEnabled(irAvailable);
|
|
|
_stretchSlider->setRange(0.5, 1.5);
|
|
|
_stretchSlider->setRange(0.5, 1.5);
|
|
|
_stretchSlider->setValue(stretch, juce::dontSendNotification);
|
|
|
_stretchSlider->setValue(stretch, juce::dontSendNotification);
|
|
|
_stretchLabel->setText(String(static_cast<int>(100.0*stretch)) + String("%"), juce::sendNotification);
|
|
|
|
|
|
|
|
|
_stretchLabel->setText(String(static_cast<int>(100.0*stretch)) + String("%"), juce::dontSendNotification);
|
|
|
}
|
|
|
}
|
|
|
{
|
|
|
{
|
|
|
const float db = _processor.getParameter(Parameters::DryDecibels);
|
|
|
const float db = _processor.getParameter(Parameters::DryDecibels);
|
|
@@ -1109,7 +1108,7 @@ void KlangFalterEditor::updateUI() |
|
|
_drySlider->setEnabled(true);
|
|
|
_drySlider->setEnabled(true);
|
|
|
_drySlider->setRange(0.0, 1.0);
|
|
|
_drySlider->setRange(0.0, 1.0);
|
|
|
_drySlider->setValue(scale, juce::dontSendNotification);
|
|
|
_drySlider->setValue(scale, juce::dontSendNotification);
|
|
|
_dryLevelLabel->setText(DecibelScaling::DecibelString(db), juce::sendNotification);
|
|
|
|
|
|
|
|
|
_dryLevelLabel->setText(DecibelScaling::DecibelString(db), juce::dontSendNotification);
|
|
|
_dryButton->setToggleState(_processor.getParameter(Parameters::DryOn), juce::dontSendNotification);
|
|
|
_dryButton->setToggleState(_processor.getParameter(Parameters::DryOn), juce::dontSendNotification);
|
|
|
}
|
|
|
}
|
|
|
{
|
|
|
{
|
|
@@ -1118,7 +1117,7 @@ void KlangFalterEditor::updateUI() |
|
|
_wetSlider->setEnabled(true);
|
|
|
_wetSlider->setEnabled(true);
|
|
|
_wetSlider->setRange(0.0, 1.0);
|
|
|
_wetSlider->setRange(0.0, 1.0);
|
|
|
_wetSlider->setValue(scale, juce::dontSendNotification);
|
|
|
_wetSlider->setValue(scale, juce::dontSendNotification);
|
|
|
_wetLevelLabel->setText(DecibelScaling::DecibelString(db), juce::sendNotification);
|
|
|
|
|
|
|
|
|
_wetLevelLabel->setText(DecibelScaling::DecibelString(db), juce::dontSendNotification);
|
|
|
_wetButton->setToggleState(_processor.getParameter(Parameters::WetOn), juce::dontSendNotification);
|
|
|
_wetButton->setToggleState(_processor.getParameter(Parameters::WetOn), juce::dontSendNotification);
|
|
|
}
|
|
|
}
|
|
|
{
|
|
|
{
|
|
@@ -1129,42 +1128,43 @@ void KlangFalterEditor::updateUI() |
|
|
const double irBegin = _processor.getIRBegin();
|
|
|
const double irBegin = _processor.getIRBegin();
|
|
|
_beginSlider->setEnabled(irAvailable);
|
|
|
_beginSlider->setEnabled(irAvailable);
|
|
|
_beginSlider->setValue(irBegin, juce::dontSendNotification);
|
|
|
_beginSlider->setValue(irBegin, juce::dontSendNotification);
|
|
|
_beginLabel->setText(juce::String(static_cast<int>(100.0 * irBegin)) + juce::String("%"), juce::sendNotification);
|
|
|
|
|
|
|
|
|
_beginLabel->setText(juce::String(static_cast<int>(100.0 * irBegin)) + juce::String("%"), juce::dontSendNotification);
|
|
|
}
|
|
|
}
|
|
|
{
|
|
|
{
|
|
|
const double irEnd = _processor.getIREnd();
|
|
|
const double irEnd = _processor.getIREnd();
|
|
|
_endSlider->setEnabled(irAvailable);
|
|
|
_endSlider->setEnabled(irAvailable);
|
|
|
_endSlider->setValue(irEnd, juce::dontSendNotification);
|
|
|
_endSlider->setValue(irEnd, juce::dontSendNotification);
|
|
|
_endLabel->setText(juce::String(static_cast<int>(100.0 * irEnd)) + juce::String("%"), juce::sendNotification);
|
|
|
|
|
|
|
|
|
_endLabel->setText(juce::String(static_cast<int>(100.0 * irEnd)) + juce::String("%"), juce::dontSendNotification);
|
|
|
}
|
|
|
}
|
|
|
{
|
|
|
{
|
|
|
const double predelayMs = _processor.getPredelayMs();
|
|
|
const double predelayMs = _processor.getPredelayMs();
|
|
|
_predelaySlider->setValue(predelayMs);
|
|
|
_predelaySlider->setValue(predelayMs);
|
|
|
_predelaySlider->setEnabled(irAvailable);
|
|
|
_predelaySlider->setEnabled(irAvailable);
|
|
|
_predelayLabel->setText(FormatSeconds(predelayMs / 1000.0), juce::sendNotification);
|
|
|
|
|
|
|
|
|
_predelayLabel->setText(FormatSeconds(predelayMs / 1000.0), juce::dontSendNotification);
|
|
|
}
|
|
|
}
|
|
|
{
|
|
|
{
|
|
|
const double attackLength = _processor.getAttackLength();
|
|
|
const double attackLength = _processor.getAttackLength();
|
|
|
_attackLengthSlider->setValue(attackLength);
|
|
|
_attackLengthSlider->setValue(attackLength);
|
|
|
_attackLengthSlider->setEnabled(irAvailable);
|
|
|
_attackLengthSlider->setEnabled(irAvailable);
|
|
|
_attackLengthLabel->setText(juce::String(100.0 * attackLength, 1)+juce::String("%"), juce::sendNotification);
|
|
|
|
|
|
|
|
|
_attackLengthLabel->setText(juce::String(100.0 * attackLength, 1)+juce::String("%"), juce::dontSendNotification);
|
|
|
}
|
|
|
}
|
|
|
{
|
|
|
{
|
|
|
const double attackShape = _processor.getAttackShape();
|
|
|
const double attackShape = _processor.getAttackShape();
|
|
|
_attackShapeSlider->setValue(attackShape);
|
|
|
_attackShapeSlider->setValue(attackShape);
|
|
|
_attackShapeSlider->setEnabled(irAvailable);
|
|
|
_attackShapeSlider->setEnabled(irAvailable);
|
|
|
_attackShapeLabel->setText((attackShape < 0.0001) ? juce::String("Neutral") : juce::String(attackShape, 2), juce::sendNotification);
|
|
|
|
|
|
|
|
|
_attackShapeLabel->setText((attackShape < 0.0001) ? juce::String("Neutral") : juce::String(attackShape, 2), juce::dontSendNotification);
|
|
|
}
|
|
|
}
|
|
|
{
|
|
|
{
|
|
|
const double decayShape = _processor.getDecayShape();
|
|
|
const double decayShape = _processor.getDecayShape();
|
|
|
_decayShapeSlider->setValue(decayShape);
|
|
|
_decayShapeSlider->setValue(decayShape);
|
|
|
_decayShapeSlider->setEnabled(irAvailable);
|
|
|
_decayShapeSlider->setEnabled(irAvailable);
|
|
|
_decayShapeLabel->setText((decayShape < 0.0001) ? juce::String("Neutral") : juce::String(decayShape, 2), juce::sendNotification);
|
|
|
|
|
|
|
|
|
_decayShapeLabel->setText((decayShape < 0.0001) ? juce::String("Neutral") : juce::String(decayShape, 2), juce::dontSendNotification);
|
|
|
}
|
|
|
}
|
|
|
{
|
|
|
{
|
|
|
const float autoGainDecibels = _processor.getParameter(Parameters::AutoGainDecibels);
|
|
|
const float autoGainDecibels = _processor.getParameter(Parameters::AutoGainDecibels);
|
|
|
const juce::String autoGainText = DecibelScaling::DecibelString(autoGainDecibels);
|
|
|
const juce::String autoGainText = DecibelScaling::DecibelString(autoGainDecibels);
|
|
|
_autogainButton->setButtonText(juce::String("Autogain ") + autoGainText);
|
|
|
_autogainButton->setButtonText(juce::String("Autogain ") + autoGainText);
|
|
|
|
|
|
_autogainButton->setToggleState(_processor.getParameter(Parameters::AutoGainOn), juce::dontSendNotification);
|
|
|
}
|
|
|
}
|
|
|
{
|
|
|
{
|
|
|
Parameters::EqType lowEqType = static_cast<Parameters::EqType>(_processor.getParameter(Parameters::EqLowType));
|
|
|
Parameters::EqType lowEqType = static_cast<Parameters::EqType>(_processor.getParameter(Parameters::EqLowType));
|
|
@@ -1175,19 +1175,19 @@ void KlangFalterEditor::updateUI() |
|
|
_lowEqButton->setButtonText(lowEqType == Parameters::Shelf ? juce::String("Low Shelf") : juce::String("Low Cut"));
|
|
|
_lowEqButton->setButtonText(lowEqType == Parameters::Shelf ? juce::String("Low Shelf") : juce::String("Low Cut"));
|
|
|
_lowCutFreqHeaderLabel->setVisible(lowEqType == Parameters::Cut);
|
|
|
_lowCutFreqHeaderLabel->setVisible(lowEqType == Parameters::Cut);
|
|
|
_lowCutFreqLabel->setVisible(lowEqType == Parameters::Cut);
|
|
|
_lowCutFreqLabel->setVisible(lowEqType == Parameters::Cut);
|
|
|
_lowCutFreqLabel->setText((::fabs(cutFreq-Parameters::EqLowCutFreq.getMinValue()) > 0.0001f) ? FormatFrequency(cutFreq) : juce::String("Off"), juce::sendNotification);
|
|
|
|
|
|
|
|
|
_lowCutFreqLabel->setText((::fabs(cutFreq-Parameters::EqLowCutFreq.getMinValue()) > 0.0001f) ? FormatFrequency(cutFreq) : juce::String("Off"), juce::dontSendNotification);
|
|
|
_lowCutFreqSlider->setVisible(lowEqType == Parameters::Cut);
|
|
|
_lowCutFreqSlider->setVisible(lowEqType == Parameters::Cut);
|
|
|
_lowCutFreqSlider->setEnabled(loEqEnabled);
|
|
|
_lowCutFreqSlider->setEnabled(loEqEnabled);
|
|
|
_lowCutFreqSlider->setValue(cutFreq, juce::dontSendNotification);
|
|
|
_lowCutFreqSlider->setValue(cutFreq, juce::dontSendNotification);
|
|
|
_loFreqHeaderLabel->setVisible(lowEqType == Parameters::Shelf);
|
|
|
_loFreqHeaderLabel->setVisible(lowEqType == Parameters::Shelf);
|
|
|
_loFreqLabel->setVisible(lowEqType == Parameters::Shelf);
|
|
|
_loFreqLabel->setVisible(lowEqType == Parameters::Shelf);
|
|
|
_loFreqLabel->setText(FormatFrequency(shelfFreq), juce::sendNotification);
|
|
|
|
|
|
|
|
|
_loFreqLabel->setText(FormatFrequency(shelfFreq), juce::dontSendNotification);
|
|
|
_loFreqSlider->setVisible(lowEqType == Parameters::Shelf);
|
|
|
_loFreqSlider->setVisible(lowEqType == Parameters::Shelf);
|
|
|
_loFreqSlider->setEnabled(loEqEnabled);
|
|
|
_loFreqSlider->setEnabled(loEqEnabled);
|
|
|
_loFreqSlider->setValue(shelfFreq, juce::dontSendNotification);
|
|
|
_loFreqSlider->setValue(shelfFreq, juce::dontSendNotification);
|
|
|
_loGainHeaderLabel->setVisible(lowEqType == Parameters::Shelf);
|
|
|
_loGainHeaderLabel->setVisible(lowEqType == Parameters::Shelf);
|
|
|
_loGainLabel->setVisible(lowEqType == Parameters::Shelf);
|
|
|
_loGainLabel->setVisible(lowEqType == Parameters::Shelf);
|
|
|
_loGainLabel->setText(DecibelScaling::DecibelString(shelfGainDb), juce::sendNotification);
|
|
|
|
|
|
|
|
|
_loGainLabel->setText(DecibelScaling::DecibelString(shelfGainDb), juce::dontSendNotification);
|
|
|
_loGainSlider->setVisible(lowEqType == Parameters::Shelf);
|
|
|
_loGainSlider->setVisible(lowEqType == Parameters::Shelf);
|
|
|
_loGainSlider->setEnabled(loEqEnabled);
|
|
|
_loGainSlider->setEnabled(loEqEnabled);
|
|
|
_loGainSlider->setValue(shelfGainDb, juce::dontSendNotification);
|
|
|
_loGainSlider->setValue(shelfGainDb, juce::dontSendNotification);
|
|
@@ -1201,19 +1201,19 @@ void KlangFalterEditor::updateUI() |
|
|
_highEqButton->setButtonText(highEqType == Parameters::Shelf ? juce::String("High Shelf") : juce::String("High Cut"));
|
|
|
_highEqButton->setButtonText(highEqType == Parameters::Shelf ? juce::String("High Shelf") : juce::String("High Cut"));
|
|
|
_highCutFreqHeaderLabel->setVisible(highEqType == Parameters::Cut);
|
|
|
_highCutFreqHeaderLabel->setVisible(highEqType == Parameters::Cut);
|
|
|
_highCutFreqLabel->setVisible(highEqType == Parameters::Cut);
|
|
|
_highCutFreqLabel->setVisible(highEqType == Parameters::Cut);
|
|
|
_highCutFreqLabel->setText((::fabs(cutFreq-Parameters::EqHighCutFreq.getMaxValue()) > 0.0001f) ? FormatFrequency(cutFreq) : juce::String("Off"), juce::sendNotification);
|
|
|
|
|
|
|
|
|
_highCutFreqLabel->setText((::fabs(cutFreq-Parameters::EqHighCutFreq.getMaxValue()) > 0.0001f) ? FormatFrequency(cutFreq) : juce::String("Off"), juce::dontSendNotification);
|
|
|
_highCutFreqSlider->setVisible(highEqType == Parameters::Cut);
|
|
|
_highCutFreqSlider->setVisible(highEqType == Parameters::Cut);
|
|
|
_highCutFreqSlider->setEnabled(hiEqEnabled);
|
|
|
_highCutFreqSlider->setEnabled(hiEqEnabled);
|
|
|
_highCutFreqSlider->setValue(cutFreq, juce::dontSendNotification);
|
|
|
_highCutFreqSlider->setValue(cutFreq, juce::dontSendNotification);
|
|
|
_hiFreqHeaderLabel->setVisible(highEqType == Parameters::Shelf);
|
|
|
_hiFreqHeaderLabel->setVisible(highEqType == Parameters::Shelf);
|
|
|
_hiFreqLabel->setVisible(highEqType == Parameters::Shelf);
|
|
|
_hiFreqLabel->setVisible(highEqType == Parameters::Shelf);
|
|
|
_hiFreqLabel->setText(FormatFrequency(shelfFreq), juce::sendNotification);
|
|
|
|
|
|
|
|
|
_hiFreqLabel->setText(FormatFrequency(shelfFreq), juce::dontSendNotification);
|
|
|
_hiFreqSlider->setVisible(highEqType == Parameters::Shelf);
|
|
|
_hiFreqSlider->setVisible(highEqType == Parameters::Shelf);
|
|
|
_hiFreqSlider->setEnabled(hiEqEnabled);
|
|
|
_hiFreqSlider->setEnabled(hiEqEnabled);
|
|
|
_hiFreqSlider->setValue(shelfFreq, juce::dontSendNotification);
|
|
|
_hiFreqSlider->setValue(shelfFreq, juce::dontSendNotification);
|
|
|
_hiGainHeaderLabel->setVisible(highEqType == Parameters::Shelf);
|
|
|
_hiGainHeaderLabel->setVisible(highEqType == Parameters::Shelf);
|
|
|
_hiGainLabel->setVisible(highEqType == Parameters::Shelf);
|
|
|
_hiGainLabel->setVisible(highEqType == Parameters::Shelf);
|
|
|
_hiGainLabel->setText(DecibelScaling::DecibelString(shelfGainDb), juce::sendNotification);
|
|
|
|
|
|
|
|
|
_hiGainLabel->setText(DecibelScaling::DecibelString(shelfGainDb), juce::dontSendNotification);
|
|
|
_hiGainSlider->setVisible(highEqType == Parameters::Shelf);
|
|
|
_hiGainSlider->setVisible(highEqType == Parameters::Shelf);
|
|
|
_hiGainSlider->setEnabled(hiEqEnabled);
|
|
|
_hiGainSlider->setEnabled(hiEqEnabled);
|
|
|
_hiGainSlider->setValue(shelfGainDb, juce::dontSendNotification);
|
|
|
_hiGainSlider->setValue(shelfGainDb, juce::dontSendNotification);
|
|
@@ -1225,7 +1225,7 @@ void KlangFalterEditor::updateUI() |
|
|
_widthLabel->setVisible(numOutputChannels >= 2);
|
|
|
_widthLabel->setVisible(numOutputChannels >= 2);
|
|
|
const float stereoWidth = _processor.getParameter(Parameters::StereoWidth);
|
|
|
const float stereoWidth = _processor.getParameter(Parameters::StereoWidth);
|
|
|
_widthSlider->setValue(stereoWidth, juce::dontSendNotification);
|
|
|
_widthSlider->setValue(stereoWidth, juce::dontSendNotification);
|
|
|
_widthLabel->setText((::fabs(1.0f-stereoWidth) < 0.001) ? juce::String("Neutral") : juce::String(stereoWidth, 2), juce::sendNotification);
|
|
|
|
|
|
|
|
|
_widthLabel->setText((::fabs(1.0f-stereoWidth) < 0.001) ? juce::String("Neutral") : juce::String(stereoWidth, 2), juce::dontSendNotification);
|
|
|
}
|
|
|
}
|
|
|
{
|
|
|
{
|
|
|
_levelMeterDry->setChannelCount(numInputChannels);
|
|
|
_levelMeterDry->setChannelCount(numInputChannels);
|
|
|