trails

trails · sources

The Bela TRAILS eurorack module read over its USB-C MIDI port — a quad touch-gesture recorder whose four channels each loop a recorded finger gesture. Twelve jacks (X/Y per channel plus a contact gate) and a divided clock from the device's own MIDI transport. The card mirrors the physical 85x85mm pad one to one, with a coloured dot and a fading trail per channel. RANGE picks unipolar pad coordinates or bipolar about the centre; SMOOTH glides the X/Y jacks; CLOCK DIV divides the MIDI clock. Touch data is live engine state and never reaches the saved patch.

The Bela TRAILS eurorack module, read straight into the rack over its USB-C port. Trails is a quad touch-gesture recorder: an 85 by 85 mm multitouch pad whose four channels each record a finger gesture, loop it, and keep emitting an X position, a Y position and a contact gate long after you have taken your hand away. This module receives all of that as MIDI and hands it to the patch as twelve modulation jacks plus a clock. Mental model: your finger is a modulation source, and once you lift it the gesture keeps performing itself. The pad view on the faceplate mirrors the physical surface one to one — up to four coloured touch points with fading trails, in the same coordinates the jacks emit — so you can see what the rack is receiving without looking down at the hardware. RANGE picks whether the X and Y jacks are the pad's own 0..1 coordinates (the default, so patching X into a video module's horizontal position puts the picture where your finger is) or bipolar around the pad's centre. SMOOTH glides the X and Y jacks toward each new sample instead of stepping, which turns a jittery fingertip into a sweep at the cost of trailing the hand. CLOCK DIV divides the device's own MIDI clock into a pulse train, so a recorded gesture and the rack can share a tempo. Nothing is streamed into the saved patch: the touch data is live engine state, so a gesture never bloats the document or reaches collaborators. In a browser, CONNECT requests MIDI permission; loading a patch never prompts. In native desktop mode, choose the TRAILS input on hardware setup once: the selection stays on this computer, reconnects after launch or reload, and applies to every TRAILS module without another CONNECT press. A missing input remains selected until it returns; choose none in hardware setup to clear it. Disconnecting or replacing the selected input releases held gates and poly notes while retaining the last axis positions. There is no MIDI back to the device — Trails takes its clock and reset as CV on its own jacks, so to slave it to the rack, patch a clock out of CV BUDDY into the module's clock input. Two things about the hardware are worth knowing before you patch it. The device transmits its X and Y positions and its transport, and nothing else: the gate you see on the module's own gate jacks is not a MIDI message at all, so everything the GATE and TRIG jacks here emit is reconstructed from the position and note streams rather than read from the device. That reconstruction gives you two different signals, and picking the right one is the difference between a drone and a rhythm. GATE is contact: high while a channel is sounding, which through a gesture usually means high the whole way through, because a playing gesture never stops and, with quantisation on, the horizontal and vertical notes overlap almost continuously. TRIG is the step: a short pulse each time the gesture moves on, which is what a drum wants. You can patch both from one gesture and get a sustained layer and a rhythmic layer together. And the touch bar down the panel is not transmitted at all, and has no output jack of its own on the hardware either; it is an assignable modifier of the device's internal behaviour, so what it changes reaches this module in the shape of the X, Y and gate it shapes rather than as a signal you can patch. The bar is drawn on the pad view so the picture matches the panel, greyed to say it carries no data. MON opens a live readout of every MIDI message the device is sending, including any this module does not recognise, which is how to check what your firmware actually transmits. The third thing worth knowing is what happens when you turn on pitch quantisation. With both pitch and temporal quantisation enabled the device stops sending its continuous high-resolution positions and sends MIDI notes instead, quantised to the scale you picked. Those notes are the same two axes, on the same per-axis channels, so the X and Y jacks keep working: each note number is spread across the jack's travel, so playing up a scale walks the jack upward in even steps. Because a note number is already linear in semitones, the jack is a pitch-shaped signal in the same way a volt-per-octave control voltage is, just normalised into this rack's range rather than measured in volts. The travel a scale covers depends on how wide it is: the whole MIDI note range is spread across the jack, so a scale spanning an octave or two moves it by a tenth to a fifth of full scale rather than end to end. Turn RANGE to BI to double that swing, or use an attenuverter downstream to make a narrow scale reach further. And once you are in note mode you do not have to go through a control voltage at all: each channel has a POLY jack carrying that channel's two axes as actual notes, one voice for X and one for Y, which you can patch straight into any polyphonic instrument to hear the scale you picked without calibrating anything. Those jacks are silent in the ordinary continuous mode, because there are no notes to send. One thing this hardware will not give you is dynamics: every note it sends carries the same fixed velocity, measured on the device rather than assumed, so nothing here can tell a firm press from a light one. To strike a drum from a gesture, patch TRIG rather than GATE. GATE tells you whether a channel is sounding, and through a gesture the answer stays yes the whole way, because the two axes cross their quantiser steps at different moments and one of them is nearly always sounding; a drum patched there fires once and then waits forever. TRIG fires once per step instead, plus once each time the loop comes back round, which is what the gate jack on the hardware itself does. How much TRIG can tell you depends on the mode, and the difference is worth knowing rather than guessing at: with quantisation on, the device sends a note per step and the triggers are exact. In the continuous mode it sends only positions and keeps its step gate to itself, so the most that can honestly be produced is a pulse when a channel starts moving again after being still, and one per loop restart.

