# Warblecot

> Modulated delay from 1 to 120 ms: an LFO sweeps each side's delay for doubling, drifting slap-back or warbling, chorused repeats; feedback of either polarity stacks them up. Rate sync locks the LFO cycle to a note of the host tempo (0 = free, 1..13 = 1/32 to 1 bar). Stereo offsets the right LFO's phase.

- Engine id: `org.sournd.delay.warblecot`
- Category: Delay
- 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: 34 s
- Sidechain input: no
- Channels: mono or stereo
- Audio demo: https://sournd.com/static/preview/demos/warblecot.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 | `time_ms` | Time | 1 | 120 | 18 | ms | log |
| 1 | `depth_ms` | Depth | 0 | 20 | 2 | ms | linear |
| 2 | `rate_hz` | Rate | 0.02 | 12 | 0.8 | Hz | log |
| 3 | `rate_sync` | Rate sync | 0 | 13 | 0 | - | linear |
| 4 | `feedback` | Feedback | -0.95 | 0.95 | 0.3 | - | linear |
| 5 | `shape` | Shape | 0 | 1 | 0 | - | linear |
| 6 | `stereo_deg` | Stereo | 0 | 180 | 90 | deg | linear |
| 7 | `tone_hz` | Tone | 1000 | 20000 | 9000 | Hz | log |
| 8 | `tempo` | Tempo | 40 | 300 | 120 | bpm | linear |
| 9 | `mix` | Mix | 0 | 100 | 50 | % | 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.delay.warblecot" };
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.delay.warblecot", &e) == SOURND_OK) {
    sournd_engine_prepare(e, 48000.0, 512);
    sournd_engine_set_param(e, 0, 18); /* Time */
    sournd_engine_process(e, in, out, 2, frames);
    sournd_engine_destroy(e);
}
```

## How it is made

Original sOURnd design: a Hermite-interpolated delay per channel swept by a sine-to-triangle LFO around the set time, stereo LFO phase offset, bipolar feedback through a one-pole low-pass, and tempo-derived LFO rates.

## Ask your AI

Paste this into your coding assistant:

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

## Related engines

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

- [Lucento](https://sournd.com/engines/lucento/index.md): Free. Clean digital echo: every repeat an exact copy, trimmed by low and high cut in the loop. Set the time in milliseconds or lock it to a note of the host tempo (the Tempo control stands in without one). Changing the time crossfades to the new echo instead of bending its pitch. Offset delays the right side for width. Sync: 0 = free, 1 = 1/32, 2 = 1/16T, 3 = 1/16, 4 = 1/16D, 5 = 1/8T, 6 = 1/8, 7 = 1/8D, 8 = 1/4T, 9 = 1/4, 10 = 1/4D, 11 = 1/2, 12 = 1/2D, 13 = 1 bar.
- [Driftel](https://sournd.com/engines/driftel/index.md): Free. Warm, wandering echo. Repeats bend in pitch, soften and saturate as they fade.
- [Twindle](https://sournd.com/engines/twindle/index.md): Free. Two delays side by side: left and right each get their own time (milliseconds or a synced note) and feedback. Cross sends each side's repeats into the other, from fully separate echoes to a ping-pong. Low and high cut shape every repeat. Sync: 0 = free, 1..13 = 1/32 to 1 bar.
- [Backwash](https://sournd.com/engines/backwash/index.md): Paid. Backwards echo: every chunk of time is played back reversed during the next one, so notes swell in from nothing and cut off. Feedback flips the repeats back and forth. Fade sets how soft each chunk's edges are. Sync: 0 = free, 1..13 = 1/32 to 1 bar (chunks longer than 2 s are held at 2 s).
- [Bucketta](https://sournd.com/engines/bucketta/index.md): Paid. Dark, gritty analogue-style echo. Short times stay bright, long times get murky because the virtual clock slows down; a compander makes hiss and grit swell and fade with the playing; turning the time bends the repeats in pitch, and the glide sets how fast. Sync as the other echoes: 0 = free, 1..13 = 1/32 to 1 bar.
- [Graniel](https://sournd.com/engines/graniel/index.md): Paid. Granular echo: the delayed sound is cut into short grains, scattered in time by Spray, pitched and panned, and layered at the chosen density, from a shimmering cloud to a stuttering glitch. Feedback feeds the cloud back into itself; Freeze (on above half) stops recording so the grains keep playing the held sound. Sync: 0 = free, 1..13 = 1/32 to 1 bar.
- [Tapsody](https://sournd.com/engines/tapsody/index.md): Paid. Rhythmic multi-tap echoes that fan out across the stereo field, even, speeding up or slowing down.
- [Volleto](https://sournd.com/engines/volleto/index.md): Paid. Stereo ping-pong. Repeats bounce left and right, thinning and blurring into a wash as they go.
