samsloop
samsloop · sources · schema v1Loop-based sample player. Upload an audio file (≤2 MB — wav / mp3 / m4a / ogg / flac / opus) or record from patched audio inputs in place; the clip is decoded to mono and played back from a fractional read-cursor with linear interpolation, so a single rate control covers varispeed including reverse. IDLE-BY-DEFAULT: a freshly loaded sample sits SILENT and does NOT auto-play — and a saved patch reloads idle too. Playback is started by a TRIGGER, which is MODE-AWARE: in one-shot mode (1-SHOT) a trigger plays the sample through once then returns to silence; in loop mode (LOOP) a trigger starts looping (a re-trigger restarts from the window edge). The trigger comes from BOTH the TRIG gate input (a rising edge) AND the on-card TRIGGER button (a momentary pulse to the worklet that works whether or not a cable is patched into TRIG). The RATE slider spans −2 (reverse 2×) through +1 (forward unity, the centered no-op) to +2 (forward 2×), and a rate CV input sums on top (±1 V = ±100%). START / END faders set the playback window. Holds exactly one sample at a time — a new upload or recording replaces the previous buffer (no playlist, no slots), which keeps the per-instance memory ceiling deterministic.
the faceplate
inputs
| id | cable | what it does |
|---|---|---|
trig | gate | Rising-edge trigger that STARTS playback per the current MODE: in one-shot mode it plays the cropped window through once; in loop mode it starts the loop (and a re-trigger restarts it from the window edge — START for forward, END for reverse). Works alongside the on-card TRIGGER button. While idle (no trigger yet) the module is silent. gate / trigger |
rate_cv | cv | CV that offsets the RATE param (linear): ±1 V swings the playback rate by ±1 unit on top of the slider, so an LFO here does pitch/speed wobble, tape-stop, or reverse sweeps. The summed rate is clamped to the worklet's [−3, +3] range; crossing zero flips playback direction. control voltage (CV); modulates rate (additive offset — ±1 CV sweeps the full range, centered on the knob) |
audio_l_in | audio | Left audio RECORD input — patch a source here and arm recording to capture it into the sample buffer (replacing whatever was loaded). Mono sources work with just this jack. audio signal |
audio_r_in | audio | Right audio RECORD input — the second channel for a stereo recording (it's mono-mixed into the single buffer on stop). Normalizes to audio_l_in when left unpatched, so a mono source needs only the left jack. audio signal |
outputs
| id | cable | what it does |
|---|---|---|
out | audio | Mono audio output — the played/looped sample at the current RATE (forward or reversed), cropped to the START..END window. Silent until a trigger starts playback. audio signal |
params
| id | label | range | default | curve |
|---|---|---|---|---|
rate | Rate | ?..? | — | linear |
mode | Mode | 0..1 | 1 | discrete |
start | Start | 0..1 | 0 | linear |
end | End | 0..1 | 1 | linear |
controls
| control | what it does |
|---|---|
| End | END of the playback window, in sample frames (the right waveform marker). Crops where playback/looping ends (and where reverse playback begins). Together START..END select the slice that plays or loops; auto-clamped to the sample length. |
| Mode | Playback MODE: LOOP (1, default) = a trigger starts a continuous loop that keeps going (re-trigger restarts it); ONE-SHOT (0) = a trigger plays the window through once and returns to idle/silent. |
| Rate | Varispeed playback RATE (−2..+2, default +1 = forward unity). Positive plays forward, negative plays in REVERSE; |value| is the speed (2 = 2× / +1 octave, 0.5 = half / −1 octave). Center (+1) is the no-op unity speed. CV via the rate_cv input (summed, clamped to ±3). |
| Start | START of the playback window, in sample frames from the buffer's beginning (the left waveform marker). Crops where playback/looping begins (and where reverse playback ends). Auto-clamped to the loaded sample's length. |
source
samsloop.ts on GitHub.