# Offsetter

> Frequency shifter: moves every partial up or down by the same number of hertz, from slow phasing drifts to detuned, inharmonic metal; feedback turns it into an endless spiral.

- Engine id: `org.sournd.modulation.offsetter`
- Category: Modulation
- 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: 0.2 s
- Sidechain input: no
- Channels: mono or stereo
- Audio demo: https://sournd.com/static/preview/demos/offsetter.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 | `shift_hz` | Shift | 0.1 | 2500 | 8 | Hz | log |
| 1 | `mode` | Mode | 0 | 2 | 0 | - | linear |
| 2 | `feedback` | Feedback | 0 | 90 | 0 | % | linear |
| 3 | `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.modulation.offsetter" };
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.modulation.offsetter", &e) == SOURND_OK) {
    sournd_engine_prepare(e, 48000.0, 512);
    sournd_engine_set_param(e, 0, 8); /* Shift */
    sournd_engine_process(e, in, out, 2, frames);
    sournd_engine_destroy(e);
}
```

## How it is made

Original sOURnd design blending general techniques: a pair of polyphase all-pass cascades forming an analytic signal, single-sideband rotation by a quadrature carrier, per-channel up/down selection and tanh-limited feedback.

## Ask your AI

Paste this into your coding assistant:

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

## Related engines

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

- [Chorvane](https://sournd.com/engines/chorvane/index.md): Free. Lush three-voice ensemble chorus with stereo spread and a soft top end.
- [Eddyturn](https://sournd.com/engines/eddyturn/index.md): Free. Eight-stage phaser with staggered notches, feedback for vocal sweeps and a stereo offset that turns it into a slow spin.
- [Tremola](https://sournd.com/engines/tremola/index.md): Free. Tremolo that morphs from a smooth throb to a choppy pulse; widen the stereo phase for auto-pan.
- [Bellrung](https://sournd.com/engines/bellrung/index.md): Paid. Ring modulator: replaces each note with metallic sum and difference tones, from bell-like shimmer to harsh clangour, with an optional wobble on the carrier.
- [Ebb](https://sournd.com/engines/ebb/index.md): Paid. Harmonic tremolo: lows and highs pulse in opposite phase, so the tone rocks between warm and bright with a subtle phasey sway instead of a plain volume throb.
- [Gyrecast](https://sournd.com/engines/gyrecast/index.md): Paid. Rotating speaker: a spinning treble horn and bass drum, slow or fast, that speed up and slow down with real weight, heard by two microphones for a wide swirling stereo image.
- [Jetwake](https://sournd.com/engines/jetwake/index.md): Paid. Jet-sweep flanger with positive or negative feedback and a near through-zero mode that sweeps the echo across the dry signal.
- [Photocel](https://sournd.com/engines/photocel/index.md): Paid. Lopsided, throbbing four-stage phase shifter swept by a lamp and light cell: chorus mode for liquid, pulsing notches, vibrato mode for a seasick pitch wobble.
- [Spinhorn](https://sournd.com/engines/spinhorn/index.md): Paid. Scanner vibrato and chorus: a spinning pickup sweeps along a line of delay taps that grow darker as they go, for the liquid, slightly grainy wobble of an old organ. Three vibrato depths, and three chorus depths that add the dry sound.
- [Stairwhorl](https://sournd.com/engines/stairwhorl/index.md): Paid. Endless sweep: phaser or flanger notches that keep rising, or keep falling, forever without ever resetting.
