
A groove that keeps moving
HALFSTEPER writes drum patterns in halfstep and glitch drum & bass, and keeps reshaping them while it plays. It runs as a VST3 plugin in Ableton or as a standalone app. Patterns are one, two or four bars long, and a fill arrives every one to eight bars, so a loop never sits still for long.
9
lanes, from kick to glitch FX
3
styles: Halfstep, Glitch DnB, Hybrid
9
knobs, three of them for live moves
1–8
bars between fills
The kick holds the floor. Everything else is allowed to move.
That line is the idea behind the plugin, and behind its Drift knob in particular. The kick stays where it is, so the groove stays recognisable, while the rest of the kit changes from one cycle to the next.
Nine lanes, one groove
A pattern is written across nine lanes: kick, snare, ghosts, rim, hi-hat, open hat, percussion, ride and glitch FX. In a typical halfstep bar the snare lands on beat three, which gives the half-time feel. Ghost notes, rims and glitch hits fill the gaps around it, and velocity gives each hit its weight.

Six knobs shape the pattern, three move it live
PATTERN
Density · Spread · Glitch · Ghosts · Groove · Humanity
These six decide what kind of groove gets written: how busy it is, how the hits spread across the bar, how much glitch and how many ghost notes it carries, how it grooves and how human it feels.
LIVE
Stutter · Evolve · Drift
These three are for playing. They reshape the running pattern without stopping it. Drift keeps the kick in place while everything else changes from cycle to cycle.
Three styles set the overall character: Halfstep, Glitch DnB and Hybrid. Together with the pattern length and the fill interval, they decide how far the pattern is allowed to wander.

It learns from your tracks
HALFSTEPER keeps a rhythm dictionary. Drop a .wav or a .mid file onto it, such as a drum loop, a break or a MIDI clip, and it extracts the kick, the snare and the hats, the three parts that carry a groove. The dictionary is stored once on the computer, outside any Ableton project, so a groove learned in one set is there in the next.

Four ways out
- Its own samples. The plugin plays its own kit straight away, in Ableton or as a standalone app.
- Drum Rack. Put a Drum Rack on a MIDI track and set MIDI From to HALFSTEPER.
- MIDI OUT + channel. Choose a port and a channel (Ch 1 by default) to drive an MPC, loopMIDI or a drum machine, in time with Ableton.
- MPC export. Export the pattern and take it onto an MPC.
MIDI OUT stays in time with Ableton and sends its note-offs on time. HALFSTEPER no longer creates a port of its own called “HALFSTEPER MIDI”: you pick the port you need.

Ableton leads, HALFSTEPER follows
Sync lives in the panel called “Ableton Link · MIDI Sync · MPC Live”. Tick DAW / MPC Host Sync and Ableton becomes the only clock in the room. While sync is on, the plugin’s own Play button deliberately starts nothing: you start everything together from Ableton’s space bar.
The same routing tip applies as with CONTRAPUNKT: a track set to “All Ins” also hears loopMIDI and doubles every note, so pick the port by name.

MIDI Learn and memory
Press MIDI Learn, pick a control and move a knob or pad on your controller. The nine knobs can be learned, along with style, bars, the note map, volume, fills, and the Play, Generate and Mutate buttons. Learned controls keep working when the plugin window is closed, so the screen can stay on Ableton. The map is saved once on the computer and shared by every set.

Whatever belongs to a song travels with the Ableton set: knobs and settings, the pattern and its samples, the MIDI port by name, the channel and host sync. Your controller map, the theme and the rhythm dictionary are stored once and shared. Any edit marks the set as changed, so Ableton asks to save before closing.

Checked in a real host
Before a build is used, it is loaded into a host and played. The test covers the generator, the samples, MPC export, MIDI Learn across all 128 controller numbers and the sound itself. It plays real notes through the plugin and checks their timing: 147 notes and 145 note-offs, on time. It then saves and restores the state with MIDI out switched on. A timing or routing bug shows up before a gig rather than during one.

