# Stepvale

> Filterbank morph: twenty narrow bands across the spectrum, their levels gliding between two stored shapes (vowels, odd or even bands, tilts, scoops, telephone), by hand or on an LFO that can lock to the song.

- Engine id: `org.sournd.filter.stepvale`
- Category: Filter
- 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/stepvale.mp3 (a bass line, 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 | `curve_a` | Curve A | 0 | 12 | 0 | - | linear |
| 1 | `curve_b` | Curve B | 0 | 12 | 1 | - | linear |
| 2 | `morph` | Morph | 0 | 100 | 0 | % | linear |
| 3 | `lfo_depth` | LFO depth | 0 | 100 | 0 | % | linear |
| 4 | `lfo_rate_hz` | LFO rate | 0.02 | 20 | 0.5 | Hz | log |
| 5 | `sync` | Sync | 0 | 11 | 0 | - | linear |
| 6 | `tempo` | Tempo | 40 | 300 | 120 | bpm | linear |
| 7 | `lfo_shape` | LFO shape | 0 | 5 | 0 | - | linear |
| 8 | `stereo` | Stereo | 0 | 180 | 0 | deg | linear |
| 9 | `resonance` | Resonance | 0 | 100 | 50 | % | linear |
| 10 | `shift` | Shift | -12 | 12 | 0 | st | linear |
| 11 | `mix` | Mix | 0 | 100 | 100 | % | linear |
| 12 | `output_db` | Output | -24 | 12 | 0 | dB | 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.filter.stepvale" };
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.filter.stepvale", &e) == SOURND_OK) {
    sournd_engine_prepare(e, 48000.0, 512);
    sournd_engine_set_param(e, 0, 0); /* Curve A */
    sournd_engine_process(e, in, out, 2, frames);
    sournd_engine_destroy(e);
}
```

## How it is made

Original sOURnd design blending general techniques: a bank of twenty log-spaced unity-peak trapezoidal band-pass filters, per-band gains interpolated in decibels between two tabulated curves (vowel curves built from typical published formant frequencies), a tempo-synced LFO on the morph and per-band gain smoothing.

## Ask your AI

Paste this into your coding assistant:

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

## Related engines

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

- [Veer](https://sournd.com/engines/veer/index.md): Free. Resonant multimode filter that morphs continuously from low-pass through band-pass and high-pass to notch, with input drive and an envelope that sweeps the cutoff with the playing.
- [Kammerl](https://sournd.com/engines/kammerl/index.md): Free. Tuned comb filter: rings any sound at a note or frequency, from a subtle metallic sheen to a singing, pitched resonance. Flip the polarity for a hollow tone an octave down; damping softens the ring.
- [Pivotta](https://sournd.com/engines/pivotta/index.md): Free. One-knob performance filter: turn left and a low-pass sweeps down from the top to the deep bass, turn right and a high-pass sweeps up to thin the sound out; the centre is a clean bypass. Resonance adds a peak at the cutoff; Steep switches 12 to 24 dB/oct.
- [Glottan](https://sournd.com/engines/glottan/index.md): Paid. A vowel filter: three resonant peaks shaped like a voice, slid between two vowels by hand, by an LFO or by how hard the input plays, for talking, wah and growl tones.
- [Prowl](https://sournd.com/engines/prowl/index.md): Paid. Auto filter: a resonant low-pass, band-pass, high-pass or notch swept by an LFO (free or locked to the song, including sample-and-hold steps) and by how hard you play, with drive in front, grit after and a stereo offset.
- [Rung](https://sournd.com/engines/rung/index.md): Paid. Warm resonant low-pass: four cascaded poles in a feedback loop with soft saturation, a slope control from 6 to 24 dB/oct and bass compensation for the level lost to resonance.
- [Sifta](https://sournd.com/engines/sifta/index.md): Paid. Spectral gate: splits the sound into a thousand narrow slices and lets each one through only while it is louder than the threshold, so hiss, room and bleed between the notes fall away while the notes stay. Invert it to keep only the quiet residue.
- [Treadle](https://sournd.com/engines/treadle/index.md): Paid. Pedal wah: one vocal, resonant peak rocked from heel to toe by the position control (map it to an expression pedal), or pushed by your playing for auto-wah. Hard notes squash the peak into a throaty honk.
