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
- Open the Provider Manager from the instrument editor's type selector.
- Select a provider (Cadenza, Famiwave, SuperGaussKit, NightFM, or WAV Sampler).
- 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
| CANCEL | Close without saving (prompts if dirty). |
| RESET | Revert to the layout on disk without leaving the editor. |
| UNDO | Pop the last change off the undo stack (50-deep). |
| SAVE | Write to data/layouts/<provider>.json. |
| BORDERS | Toggle dashed design-mode borders on the preview. |
| W± / H± | Resize the canvas in 10-pixel steps. |
Selecting & Moving
| Drag | Move the element under the cursor (snaps to 4px grid). |
| Click-drag (empty) | Box-select every element intersecting the rectangle. |
| Shift+Click | Toggle an element in/out of the selection. |
| Shift+Drag | Move every member of a selection's group together. |
| Ctrl+Z | Undo any change (drag, resize, property edit, group). |
| Esc | Close prompt; a second Esc cancels the close. |
Groups
- Select two or more elements (box-select or Shift+click).
- Click GROUP below the ELEMENTS list.
- Any future Shift+drag on a member moves the whole group together.
- 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.