mirror of
https://codeberg.org/armin/gelyk.git
synced 2026-10-11 17:01:53 +02:00
JUCE_USE_CURL defaults to 1 on Linux, so juce_core compiled juce_Network_curl.cpp and included <curl/curl.h>. Nothing linked libcurl (NEEDS_CURL was off), but its development headers were still a hard build requirement. Set JUCE_USE_CURL=0 and pin NEEDS_CURL/NEEDS_WEB_BROWSER to FALSE alongside the existing JUCE_WEB_BROWSER=0. X11's Xrandr/Xinerama/Xshm/Xcursor headers are only dlsym()ed at runtime, but live in separate -dev packages on Arch/Artix. Probe each with check_include_file_cxx and define the JUCE_USE_* flags accordingly, so a distro carrying just libX11 still builds. Also check alsa/freetype2/fontconfig up front with a distro-specific hint instead of letting JUCE's raw pkg-config error surface, and expand the README's Linux section to cover all of it.
194 lines
8.1 KiB
Markdown
194 lines
8.1 KiB
Markdown
# Gelyk EQ
|
||
|
||

|
||
|
||
A minimalist **7-band parametric equalizer** with a cyber/neon UI, built on
|
||
[JUCE](https://juce.com) (JUCE 8). It ships as an **AU** and **VST3** plugin.
|
||
|
||
This README is intentionally verbose: it covers what the plugin *is*, how it is
|
||
structured, how every band behaves, and how to build it from source on any
|
||
platform - including Linux/Artix without the WebKitGTK/GTK developer headers.
|
||
|
||
---
|
||
|
||
## What it is
|
||
|
||
**Gelyk EQ** is an audio effects plugin for mixing and mastering. It provides
|
||
seven independent EQ bands covering the full ~20 Hz – 20 kHz spectrum, plus a
|
||
master output gain, wrapped in a dark, glowing "neon" interface.
|
||
|
||
Rather than a dense wall of identical knobs, each band is laid out as a large
|
||
**drag-to-shape fader** (the "gain curve") in a shared visualiser. Dragging
|
||
gives you one-glance sight of the summed response you are actually shaping.
|
||
|
||
### The band layout
|
||
|
||
Seven filters run in series, logarithmically spaced across the spectrum:
|
||
|
||
| Band | Filter type | Default frequency | Default Q |
|
||
|------|------------------|-------------------|-----------|
|
||
| 0 | Low shelf | 60 Hz | 0.71 |
|
||
| 1 | Peak/parametric | 160 Hz | 1.0 |
|
||
| 2 | Peak/parametric | 400 Hz | 1.0 |
|
||
| 3 | Peak/parametric | 800 Hz | 1.0 |
|
||
| 4 | Peak/parametric | 1.6 kHz | 1.0 |
|
||
| 5 | Peak/parametric | 4 kHz | 1.0 |
|
||
| 6 | High shelf | 10 kHz | 0.71 |
|
||
|
||
### Parameter ranges
|
||
|
||
| Parameter | Range | Default |
|
||
|----------------|------------------|---------|
|
||
| Gain (per band)| −24 … +24 dB | 0 dB |
|
||
| Frequency | 20 … 20,000 Hz | per band (skewed, centre 1 kHz) |
|
||
| Q (per band) | 0.1 … 6.0 | per band |
|
||
| Master | −24 … +24 dB | 0 dB |
|
||
|
||
All parameters are smoothed per-block to avoid zipper noise, and remember their
|
||
state between sessions via a JUCE `AudioProcessorValueTreeState`.
|
||
|
||
### On-screen controls
|
||
|
||
- **The visualiser** - the main field shows:
|
||
- the **live input spectrum** (a realtime FFT analyser), drawn as a glowing,
|
||
filled waveform;
|
||
- the **static summed EQ curve** (the actual filter response), overlaid on the
|
||
same log-frequency axis so peaks line up with their bands;
|
||
- the neon **0 dB centre line** and reference grid.
|
||
- **Per-band faders** - drag a band vertically to change its gain, horizontally
|
||
to move its frequency, or use the mouse wheel to nudge its Q. The knobs and
|
||
numeric readouts below each fader are permanently linked to it.
|
||
- **LEVEL / FREQ / Q knobs** - an alternative, precise way to edit the currently
|
||
hovered band.
|
||
- **MASTER fader** - output trim.
|
||
- **SENS slider** - vertical offset for the live spectrum trace (how visually
|
||
"hot" the analyser appears; the display is pre-tuned to real per-FFT-bin
|
||
levels, so it reads meaningfully without touching this).
|
||
- **WAVE slider** - opacity of the live spectrum waveform.
|
||
- **HUE / SAT / BRI sliders** - recolor the entire palette (colour-shift, global
|
||
saturation and brightness) for a custom neon look.
|
||
- **SCALE selector** - fractional UI scaling for high-DPI or small screens.
|
||
- A **status bar** shows the build version and, when the plugin is built from a
|
||
git checkout, the current branch/commit and dirty state.
|
||
|
||
---
|
||
|
||
## Controls at a glance
|
||
|
||
| Control | Mouse down / drag | Mouse wheel |
|
||
|---------------|--------------------------|--------------------------|
|
||
| Band fader | Vertical = gain | Adjusts band Q |
|
||
| | Horizontal = frequency | |
|
||
| Per-band knobs| Rotate = value | - |
|
||
| Master fader | Vertical = output gain | - |
|
||
|
||
Double-click any knob or fader to reset it to its default value.
|
||
|
||
---
|
||
|
||
## Project structure
|
||
|
||
```
|
||
Source/
|
||
PluginProcessor.h/cpp AudioProcessor, parameter layout, state + audio pipeline
|
||
PluginEditor.h/cpp The neon UI: visualiser, faders, knobs, color controls
|
||
EqualizerDSP.h/cpp FilterBand IIR biquad + the background SpectrumAnalyser (FFT)
|
||
GitInfo.h.in Template for the git build-info header, filled by CMake
|
||
CMakeLists.txt Build configuration (JUCE 8, AU + VST3, CMake 3.15+)
|
||
Makefile Convenience wrapper: build, install, codesign
|
||
```
|
||
|
||
### DSP highlights (`EqualizerDSP`)
|
||
|
||
Each `FilterBand` is a set of JUCE IIR biquad coefficients, recalculated
|
||
cheaply whenever gain/frequency/Q change and continuously smoothed toward the
|
||
target. The channels run stereo-locked so the summed response is identical on
|
||
left and right.
|
||
|
||
The **`SpectrumAnalyser`** runs on a background thread: it fills a circular ring
|
||
buffer from the input, and periodically Hann-windows the most recent 4096
|
||
samples and runs a realtime FFT to produce the magnitude spectrum the editor
|
||
renders (aggregated into log-spaced bins from 20 Hz to 20 kHz).
|
||
|
||
---
|
||
|
||
## Building
|
||
|
||
### Requirements
|
||
|
||
- **CMake 3.15+** and a C++17 compiler (Clang, GCC, or MSVC).
|
||
- [JUCE 8.0.7](https://github.com/juce-framework/JUCE) - fetched automatically
|
||
by CMake via `FetchContent` when `JUCE_ROOT` is not set. To reuse an existing
|
||
checkout, configure with `-DJUCE_ROOT=/path/to/JUCE`.
|
||
|
||
### Configure & build
|
||
|
||
```sh
|
||
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
|
||
cmake --build build --config Release -j$(nproc)
|
||
```
|
||
|
||
The plugins are placed in `build/GelykEQ_artefacts/<config>/AU` (and `VST3`).
|
||
|
||
On macOS the bundled `Makefile` also installs both formats into your user plugin
|
||
folders and refreshes the system registry:
|
||
|
||
```sh
|
||
make # configure + build
|
||
make install # copy into ~/Library/Audio/Plug-Ins and codesign
|
||
```
|
||
|
||
### Linux / Artix note (no GTK, WebKitGTK, curl or GTK file selector needed)
|
||
|
||
Gelyk builds on minimal/headless-flavored distros such as **Artix** without any
|
||
of the usual JUCE baggage: no `webkit2gtk`, `gtk3`, `libsoup`, `jsc`, `libcurl`
|
||
or file-selector development packages. This is pinned in `CMakeLists.txt`:
|
||
|
||
```cmake
|
||
NEEDS_CURL FALSE # juce_add_plugin: never link libcurl
|
||
NEEDS_WEB_BROWSER FALSE # juce_add_plugin: never link WebKitGTK
|
||
|
||
target_compile_definitions(GelykEQ PRIVATE
|
||
JUCE_WEB_BROWSER=0
|
||
JUCE_USE_CURL=0
|
||
)
|
||
```
|
||
|
||
- **`JUCE_WEB_BROWSER=0`** removes `WebBrowserComponent` from the compile, which
|
||
is the only thing in `juce_gui_extra` that `#include`s `<gtk/gtk.h>`,
|
||
`<webkit2/webkit2.h>`, `<jsc/jsc.h>` and `<libsoup/soup.h>`.
|
||
- **`JUCE_USE_CURL=0`** matters just as much. JUCE's Linux default is `1`, which
|
||
makes `juce_core` `#include <curl/curl.h>` and compile `juce_Network_curl.cpp`.
|
||
Nothing would *link* libcurl (`NEEDS_CURL` is `FALSE`), but its **headers**
|
||
would still be a hard requirement. Gelyk never touches `URL`/`WebInputStream`,
|
||
so nothing is lost.
|
||
- **File dialogs are not a GTK dependency.** JUCE 8's Linux `FileChooser` shells
|
||
out to `zenity`/`kdialog` at runtime, and Gelyk never opens a native file
|
||
dialog anyway.
|
||
- X11's multi-monitor/DPI extensions (`Xrandr`, `Xinerama`, `Xshm`, `Xcursor`)
|
||
are `dlsym()`ed at runtime by JUCE, so their headers are treated as optional:
|
||
`CMakeLists.txt` probes for each and sets `JUCE_USE_XRANDR` / `JUCE_USE_XINERAMA`
|
||
/ `JUCE_USE_XSHM` / `JUCE_USE_XCURSOR` accordingly. A distro carrying just
|
||
`libX11` still builds, minus multi-monitor reporting.
|
||
|
||
What *is* still required is JUCE's own Linux baseline, checked at configure time
|
||
with a helpful error instead of a raw pkg-config failure:
|
||
|
||
| pkg-config | Arch / Artix | Debian / Ubuntu |
|
||
|------------|-------------------------|--------------------------------|
|
||
| `alsa` | `alsa-lib` | `libasound2-dev` |
|
||
| `freetype2`| `freetype2` | `libfreetype6-dev` |
|
||
| `fontconfig` | `fontconfig` | `libfontconfig1-dev` |
|
||
| X11 headers| `libx11` (`libxext` for `Xshm`) | `libx11-dev` (`libxext-dev`) |
|
||
|
||
None of them drag in GTK.
|
||
|
||
> If you ever do need native file dialogs at runtime (outside Gelyk), install
|
||
> `zenity` or `kdialog`.
|
||
|
||
---
|
||
|
||
## License
|
||
|
||
See the JUCE license for the framework; the Gelyk EQ source follows the same
|
||
licensing model. (Adjust per your chosen licensing.)
|