potatoslicer

Layout Editor

A full-screen mode for repositioning every control on a sound provider's instrument panel. Saves to per-provider JSON.

Opening the Editor

  1. Open the Provider Manager from the instrument editor's type selector.
  2. Select a provider (Cadenza, Famiwave, SuperGaussKit, NightFM, or WAV Sampler).
  3. Click the magenta EDIT LAYOUT button.

The app switches to a full-screen layout mode with a live panel preview in the middle and editor panels on either side.

Screen Layout

  • ELEMENTS (left) — hierarchical tree of every container, sub-element, and control. Click to select, drag to reorder.
  • Panel preview (center) — the simulated instrument panel. Every drag happens here; positions snap to a 4-pixel grid.
  • PROPERTIES (right) — numeric fields (x, y, w, font_size, visible) for the selected element. Click any value to type a new one.
  • Instructions bar (bottom) — context-sensitive tip line that updates based on the current selection.

Header Buttons

CANCELClose without saving (prompts if dirty).
RESETRevert to the layout on disk without leaving the editor.
UNDOPop the last change off the undo stack (50-deep).
SAVEWrite to data/layouts/<provider>.json.
BORDERSToggle dashed design-mode borders on the preview.
W± / H±Resize the canvas in 10-pixel steps.

Selecting & Moving

DragMove the element under the cursor (snaps to 4px grid).
Click-drag (empty)Box-select every element intersecting the rectangle.
Shift+ClickToggle an element in/out of the selection.
Shift+DragMove every member of a selection's group together.
Ctrl+ZUndo any change (drag, resize, property edit, group).
EscClose prompt; a second Esc cancels the close.

Groups

  1. Select two or more elements (box-select or Shift+click).
  2. Click GROUP below the ELEMENTS list.
  3. Any future Shift+drag on a member moves the whole group together.
  4. Click UNGROUP on any member to dissolve the group.

Groups persist into the JSON file and appear as expandable parents in the ELEMENTS list.

Container Sub-Elements

Four parent containers expose a fixed set of sub-elements you can position independently of the container:

  • buttons — DEL, CANCEL, MUTE, SOLO, PREVIEW, SAVE
  • type — label, < arrow, type display, > arrow
  • preset — label, category prev/display/next, name prev/display/next, LOAD, SAVE AS
  • copy — label, < arrow, source display, > arrow, APPLY

Slider controls also expose sub-positions for label, track, and value text.

Layout JSON Format

Layouts live in potatoslicer-app-python/data/layouts/ — one file per provider.

{
  "provider": "nightfm",
  "width": 700,
  "height": 500,
  "bg_color": [8, 10, 18],
  "controls": [
    {
      "param": "attack",
      "label": "Attack",
      "type": "slider",
      "x": 120, "y": 220,
      "w": 140,
      "range": [0.0, 2.0]
    }
  ],
  "positions": {
    "buttons":  { "x": 16, "y": 16, "w": 280, "h": 24 },
    "btn_save": { "x": 16, "y": 16 },
    "type":     { "x": 16, "y": 48 }
  },
  "groups": [
    { "name": "adsr", "members": ["attack", "decay", "sustain", "release"] }
  ]
}

Files are plain JSON — hand-edit them in any text editor and the app picks up changes via mtime watching, no restart required.