# Widewing

> Short-delay widener: a few milliseconds between the channels opens the image while the lows stay centred. Mono-safe mode keeps the mono sum exactly the input; mono check folds the output so you can hear what a mono listener gets.

- Engine id: `org.sournd.utility.widewing`
- Category: Utility
- 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: 0.1 s
- Sidechain input: no
- Channels: mono or stereo
- Audio demo: https://sournd.com/static/preview/demos/widewing.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 | `delay_ms` | Delay | 1 | 40 | 15 | ms | linear |
| 1 | `delay_right` | Delay the right side | 0 | 1 | 1 | - | linear |
| 2 | `amount_pct` | Amount | 0 | 100 | 100 | % | linear |
| 3 | `low_cut_hz` | Keep centred below | 20 | 1000 | 150 | Hz | log |
| 4 | `mono_safe` | Mono-safe | 0 | 1 | 1 | - | linear |
| 5 | `mono_check` | Mono check | 0 | 1 | 0 | - | 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.utility.widewing" };
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.utility.widewing", &e) == SOURND_OK) {
    sournd_engine_prepare(e, 48000.0, 512);
    sournd_engine_set_param(e, 0, 15); /* Delay */
    sournd_engine_process(e, in, out, 2, frames);
    sournd_engine_destroy(e);
}
```

## How it is made

Original sOURnd utility blending general techniques: the precedence effect, a high-pass split that keeps the low band undelayed, a mid-to-side delayed injection that cancels in the mono sum, and a mono fold-down for checking.

## Ask your AI

Paste this into your coding assistant:

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

## Related engines

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

- [Gain](https://sournd.com/engines/gain/index.md): Free. Clean level control with a short de-zipper ramp.
- [Keelson](https://sournd.com/engines/keelson/index.md): Free. Channel utility: flip polarity per channel, swap channels, fold to mono (sum, left or right), balance or pan with a choice of pan law, delay each channel by samples plus milliseconds for time alignment, remove DC, and trim the level.
- [Breadth](https://sournd.com/engines/breadth/index.md): Free. Stereo width from mono to double width, with a low end that folds to mono below a chosen frequency.
- [Loomwise](https://sournd.com/engines/loomwise/index.md): Paid. Stereo spread: splits the centre of the mix into bands between two frequencies and places alternate bands left and right, widening mono or narrow material with no delay, no phasiness and a mono sum that never changes.
- [Meridel](https://sournd.com/engines/meridel/index.md): Paid. Mid/side mixer: set the centre and the sides separately, spread or narrow the image, and turn the whole image left or right without losing energy. Decode mode takes a mid/side recording in; encode mode sends mid/side out.
- [Spherel](https://sournd.com/engines/spherel/index.md): Paid. Binaural panner for headphones: places the input around the listener's head by azimuth, elevation and distance, with the time and level differences between the ears, the head's shadow, a pinna cue for height and softer highs from behind and far away.
