# Shimmerhall

> 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.

- Engine id: `org.sournd.reverb.shimmerhall`
- 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: 45 s
- Sidechain input: no
- Channels: mono or stereo
- Audio demo: https://sournd.com/static/preview/demos/shimmerhall.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 | 300 | 20 | ms | linear |
| 1 | `decay_s` | Decay | 1 | 20 | 6 | s | log |
| 2 | `size` | Size | 0 | 1 | 0.7 | - | linear |
| 3 | `damping_hz` | Damping | 1500 | 16000 | 7000 | Hz | log |
| 4 | `interval` | Interval | 0 | 4 | 0 | - | linear |
| 5 | `shimmer` | Shimmer | 0 | 100 | 40 | % | linear |
| 6 | `mod_depth` | Mod depth | 0 | 1 | 0.4 | - | linear |
| 7 | `width` | Width | 0 | 1 | 1 | - | linear |
| 8 | `mix` | Mix | 0 | 100 | 35 | % | 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.shimmerhall" };
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.shimmerhall", &e) == SOURND_OK) {
    sournd_engine_prepare(e, 48000.0, 512);
    sournd_engine_set_param(e, 0, 20); /* Pre-delay */
    sournd_engine_process(e, in, out, 2, frames);
    sournd_engine_destroy(e);
}
```

## How it is made

Original sOURnd design: pre-delay and three all-pass input diffusers per channel into an eight-line Hadamard feedback delay network with in-loop all-passes, low shelf and damping; its output passes through one or two crossfading two-head delay-line pitch shifters and a band-pass, and returns to the network input at the shimmer level.

## Ask your AI

Paste this into your coding assistant:

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