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:
@@ -40,10 +40,19 @@ public:
|
||||
void removeBand (int index);
|
||||
int getNumBands() const;
|
||||
|
||||
// Signal chain stages
|
||||
enum ChainStage { MasterGain = 0, Limiter, MakeupGain, NumStages };
|
||||
static constexpr int numChainStages = (int) NumStages;
|
||||
|
||||
// Settings
|
||||
std::atomic<bool> bypassed { false };
|
||||
std::atomic<float> masterGainDb { 0.0f };
|
||||
std::atomic<bool> limiterEnabled { true };
|
||||
std::atomic<float> makeupGainDb { 0.0f }; // -24 to +24 dB
|
||||
|
||||
// Chain order (read/write from GUI, read from audio thread)
|
||||
std::array<ChainStage, numChainStages> getChainOrder() const;
|
||||
void setChainOrder (const std::array<ChainStage, numChainStages>& order);
|
||||
|
||||
void setQuality (int fftOrder);
|
||||
|
||||
@@ -58,10 +67,28 @@ private:
|
||||
juce::dsp::Convolution convolution;
|
||||
juce::dsp::Limiter<float> limiter;
|
||||
|
||||
// Spectrum analyzer
|
||||
static constexpr int spectrumFFTOrder = 11; // 2048-point FFT
|
||||
static constexpr int spectrumFFTSize = 1 << spectrumFFTOrder;
|
||||
juce::dsp::FFT spectrumFFT { spectrumFFTOrder };
|
||||
juce::dsp::WindowingFunction<float> spectrumWindow { spectrumFFTSize, juce::dsp::WindowingFunction<float>::hann };
|
||||
std::array<float, spectrumFFTSize> fifoBuffer {};
|
||||
int fifoIndex = 0;
|
||||
std::array<float, spectrumFFTSize * 2> fftData {};
|
||||
std::array<float, spectrumFFTSize / 2> spectrumMagnitude {};
|
||||
juce::SpinLock spectrumLock;
|
||||
std::atomic<bool> spectrumReady { false };
|
||||
|
||||
public:
|
||||
bool getSpectrum (float* dest, int maxBins) const;
|
||||
|
||||
double currentSampleRate = 44100.0;
|
||||
int currentBlockSize = 512;
|
||||
bool firLoaded = false;
|
||||
|
||||
std::array<ChainStage, numChainStages> chainOrder { MasterGain, Limiter, MakeupGain };
|
||||
juce::SpinLock chainLock;
|
||||
|
||||
void updateFIR();
|
||||
|
||||
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (InstaLPEQProcessor)
|
||||
|
||||
Reference in New Issue
Block a user