# Marcher

> Step effects sequencer: three eight-step lanes move a resonant low-pass filter, the stereo position and the level in time with the host (or the Tempo control). Glide slides between steps instead of jumping; Depth scales the filter lane (0 = filter open). Steps shortens the pattern. Rate: 0 = 1/8, 1 = 1/16, 2 = 1/32, 3 = 1/16T.

- Engine id: `org.sournd.performance.marcher`
- Category: Performance
- 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.05 s
- Sidechain input: no
- Channels: mono or stereo
- Audio demo: https://sournd.com/static/preview/demos/marcher.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 | `cut_1` | Cutoff 1 | 0 | 100 | 100 | % | linear |
| 1 | `cut_2` | Cutoff 2 | 0 | 100 | 55 | % | linear |
| 2 | `cut_3` | Cutoff 3 | 0 | 100 | 80 | % | linear |
| 3 | `cut_4` | Cutoff 4 | 0 | 100 | 40 | % | linear |
| 4 | `cut_5` | Cutoff 5 | 0 | 100 | 90 | % | linear |
| 5 | `cut_6` | Cutoff 6 | 0 | 100 | 50 | % | linear |
| 6 | `cut_7` | Cutoff 7 | 0 | 100 | 70 | % | linear |
| 7 | `cut_8` | Cutoff 8 | 0 | 100 | 35 | % | linear |
| 8 | `pan_1` | Pan 1 | -100 | 100 | 0 | % | linear |
| 9 | `pan_2` | Pan 2 | -100 | 100 | 0 | % | linear |
| 10 | `pan_3` | Pan 3 | -100 | 100 | 0 | % | linear |
| 11 | `pan_4` | Pan 4 | -100 | 100 | 0 | % | linear |
| 12 | `pan_5` | Pan 5 | -100 | 100 | 0 | % | linear |
| 13 | `pan_6` | Pan 6 | -100 | 100 | 0 | % | linear |
| 14 | `pan_7` | Pan 7 | -100 | 100 | 0 | % | linear |
| 15 | `pan_8` | Pan 8 | -100 | 100 | 0 | % | linear |
| 16 | `level_1` | Level 1 | 0 | 100 | 100 | % | linear |
| 17 | `level_2` | Level 2 | 0 | 100 | 100 | % | linear |
| 18 | `level_3` | Level 3 | 0 | 100 | 100 | % | linear |
| 19 | `level_4` | Level 4 | 0 | 100 | 100 | % | linear |
| 20 | `level_5` | Level 5 | 0 | 100 | 100 | % | linear |
| 21 | `level_6` | Level 6 | 0 | 100 | 100 | % | linear |
| 22 | `level_7` | Level 7 | 0 | 100 | 100 | % | linear |
| 23 | `level_8` | Level 8 | 0 | 100 | 100 | % | linear |
| 24 | `steps` | Steps | 1 | 8 | 8 | - | linear |
| 25 | `rate` | Rate | 0 | 3 | 1 | - | linear |
| 26 | `glide` | Glide | 0 | 100 | 10 | % | linear |
| 27 | `resonance` | Resonance | 0 | 100 | 30 | % | linear |
| 28 | `depth` | Depth | 0 | 100 | 100 | % | linear |
| 29 | `tempo` | Tempo | 40 | 300 | 120 | bpm | linear |
| 30 | `mix` | Mix | 0 | 100 | 100 | % | 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.performance.marcher" };
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.performance.marcher", &e) == SOURND_OK) {
    sournd_engine_prepare(e, 48000.0, 512);
    sournd_engine_set_param(e, 0, 100); /* Cutoff 1 */
    sournd_engine_process(e, in, out, 2, frames);
    sournd_engine_destroy(e);
}
```

## How it is made

Original sOURnd design: a bar-locked step clock drives three lanes of per-step targets, each followed by a one-pole glide whose time scales with the step length; the cutoff lane maps logarithmically to a zero-delay-feedback state-variable low-pass, the pan lane to an equal-power balance and the level lane to a gain.

## Ask your AI

Paste this into your coding assistant:

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

## Related engines

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

- [Torpora](https://sournd.com/engines/torpora/index.md): Free. Tape stop: the sound slows down and drops in pitch to a halt over the stop time, then spins back up over the start time (0 = cut straight back in). Curve bends the slowdown from a sudden drag (negative) to a long coast (positive). Trigger: 0 = the Stop control (on above half), 1 = the host transport stopping and starting, 2 = either.
- [Gatestep](https://sournd.com/engines/gatestep/index.md): Free. Step gate: sixteen steps, each with its own level, chop the sound in time with the host (or the Tempo control). Each step opens for its duty then closes; Shape softens the edges from a hard chop to a smooth pulse; Swing delays every other step; Depth sets how far the closed gate goes down. Length shortens the pattern. Rate: 0 = 1/8, 1 = 1/16, 2 = 1/32, 3 = 1/16T.
- [Carvello](https://sournd.com/engines/carvello/index.md): Paid. Beat slicer: each bar is cut into equal slices, and Shuffle is the chance that a slice is replaced by an earlier slice of the same bar (Reverse the chance it plays backwards), so loops are broken up and rebuilt on the fly. Hold keeps one pattern for every bar (above half) instead of a new one each bar. Slices: 0 = 4, 1 = 8, 2 = 16, 3 = 32 per bar. Seed picks the pattern.
- [Glacine](https://sournd.com/engines/glacine/index.md): Paid. Sustainer: turn Hold on and the current sound is captured and held indefinitely as a smooth, evolving texture, blended under or over the live signal. While held, the trigger decides when it crossfades to a fresh capture: 0 = manual (only when Hold is switched on), 1 = new note (a stable pitch change larger than Pitch change), 2 = transient, 3 = every N beats, 4 = every N bars (host grid, or the Tempo control without one). Switching Hold off lets the held sound die away over Release.
- [Rippet](https://sournd.com/engines/rippet/index.md): Paid. Grid stutter: once per interval, at the offset, it rolls the dice and may grab a short slice and stutter it for the gate length, each repeat optionally dropping in pitch and level. Locks to the host grid; without one it runs on its own Tempo. Interval: 0 = 1 beat, 1 = 2 beats, 2 = 1 bar, 3 = 2 bars, 4 = 4 bars. Offset and Gate count sixteenth notes. Repeat: 0 = 1/32, 1 = 1/16, 2 = 1/8, 3 = 1/4, 4 = 1/2. The same seed and song position always make the same decision.
