Technical documentation

The .mapping file, element by element

Every line and every field of the SBX_CONTROLLER_MAPPING 6 format: what it holds, how Stembox reads it the moment the MIDI message arrives, and why the software is designed that way. The examples are real lines from the published DDJ-FLX10 and DDJ-SX2 mappings.

Contents

1. Overview

A .mapping file is a text file that describes one controller: which buttons, faders, knobs and platters it has, which MIDI address each of them speaks on, which Stembox control it drives, and which messages Stembox must send back to light it up. The software knows no controller "by heart": everything it knows about a device comes from this file.

The file is made of lines. Each line starts with a keyword (input, output, modifier…) followed by fields separated by spaces. An input line links a physical address to a control; an output line links a control to a feedback message (an LED); the other lines declare SHIFT keys, settings, platters, wake-up messages, and so on.

Where the software looks for files

FolderRole
mappings\ next to the executableThe mappings shipped with the software (on macOS: Contents/Resources/mappings inside the app). This folder is never used directly to run a controller: it is the source of the copy described below.
Windows: %LOCALAPPDATA%\stembox-substrat\mappings\The folder of all the mappings in use: the ones you create in the editor and the copies of the shipped ones. Opening this folder shows as many mappings as the software's menu.
Linux / Raspberry Pi: ~/.local/share/stembox-substrat/mappings/Same role (the system's "application local data" location).
macOS: ~/Library/Application Support/stembox-substrat/mappings/Same role.

At launch, each shipped .mapping is copied into the user folder only if it is not already there, and the copy is made writable. From then on it is a mapping like any other: you edit it, and no update overwrites it.

Why

Rewriting the shipped files at every launch overwrote the user's edits. The consequence is accepted: a shipped mapping fixed in a new version does not reach a computer that already has that file. A few important fixes are therefore applied at load time, without touching the file (see §15).

How a mapping is chosen for a device

When a MIDI port opens, Stembox looks for that device's mapping, in this order:

  1. The memory. The file mappings-actifs.conf, stored next to the mappings folder (so in stembox-substrat), holds one line per device: <device key><TAB><file name without .mapping>. The key is the port name, with leading and trailing spaces removed, where any character other than a letter, a digit, - or _ becomes _. If this line points to an existing file, that file runs — even if it was written for another controller. The file is rewritten as a whole, atomically (temporary file then rename), in plain ASCII.
  2. The name match. Otherwise, Stembox keeps the files whose nameContains field (on the device line) matches the port name. The comparison uses a key: only letters and digits are kept, in upper case (DDJ-FLX10 → DDJFLX10). It matches if either key contains the other. Candidates are ranked: first those whose key is contained in the port name (longest first — so a DDJ-1000SRT does not pick the DDJ-1000 mapping), then by most recent write date, then by file name.
  3. The shipped preset. Failing everything else, a mapping marked as a shipped preset whose name contains the device key.

The file name comes from the mapping name (a mapping called "my set" is saved as my-set.mapping): one controller can therefore have several mappings, and it is the content (device), not the file name, that says which device it belongs to. Every save from the editor is atomic, then read back and compared, byte for byte, with what was meant to be written.

2. Syntax and reading rules

  • One line = one element. The reader processes the file line by line. Leading spaces (and tabs) are ignored.
  • Ignored lines: empty lines and lines whose first non-blank character is #. The software never writes comments: a # added by hand disappears at the next save from the editor.
  • Strings (identifiers, control paths, names): between straight double quotes "…", with \" for a quote and \\ for a backslash. A single word without spaces written without quotes is also accepted when reading, but the software always writes the quotes.
  • Numbers: "C" notation, independent of the system language (decimal point, never a comma). Reals are written with 17 significant digits, which explains the 0.050000000000000003: it is the exact spelling of the binary real closest to 0.05, and it guarantees that a file read and rewritten comes out identical. 1000000000 is 109. Non-finite values (infinity, NaN) are rejected.
  • Keywords and enumerations are case-sensitive: midi-note, not MIDI-Note.
  • Exact fields: each line must contain exactly its fields, no more, no less. An extra field at the end of a line is an error.

Line order

The software always writes in this order: header, id, name, device, platter-calibration, platter-ring, each modifier followed by its modifier-feedback lines, effect-selection, input, each output followed by its optional output-color, setting, wake, keep-alive, screen, text-display.

When reading, the order is free, with three constraints: the header is the first meaningful line; a modifier-feedback must come after the modifier it names; an output-color must come after the output it names. The order of input lines among themselves matters in one place only: when several bindings share an address, they are applied in file order.

All or nothing

The reader does not stop at the first mistake: it goes through the whole file and records each error with its line number (0 for the global checks run at the end). If a single error is found, the whole file is rejected: it does not appear in the list of mappings and does not load. An unknown keyword is an error ("champ inconnu", unknown field).

Why

A half-loaded mapping is worse than a missing one: some buttons would work, others not, with nothing to say so. Rejecting the whole file makes the error visible at once. The rejection is remembered: a rejected file is only read again when its size or date changes.

Format versions

The header accepts versions 1 to 6; the software always writes 6. Fields added over the versions take their default value in an older file:

VersionWhat it addedIn an older file
2The two soft-takeover fields of input (takeover, tolerance)disabled, tolerance 0.02
3The choice labels of a settingno labels
4The platter-calibration and platter-ring linesrejected (error)
5The modifier-feedback and effect-selection lines; the \n \r \t \\ escapes in a setting descriptionrejected (error); description read as is
6The literalValue field of input0

3. Header, identity and device

The first four lines of the DDJ-FLX10 mapping:

SBX_CONTROLLER_MAPPING 6
id "DDJ-FLX10"
name "Pioneer DDJ-FLX10"
device midi 0 0 "DDJ-FLX10"
LineFieldsRules
SBX_CONTROLLER_MAPPINGversion (integer)Required, first meaningful line, version 1 to 6. Otherwise: "entete ou version invalide" (invalid header or version). File without a header: "entete absente" (missing header).
id"identifier"Required, exactly once, not empty. Stable identifier of the mapping.
name"display name"Required, exactly once, not empty. Name shown in the menus; it also names the file when the editor saves it.
devicetransport vendorId productId "nameContains"Required, exactly once. transport = midi or hid.

The device line

No.FieldValuesMeaning
1transportmidi | hidThe link type. A message received over another transport is ignored by this mapping.
2vendorIdinteger 0–65535USB vendor identifier. Kept in the file; every published MIDI mapping leaves it at 0, recognition being done by name.
3productIdinteger 0–65535USB product identifier. Same remark.
4nameContainsstringThe device's MIDI port name (or part of it). This is what ties the file to the controller (see §1). E.g. "DDJ-FLX10".
Not established

The role of vendorId / productId for an HID device is not documented here: in the code examined, choosing a mapping relies on the name. In MIDI files, leave 0 0.

4. The physical address (7 fields)

The input, modifier and effect-selection lines all end with the same 7-field address, which designates a physical control. In the FLX10 deck 1 QUANTIZE line, it is the end: midi midi-note 0 53 0 0 0.

No.FieldValuesMeaning
1transportmidi | hidLink type.
2kindmidi-note, midi-cc, midi-program, midi-pitch, midi-pressure, hid-fieldMessage type (see the next table).
3channel0–15MIDI channel counted from 0. Manufacturer documentation counts from 1: their "channel 7" is written 6.
4number0–65535Note or CC number (0–127), program number. 0 for midi-pitch and midi-pressure, which have no number.
5reportId0–255HID: report number (0 = report without a number). MIDI: the number of the CC carrying the least significant byte of a 14-bit value, only read by the fourteen-bit and absolute-wheel encodings on a CC; 0 = the standard MSB + 32 rule. Otherwise 0.
6bitOffsetintegerHID only: position of the field's first bit in the report. MIDI: 0.
7bitWidth0–64 in the fileHID only: field width in bits (reading only accepts 1 to 16). MIDI: 0.

How a MIDI message becomes an address

The first byte (status) gives the type in its upper 4 bits and the channel in its lower 4 bits. System messages (byte ≥ 0xF0: clock, SysEx…) are not read by mappings.

StatuskindnumberValue read
0x9n note-onmidi-notebyte 2 (note)byte 3 (velocity 0–127)
0x8n note-offmidi-notebyte 20, whatever the velocity
0xBn control changemidi-ccbyte 2 (CC)byte 3
0xCn program changemidi-programbyte 2byte 2 (the number is also the value)
0xDn channel pressuremidi-pressure0byte 2
0xEn pitch bendmidi-pitch0most significant = byte 3, least significant = byte 2 (both are kept)

A note-off and a note-on with velocity 0 therefore give the same result: the same address, value 0. This is what lets a single input line see a button's press (127) and release (0).

A binding answers a message if its 7 fields are equal to those of the decoded address. A decoded MIDI message always has reportId, bitOffset and bitWidth at 0: an ordinary MIDI line must therefore end with 0 0 0. The only exception is the LSB number declared in reportId by a 14-bit binding on a CC, which follows its own path (see encodings).

HID

For an HID device, each received report is presented to every HID address of the mapping. If reportId ≠ 0, the report's first byte must equal that number and bits are counted after it. The value is assembled bit by bit, from bit bitOffset over bitWidth bits (bit 0 of each byte first), then interpreted by the binding like any other value. A report too short for the field is counted as malformed and ignored.

5. The input line: from gesture to control

This is the most frequent line (480 in the FLX10 mapping). It says: "when this message arrives, interpret its value like this, then act like this on this control". Real example, the FLX10 deck 1 QUANTIZE button:

input "learned-40" "deck.1.grid.quantize" write absolute linear 1 0 127 0 1 1 0 0 0.5 0.050000000000000003 0 0 0.02 0 0 midi midi-note 0 53 0 0 0
No.FieldExamplePossible valuesMeaning
1id"learned-40"non-empty string, unique among input linesBinding identifier (the editor numbers them).
2controlPath"deck.1.grid.quantize"registry pathThe driven control (§14). An unknown path does not prevent loading: the binding simply does nothing.
3actionwritewrite, trigger, increment, toggle, write-literalWhat is done with the value (actions).
4encodingabsoluteabsolute, signed-relative, binary-offset, twos-complement, fourteen-bit, absolute-wheel, wrap-counterHow to read the received byte (encodings).
5curvelinearlinear, power, logarithmic, smoothResponse curve of an absolute value.
6curveAmount1realCurve parameter (exponent of power, strength of logarithmic).
7inputMinimum0integer 0–65535Lowest expected raw value.
8inputMaximum127integer > inputMinimumHighest raw value.
9outputMinimum0realValue written for position 0. Also the press threshold of the pulse actions.
10outputMaximum1real ≥ outputMinimumValue written for position 1.
11relativeStep1realMultiplier of a relative step (jog: 0.05).
12reversed00 | 1Reverses the direction: position 1 − p, or a step of opposite sign.
13switching00 | 1Enables the switch (threshold + hysteresis).
14threshold0.5real (0–1)Switch threshold, as a position.
15hysteresis0.05…realWidth of the dead zone around the threshold.
16debounce0integer ≥ 0 (ms)Minimum delay between two switch flips.
17takeover00 | 1Enables soft takeover (version ≥ 2).
18tolerance0.02real ≥ 0Accepted gap for takeover, in the control's unit (version ≥ 2).
19literalValue0realThe fixed value written by write-literal (version ≥ 6). Ignored by the other actions.
20layerCount00–32Number of layer conditions that follow.
…"layer" 0|1—layerCount pairsEach pair: a layer declared by a modifier, and the required state (1 = active, 0 = inactive).
+7addressmidi midi-note 0 53 0 0 0see §4The physical control.

Checks done after reading: unique identifier ("identifiant d'entree duplique", duplicate input id), inputMaximum > inputMinimum and outputMaximum ≥ outputMinimum ("plage d'entree invalide", invalid input range), and every layer named must be declared by a modifier ("couche d'entree inconnue", unknown input layer).

How the software reads a binding, in order

  1. Address match. The decoded address must equal the binding's (14-bit case: see below). Every binding of the mapping is examined: several bindings can answer the same message, and they all act, in file order.
  2. Layer filter. The layer conditions must all be met, otherwise the binding is skipped (log: "autre couche : SHIFT/deck", other layer).
  3. Value interpretation: encoding, range, reversal, curve, then optionally the switch. The result is an absolute value (a scaled position) or a relative one (a step). A filtered value (switch without change, first message of an absolute jog…) stops here.
  4. Control law: for a gain or an EQ band, the position is converted by the control's own law (see below).
  5. Soft takeover, if enabled: the value is only applied once the fader has "caught" the control.
  6. Action on the control, according to the action and the control's kind.

Encodings: reading the received byte

Notation: b = the received value (0–127 in MIDI), step = relativeStep, p = the position between 0 and 1.

EncodingResultComputationUse
absoluteabsolutep = (clamp(b, inMin, inMax) − inMin) / (inMax − inMin)Buttons, faders, knobs: the value is the position.
fourteen-bitabsoluteraw = (MSB & 0x7F) << 7 | (LSB & 0x7F); p = raw / 16383 (the inputMinimum/inputMaximum fields are replaced by 0 and 16383)Tempo fader, high-resolution faders.
binary-offsetrelativeδ = (b − 64) × stepPioneer jogs (64 = still, 65 = +1, 63 = −1), browse knob.
signed-relativerelativeb = 0 or 64 → 0; b < 64 → +b; b > 64 → −(b − 64); then × step"Sign bit" encoders (64 + n = −n).
twos-complementrelativeδ = (byte < 0x40 ? byte : byte − 0x80) × step — 7-bit two's complement: 0x01 = +1, 0x7F = −1, 0x41 = −63Two's-complement encoders (browse knobs, BEATS of Multi Beat FX).
absolute-wheelrelative14-bit angle a = MSB << 7 | LSB (16,384 positions that wrap); δ = a − aprevious brought back to the shortest path (if δ > 8192: −16384; if δ < −8192: +16384); × stepJog that sends its angular position (Denon PRIME GO, Numark NV).
wrap-counterrelative7-bit position; δ = b − bprevious brought back into −64…+63 (127 → 2 = +3); × stepJog that sends a 0–127 counter that wraps (Hercules DJControl T10).
  • For relative encodings, reversed flips the sign of the step; the input range, curve and output range are not applied: the value produced is the step itself.
  • For absolute-wheel and wrap-counter, the first message only sets the starting position and produces nothing. A zero gap produces nothing either.

14 bits in detail

On a CC, a fourteen-bit binding listens to two numbers on the same channel: its own (MSB) and the LSB's — reportId if it is not zero, otherwise MSB + 32 (the MIDI standard, and every Pioneer table: CC 0 and CC 32 for the tempo fader).

  • When the MSB arrives, the value is applied right away with the last known LSB (0 if there never was one); the LSB that follows refines it.
  • When the LSB arrives, the value is recomputed with the last MSB, provided an MSB has already been received.
  • For absolute-wheel, the MSB alone produces nothing: a half-received angle is not an angle, it is read when the LSB arrives.
  • On a pitch-bend message (midi-pitch), both halves arrive in the same message: MSB = byte 3, LSB = byte 2.
Why

In 7 bits, a tempo fader only has 128 steps: about 0.11 BPM per step at ±6 % around 121 BPM, which makes some values (121.0) impossible to reach. Every published deck.N.tempo.fader line is therefore fourteen-bit. Applying the MSB without waiting for the LSB keeps a fader alive on a table that would never send an LSB (128 steps, as before) instead of a dead fader.

Example, the FLX10 deck 1 tempo fader: CC 0 (and CC 32 for the LSB) on channel 0, output from −1 to +1, soft takeover enabled:

input "learned-34" "deck.1.tempo.fader" write fourteen-bit linear 1 0 127 -1 1 1 0 0 0.5 0.050000000000000003 0 1 0.02 0 0 midi midi-cc 0 0 0 0 0

Messages B0 00 40 then B0 20 00: raw = 64 × 128 + 0 = 8192, p = 8192 / 16383 ≈ 0.50003, value = −1 + 2p ≈ 0.00006 — the fader at its centre.

Curves, reversal and output range (absolute values)

  1. p = (clamp(raw, inMin, inMax) − inMin) / (inMax − inMin) — an out-of-range value is brought back to the bound.
  2. if reversed = 1: p = 1 − p.
  3. curve, with p clamped to 0–1:
    • linear: p
    • power: pa, with a = max(curveAmount, 0.01)
    • logarithmic: ln(1 + p·a) / ln(1 + a), with a = max(curveAmount, 0.01)
    • smooth: p² × (3 − 2p) (S-curve, curveAmount not read)
  4. value = outputMinimum + p × (outputMaximum − outputMinimum).

For QUANTIZE: press b = 127 → p = 1 → value 1; release b = 0 → value 0.

The control's law (gain and EQ)

If the binding is an absolute write, with a linear curve, no switch, and the target control follows the eqGain law (EQ bands) or gainTaper (input gain, headphones), and outputMinimum equals the control's minimum, then the value is not written as is: the position (value − outMin) / (outMax − outMin) is converted by the control's law, which puts unity (gain ×1) at the centre of the travel. The maximum is not compared: existing mappings carry the old gain range (0 to 4); what counts is the knob's position.

Why

A linear conversion over 0–4 put the centred knob at ×2 (+6 dB) instead of ×1: gain and EQ stacked about +12 dB, and the VU meters stayed in the red. A controller knob is a position; the control knows how to turn it into a value.

The switch (switching)

With switching = 1, a continuous value becomes a two-state switch. The position is recomputed over the output range: q = (value − outMin) / (outMax − outMin). With high = threshold + hysteresis/2 and low = threshold − hysteresis/2 (clamped to 0–1):

  • low state → goes high if q ≥ high; high state → stays high while q > low;
  • nothing is produced while the state does not change; a change happening less than debounce ms after the previous one is ignored;
  • on a change, the value produced is outputMaximum (high) or outputMinimum (low).
Why

Hysteresis keeps a fader resting right on the threshold from making the control flicker; debounce absorbs bouncing contacts. None of the published mappings uses it (all have 0 0.5 0.05 0, the defaults).

Soft takeover (takeover)

With takeover = 1 and an absolute value, the value is only applied once the physical fader has "joined" the control's current value: either |value − current| ≤ tolerance, or the fader has crossed the current value between two messages. Once caught, the binding applies every following message, until the next restart of the mapping (plug-in, reload), which releases it again. Relative values are never subject to takeover.

Why

Without takeover, touching a tempo fader whose physical position does not match the deck's speed would make the speed jump at once. On the FLX10, the tempo fader (output −1…+1) has a tolerance of 0.02, i.e. 1 % of its travel.

Actions: what the binding does to the control

The behaviour depends on the action and on the control's kind declared in the registry (§14). "Press" means: interpreted value strictly greater than outputMinimum; "release": value ≤ outputMinimum.

ActionToggle-kind controlOther controls
writeFlips on press (0 → 1, 1 → 0), release ignored.Writes the value as is: 1 then 0 for a momentary control (held while pressed), the position for a fader, the step for an encoder.
toggleFlips on every message, whatever its value.Behaves like trigger.
triggerWrites 1 on press; never writes 0; release ignored.
incrementAdds the value to the control's current value (current + δ) — for relative values (browse knob).
write-literalWrites literalValue on press; writes nothing on release, except for an off-on-release effect selection (§8).
Why flip on press

A PLAY button sends 127 on press and 0 on release. Copied as is into deck.N.transport.playing (a toggle control), it started playback and paused it again on release: a PLAY you would have to hold. So the software reads the control's kind, not the button's name: on a toggle control, the press flips and the release is ignored — otherwise the press would invert the state and the release would invert it again, doing nothing. A momentary control keeps the copy, which is what it expects. No list of buttons has to be maintained: if the registry changes a kind, the behaviour follows.

Why toggle flips on every message

The toggle action is for latching switches that send only one message per press, their new state, alternating: 7F, then 00, then 7F… (measured on the FLX10). Ignoring the 00 as a release meant pressing twice to switch back on. The value is not copied either: the controller's internal state is not necessarily the software's (at plug-in, or after a change made on screen). And if the control is not a toggle (for instance library.navigateLeft, which is a trigger), toggle behaves like trigger: otherwise every other click wrote 0 and did nothing.

Why trigger never writes 0

A trigger (load, jump 4 beats, next effect) reacts to writing 1. Writing 0 on release would serve no purpose and could be taken for a second event. Since trigger only looks at "value > outputMinimum", it also works on a relative step: a positive step fires, a negative or zero step does nothing — this is what lets an endless encoder be bound to two triggers (§16).

Why write-literal

Several distinct buttons can target the same multi-state control: the eight pad-mode headers all target deck.N.pads.mode (0 = HOT CUE … 7 = KEY SHIFT). With write, each button copied its raw value (1 on press, 0 on release): you had to hold the button to see its mode, and they all showed the same one. With write-literal, each button writes its own number, once, on press.

input "learned-51" "deck.1.pads.mode" write-literal absolute linear 1 0 127 0 1 1 0 0 0.5 0.050000000000000003 0 0 0.02 0 0 midi midi-note 0 27 0 0 0
input "learned-52" "deck.1.pads.mode" write-literal absolute linear 1 0 127 0 1 1 0 0 0.5 0.050000000000000003 0 0 0.02 1 0 midi midi-note 0 30 0 0 0
input "learned-53" "deck.1.pads.mode" write-literal absolute linear 1 0 127 0 1 1 0 0 0.5 0.050000000000000003 0 0 0.02 2 0 midi midi-note 0 32 0 0 0

Note 27 → page 0 (HOT CUE), note 30 → page 1 (PAD FX), note 32 → page 2 (BEAT JUMP): only field 19 changes.

Layer conditions (SHIFT and other modifiers)

After literalValue come layerCount and then as many "layer" state pairs. The binding is only accepted if, for every pair, the layer is active (at least one modifier of that layer is active) when the state is 1, or inactive when it is 0. A binding without conditions (layerCount = 0) answers in every layer, SHIFT held or not.

Real example, a table whose SHIFT does not change the note sent (Denon DN-MC6000): the same note 107 is SYNC without SHIFT and MASTER with SHIFT:

input "mc6000-d1-sync" "deck.1.sync.enabled" write absolute linear 1 0 64 0 1 1 0 0 0.5 0.050000000000000003 0 0 0.02 0 1 "deck-1-shift" 0 midi midi-note 0 107 0 0 0
input "mc6000-d1-master" "deck.1.sync.requestLeader" write absolute linear 1 0 64 0 1 1 0 0 0.5 0.050000000000000003 0 0 0.02 0 1 "deck-1-shift" 1 midi midi-note 0 107 0 0 0
Why

On most Pioneer tables, SHIFT itself changes the note or the channel: the bindings then need no condition. Layer conditions are for tables where SHIFT changes nothing in the message: the software has to know that SHIFT is held. The state of every layer is computed in one single place, and every binding consults it.

Good to know

A direct consequence: on a table whose SHIFT does not change the messages, a binding without conditions also answers with SHIFT held. For one button to do two things, one binding needs a 0 condition and the other a 1. Re-learning in the editor loses these hand-written conditions.

6. The output and output-color lines: the lights

An output line watches a registry control and, at every change, builds a message sent to the controller. Real example, the deck 1 QUANTIZE LED:

output "auto-led-1155" "deck.1.grid.quantize" midi none threshold 0.050000000000000003 1000000000 0 3 literal 144 literal 53 value7 0
No.FieldExampleValuesMeaning
1id"auto-led-1155"unique stringIdentifier; also the grouping key of the sends.
2controlPath"deck.1.grid.quantize"pathThe watched control.
3transportmidimidi | hidWhere the message goes.
4cadencenonenone, 250-ms, 500-ms, beatBlinking: during the "off" phase of the chosen clock, the position is forced to 0.
5rulethresholdscale, threshold, equalsHow to read the next two bounds.
6inputMinimum0.05realLow bound (or expected value for equals).
7inputMaximum1e9realHigh bound (not read by equals).
8lookupCount00–256Number of entries of the fixed colour table, followed by as many r g b triplets (0–255).
9messageCount31–65536Number of bytes of the message, followed by as many source literal pairs.
…bytesliteral 144 literal 53 value7 0see belowHere: 0x90 (note-on channel 0), 0x35 (note 53), then the value.

Checks: unique identifier; non-empty range (max > min, or max ≥ min for equals) and non-empty message ("plage ou message de sortie invalide", invalid output range or message); a table present if a lookup0/1/2 byte is used ("table de sortie absente", missing output table).

The three readings of the bounds

rulePositionUse
scaleclamp((v − min) / (max − min), 0, 1)A level: VU meters (output "vu-deck-1" "deck.1.level.meterLeft" midi none scale 0 1 0 3 literal 176 literal 2 value7 0). The model's default.
threshold1 if min ≤ v ≤ max (closed interval), else 0A two-state LED. Almost every published LED: [0.05 ; 109] = "lit as soon as the control is not zero".
equals1 if |v − min| < 10−6, else 0Lit for one exact value. FLX10: the native STEM buttons, lit when the part is not muted ("deck.1.stems.role.drums.muted" midi none equals 0 0).
Why a threshold

The bounds 0.05 and 109 are not a range: read as a range, they gave a position of 10−9, i.e. byte 0 — every LED stayed off while the message went out, well formed. Read as a threshold, a binary value is enough: it goes through the same formatting and gives 0x7F or 0x00. The interval is closed at both ends, which also allows switching a light off above a level. For the pad-page headers, the FLX10 uses a threshold centred on each page number: -0.5 0.5 for page 0, 0.5 1.5 for page 1…

Byte sources

Each byte of the message is a source literal pair. The literal is only read by literal; the other sources write it as 0. With v14 = round(position × 16383):

SourceByte sent
literalThe written number (0–255): status, note number, SysEx bytes…
value7General case: v14 >> 7 (0–127; position 1 → 127). Pad case: see below.
value14-msb / value14-lsb(v14 >> 7) & 0x7F / v14 & 0x7F (motorised faders, 14-bit displays).
lookup0 / lookup1 / lookup2Component 0, 1 or 2 of entry round(position × (N − 1)) of the fixed table (colours of the mode buttons on RGB-SysEx tables).
color-r / color-g / color-bRed, green or blue component (8 bits brought down to 7: >> 1) of the pad's colour; 0 if off; divided by 4 if dimmed; white if no colour is known.

A message starting with F0 is sent as a long message (SysEx).

Pad colour: output-color

output "auto-led-991" "deck.1.pads.cell.1.lit" midi none threshold 0.050000000000000003 1000000000 0 3 literal 151 literal 0 value7 0
output-color "auto-led-991" "deck.1.pads.cell.1.colorIndex"

output-color "output id" "path" gives an output a second path: the one carrying the pad's colour rank. It must follow its output, once per output ("couleur de sortie invalide", invalid output colour). When present, the value7 byte is no longer an intensity but a colour:

  • off (position 0) → 0;
  • lit → the velocity matching the colour rank on the controller's colour wheel;
  • dimmed (control value strictly between 0 and 0.75) → the same hue with bit 0x40 added (capped); on the FLX10, dimmed white is 0x7F (measured);
  • setting pad_leds = single (single lamp, outside scale) → 0 off, 0x40 dimmed, 0x7F full, colour being meaningless;
  • setting pad_leds = packed_rgb → the velocity in the Hercules pad format.
Why two paths

An RGB pad has a single message — a note-on whose velocity carries the hue. So you need to know at the same time whether it is lit and which colour, and these are two distinct registry controls. As long as an output watched only one, the eight pads could only share one colour. A separate line (rather than one more field on output) keeps outputs without colour written identically. Recolouring a hot cue re-fires the output with its last value: the pad changes hue without waiting to be switched off and on.

When messages are sent

  • On change. Each output subscribes to its control (and to its colour). Changes are grouped: only the last value of an output goes out at each round.
  • Never the same message twice. If the bytes built are identical to this output's last send, nothing goes out. The comparison is on the bytes, the only thing the controller receives.
  • When the mapping starts, the "already sent" state is forgotten and all outputs are sent, then a second time 1.5 s later. The controller may have been asleep or re-plugged, and at the very start its output port is not always open: whatever is sent then is lost.
  • Echo. A scale output (fader, level) is not sent back to the controller that just changed the value (otherwise a motorised fader would fight the hand); an LED (threshold, equals) always is: pressing QUANTIZE on the controller updates its LED.
  • An output whose control does not exist in the registry never sends anything.

7. modifier and modifier-feedback: SHIFT and layers

modifier "learned-modifier-22" "deck-1-shift" held 0 midi midi-note 0 63 0 0 0
modifier-feedback "learned-modifier-22" midi 0.050000000000000003 1000000000 3 literal 144 literal 63 value7 0
modifier "learned-modifier-19" "deck-1-zoom" held 0 midi midi-note 0 74 0 0 0
No.FieldValuesMeaning
1idunique, non-empty stringModifier identifier ("identifiant de modificateur duplique", duplicate modifier id).
2layernon-empty stringThe layer it activates: deck-1-shift, deck-1-zoom… Several modifiers can carry the same layer.
3modeheld, latched, touchheld: active while the button is held (value ≠ 0). latched: each press (rising edge) inverts the state. touch: treated as held.
4expirationinteger ≥ 0 (ms)Safety (except latched): an active modifier with no message for this long turns off. 0 = never.
+7address§4The physical button.

A message at a modifier's address updates its state and then carries on to the input bindings: a SHIFT button can also drive a control. Active layers are sorted; their combination (deck-1-shift+deck-1-zoom), or base if there is none, is used for diagnostics.

Why the expiration

If a SHIFT release is lost (saturated port, cable), the table would stay "in SHIFT" for the rest of the night. A bounded expiration prevents that for held modes; a latched mode is durable by nature and does not expire.

Zoom layers

The deck-N-zoom layers are read by the waveform zoom: while a modifier of this layer is active, the zoom acts on deck N only. The published mappings set them as held on each deck's SHIFT (FLX10: note 74; SX2: the same note 63 as SHIFT, hence two modifiers on the same address).

modifier-feedback (version ≥ 5)

modifier-feedback "modifier id" transport min max N (source literal)×N: the modifier's lamp. It follows the layer, not the button: when the layer becomes active or inactive, the value 1 or 0 is compared with the closed interval [min, max]; each non-literal byte is then 0x7F (inside) or 0x00. The named modifier must be declared before; N > 0; max > min. Error: "retour de modificateur invalide" (invalid modifier feedback).

8. effect-selection: choosing an effect by name

effect-selection "learned-selection-22" "fx.unit.1.slot.1" "reverb" midi midi-note 4 36 0 0 0
effect-selection "learned-selection-679" "fx.unit.2.slot.1" "space" midi midi-note 6 0 0 0 0 off-on-release
No.FieldValuesMeaning
1idunique stringOtherwise "identifiant de selection d'effet duplique" (duplicate effect selection id).
2slotPathfx.unit.1.slot.1 (Beat FX), fx.unit.2.slot.1 (Color FX)The targeted effect slot.
3effectIdeffect nameBeat FX: lowcutecho, echo, mtdelay, spiral, reverb, trans, enigmajet, flanger, phaser, stretch, sliproll, roll, mobiussaw, mobiustri. Color FX: space, decho, crush, pitch, noise, filter.
+7address§4A note or a CC (press = a non-zero value).
(end)off-on-releaseoptionalStateful button: its value 0 switches this effect off instead of being a plain release.

How it is read

At load time, each selection becomes a write-literal binding on <slotPath>.selectById, whose literal value is the effect's rank in the list above, counted from 1 (reverb = 5, space = 1). The press writes this rank. With off-on-release, the value 0 writes 1000 + rank, which means "switch this effect off if it is on". An unknown name is kept in the file but drives nothing.

If the mapping contains at least one selection on fx.unit.2.slot.1 (one button per Color FX) and the colorfx_buttons setting is not select, the Color FX switches to on/off mode: off at start, a press turns it on, another press (or the button's OFF signal) turns it off.

Why by name

The order of a selector's positions changes from one controller to another (GRV6: DELAY, ECHO, LOW CUT ECHO…; DDJ-800: LOW CUT ECHO, ECHO, MT DELAY…). Linking by position would play another effect than the one printed on the table. The name is stable; the rank list is fixed data of the software, never sorted or reordered. The stateful button exists because the FLX10 COLOR FX buttons hold their own state: the same note switches on (non-zero value) and off (value 0).

9. The setting line

setting "beat_fx_mode" "Beat FX" "" choice 0 1 1 2 "single" "multi" 2 "Single Beat FX" "Multi Beat FX"
No.FieldExample (SX2)Meaning
1id"beat_fx_mode"Setting key, unique, non-empty. This is what the software looks for.
2name"Beat FX"Displayed label, non-empty.
3description""Help text (may be empty). Version ≥ 5: \n, \r, \t, \\ are decoded; any other escape is an error.
4kindchoiceboolean, integer, real, choice.
5minimum0Low bound.
6maximum1High bound (≥ minimum).
7defaultValue1The setting's value, within the bounds. For a choice: the rank of the selected choice, counted from 0 (here 1 = multi).
8choiceCount20–128, followed by the choice values (strings).
…choices"single" "multi"The values the software compares.
+1labelCount2Version ≥ 3: 0 or exactly choiceCount, followed by the labels (non-empty).
…labels"Single Beat FX" "Multi Beat FX"What the editor shows.

Checks: "plage de reglage invalide" (invalid setting range) if maximum < minimum, if the value is out of bounds, or if a choice has no choices; "libelles de choix incomplets" (incomplete choice labels) if the number of labels does not match.

Why in the mapping

These choices describe the table, not the computer: a detented selector or a single button, colour or monochrome pads, a SHIFT that changes the pads' channel… The controller declares its nature in its file; the software never guesses it from the model name. A setting unknown to the software is kept and ignored.

10. Known settings

idChoicesEffect
beat_fx_modesingle | multisingle (or absent): the single Beat FX (fx.unit.1.…). multi: two units FX1 / FX2 of three effects (fx.multi.…); at load time the fx.multi.active control goes to 1 and the screen shows MULTI and the FX1 / FX2 tabs; the editor hides the single Beat FX section.
pad_ledscolour | single | packed_rgbNature of the pad LEDs, which changes the meaning of the byte sent (see §6). single or mono = single lamp; packed_rgb = Hercules format; any other value, or none, = colour wheel. Changing it re-sends every LED at once.
pad_shift_offset0 | 1 (number)MIDI channel offset of the pads while SHIFT is held. 1 (Pioneer): the pad bindings and LEDs are duplicated at load time on the next channel. 0: nothing is added (table that changes the note, not the channel). See §15.
waveform_zoomcustom | navWaveform zoom on a dedicated knob (custom) or on the browse knob while the library is closed (nav, and also when the setting is absent). Applied to app.waveform.zoomFromBrowse at every load.
colorfx_buttonsonoff | selectWith one button per Color FX: onoff (or absent) = pressing again switches the effect off; select = the buttons only choose, the knob sets the amount.
fx_selectorbutton | knobShape of the Beat FX selector: a button that scrolls (button) or one note per position (knob). Read by the editor to offer the right lines.
colorfx_selectorsingle | buttonsShape of the Color FX selector: a single button or one button per effect. Read by the editor.
stems_on_padsnative | padsDedicated STEM buttons (native) or stems on the KEYBOARD pads (pads). The editor greys out the stem lines in pads, without erasing learned bindings.
grid_edit_mode_1 … _4click | holdHow the deck.N.grid.editing control (BEAT GRID EDIT panel) is triggered. click (or absent): ordinary binding. hold: the binding can sit on an already-mapped button (QUANTIZE…); a short press keeps the button's function; held for 1 s, the button toggles the panel and cancels the press's effect on the other toggles of the same address (QUANTIZE gets its state back).
jog_invertno | yesJog reading direction, published to deck.N.scratch.inverted for the four decks.
platter_motor_rpmreal (real)Motorised platter (Hercules T10): motor speed in rpm, published to deck.N.scratch.motorRpm at start for decks whose rotation is mapped, reset to 0 on stop.
stembox.shipped-presetbooleanInternal "shipped preset" mark; removed from the copy installed for the user. Do not write it by hand.

The published Hercules T10 mapping also contains toggle_fx_1 to toggle_fx_3 settings (one effect per FX button); in the code examined, no engine component reads them.

11. Platters, wake-up and keep-alive

platter-calibration (version ≥ 4)

platter-calibration 1 48604 48466 4
platter-calibration 2 52305 53480 4

Fields: deck (1–255), counter-clockwise pulses, clockwise pulses, turns (≠ 0). These are the sums measured by the editor's calibration assistant, which has you make 4 turns in each direction and adds up |byte − 64|: the platter sends at a fixed rate and puts its speed in the value, so counting messages would measure the gesture's duration, not the distance.

At load time, the valid platters (turns and both sums non-zero) are averaged:

  • pulses per turn = mean of (counter-clockwise + clockwise) / (2 × turns);
  • symmetry = Σ clockwise / Σ counter-clockwise (inverted if jog_invert = yes).

Both values are published for the four decks (deck.N.scratch.pulsesPerTurn, deck.N.scratch.symmetry). FLX10: (48604 + 48466) / 8 = 12,133.75 and (52305 + 53480) / 8 = 13,223.125, mean ≈ 12,678 pulses per turn; symmetry = 101,946 / 100,909 ≈ 1.010.

Why

The platters of one controller are the same part: averaging cancels part of the gesture's error. Without calibration, an FLX10 (about 12,000 units per turn) would scroll the waveform far too fast compared with an FLX4 (about 720). A mapping without a jog publishes nothing, so as not to overwrite the geometry of another controller plugged in at the same time.

platter-ring (version ≥ 4)

platter-ring 1 191 9

Fields: deck (1–255), status (0–255), number (0–127), and an optional 4th field, the "on" value (1–127, 127 if absent; only written if it differs from 127). The message sent is status number level: FLX10, BF 09 7F (CC 9 on channel 16) for deck 1's ring. The DDJ-1000 expects 1 ("WHITE"); 0 switches off everywhere.

The software pushes the rings 2, 3, 8, 20 and 40 s after start (each time: the wake sequence, then each ring's level), blinks them (500 ms half-period) when deck.N.transport.ending is true, and sends the steady level twice (at once and 700 ms later) when blinking ends.

Why these pushes

An open port is not a ready controller: the table ignores what it receives until it has finished starting up. The first push comes after the second LED send (1.5 s), so it is not drowned in their burst. The pushes are bounded, never periodic: endless sending to a vanished port is a cause of crashes.

wake and keep-alive

wake 0 3 191 66 127

wake delay_ms N byte×N: one message of the wake-up sequence (at least one byte). When the mapping starts, the wake messages are sent in file order; after each one, the software waits its delay before the next. FLX10: BF 42 7F, which hands control to the computer — without it, the table ignores the ring levels.

keep-alive delay_ms N byte×N: at most one line (otherwise "message temporise invalide", invalid timed message). After the sequence, this message is repeated every delay ms; a delay of 0 repeats nothing.

12. screen and text-display

These two lines declare display capabilities of the controller; the content is produced by the software. None of the published mappings uses them.

  • screen "id" width height format max_fps: a graphic screen. format = monochrome, rgb565, bgr565 or rgba8888; width, height and fps > 0.
  • text-display "id" max_chars max_fps encoding prefix suffix replacement padding glyphs: a text display. max_chars 1–4096, encoding = ascii or glyph-table. Prefix, suffix, replacement and padding are each N byte×N. Then glyph count, and for each one code_point N byte×N (code point ≤ U+10FFFF, unique, at least one byte). With glyph-table, the replacement is required.

13. The complete path of a message

Example followed end to end: pressing QUANTIZE, deck 1, on a DDJ-FLX10.

  1. Bytes received: 90 35 7F. The message first goes to the mapping editor if it is learning on this device (it then belongs to the editor alone); otherwise to the mapping loaded for this device. With no mapping loaded, it is ignored.
  2. Address decoding: 0x90 = note-on (upper 4 bits) on channel 0 (lower 4 bits); note 0x35 = 53; value 127. Address: midi midi-note 0 53 0 0 0.
  3. Modifiers: no modifier sits at this address (deck 1's SHIFT is note 63).
  4. Binding lookup: a single input has exactly this address, learned-40 → deck.1.grid.quantize. The padpage-sampler-89 line, also on note 53, is on channel 7 (the pads): it does not answer.
  5. Layers: the binding has no condition (layerCount = 0): accepted.
  6. Interpretation: absolute, range 0–127 → p = 127/127 = 1; no reversal; linear; output 0–1 → value 1. No switch, no gain law, no takeover.
  7. Action: write on a toggle-kind control (deck.{d}.grid.quantize;toggle;0..1;1) → press (1 > 0): the control flips. QUANTIZE was 1 (its default): it goes to 0.
  8. Release: 90 35 00 (or 80 35 00) → value 0 ≤ 0: ignored. Nothing is written.
  9. LED feedback: output auto-led-1155 watches deck.1.grid.quantize. Value 0 → outside [0.05 ; 109] → position 0 → value7 = 0. Message built: 90 35 00. It differs from the last send: it goes out at the next round, and the LED turns off. At the next press, value 1 gives 90 35 7F.

14. Registry controls

The second field of an input or output line is a control path in the Stembox registry. For each control, the registry declares: its path, its kind, its range, its default value, its law (linear, log, audioTaper, centreDetent, eqGain, gainTaper, none) and a description.

Naming

Paths are words separated by dots. In the registry, braces stand for a number expanded at build time: {d} = deck 1–4, {u} = effect unit 1–4, {t} = effect slot 1–4, {n} = pad 1–16, {h} = hot cue 1–16, {s} = sampler 1–16. In a .mapping file, always write the expanded path: deck.1.grid.quantize, never deck.{d}.….

FamilyExamples
deck.N.…Everything belonging to a deck: transport.playing, cue.button, tempo.fader, grid.quantize, loop.setIn, jump.fourBack, scratch.wheelMove, scratch.wheelTouch, level.volume, level.gain, eq.high, pads.mode, pads.cell.N.press, pads.cell.N.lit, pads.cell.N.colorIndex, stems.role.drums.muted, switchTo…
fx.unit.U.…The single Beat FX (unit 1) and the Color FX (unit 2): slot.1.enabled, slot.1.next, slot.1.selectById, slot.1.timePrevious / timeNext, assign.deck.N…
fx.multi.U.…Multi Beat FX: slot.T.enabled (ON), slot.T.next (FX SELECT), slot.T.mix, assign.deck.N (FX ASSIGN), timePrevious / timeNext; fx.multi.active.
fx.part.…Stem part processed by the effect (fx.part.vocals, drums, instruments).
mixer.…Mixer: crossfader.position, head.volume, master.colorFx.amount…
library.…Library: scroll (encoder), activate (forward), navigateLeft (back), drillToggle, loadToDeck.N…
app.…, ui.…Application and display: app.waveform.zoomKnob, app.waveform.zoomFromBrowse, app.layout.toggle…
stems.…, sampler.…, drums.…, preview.…Separation queue, samplers, DRUM STATION, preview decks.

Kinds and their consequence on a binding

KindMeaningUsual binding
toggleA 0/1 state that each press inverts (transport.playing, grid.quantize).write: flips on press, release ignored. toggle for a latching switch (one message per press).
momentaryIs 1 while held, 0 on release (cue.button, pads.cell.N.press, scratch.wheelTouch).write: the value is copied, press and release both count.
triggerA pulse (loop.setIn, library.activate, switchTo).write or trigger: writing 1 fires it.
encoderA relative step (scratch.wheelMove −4…4, library.scroll).Relative encoding; write writes the step, increment adds it.
valueA continuous quantity within its range (level.volume 0–1, tempo.fader −1…1, eq.high 0–4).Absolute write, possibly 14-bit and with takeover.
enum, choiceNamed states, read by rank (pads.mode: hotCue, padFx, beatJump, sampler, keyboard, padFx2, beatLoop, keyShift).write-literal: each button writes its rank.
readonlyComputed by the software (pads.cell.N.lit, transport.playLamp, level.meterLeft).Source of an output, not a target of an input.

Encoder example: the FLX10 jog, binary-offset with a step of 0.05, i.e. (byte − 64) × 1/20, exactly the registry's definition of deck.N.scratch.wheelMove. The platter sends on three CCs depending on the zone touched (33 edge, 34 top with the hand on it, 35 top): all three are bound.

input "learned-49" "deck.1.scratch.wheelMove" write binary-offset linear 1 0 127 0 1 0.050000000000000003 0 0 0.5 0.050000000000000003 0 0 0.02 0 0 midi midi-cc 0 35 0 0 0
Good to know

Being in the registry is not enough for a control to do something: some are only lamp indicators or await their logic. The list of functions actually available is the mapping editor's. A binding to a path unknown to the registry loads but does nothing (log: "COMMANDE INCONNUE", unknown control).

15. What happens at load time

Before routing the first message, the software applies transformations to the mapping it has read, in memory. The file is not modified.

  1. The pads' SHIFT layer. If pad_shift_offset is 1, every pad binding and pad LED is duplicated on the next channel (identifiers suffixed -shift), so that SHIFT + pad reaches the same control as the pad alone and its lamp answers the same way. The expansion is refused (mapping unchanged) if the target channel is out of the MIDI range or already carries a binding that is not a pad. It is idempotent: previous copies are removed first, and they are never written to the file.
  2. The PLAY lamp. An output wired to deck.N.transport.playing is redirected to deck.N.transport.playLamp (steady while playing, blinking when paused, off without a track), if that control exists.
  3. Added lamps. For each note button bound to deck.N.slip.enabled, deck.N.key.sync or deck.N.sync.requestLeader without a matching output, an LED is added at the same address (0x90 | channel, note, value7, threshold [0.05 ; 109]), showing slip.enabled, key.syncActive and sync.leader respectively. Their identifiers start with auto-lampe- and they are never written to the file.
  4. FLX10: the deck switch. On an FLX10 mapping, the deck.N.switchTo bindings on note 0x72 (the pulse of the 1/3 or 2/4 button) are re-linked to note 0x3C on the deck's channel, the state flag the table sends at plug-in and at every press (7F = active).
  5. DDJ-400: the headphone mix. mixer.head.mix bindings are removed: the DDJ-400 mixes cue and master in the headphones itself, the software must send pure cue.
  6. Channel volumes at zero. Every mapped deck.N.level.volume is set to 0 before the first message is routed: a fader has no position feedback, and an unknown position must mean silence, not a deck at full volume.
  7. Platter geometry and jog direction are published (§11), and the zoom / Multi Beat FX mode applied (§10).
  8. One-button navigation. If one address carries both library.activate and library.navigateLeft, the router replaces them with a single pulse on library.drillToggle: going in or out is decided by the interface, which alone knows the state of the list. The file keeps its two bindings.
  9. Platters without a touch sensor. A deck whose rotation is mapped but not its touch (scratch.wheelTouch) is flagged as such: the software derives the vinyl mode of older controllers from it (vinyl ON: turning scratches; OFF: pitch bend).
Why at load time

Shipped mappings are only copied once to the user: fixing the shipped file would only reach new installations. Fixing at load time also reaches copies already installed, without re-learning any mapping.

16. Special cases

One button on two controls

Several bindings can share an address; they all act. This is intended: LOOP IN is bound to loop.setIn and loop.halve on the same note, LOOP OUT to loop.setOut and loop.double. A table without BACK / VIEW buttons binds the browse-knob press to library.activate and library.navigateLeft (merged at load time, §15).

The 1/3 button (coalesced deck switch)

deck.N.switchTo is a request, not a state: deck 1 or 3 for the left column, 2 or 4 for the right. Two requests from the same side in the same round (a single "1/3" button, learned on both lines) = toggle; a single one (dedicated button) = that deck is designated. In the FLX10 file, note 114 on channel 2 is bound to deck.1.switchTo and to deck.3.switchTo (at load time, these bindings are then moved to the table's state flags, §15).

A stateful button on two write-literal bindings

input "learned-1408" "fx.part.vocals" write-literal absolute linear 1 0 127 0 1 1 1 0 0.5 0.050000000000000003 0 0 0.02 0 0 midi midi-note 6 27 0 0 0

With reversed = 1, the position is inverted: value 0 becomes 1 ("press") and 127 becomes 0. This line therefore writes its literal 0 when the table sends 0. Paired with a non-reversed twin line with literal 1 on the same note, it copies the state the table holds itself (FLX10 FX PART: one message per press, 7F then 00 alternately). Same construction for fx.unit.1.slot.1.enabled on note 70 of channel 4.

The BEATS encoder learned twice, once reversed

input "sz2-mfx-1-beat-next" "fx.multi.1.timeNext" trigger twos-complement linear 1 0 127 0 1 1 0 0 0.5 0.050000000000000003 0 0 0.02 0 0 midi midi-cc 4 0 0 0 0
input "sz2-mfx-1-beat-prev" "fx.multi.1.timePrevious" trigger twos-complement linear 1 0 127 0 1 1 1 0 0.5 0.050000000000000003 0 0 0.02 0 0 midi midi-cc 4 0 0 0 0

The DDJ-SX2's endless BEATS knob (CC 0, channel 4) is bound to two triggers. Each message produces a relative step; trigger only fires on a positive step. The reversed line flips the sign: ► (timeNext) answers positive steps, ◄ (timePrevious) negative ones. One click = one time step, on the three effects of a Multi unit at once.

Turned right, the encoder sends 0x01, 0x02… (δ > 0): only the ► line fires. Turned left, it sends 0x7F, 0x7E… (δ < 0, flipped to δ > 0 by reversed): only the ◄ line fires. A trigger only fires when the interpreted value is positive — that is what separates the two directions.

Multi Beat FX

With beat_fx_mode = multi (DDJ-SX2, SZ2, RZ…), each unit has three ON buttons, SHIFT + ON = FX SELECT, three knobs, and the FX ASSIGN of each channel:

input "sz2-mfx-1-1-on" "fx.multi.1.slot.1.enabled" write absolute linear 1 0 127 0 1 1 0 0 0.5 0.050000000000000003 0 0 0.02 0 0 midi midi-note 4 71 0 0 0
input "sz2-mfx-1-1-next" "fx.multi.1.slot.1.next" write absolute linear 1 0 127 0 1 1 0 0 0.5 0.050000000000000003 0 0 0.02 0 0 midi midi-note 4 99 0 0 0
input "sz2-mfx-1-1-mix" "fx.multi.1.slot.1.mix" write absolute linear 1 0 127 0 1 1 0 0 0.5 0.050000000000000003 0 0 0.02 0 0 midi midi-cc 4 2 0 0 0
output "sz2-mfx-1-1-led" "fx.multi.1.slot.1.enabled" midi none threshold 0.050000000000000003 1000000000 0 3 literal 148 literal 71 value7 0

Single mode (FLX10) uses fx.unit.1.slot.1.… and a detented selector as effect-selection.

A button that sends one note on click and another on hold

Measured on the FLX10: 4 BEAT sends 0x5E on click and 0x70 on hold. Both notes are mapped to the same control.

A table where a button changes channel

On the DDJ-FLX4, Beat FX ON changes MIDI channel with the FX channel selector. The editor lets you learn the same button on another channel without replacing the first one: both bindings stay.

17. Errors and diagnostics

Reader errors

Each error makes the whole file unreadable (§2). The messages are the software's own (in French), with their meaning:

MessageCause
entete absente / entete ou version invalideFirst meaningful line other than SBX_CONTROLLER_MAPPING 1–6.
identifiant invalide / nom invalide / appareil invalideid, name, device empty, malformed or repeated.
champs obligatoires absentsid, name or device is missing.
champ inconnuUnknown line keyword (typo, line from another format).
association d'entree invalideinput line: missing or extra field, unknown enumeration, 0/1 expected, non-finite number, more than 32 layers.
plage d'entree invalideinputMaximum ≤ inputMinimum or outputMaximum < outputMinimum.
couche d'entree inconnueA condition names a layer that no modifier declares.
identifiant d'entree / de sortie / de modificateur / de reglage / de selection d'effet / d'afficheur dupliqueTwo lines of the same type share the same id.
association de sortie invalideMalformed output line (byte > 255, more than 256 table entries…).
plage ou message de sortie invalideEmpty bounds for the rule, or a message with no byte.
table de sortie absentelookup0/1/2 byte without a table.
couleur de sortie invalideoutput-color without a preceding output of the same id, or duplicated.
modificateur invalide / retour de modificateur invalideMalformed modifier or modifier-feedback line; feedback before its modifier; version < 5.
intention de selection d'effet invalideMalformed effect-selection line, final flag other than off-on-release, version < 5.
reglage invalide / plage de reglage invalide / libelles de choix incompletsMalformed setting line, value out of bounds, empty choice, wrong number of labels, unknown escape.
calibrage de plateau invalide / retour de plateau invalideDeck 0, zero turns, number > 127, "on" value outside 1–127, version < 4.
message temporise invalidewake / keep-alive without bytes, negative delay, second keep-alive.
ecran invalide / afficheur textuel invalide / glyphe d'afficheur duplique / remplacement d'afficheur absentscreen / text-display lines.

Diagnostic log messages

The console log (sent with a console report) describes what becomes of each message, for instance midi note ch1 0x35 = 127 -> deck.1.grid.quantize = 0 (the channel is shown counted from 1 there):

  • NON MAPPE (aucune entree du mapping) — not mapped: no binding or modifier has this address — check the channel (0-based in the file) and the number.
  • ignore (autre couche : SHIFT/deck) — ignored, other layer: the address is bound, but a layer condition is not met.
  • COMMANDE INCONNUE de Stembox, rien fait — unknown control: the path does not exist in the registry (typo, removed control).
  • rien ecrit (relachement) — nothing written (release): release of a toggle, a trigger or a literal, or the twin input of a stateful button.
  • non applique (reprise en douceur (takeover)) — not applied (soft takeover): the fader has not yet joined the control's value. non applique (valeur filtree) — filtered value: switch without change, first message of an absolute jog…
  • appui long arme (1 s) / appui long relache — long press armed / released: grid_edit_mode_N = hold binding.
  • During the first 3 seconds, messages are not detailed: they are the initial positions of the knobs and faders the table sends when it opens; only their count is logged.

In the editor

  • "Already mapped to … — nothing changed.": the learned button is already bound to another function; the editor names that function and changes nothing. Free the button first, or learn it on the right line.
  • "Nothing usable was received": the capture received nothing usable; the line is unchanged.

Common pitfalls when editing by hand

  • Channel counted from 1 (as in the documentation) instead of 0.
  • Decimal comma (0,05) instead of a point.
  • A forgotten or extra field: count the fields (28 for an input line without layers).
  • An output-color placed before its output.
  • The LSB of a 14-bit knob bound to another control: no binding should live at the knob's address + 32.
  • An LED as scale with bounds 0.05 1000000000: it stays off; threshold is needed.
↑ Back to top