# Hushel

> Dynamic EQ band: a bell that cuts only while its own band is louder than the threshold. Set it high and narrow-ish for de-essing; the wide control moves the cut from the band to the whole signal.

- Engine id: `org.sournd.dynamics.hushel`
- Category: Dynamics
- 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: 1 s
- Sidechain input: no
- Channels: mono or stereo
- Audio demo: https://sournd.com/static/preview/demos/hushel.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 | `freq_hz` | Frequency | 200 | 16000 | 6500 | Hz | log |
| 1 | `q` | Q | 0.3 | 10 | 2 | x | log |
| 2 | `gain_db` | Static gain | -18 | 18 | 0 | dB | linear |
| 3 | `threshold_db` | Threshold | -60 | 0 | -30 | dB | linear |
| 4 | `ratio` | Ratio | 1 | 20 | 4 | x | log |
| 5 | `range_db` | Range | 0 | 24 | 12 | dB | linear |
| 6 | `attack_ms` | Attack | 0.1 | 50 | 1 | ms | log |
| 7 | `release_ms` | Release | 5 | 1000 | 80 | ms | log |
| 8 | `wide_pct` | Wide | 0 | 100 | 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.dynamics.hushel" };
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.dynamics.hushel", &e) == SOURND_OK) {
    sournd_engine_prepare(e, 48000.0, 512);
    sournd_engine_set_param(e, 0, 6500); /* Frequency */
    sournd_engine_process(e, in, out, 2, frames);
    sournd_engine_destroy(e);
}
```

## How it is made

Original sOURnd design blending general techniques: constant-peak band-pass sidechain, bell built by adding a scaled band-pass to the dry signal, log-domain threshold/ratio/range gain computer, split-band versus wideband reduction blend.

## Ask your AI

Paste this into your coding assistant:

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