Fix live waveform scaling, drop GTK deps, and document the project

- Tune the live spectrum display to a fixed range matched to real per-FFT-bin
  levels (-40..0 dB) so typical content sits mid-screen instead of flying to
  the top or hugging the bottom; widen the SENS offset control to -48..+24 dB
- Disable JUCE_WEB_BROWSER so the WebKitGTK WebBrowserComponent (unused) is
  compiled out, letting the plugin build on Artix/Arch without GTK/WebKit dev
  headers
- Add a verbose README covering the bands, parameters, controls, structure,
  DSP, build steps, and the Linux/Artix note
This commit is contained in:
Armin 2026-08-29 23:17:32 +02:00
commit 585f8d43dd
4 changed files with 183 additions and 9 deletions

View file

@ -298,7 +298,7 @@ GelykEQAudioProcessorEditor::GelykEQAudioProcessorEditor(GelykEQAudioProcessor&
double min, max, def;
const char* tip;
} colorControls[] = {
{ &waveSensLabel, &waveSensSlider, "SENS", -12.0, 12.0, 0.0, "Live waveform sensitivity (dB)" },
{ &waveSensLabel, &waveSensSlider, "SENS", -48.0, 24.0, 0.0, "Live waveform sensitivity (dB offset)" },
{ &colorHueLabel, &colorHueSlider, "HUE", -0.5, 0.5, 0.0, "Master colour hue shift" },
{ &colorSatLabel, &colorSatSlider, "SAT", 0.0, 1.0, 1.0, "Master colour saturation" },
{ &colorBriLabel, &colorBriSlider, "BRI", 0.5, 1.5, 1.0, "Master colour brightness" },
@ -801,21 +801,24 @@ void GelykEQAudioProcessorEditor::paint(juce::Graphics& g)
g.setColour(lookAndFeel.cyan().withAlpha(0.55f));
g.drawHorizontalLine((int) centreLineY, (float) mainArea.getX(), (float) mainArea.getRight());
// Spectrum overlay.
// Spectrum overlay. The live waveform uses a fixed range tuned to real
// per-FFT-bin levels: a single loud bin reads ~0 dB at the top edge, typical
// content (~-20 dB) sits mid-screen, and -40 dB is the floor. SENS shifts the
// whole trace up/down as a dB offset.
if (spectrum.size() > 2)
{
const float waveAlpha = lookAndFeel.waveformOpacity;
const float sensFactor = std::pow(10.0f, lookAndFeel.waveSensitivity / 20.0f);
const float sensDb = lookAndFeel.waveSensitivity; // dB offset applied to the trace
const float dbMax = 0.0f; // full-scale bin → top of the plot
const float dbMin = -40.0f; // silence floor → bottom of the plot
juce::Path path;
const float x0 = (float) mainArea.getX();
const float width = (float) mainArea.getWidth();
for (int i = 0; i < spectrum.size(); ++i)
{
float db = juce::Decibels::gainToDecibels(
juce::Decibels::decibelsToGain(spectrum[i]) * sensFactor);
db = juce::jlimit(-72.0f, 12.0f, db);
float norm = (db + 72.0f) / 84.0f; // 0..1 up
float db = juce::jlimit(dbMin, dbMax, spectrum[i] + sensDb);
float norm = (db - dbMin) / (dbMax - dbMin); // 0..1 up
float xx = (i < freqBins.size())
? bandFreqToX(freqBins[i], x0, width)
: x0 + (float) i / (float) (spectrum.size() - 1) * width;

View file

@ -35,7 +35,7 @@ public:
float saturation = 1.0f;
float brightness = 1.0f;
float waveformOpacity = 0.2f;
float waveSensitivity = 0.0f; // in dB, added to the spectrum display level
float waveSensitivity = 0.0f; // in dB, vertical offset added to the live waveform trace
float uiScale = 1.0f;
private: