jdxi_editor.ui.style.rack_skin
The look of a panel, as an object: the faceplate painted behind the content, any rack ears beside it, and the palette its display picks up.
A skin owns chrome only, never layout. The room it is allowed to take is the
three numbers it declares – JDXiSkin.ear_width, JDXiSkin.bezel
and JDXiSkin.rail_height – which
JDXiSkin.content_margins() turns into the margins
RackPanel sets on its layout.
Everything left over belongs to the content, so a skin cannot quietly grow.
The default skin is the JD-Xi’s shiny black panel exactly as it was before skins existed, so wrapping something in a RackPanel changes nothing until another skin is chosen.
A skin drives three things:
the chrome a
RackPanelpaints,the panel image behind an editor’s outermost groups (
mark_sheen, which reaches them as a stylesheetborder-image: seejdxi_editor.ui.style.editor_style.gloss_panel_file()),the colours of the LCD widgets, so a brushed aluminium faceplate is not left with a Roland-orange display.
The reusable part – the JDXiSkin base, its palettes and
textures, the SkinRegistry and the RackPanel / RackEars
widgets – lives in picoui.skin. This module holds the editor’s own
skins, its REGISTRY of them, and the restyling the editor needs when
the skin changes (the registry’s listener).
Adding one means subclassing JDXiSkin, declaring those three numbers
and its look – a FaceSpec as face and an
EarSpec as ear – then adding it to
REGISTRY. The machine details are specs too (the TB-303’s keyboard,
the TR-909’s steps, the MS-20’s patch cords), so any skin can borrow one. A
paint hook is overridden only for what no spec describes yet: the Minimoog’s
rail is the one left.
The choice is remembered in QSettings under ui/skin.
Attributes
Classes
How the Audio Monitor draws its level meters. Any skin can take any of |
|
How the MIDI player draws its track lanes. |
|
The JD-Xi's shiny black panel, and the base every editor skin extends. |
|
The JD-Xi as a 1U rack unit, after the JDXV: brushed gunmetal rather than |
|
Satin-finished aluminium with a green display, as 1970s rack gear had. |
|
Ivory painted steel with walnut end cheeks, as on 1970s studio gear. |
|
The TR-808: matte charcoal, orange silkscreen, teak cheeks, and the |
|
The TB-303 Bass Line: the silver box, orange knob line, red LED numerals |
|
The TR-909: a light grey box with blue silkscreen, dark end cheeks, and |
|
The TR-1000: a modern rhythm machine in mid grey, with dark cheeks, a |
|
The Jupiter-8: a textured near-black panel under bold red section bars, |
|
The red JD-Xi: the same glossy black control panel, set into a scarlet |
|
The white JD-Xi: a silver control panel set into a white body. |
|
The Juno-106: a matte slate panel, a red bar and a blue bar along the |
|
The Minimoog: a matte black panel set in a walnut cabinet. |
|
The MC-101 groovebox: a compact matte black body, a white OLED, and the |
|
The Korg MS-20: a matte black panel with its sections boxed in white |
|
The SH-101: a dark matte control panel set in a coloured plastic body. |
|
The SH-101 in red. |
|
The SH-101 in blue. |
|
The ARP 2600: a dark charcoal panel printed in white, in a black case, |
Functions
|
A colour for each of |
|
|
|
The skin |
|
The skin everything is drawn with. |
|
Change the skin, and restyle the running application. |
|
Repoint the chrome at the new skin's panel image. |
|
The width and height a panel image's name ends with. |
Module Contents
- class jdxi_editor.ui.style.rack_skin.MeterStyle[source]
-
How the Audio Monitor draws its level meters. Any skin can take any of them: the meter belongs to the skin’s era, not to its material.
- class jdxi_editor.ui.style.rack_skin.LaneStyle[source]
How the MIDI player draws its track lanes.
- Parameters:
cards – bool each lane drawn as a punched card
backing – Material the cards lie on, filling the lane list behind them: the cabinet’s wood, or the faceplate’s metal
- class jdxi_editor.ui.style.rack_skin.JDXiSkin[source]
Bases:
picoui.skin.SkinThe JD-Xi’s shiny black panel, and the base every editor skin extends.
The painting, margins and palette machinery are picoui’s
JDXiSkin; what is added here is the JD-Xi’s own display and the editor’s features a skin chooses: itsmeterstyle on the Audio Monitor and itslanesin the MIDI player.
- class jdxi_editor.ui.style.rack_skin.JdxiRackSkin[source]
Bases:
JDXiSkinThe JD-Xi as a 1U rack unit, after the JDXV: brushed gunmetal rather than the shiny black plastic, a lit chamfer along the top, a red stripe along the bottom, and a blue backlit screen.
The chamfer and the stripe are painted as part of the face rather than as chrome around it. That costs no room – both sit in the bezel the content already leaves free – and, more importantly, it is what makes the skin recognisable: the faceplate reaches an editor’s groups as a nine-slice image whose top and bottom edges are drawn unstretched, so anything in them appears on every panel in the application. The ears are not part of that image – a nine-slice would stretch them – so a RackPanel or a RackEars strip draws them itself.
- class jdxi_editor.ui.style.rack_skin.Brushed70sSkin[source]
Bases:
JDXiSkinSatin-finished aluminium with a green display, as 1970s rack gear had.
The panel is a bevel: lit along its top edge, shadowed along its bottom, with the grain kept faint enough that the metal reads by its gradient rather than by its texture. Legends are ink, and red is reserved for lamps.
- class jdxi_editor.ui.style.rack_skin.IvoryWalnutSkin[source]
Bases:
JDXiSkinIvory painted steel with walnut end cheeks, as on 1970s studio gear.
The one pale faceplate in the set, which is why
Foregroundexists: its lettering is ink rather than near-white, while the controls standing on it keep their dark surfaces.
- class jdxi_editor.ui.style.rack_skin.Tr808Skin[source]
Bases:
JDXiSkinThe TR-808: matte charcoal, orange silkscreen, teak cheeks, and the step-button run of red, orange, yellow and white along the bottom.
That run of colour is the machine, so it goes in the face rather than in chrome around it: the bottom edge of the nine-slice is drawn on every panel in the application, where ears and rails never appear.
- class jdxi_editor.ui.style.rack_skin.Tb303Skin[source]
Bases:
JDXiSkinThe TB-303 Bass Line: the silver box, orange knob line, red LED numerals and the little keyboard of step buttons along the bottom.
Its faceplate is flat painted metal rather than brushed, which is what separates it from the satin aluminium skin at a glance; the keyboard band separates it from everything else. Both live in the face, so they reach every panel rather than only a RackPanel.
- class jdxi_editor.ui.style.rack_skin.Tr909Skin[source]
Bases:
JDXiSkinThe TR-909: a light grey box with blue silkscreen, dark end cheeks, and the sixteen cream step buttons with a red LED over each one.
That row of buttons and lights is the machine’s face, so it goes in the faceplate’s bottom edge and appears on every panel. The steps are drawn in fours, as they are grouped on the hardware.
- class jdxi_editor.ui.style.rack_skin.Tr1000Skin[source]
Bases:
JDXiSkinThe TR-1000: a modern rhythm machine in mid grey, with dark cheeks, a red rule and the sixteen step buttons with a light over each one.
Declared entirely from specs, with no paint method: the test that a new skin needs configuration rather than drawing code.
- class jdxi_editor.ui.style.rack_skin.Jupiter8Skin[source]
Bases:
JDXiSkinThe Jupiter-8: a textured near-black panel under bold red section bars, with the run of coloured patch buttons along the bottom.
The red header bar is what the eye remembers of a JP-8, so it takes the whole of the faceplate’s top edge rather than the hairline the other skins draw there, and the patch buttons are discrete keys with gaps rather than a continuous stripe.
- class jdxi_editor.ui.style.rack_skin.RedJdxiSkin[source]
Bases:
JDXiSkinThe red JD-Xi: the same glossy black control panel, set into a scarlet body instead of the matte black one.
What changes is almost all chassis rather than faceplate – the body around the panels, the keyboard strip, the lettering on them – so the panel keeps the thin red edge the hardware shows where the inset meets the body, which is also what tells this skin’s faceplate apart from the plain glossy one.
- class jdxi_editor.ui.style.rack_skin.WhiteJdxiSkin[source]
Bases:
JDXiSkinThe white JD-Xi: a silver control panel set into a white body.
The panel is the same glossy construction as the default skin – the gradient, the diagonal reflection, the rim and the top highlight – in light metal instead of black plastic, so it is declared as colours rather than painted again. The sheen is stronger than the black panel’s, because a bright surface returns more of the light that falls on it.
- class jdxi_editor.ui.style.rack_skin.Juno106Skin[source]
Bases:
JDXiSkinThe Juno-106: a matte slate panel, a red bar and a blue bar along the top, and wooden end cheeks.
The bars are the coloured section rules across the machine, so they take the faceplate’s top edge, which the nine-slice keeps at its own size. The cheeks are the wood at each end, drawn as the ears.
- class jdxi_editor.ui.style.rack_skin.MiniMoogSkin[source]
Bases:
JDXiSkinThe Minimoog: a matte black panel set in a walnut cabinet.
The cabinet is the wood at each end and the lip above and below the panel. Its lanes are punched cards, on this cabinet’s own wood.
- jdxi_editor.ui.style.rack_skin.group_colors(colors, per_group: int, count: int, dim: int = 190) tuple[source]
A colour for each of
countsteps lit in groups: each group takes the next ofcolors, its first step at full strength and the rest dimmed.- Parameters:
colors – sequence of “#RRGGBB”, one per group, reused in turn
per_group – int steps in a group
count – int steps
dim – int how much darker the off-beat steps are (QColor.darker)
- Returns:
tuple of “#rrggbb”
- class jdxi_editor.ui.style.rack_skin.Mc101Skin[source]
Bases:
JDXiSkinThe MC-101 groovebox: a compact matte black body, a white OLED, and the sixteen backlit step pads along its front edge.
The pads are what the machine is recognised by, so, like the TR-909’s buttons, they go in the faceplate’s bottom edge and appear on every panel. Each group of four is lit in its own colour, as the pads take the colour of the track being edited, with the first step of each group brightest. The sides are the moulded body itself: no wood, no screws.
- class jdxi_editor.ui.style.rack_skin.Ms20Skin[source]
Bases:
JDXiSkinThe Korg MS-20: a matte black panel with its sections boxed in white lines, and patch cables.
Editor panels are drawn from a stretched image that keeps only a few pixels of each edge sharp, so cables across their middle would be distorted and sit behind the controls. They get the white section box, drawn in that sharp edge. The cables are on the rack-mounted panels instead, where nothing lies behind them: each cheek is a small patch bay with a cable looped between two jacks, and a third cable sags along a slim rail under the panel, plugged into the foot of each cheek.
- class jdxi_editor.ui.style.rack_skin.Sh101Skin[source]
Bases:
JDXiSkinThe SH-101: a dark matte control panel set in a coloured plastic body.
The SH-101 came in grey, red and blue, so it is offered in all three, as the JD-Xi is in black, red and white. What changes is the body: the rim of plastic showing round the panel, the lip along its front edge, the sides, and the chassis behind everything. The panel itself stays the same dark charcoal. A portable synth, so the sides are plain moulded plastic: no rack screws.
The body colours are mid tones, dark enough that white lettering stays legible on the body as well as the panel.
- class jdxi_editor.ui.style.rack_skin.Arp2600Skin[source]
Bases:
JDXiSkinThe ARP 2600: a dark charcoal panel printed in white, in a black case, with its speakers behind perforated grilles, and patch cords looped over them as on the MS-20’s cheeks (white on the left, orange on the right).
The panel’s look is its printing: white legends, white boxes round the module titles and white signal-flow lines between them. Editor panels get a white box and the printed flow line along the top, inside the sharp edges of the panel image (so section titles print in that white, ink_legends). On the hardware the speaker grilles are in the panel’s lower corners; here they are the cheeks either side, the one place on a rack panel nothing else sits. The case’s black base runs under the panel as a rail, and its red power lamp is the accent.
- jdxi_editor.ui.style.rack_skin.skin_by_id(skin_id: str | None) picoui.skin.Skin[source]
The skin
skin_idnames, falling back to the default.- Parameters:
skin_id – Optional[str] a key of
SKINS- Returns:
JDXiSkin
- jdxi_editor.ui.style.rack_skin.active_skin() picoui.skin.Skin[source]
The skin everything is drawn with.
- Returns:
Skin
- jdxi_editor.ui.style.rack_skin.set_active_skin(skin: str | Skin, *, remember: bool = True) picoui.skin.Skin[source]
Change the skin, and restyle the running application.
- Parameters:
skin – str | JDXiSkin the skin, or its id
remember – bool store the choice for next time
- Returns:
JDXiSkin the skin now in use
- jdxi_editor.ui.style.rack_skin._restyle_application(_skin: JDXiSkin | None = None) None[source]
Repoint the chrome at the new skin’s panel image.
The panel behind an editor’s outermost groups reaches them as a stylesheet
border-image, whose path names the skin that rendered it. Every editor carries its own stylesheet, with its own accent, and is a child of the main window rather than a window itself, so the path is swapped in place wherever it appears: rebuilding the stylesheets instead would reach none of them, and would throw away each editor’s accent.- Returns:
None