You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs(electra-one): update fiche with findings from electra-one-mcp v0.1.0
Following a deep RE pass on the app.electra.one JS bundle + a full
hardware validation session on firmware 4.1.4 for the sister
electra-one-mcp Claude Code plugin, several gaps in this fiche
became visible. This commit fills them.
Updates:
- §2 Control types: ADD `custom` (Lua-painted tiles). Critical for
widget devs — was missing.
- §2: ADD the "one pot per custom tile" firmware quirk (forum #4172),
with a note explaining why `inputs[]` declaring multiple potIds is
silently ignored for `type:"custom"`.
- §2: Correct the screen height (1024×575 panel vs 1024×565 drawing
area per the bundle's displayHeight constant).
- §5 Events table: extend with the events the JSON `replies[]` array
already emits but the MD didn't document — control_set/switched,
snapshot_bank/switched, capture_list/changed, usb_host/changed —
plus map each to its SysEx event code (7E XX / 7F XX).
- NEW §7b: Schema gotcha — `tiles` vs `controls`. The web editor's
internal schema (used in the electraone-widgets repo and in the
Firestore-imported presets under `.cache/electra-import/`) is NOT
what the device firmware parses via `/preset/upload`. Documents the
symptom (silent ACK then empty screen) and points at the converter
in the sister plugin.
- NEW §7c: File Transfer API. Brief documentation of the
01 2D / 2E / 2F / 04 2D protocol, the supported type values, and
the known commit-rollback gotcha when type="preset".
- NEW §11: Full MK2 layout math reference. The slot_to_bounds /
slot_to_pot / slot_to_set / slot_to_page_id / bounds_to_slot
formulas extracted from the bundle (offsets ~129500 + ~159200 +
~134272), verified against a live MIDI sniff. Lets a Rust port of
the converter live in osc-bridge if desired.
- NEW §12: USB port routing nuance. The §8 recommendation (Port 1)
is correct for osc-bridge's mixed config+CC workload, but pure
SysEx admin clients (like electra-one-mcp's push_to_device) target
Port 3 (CTRL) — matching app.electra.one's auto-selection regex.
Documents both for cross-reference.
- NEW §13: Pointer to the sister plugin's structured SysEx catalog
(62 commands) so contributors looking to extend the driver have a
starting reference.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|`/electra1/usb_host/changed`| USB Host port: a controller (re)connected on the device's USB-Host jack |
182
+
|`/electra1/log <text>`|`print()` output and runtime Lua errors from device (`7F 00`) — *not yet emitted by osc-bridge; the SysEx arrives but the driver doesn't surface it as OSC. Easy add: one entry in `replies[]`*|
161
183
162
184
---
163
185
@@ -271,6 +293,73 @@ live dialogue — is ~1 KB of Lua.
271
293
272
294
---
273
295
296
+
## 7b. Schema gotcha — `tiles` vs `controls`
297
+
298
+
If you're generating preset JSON from a tool that uses the web-editor's
299
+
internal "tiles" schema (the format `app.electra.one` saves into Firestore and
300
+
that the [electraone-widgets](https://github.com/roomi-fields/electraone-widgets) repo
301
+
uses), you must convert it before uploading via SysEx — the firmware does not
302
+
parse it.
303
+
304
+
Symptom: `/preset/upload` ACKs at the transport level, the device fires
305
+
`7E 05` preset-list-change and `7E 02` preset-switch events as if everything
306
+
worked, but the screen shows "no name - page 1" or stays empty, and
|**`controls` (device firmware)**|`version`, `name`, `projectId`, `pages`, `devices`, `overlays`, `groups`, `controls[]`| The official [Preset format spec](https://docs.electra.one/developers/presetformat.html) — what `/preset/upload` must send. |
313
+
314
+
The web editor converts tiles → controls in JS (`projectToPreset` function,
315
+
offset ~127000–131000 in bundle `0c61af0.js`) before calling its WebMIDI
316
+
`output.send()`. If your osc-bridge client is generating presets from
317
+
scratch following the `controls` schema described in §2, you're fine. If you're
318
+
pulling JSON from Firestore or from the electraone-widgets repo, run it
319
+
through the converter first.
320
+
321
+
A Python port of `projectToPreset` (byte-identical to the web editor, verified
322
+
against a live MIDI sniff) lives in the
323
+
[electra-one-mcp plugin](https://github.com/roomi-fields/electra-one-mcp) at
324
+
`server/preset_converter.py`. Translate to Rust as needed.
325
+
326
+
The same plugin also ports `presetToProject` (the reverse direction) so you
327
+
can pull a preset off the device and write it back in tiles form for
328
+
`git diff`-style workflows.
329
+
330
+
---
331
+
332
+
## 7c. File Transfer API (for very large files / multi-file deploys)
333
+
334
+
In addition to the simple uploads in §2 (`01 01 Upload Preset`, `01 0C Upload
0 commit comments