# Gridelle

> Thirty-one-band third-octave graphic EQ, 20 Hz to 20 kHz, +-12 dB per band, constant-Q, for room and system voicing and precise tonal balance.

- Engine id: `org.sournd.eq.gridelle`
- Category: EQ
- Licence: paid: £2.99 an effect or £4.99 a synth, once (owned for good, with updates), or included in the Everything plan (£14.99 a month)
- Version: 1.0.0
- Latency: 0 samples
- Tail: 0.3 s
- Sidechain input: no
- Channels: mono or stereo
- Audio demo: https://sournd.com/static/preview/demos/gridelle.mp3 (a drum loop, default settings)

## Parameters

The id is the C ABI parameter id and the JUCE parameter id (as a decimal string).

| Id | Key | Name | Min | Max | Default | Unit | Taper |
|---|---|---|---|---|---|---|---|
| 0 | `band_1_db` | 20 Hz | -12 | 12 | 0 | dB | linear |
| 1 | `band_2_db` | 25 Hz | -12 | 12 | 0 | dB | linear |
| 2 | `band_3_db` | 31.5 Hz | -12 | 12 | 0 | dB | linear |
| 3 | `band_4_db` | 40 Hz | -12 | 12 | 0 | dB | linear |
| 4 | `band_5_db` | 50 Hz | -12 | 12 | 0 | dB | linear |
| 5 | `band_6_db` | 63 Hz | -12 | 12 | 0 | dB | linear |
| 6 | `band_7_db` | 80 Hz | -12 | 12 | 0 | dB | linear |
| 7 | `band_8_db` | 100 Hz | -12 | 12 | 0 | dB | linear |
| 8 | `band_9_db` | 125 Hz | -12 | 12 | 0 | dB | linear |
| 9 | `band_10_db` | 160 Hz | -12 | 12 | 0 | dB | linear |
| 10 | `band_11_db` | 200 Hz | -12 | 12 | 0 | dB | linear |
| 11 | `band_12_db` | 250 Hz | -12 | 12 | 0 | dB | linear |
| 12 | `band_13_db` | 315 Hz | -12 | 12 | 0 | dB | linear |
| 13 | `band_14_db` | 400 Hz | -12 | 12 | 0 | dB | linear |
| 14 | `band_15_db` | 500 Hz | -12 | 12 | 0 | dB | linear |
| 15 | `band_16_db` | 630 Hz | -12 | 12 | 0 | dB | linear |
| 16 | `band_17_db` | 800 Hz | -12 | 12 | 0 | dB | linear |
| 17 | `band_18_db` | 1 kHz | -12 | 12 | 0 | dB | linear |
| 18 | `band_19_db` | 1.25 kHz | -12 | 12 | 0 | dB | linear |
| 19 | `band_20_db` | 1.6 kHz | -12 | 12 | 0 | dB | linear |
| 20 | `band_21_db` | 2 kHz | -12 | 12 | 0 | dB | linear |
| 21 | `band_22_db` | 2.5 kHz | -12 | 12 | 0 | dB | linear |
| 22 | `band_23_db` | 3.15 kHz | -12 | 12 | 0 | dB | linear |
| 23 | `band_24_db` | 4 kHz | -12 | 12 | 0 | dB | linear |
| 24 | `band_25_db` | 5 kHz | -12 | 12 | 0 | dB | linear |
| 25 | `band_26_db` | 6.3 kHz | -12 | 12 | 0 | dB | linear |
| 26 | `band_27_db` | 8 kHz | -12 | 12 | 0 | dB | linear |
| 27 | `band_28_db` | 10 kHz | -12 | 12 | 0 | dB | linear |
| 28 | `band_29_db` | 12.5 kHz | -12 | 12 | 0 | dB | linear |
| 29 | `band_30_db` | 16 kHz | -12 | 12 | 0 | dB | linear |
| 30 | `band_31_db` | 20 kHz | -12 | 12 | 0 | dB | linear |
| 31 | `output_db` | Output | -12 | 12 | 0 | dB | linear |

## Use it in JUCE

CMake ([quick start](/docs/juce/index.md)):

```cmake
juce_add_module(path/to/sournd_engine)
target_include_directories(MyPlugin PRIVATE path/to/include)
target_link_libraries(MyPlugin PRIVATE sournd_engine path/to/libsournd_cabi.a)
```

C++:

```cpp
#include <sournd_engine/sournd_engine.h>

sournd::SourndEngine engine { "org.sournd.eq.gridelle" };
juce::AudioProcessorValueTreeState parameters { *this, nullptr, "Parameters",
    sournd::SourndEngineParameters::createLayout (engine) };
sournd::SourndEngineParameters bridge { engine, parameters };

// prepareToPlay
engine.prepare ({ sampleRate, (juce::uint32) maximumBlock, 2 });
bridge.prepare (sampleRate);
setLatencySamples ((int) engine.latency());

// processBlock
bridge.apply ((uint32_t) buffer.getNumSamples());
juce::dsp::AudioBlock<float> block { buffer };
engine.process (juce::dsp::ProcessContextReplacing<float> { block });

// get/setStateInformation: hold getCallbackLock() around saveState / loadState,
// so state work never overlaps processBlock (full example: /docs/juce/)
```

Plain C:

```c
sournd_engine *e = NULL;
if (sournd_engine_create("org.sournd.eq.gridelle", &e) == SOURND_OK) {
    sournd_engine_prepare(e, 48000.0, 512);
    sournd_engine_set_param(e, 0, 0); /* 20 Hz */
    sournd_engine_process(e, in, out, 2, frames);
    sournd_engine_destroy(e);
}
```

## How it is made

Original sOURnd design blending general techniques: cascaded constant-Q RBJ peaking biquads on the base-2 third-octave series, bands out of the path at 0 dB.

## Ask your AI

Paste this into your coding assistant:

```text
Add the sournd engine org.sournd.eq.gridelle to my JUCE plugin. Follow https://sournd.com/docs/juce/index.md
and the engine reference at https://sournd.com/engines/gridelle/index.md. Expose every parameter through APVTS.
```