the faceplate

trailsx1cvy1cvx2cvy2cvx3cvy3cvx4cvy4cvg1gateg2gateg3gateg4gateclockgatetrig1gatetrig2gatetrig3gatetrig4gatepoly1polyPitchGatepoly2polyPitchGatepoly3polyPitchGatepoly4polyPitchGateaudiocvgatepitch
0 inputs · 21 outputs · 0 params

outputs

idcablewhat it does
x1cvChannel 1's horizontal pad position. 0 is the left edge of the pad and 1 the right, or −1..+1 about the centre when RANGE is BI. It keeps streaming while a recorded gesture plays back, and holds its last value when the channel is idle. With pitch quantisation switched on the device sends notes instead of continuous positions, and this jack follows those notes: each note number lands at its own point along the travel, so a scale steps the jack rather than sliding it, and a released note holds the last pitch rather than dropping to zero.
control voltage (CV)
y1cvChannel 1's vertical pad position, 0 at the bottom edge through 1 at the top (or −1..+1 when RANGE is BI). Pair it with X1 to drive a two-axis destination from one finger.
control voltage (CV)
x2cvChannel 2's horizontal pad position, in the same coordinates as X1.
control voltage (CV)
y2cvChannel 2's vertical pad position, in the same coordinates as Y1.
control voltage (CV)
x3cvChannel 3's horizontal pad position, in the same coordinates as X1.
control voltage (CV)
y3cvChannel 3's vertical pad position, in the same coordinates as Y1.
control voltage (CV)
x4cvChannel 4's horizontal pad position, in the same coordinates as X1.
control voltage (CV)
y4cvChannel 4's vertical pad position, in the same coordinates as Y1.
control voltage (CV)
g1gateChannel 1's CONTACT gate: high while the channel is sounding, low when it is idle. It answers "is this channel in contact", and during a gesture the answer is usually yes the whole way through, so expect a long held gate rather than a rhythm. That is deliberate and it is worth understanding before you patch it. In the continuous mode the device streams positions without a pause while a recorded gesture plays back, so contact never ends; the gate is re-struck once at the top of each loop repetition, as a brief dip to zero and back, so a looping gesture articulates an envelope again each time round. With quantisation on, the channel is counted as sounding while EITHER its horizontal or its vertical note is held, and because those two are quantised separately they overlap almost continuously — one is nearly always sounding — so the gate stays up for the whole gesture and the loop dip is not applied, because the notes themselves are already the articulation. If you want a drone that follows a gesture, this is the jack. If you want to strike a drum once per step, patch TRIG instead. Two limits are worth knowing. The loop dip is driven by the device's transport, and the device reports only one playhead, its first channel's: with clock-synchronised recording every channel shares the cycle and they re-strike together, but a channel running a different step count re-strikes at channel 1's rate rather than its own. And the hardware's own gate jacks are not transmitted over MIDI at all, so everything on this jack is reconstructed from the position and note streams rather than read from the device.
gate / trigger; gate — acts while the level is high (reacts to both edges)
g2gateChannel 2's contact gate, in the same form as GATE 1 — high while that channel is sounding, and long-held through a gesture rather than rhythmic. See GATE 1 for what it does in each mode, why it holds, and what the device does and does not transmit.
gate / trigger; gate — acts while the level is high (reacts to both edges)
g3gateChannel 3's contact gate, in the same form as GATE 1 — high while that channel is sounding. See GATE 1 for the mode differences and the limits.
gate / trigger; gate — acts while the level is high (reacts to both edges)
g4gateChannel 4's contact gate, in the same form as GATE 1 — high while that channel is sounding. See GATE 1 for the mode differences and the limits.
gate / trigger; gate — acts while the level is high (reacts to both edges)
clockgateA pulse train derived from the MIDI clock the device transmits, divided by the CLOCK DIV setting — at the default 24 that is one pulse per quarter note, the division TIMELORDE expects. It is a trigger: each pulse is a short fixed-width rising edge and the level between pulses carries no meaning. Silent until the device's transport is running.
gate / trigger; trigger — fires once per rising edge
trig1gateA short pulse every time channel 1's gesture steps — this is the jack to patch into a drum. It fires once per step of the recorded or played gesture, plus once each time the loop returns to its start, which is what the module's own gate jack does on the hardware. Use it wherever you want something struck rather than held: a kick, a snare, a sampler, an envelope you want re-articulated. It is deliberately not the same jack as GATE 1. GATE 1 answers "is this channel sounding", and during a gesture that answer stays yes the whole time, because the horizontal and vertical positions cross their quantiser steps at different moments and one of them is essentially always sounding. A drum patched there fires once at the start of a gesture and then never again, which is the problem this jack fixes. How much it can tell you depends on the mode. With pitch and temporal quantisation on, the device sends a note for every step and this jack is exact, one pulse per step. In the ordinary continuous mode the device sends only positions, and its own step gate is not transmitted at all, so all this can honestly fire on is the moment a channel starts moving again after being still, and each loop restart. If you want steady triggers from a gesture, turn quantisation on.
gate / trigger; trigger — fires once per rising edge
trig2gateChannel 2's step trigger, in the same form as TRIG 1 — a short pulse per gesture step and per loop restart, for striking a drum or re-articulating an envelope.
gate / trigger; trigger — fires once per rising edge
trig3gateChannel 3's step trigger, in the same form as TRIG 1.
gate / trigger; trigger — fires once per rising edge
trig4gateChannel 4's step trigger, in the same form as TRIG 1.
gate / trigger; trigger — fires once per rising edge
poly1polyPitchGateChannel 1's two axes as a note bus, for playing an instrument directly instead of reconstructing pitch from a control voltage. Voice 1 is the X axis and voice 2 is the Y axis, each carrying a pitch and its own gate, so one finger plays a two-note chord that moves as you move. Patch it into any polyphonic voice. Only alive when the device is sending notes: turn on both pitch and temporal quantisation and this starts playing, and in the ordinary continuous mode it sits silent while the X, Y and gate jacks carry everything as usual. The pitch is the real quantised note the device chose, so it lands in tune with whatever scale you picked on the panel rather than being a voltage you have to calibrate. The gate stays up for as long as you hold the position, so a sustained touch sustains the note. Velocity is not part of it: this hardware sends the same fixed velocity for every note, so the bus carries no dynamics and a voice that responds to how hard you play will always hear the same thing.
poly pitch+gate bus; 10-channel poly bus (5 pitch + 5 gate lanes)
poly2polyPitchGateChannel 2's two axes as a note bus, in the same form as POLY 1 — voice 1 is X, voice 2 is Y, and it is alive only when the device is sending notes. Each channel has its own bus so you can play a different instrument from each recorded gesture.
poly pitch+gate bus; 10-channel poly bus (5 pitch + 5 gate lanes)
poly3polyPitchGateChannel 3's two axes as a note bus, in the same form as POLY 1 — voice 1 is X, voice 2 is Y, and it is alive only when the device is sending notes.
poly pitch+gate bus; 10-channel poly bus (5 pitch + 5 gate lanes)
poly4polyPitchGateChannel 4's two axes as a note bus, in the same form as POLY 1 — voice 1 is X, voice 2 is Y, and it is alive only when the device is sending notes.
poly pitch+gate bus; 10-channel poly bus (5 pitch + 5 gate lanes)

