v1.2.2: Live spectrum analyzer, makeup gain, drag-and-drop signal chain

- Real-time FFT spectrum analyzer drawn behind EQ curves
- Makeup gain knob (+/- 24 dB) after limiter
- Draggable signal chain panel: reorder Master Gain / Limiter / Makeup Gain
- Chain order saved/restored with DAW session
- Scaled fonts in signal chain panel

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
hariel1985
2026-03-25 11:44:27 +01:00
szülő 72c7958d98
commit 9c5b5a3957
9 fájl változott, egészen pontosan 474 új sor hozzáadva és 14 régi sor törölve

Fájl megtekintése

@@ -92,6 +92,23 @@ InstaLPEQEditor::InstaLPEQEditor (InstaLPEQProcessor& p)
limiterLabel.setJustificationType (juce::Justification::centred);
addAndMakeVisible (limiterLabel);
// Makeup gain
makeupGainSlider.setSliderStyle (juce::Slider::RotaryHorizontalVerticalDrag);
makeupGainSlider.setTextBoxStyle (juce::Slider::TextBoxBelow, false, 60, 16);
makeupGainSlider.setRange (-24.0, 24.0, 0.1);
makeupGainSlider.setValue (0.0);
makeupGainSlider.setTextValueSuffix (" dB");
makeupGainSlider.setDoubleClickReturnValue (true, 0.0);
addAndMakeVisible (makeupGainSlider);
makeupGainLabel.setFont (customLookAndFeel.getMediumFont (13.0f));
makeupGainLabel.setJustificationType (juce::Justification::centred);
addAndMakeVisible (makeupGainLabel);
// Signal chain panel
chainPanel.setListener (this);
chainPanel.setOrder (processor.getChainOrder());
addAndMakeVisible (chainPanel);
// Sizing
constrainer.setMinimumSize (700, 450);
constrainer.setMaximumSize (1920, 1080);
@@ -154,7 +171,11 @@ void InstaLPEQEditor::resized()
newBandButton.setBounds (header.removeFromRight ((int) (90 * scale)).reduced (2));
// Bottom master row
// Signal chain panel (bottom-most)
int chainH = (int) std::max (28.0f, 36.0f * scale);
chainPanel.setBounds (bounds.removeFromBottom (chainH).reduced (pad, 2));
// Master controls row (above chain)
int masterH = (int) std::max (50.0f, 65.0f * scale);
auto masterArea = bounds.removeFromBottom (masterH).reduced (pad, 2);
@@ -168,6 +189,11 @@ void InstaLPEQEditor::resized()
limiterLabel.setBounds (masterArea.removeFromLeft (55));
limiterToggle.setBounds (masterArea.removeFromLeft (40));
// Makeup gain knob
makeupGainLabel.setFont (customLookAndFeel.getMediumFont (std::max (11.0f, 14.0f * scale)));
makeupGainLabel.setBounds (masterArea.removeFromLeft (55));
makeupGainSlider.setBounds (masterArea.removeFromLeft (masterH));
// Quality selector on the right side of master row
qualityLabel.setFont (customLookAndFeel.getMediumFont (std::max (11.0f, 14.0f * scale)));
auto qLabelArea = masterArea.removeFromRight (30);
@@ -192,6 +218,15 @@ void InstaLPEQEditor::timerCallback()
processor.bypassed.store (bypassToggle.getToggleState());
processor.masterGainDb.store ((float) masterGainSlider.getValue());
processor.limiterEnabled.store (limiterToggle.getToggleState());
processor.makeupGainDb.store ((float) makeupGainSlider.getValue());
// Update spectrum analyzer
{
std::array<float, 1024> specData {};
if (processor.getSpectrum (specData.data(), (int) specData.size()))
curveDisplay.setSpectrum (specData.data(), (int) specData.size(),
processor.getCurrentSampleRate(), 2048);
}
// Update display with latest magnitude response
auto magDb = processor.getFIREngine().getMagnitudeResponseDb();
@@ -267,6 +302,11 @@ void InstaLPEQEditor::nodeDeleteRequested (int bandIndex)
syncDisplayFromProcessor();
}
void InstaLPEQEditor::chainOrderChanged (const std::array<InstaLPEQProcessor::ChainStage, InstaLPEQProcessor::numChainStages>& order)
{
processor.setChainOrder (order);
}
void InstaLPEQEditor::syncDisplayFromProcessor()
{
auto currentBands = processor.getBands();