# Shapeverb

> Envelope reverb: each hit opens a dense reverb under a shape you draw (attack, hold, decay and curve) instead of a natural fade. Zero attack, a hold and a fast decay give the big gated burst; a long attack and no hold give a reverse swell that cuts off. Curve bends the attack and decay from punchy (negative) to slow (positive). Sensitivity sets what counts as a hit.

- Engine id: `org.sournd.reverb.shapeverb`
- Category: Reverb
- 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: 8.5 s
- Sidechain input: no
- Channels: mono or stereo
- Audio demo: https://sournd.com/static/preview/demos/shapeverb.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 | `predelay_ms` | Pre-delay | 0 | 200 | 0 | ms | linear |
| 1 | `attack_ms` | Attack | 0 | 2000 | 5 | ms | linear |
| 2 | `hold_ms` | Hold | 0 | 2000 | 250 | ms | linear |
| 3 | `decay_ms` | Decay | 10 | 4000 | 120 | ms | log |
| 4 | `curve` | Curve | -1 | 1 | 0 | - | linear |
| 5 | `sensitivity` | Sensitivity | 0 | 100 | 50 | % | linear |
| 6 | `size` | Size | 0 | 1 | 0.5 | - | linear |
| 7 | `damping_hz` | Damping | 1500 | 16000 | 8000 | Hz | log |
| 8 | `width` | Width | 0 | 1 | 1 | - | linear |
| 9 | `mix` | Mix | 0 | 100 | 40 | % | 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.shapeverb" };
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.shapeverb", &e) == SOURND_OK) {
    sournd_engine_prepare(e, 48000.0, 512);
    sournd_engine_set_param(e, 0, 0); /* Pre-delay */
    sournd_engine_process(e, in, out, 2, frames);
    sournd_engine_destroy(e);
}
```

## How it is made

Original sOURnd design: an onset detector on the pre-delayed input retriggers an attack-hold-decay envelope (starting from its current level, power-curve segments) that gates the output of a dense eight-line Hadamard feedback delay network whose decay is set several times longer than the envelope, fed through two all-pass diffusers per channel.

## Ask your AI

Paste this into your coding assistant:

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

## Related engines

Other [reverb engines](https://sournd.com/engines/category/reverb/index.md):

- [Roomette](https://sournd.com/engines/roomette/index.md): Free. A real-sounding room: distinct early reflections that place a sound at a distance, with a short soft tail.
- [Coilette](https://sournd.com/engines/coilette/index.md): Free. 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.
- [Aulana](https://sournd.com/engines/aulana/index.md): Paid. Lush, slowly moving hall. Separate low and high decay let the tail stay warm and dark or open and airy.
- [Blossa](https://sournd.com/engines/blossa/index.md): Paid. Reverb that blooms: it swells in behind notes, steps aside while you play, and can be gated shut for a hard stop.
- [Cellara](https://sournd.com/engines/cellara/index.md): Paid. Echo chamber: an immediate, dense burst of hard-wall reflections that turns into a smooth, still tail with a forward midrange and a bass that clears quickly. Early sets how much of the first burst you hear; Walls sets how bright the surfaces are.
- [Shimmerhall](https://sournd.com/engines/shimmerhall/index.md): Paid. Shimmer reverb: a long, gently moving space whose tail is pitch-shifted and fed back into itself, so held notes bloom into a bright halo an octave or a fifth above. Shimmer sets how much climbs. Interval: 0 = octave up, 1 = fifth up, 2 = octave and fifth, 3 = octave and octave-plus-fifth, 4 = octave down and up.
- [Tesselle](https://sournd.com/engines/tesselle/index.md): Paid. Bright, dense sheet of reverb that builds almost instantly. Smooth on drums and vocals.