controls

controlwhat it does
DivisorHow many of the device's MIDI clock ticks make one pulse on the CLOCK jack. MIDI runs at a fixed 24 pulses per quarter note, so 24 is one pulse per quarter (patch it into TIMELORDE's clock to slave the rack to the device's transport), 12 is eighths, 6 sixteenths, 3 thirty-seconds, and RAW passes every incoming tick. Only divisions that divide 24 evenly are offered, because any other lands on no note value and drifts against every other clock in the rack.
RangeWhether the eight X and Y jacks emit the pad's own coordinates or a bipolar signal centred on the middle of the pad. UNI is 0..1 and is the default because a touch position is a COORDINATE: the pad's bottom-left is (0, 0) and its top-right is (1, 1), which is the space a screen and an absolute-position CV input already speak, so a 1:1 mapping lands the picture where your finger physically is. BI is −1..+1 with the centre of the pad at 0, which is what a destination that modulates around its own knob setting wants. It changes what the jacks emit, never what the pad view shows — the view always mirrors the physical surface.
SmoothHow lazily the X and Y jacks follow the device. At 0 each arriving sample steps the jack immediately, which is what a 1:1 screen mapping wants; turning it up makes the jack glide exponentially toward each new sample instead, covering about two thirds of the distance in the time the knob sets, up to a quarter of a second at the far end. Use it to turn a jittery fingertip or a coarse stream into a smooth sweep, and accept that the jack then trails the hand that made the gesture. It does not affect the gates or the clock, which must stay sharp.
Trails connect {n}The gesture that makes the module do anything at all. A browser shows no MIDI port until it has consented, and it only asks when a click asks it to — so before this press there is no device to read, and all twenty-one jacks sit at zero however many gestures the hardware is looping. Pressing it grants access (one prompt, once per origin) and binds every attached port whose name looks like a Trails, which is how a class-compliant USB-C device joins the rack with no driver and no helper app. It is safe to press again: on an already-granted origin it simply re-resolves the port list, which is what re-binds a device that was unplugged and put back. Loading a patch that contains this module never raises the prompt by itself — nothing in the rack asks for MIDI on the module's behalf. The outcome is always nameable rather than silent: bound, no port named Trails, permission denied, the prompt suppressed, or Web MIDI missing entirely, and the LINK lamp on the faceplate carries the sentence with the failures also printed under it. If it says no port is present, connect the module's USB-C socket to this computer; if you want to see what the device is actually transmitting, press MON beside the lamp.

source

trails.ts on GitHub.

Generated from packages/web/src/lib/{audio,video}/module-registry.ts · repo