HALFSTEPER pairs with CONTRAPUNKT, the harmony generator: one writes the drums, the other the chords, and both follow Ableton’s clock.
Technical notes: stack, algorithms, code
This part is for developers. The excerpts below are copied from the HALFSTEPER source. Lines starting with // … mark omissions; all other comments are the original ones.
STACK
What it is built with
| Language | C++17, namespace halfstep |
|---|---|
| Formats | VST3 plugin (HALFSTEPER.vst3) and a standalone app |
| Plugin API | Steinberg VST3 SDK: IEditController, IMidiMapping, IComponentHandler2 |
| MIDI out | Windows Multimedia API (mmsystem.h), a QueryPerformanceCounter clock and a dedicated worker thread |
| Interface | An HTML/JS desktop view (ui_desktop.html) inside the plugin window; JSON messages (nlohmann/json) |
| Sound | Built-in sample player, MPC export |
| Learning | Rhythm dictionary built from .wav and .mid files |
MODEL · 01
The pattern
A pattern is a grid of nine lanes (kick, snare, ghosts, rim, hi-hat, open hat, percussion, ride, glitch FX) over one, two or four bars, with a velocity for every hit. The style sets the overall character. The six pattern knobs shape what gets written, and the three live knobs act on the running pattern. Drift is defined by what it keeps: the kick lane stays fixed while the other lanes are allowed to change from cycle to cycle. Every lane maps to a note through the note map, which is what lets the same pattern drive the built-in kit, a Drum Rack or an MPC.
MIDI · 02
A scheduled MIDI OUT
Sending MIDI to an external port from inside a VST3 plugin has two problems. The audio thread must not call into the operating system’s MIDI driver, and the timing must still follow the host. VstExternalMidiOut solves both. The audio thread only pushes a note with its due time and length into a lock-free queue. A worker thread, timed by the high-resolution performance counter, sends the note-on when it is due and the note-off when its length runs out. That is why note-offs now arrive on time. The port is stored by name: if loopMIDI restarts or an MPC is reconnected, the worker opens the port again by itself.
// The port is remembered by NAME (saved in the project) and re-opened automatically
// when it appears again (loopMIDI restarted, MPC reconnected, device list changed).
// …
namespace halfstep {
class VstExternalMidiOut {
public:
VstExternalMidiOut() {
LARGE_INTEGER f;
QueryPerformanceFrequency(&f);
qpcFreq_ = static_cast<double>(f.QuadPart);
worker_ = std::thread([this]() { loop(); });
}
// …
// ---------- AUDIO THREAD (lock-free) ----------
bool active() const noexcept { return enabledForAudio_.load(std::memory_order_relaxed); }
int channel() const noexcept { return channel_.load(std::memory_order_relaxed); }
void pushNote(double dueSec, int note, int vel, double durSec) noexcept {
push({dueSec, static_cast<float>(std::max(0.01, durSec)), static_cast<uint8_t>(note & 0x7F),
static_cast<uint8_t>(std::clamp(vel, 1, 127)), 0});
}
void pushAllOff() noexcept { push({0.0, 0.0f, 0, 0, 1}); }
// ---------- UI / state side ----------
void configure(const std::string& portName, int channel0to15) {
{
std::lock_guard<std::mutex> lk(cfgMu_);
wantedName_ = portName;
}
channel_.store(std::clamp(channel0to15, 0, 15), std::memory_order_relaxed);
enabledForAudio_.store(!portName.empty(), std::memory_order_relaxed);
reopenRequested_.store(true, std::memory_order_release);
}
// …
};Earlier versions created a virtual port of their own called “HALFSTEPER MIDI”. Now the plugin creates none, and the window shows the external output of this instance: the wanted port, the channel, whether the port is open, and the list of available outputs.
// …
/*createVirtualPort=*/false);
// The MIDI OUT shown in the window is the DAW-synced external output of this instance.
midi->setStatusDecorator([this](nlohmann::json& j) {
if (!shared) return;
j["out_port"] = shared->extOut.wantedName();
j["ext_channel"] = shared->extOut.channel() + 1;
j["ext_connected"] = shared->extOut.isOpen();
j["outputs"] = halfstep::VstExternalMidiOut::listOutputs();
});HOST · 03
MIDI Learn with the window closed, saving with the set
MIDI Learn uses the same IMidiMapping technique as CONTRAPUNKT: the host turns every controller number into a hidden parameter. The learned bindings are applied by a timer on the GUI thread that keeps running when the editor is closed, so a controller keeps working while the screen shows Ableton. Changes made in the window call setDirty(), so Ableton asks to save the set.
// Tell the DAW the project changed (so the plugin state is saved with the set).
void markDirty() {
if (!compHandler) return;
FUnknownPtr<IComponentHandler2> h2(compHandler);
if (h2) h2->setDirty(true);
}
// …
// --- IMidiMapping ---
tresult PLUGIN_API getMidiControllerAssignment(int32 busIndex, int16 /*channel*/,
CtrlNumber midiControllerNumber, ParamID& id) SMTG_OVERRIDE {
if (busIndex != 0 || midiControllerNumber < 0 || midiControllerNumber >= kNumCCParams) return kResultFalse;
id = kCCParamBase + static_cast<ParamID>(midiControllerNumber);
return kResultTrue;
}
// GUI-thread timer (runs even with the editor closed): MIDI Learn + bound knobs.SYNC · 04
Host sync
With DAW / MPC Host Sync on, the pattern position comes from the host’s transport rather than from the plugin’s own clock. That is why the plugin’s Play button does nothing in this mode: there is only one clock, Ableton’s, and the space bar starts it. The external MIDI OUT is scheduled against the same position, so an MPC or a drum machine on loopMIDI plays in time with the set.
TEST · 05
The host test
Every build is loaded into a test host before it is used. The test checks that the generator writes patterns and that the samples load and sound. It runs an MPC export and maps all 128 controller numbers through MIDI Learn. It then plays a sequence through the plugin and counts the events: 147 notes and 145 note-offs arrived on time in the latest run. Finally it saves and restores the state with MIDI out switched on and opens older projects.
The deck
All 12 slides of “HALFSTEPER — how it works”. Click a slide to enlarge it; use the arrow keys to move through the deck.
01Cover — HALFSTEPER
02What it is
03The principle
04Nine lanes, one groove
05Six shape the pattern. Three move it live.
06It learns from your tracks
07Four ways out
08Ableton leads, HALFSTEPER follows
09Learned once, works with the window closed
10Checked in a real host on every build
11What it remembers
12Start it from Ableton. Let the groove evolve.Facts, concepts & context
- CONTRAPUNKT[plugin]Zemla Studio’s harmony generator; writes the chords while HALFSTEPER writes the drums.
- halfstep[genre]Half-time drum & bass: the snare lands on beat three, the tempo stays fast.
- Drum Rack[instrument]Ableton’s drum sampler. Set its track’s MIDI From to HALFSTEPER to play the pattern.
- MPC[hardware]Sampler workstation. HALFSTEPER exports patterns for it and drives it over MIDI.
- loopMIDI[tool]Virtual MIDI ports on Windows; one of the MIDI OUT destinations.
- Zemla Studio[studio]Experimental design studio from Lviv: art, science and technology, put to work on a story.
- MPC [instrument / technology]instrument / technology. T.A.M. Club / Centrum Mundi corpus · Sound, code & hardware in one database
- DAW [instrument / technology]instrument / technology. T.A.M. Club / Centrum Mundi corpus · CONTRAPUNKT: a VST3 plugin that composes the harmony instead of looping…
- The Host [person]person · Przestrzen Prywatna: Autonomous Sound, Factory Jams, and the Cost of…
- Windows [instrument / technology]instrument / technology. T.A.M. Club / Centrum Mundi corpus · CONTRAPUNKT: a VST3 plugin that composes the harmony instead of looping…
- Ableton Live [instrument / technology]instrument / technology. T.A.M. Club / Centrum Mundi corpus · Centrum Mundi — LX — Anton Lapov: Media Art, the Luhansk Underground…
- Zemla Studio [label / press]label / press. T.A.M. Club / Centrum Mundi corpus · The Lecture That Wasn’t Supposed to Happen: RASTER // ATLAS, Paradoxes…
- rack [instrument / technology]instrument / technology. T.A.M. Club / Centrum Mundi corpus · Centrum Mundi — XLIII — Performer vs. Composer and Music Without Drums…
