All plugins Loop Station ยท 5 tracks

RC5LOOP

Five track loop station as a native CLAP plugin for Linux, in the spirit of the Boss RC-505.

Made for bass, but it takes any stereo source. No Wine, no bridge: just C++, X11 and cairo.

CLAP NATIVE LINUX 5 TRACKS MIDI NOTE + CC C++ / X11 / CAIRO
RC5LOOP interface with the five tracks, transport controls and metronome

The interface, drawn in cairo, with no heavy toolkit behind it

HOW IT WORKS

Each track has one button that cycles, just like the hardware:

Current stateWhat the button does
emptystarts recording
recordingcloses the loop and plays
playinggoes into overdub
overdubbinggoes back to playing
stoppedgoes back to playing

The first track you close defines the master loop. With SYNC on, every other track is locked to whole multiples of it: pressing REC schedules the start for the next pass, and pressing again closes it on the following pass. Without SYNC, everything happens right away and each track runs loose.

MULTI plays as many tracks as you want at the same time. SINGLE keeps only one playing, switching the moment you trigger another. Per track: volume, pan, REV (reverse), 1/2 and x2 (speed), ONE (fires once and stops) and UNDO/REDO.

METRONOME AND THE TIME GRID

The click runs before any recording, it is what holds the time while you record the first track. Time signature goes from 2/4 to 4/4, and the first beat gets a higher click.

With SYNC on, every recording starts and ends on a whole bar, and a loop can be as many bars as you play without the signature or the BPM changing. The dot next to the title blinks in time, blue on the beats and orange on the first beat of the bar, so you feel the tempo without reading a number.

PREVIEW picks 1, 2 or 4 bars of metronome before recording actually starts, and it plays even with CLICK off. GLOBAL REC picks the first empty track, starts that count-in and begins recording by itself when it ends. FOLLOW HOST pulls the tempo from the project BPM in REAPER instead of the internal field.

If CLICK is off and there is no master loop, there is no grid: the first recording is free and its length becomes the bar. That is the play and see what happens mode.

MIDI AND FOOT CONTROL

The default map is ready and accepts note or CC for each action, because a bluetooth pedalboard sometimes sends one and sometimes the other. CC fires at value 64 or above, and all channels are accepted.

ActionNoteCC
Track 1 to 5 REC/DUB60..6420..24
Track 1 to 5 STOP65..6930..34
Track 1 to 5 CLEAR70..7440..44
ALL START7550
ALL STOP7651
UNDO/REDO7752
CLEAR ALL7853
GLOBAL REC7954

To remap: click MIDI MAP, click the field and step on the pedal. Right click clears the binding. The map is saved with the project.

RC5LOOP MIDI mapping screen

The mapping screen, made to be configured with your foot

DESIGN DECISIONS

Undo without allocating memory on the audio thread. Each track has two buffers: the consolidated base and the layer of the last overdub. Playing is summing the two, and undoing is simply stopping the sum, an instant operation. When a new overdub starts, the previous layer is folded into the base one frame at a time, as the loop passes that point. There is never a memcpy of tens of megabytes inside the audio callback.

No malloc after activate. Every buffer is allocated at once when the host activates the plugin. Commands from the interface reach the audio through a lock free SPSC queue, and the state comes back to the interface through atomics.

Events land on the right sample. The audio block is sliced at the instants of the MIDI events, so the pedal is not rounded to the start of the buffer.

BUILD AND INSTALL

./build.sh

That compiles, runs the tests and copies the plugin to ~/.clap/RC5LOOP.clap. In REAPER, under Preferences > Plug-ins > CLAP, confirm that ~/.clap is in the path list and click Re-scan. The plugin shows up as CLAP: RC5LOOP (Mister RickRoss).

Dependencies: gcc, cmake, pkg-config, cairo-devel, libX11-devel. The CLAP headers already ship with the repository.

# test without a DAW ./build/standalone # opens the interface with a synthetic bass coming in ./build/standalone --demo # records three tracks by itself, to show the states

KNOWN LIMITATIONS

These are real, they are not "coming soon".

  • Overdub only at x1 forward. With REV or a speed other than 1, the command is refused and a warning shows on screen. That is a direct consequence of the incremental fold.
  • Undo is single level, same as the RC-505. It undoes the last overdub session, not the one before it.
  • Undo in the middle of the first pass of a new overdub can take out more than you want. After a full pass, the behaviour is exact.
  • Loop audio is not saved in the project. Only the parameters and the MIDI map. Close the project, lose the loops.
  • Tracks at a speed other than 1 drift out of sync with the tempo, exactly like on the hardware.
  • Changing TEMPO after a master loop exists does nothing. From that point the recorded loop is in charge. To change tempo it is CLEAR ALL.
  • 60 s ceiling per track, about 230 MB of RAM at 48 kHz. To change it: ./build.sh -DRC5_MAX_LOOP_SECONDS=120.
  • X11 interface only. It works on Wayland through XWayland, which is how REAPER already runs.
  • CLAP only. No VST3 and no LV2 for now.