# Coilette

> Spring reverb: a boingy, splashy tank whose echoes chirp downward as the lows lag behind the highs. Tension tightens the springs (shorter, brighter, less chirp); Drip is how hard transients shake the tank; Springs sets how many are in it.

- Engine id: `org.sournd.reverb.coilette`
- Category: Reverb
- Licence: free: a closed library, free to use in your plugins, downloaded with no account or email
- Download (no account or email): https://sournd.com/download/free/macos (macOS universal), https://sournd.com/download/free/linux (Linux x86_64 and aarch64) or https://sournd.com/download/free/windows (Windows x64). One archive with every free engine: static library, C headers, README.
- Version: 1.0.0
- Latency: 0 samples
- Tail: 14 s
- Sidechain input: no
- Channels: mono or stereo
- Audio demo: https://sournd.com/static/preview/demos/coilette.mp3 (plucked chords, 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 | `decay_s` | Decay | 0.5 | 8 | 2.5 | s | log |
| 1 | `tension` | Tension | 0 | 1 | 0.5 | - | linear |
| 2 | `springs` | Springs | 1 | 3 | 3 | - | linear |
| 3 | `drip` | Drip | 0 | 1 | 0.4 | - | linear |
| 4 | `tone_hz` | Tone | 1500 | 10000 | 4500 | Hz | log |
| 5 | `low_cut_hz` | Low cut | 40 | 600 | 120 | Hz | log |
| 6 | `width` | Width | 0 | 1 | 1 | - | linear |
| 7 | `mix` | Mix | 0 | 100 | 30 | % | 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.reverb.coilette" };
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.reverb.coilette", &e) == SOURND_OK) {
    sournd_engine_prepare(e, 48000.0, 512);
    sournd_engine_set_param(e, 0, 2.5); /* Decay */
    sournd_engine_process(e, in, out, 2, frames);
    sournd_engine_destroy(e);
}
```

## How it is made

Original sOURnd design: per spring, a delay loop through forty first-order all-pass sections with a shared negative coefficient (frequency-dependent group delay, so dispersion grows with every round trip), one-pole damping and low cut inside the loop, RT60-derived loop gain, band-limited mono input, an onset detector that injects extra high-passed energy and kicks a decaying sinusoidal wobble of the loop delay, and fixed stereo placement per spring.

## Ask your AI

Paste this into your coding assistant:

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