8-track looper plugin (VST3 + standalone) built with JUCE. Multi-input, multi-output, host-synced, generic MIDI learn for any controller.
Two plugins are built:
- Totem Looper: the looper itself (VST3 + standalone).
- Totem Send: put it on any track of the host and choose SEND 1 to 8. That track's audio becomes an input of Totem Looper, with no routing to set up in the host. Works even when the host runs plugins in separate processes.
- Load Totem Looper on any track.
- On each track to loop (guitar, voice, synth, a bus...), add Totem Send. A newly inserted Totem Send takes the first SEND number no other one uses (two sends on the same number would disturb each other).
- In Totem Looper, set each track's input to
SEND n · STEREOorSEND n · MONO. The header shows which sends are live. - Press REC.
Each track can have its loop length chosen in advance (1 to 16 bars): recording then stops by itself, exactly on the bar line. FREE LENGTH means the second REC closes the loop. The click accents the first beat of every bar.
When the host is playing and QUANTIZE is on, PLAY and STOP wait for the next bar or beat (the button turns copper); press again before it to cancel. Reverse and half speed stay in time with the bars and switch without clicks: after the short fade, the loop lands where the bar grid says it should (at half speed the loop lasts twice as long, counted from where it started). STOP rewinds a loop, so the next PLAY starts it from the top. Each strip shows two meters, IN (the track's live input) and OUT. MON lets the live input play through the track's volume, pan and output.
With SYNC on HOST, the loops follow the host transport: stopping the host stops them, playing again brings them back exactly in time with the bars.
Set IN LATENCY (footer) to the input latency shown in the host's audio settings: recordings and overdubs are moved back by that amount, plus the delay of Totem Send (measured to the sample while the host plays), so they land on the beat.
Totem Send's audio is always read continuously. Effects with latency (a lookahead compressor, a linear-phase EQ...) can go anywhere, before or after Totem Send, or on Totem Looper's outputs: the host then shifts the timelines it reports, and Totem Looper only trusts the timeline when it agrees with what it measures itself.
The track carrying Totem Looper also feeds IN 1/IN 2, and its sidechain
feeds IN 3/IN 4, for people who prefer host routing.
git submodule add https://github.com/juce-framework/JUCE.git JUCE # once
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release
The VST3 is copied to the system VST3 folder after each build (COPY_PLUGIN_AFTER_BUILD).
| Folder | Role |
|---|---|
Source/Core |
Limits, host parameters, input sources, lock-free queue, commands shared by UI and MIDI |
Source/Engine |
LoopTrack (record, overdub layers, undo/redo, capture), LooperEngine (routing, quantisation, master loop), TransportClock, InputCapture, Metronome |
Source/Midi |
MidiTrigger (any note / CC / program change on any channel), MidiMappingTable (lock-free learn table), MidiInputHandler (pedal gestures) |
Source/Bus |
SendBus: lock-free ring buffers in shared memory between Totem Send and Totem Looper |
Source/Send |
The Totem Send plugin (processor + small editor) |
Source/Persistence |
Loop audio saved as WAV files in Documents/Totem Looper/Sessions/<instance id>/ |
Source/UI |
Look and feel, totem ring, buttons, meters, track strip, header, footer, MIDI learn overlay |
Source/PluginProcessor.* |
Wires host buses, MIDI, parameters and state to the modules |
Source/PluginEditor.* |
Main window, refreshed on the display's vertical blank |
Each track keeps up to 16 overdubs, each as its own layer, so every one of
them can be undone and redone. When a track holds 16 overdubs, its ring shows
17 · FULL (the first recording counts as a layer), and a 17th overdub (or a
CAPTURE onto the loop) is refused: the ring says FULL / UNDO FIRST for a
moment. UNDO one layer, or CLEAR the track, to make room. The limit is
kMaxLayers in Source/Core/Constants.h.
Memory: each layer takes the size of the loop (about 3 MB for an 8 s stereo loop at 48 kHz, 11.5 MB for the 30 s maximum). Eight tracks with 16 layers of 8 s use about 400 MB; with 30 s loops, about 1.5 GB.
CAPTURE copies its audio from the input history a slice per audio block, so no block runs late, even with 30 s loops at small buffer sizes.
Undo goes all the way down: once every layer is undone, one more UNDO removes the loop itself and the track is empty again. REDO brings the loop back (stopped: PLAY restarts it in time), then its layers. Recording or capturing something new on the track ends the redo.
Layer memory is allocated on demand by a background thread, sized to the track's loop: two free layers are always kept ready, so an overdub starts at once without the audio thread ever allocating memory.
- Audio thread:
LooperEngine::beginBlock→MidiInputHandler::process→LooperEngine::render. No allocation, no lock. - UI → audio:
Commandobjects through a single-producer / single-consumer queue. - Audio → host parameters:
ParameterRequestqueue, drained by a 50 Hz timer on the message thread. - Audio → UI: atomics only (track snapshots, meters, last MIDI message).
- Layer memory:
LayerMemoryThread(background, every 10 ms) sizes the freeLayerSlots; the audio thread claims a ready slot with a compare-and-swap, never waiting.
Click MIDI LEARN, click a control, then press a pedal, a key or move a knob. Right-click a control in learn mode to remove its mapping. CC pedals: MOMENTARY (high on press, low on release) or TOGGLE (each message is a press).
Pedal gestures on a track's REC: press = REC / OVERDUB, double tap = STOP, hold then release = UNDO (needs a controller that sends releases).
Totem Looper is free software, released under the
GNU Affero General Public License v3.0 or later (AGPL-3.0-or-later).
You can use, study, modify and share it. Anyone who distributes a build,
modified or not, must offer its complete source code under the same licence.
Third-party code:
| Component | Licence | Notes |
|---|---|---|
| JUCE | AGPLv3 (or commercial) | Used here under the AGPLv3, as a git submodule |
| VST3 SDK (bundled with JUCE) | MIT | "VST" is a trademark of Steinberg: follow their usage guidelines if the VST logo is shown |
Each source file starts with an SPDX-License-Identifier line.
Issues and pull requests are welcome. By contributing, you agree that your contribution is released under the same licence (AGPL-3.0-or-later).
