Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::format::rack Namespace Reference

Namespaces

namespace  volts
 Published modular voltage standards. Centralized so no module can drift.

Classes

struct  ParamSpec
struct  PortSpec
struct  LightSpec
struct  ModuleDescriptor
 One module: everything needed to emit its panel, its manifest entry, and its widget placement. More...
struct  PluginManifest
 A whole plugin: brand plus its modules. More...

Enumerations

enum class  ControlKind {
  KnobLarge , Knob , KnobSmall , Trimpot ,
  Toggle , Button
}
 Which physical control renders a parameter. More...
enum class  PortRole {
  Audio , Cv , Pitch , Gate ,
  Trigger , Clock
}
 What a jack carries. More...

Functions

constexpr double hp_to_mm (int hp)
constexpr double mm_to_px (double mm)
constexpr double control_radius_mm (ControlKind k)
 Drawn footprint radius in mm for each control kind — the radius of what Rack actually paints, not of the authoring placeholder.
const char * widget_class (ControlKind k)
 The Rack widget class this control maps to.

Variables

constexpr double kHpMm = 5.08
 Eurorack geometry.
constexpr double kPanelHeightMm = 380.0 / 75.0 * 25.4
constexpr double kRackDpi = 75.0
constexpr double kJackRadiusMm = 4.11
 Jack footprint (PJ301M is 24.3 px square).
constexpr double kLightRadiusMm = 1.39
 Medium LED (3 mm).

Enumeration Type Documentation

◆ ControlKind

Which physical control renders a parameter.

Determines both the panel footprint and the Rack widget class, so the two cannot disagree.

Enumerator
KnobLarge 

54 px / 18.29 mm — the hero control

Knob 

36 px / 12.19 mm — standard

KnobSmall 

25.5 px / 8.64 mm

Trimpot 

17 px / 5.76 mm — attenuverters and secondary amounts

Toggle 

10 × 20.6 px switch

Button 

momentary

◆ PortRole

enum class pulp::format::rack::PortRole
strong

What a jack carries.

Drives the label, the tooltip, and the panel's input/output treatment — outputs sit on a filled shape, inputs on bare plate, so the distinction survives greyscale and a dark room.

Enumerator
Audio 

±5 V

Cv 

0..10 V or ±5 V

Pitch 

1 V/oct

Gate 

10 V while active

Trigger 

10 V, ~1 ms

Clock 

trigger used as a time base

Function Documentation

◆ control_radius_mm()

double pulp::format::rack::control_radius_mm ( ControlKind k)
inlineconstexpr

Drawn footprint radius in mm for each control kind — the radius of what Rack actually paints, not of the authoring placeholder.

Label clearance is computed from this, which is the check an SVG-only validator cannot make.

◆ hp_to_mm()

double pulp::format::rack::hp_to_mm ( int hp)
inlineconstexpr

◆ mm_to_px()

double pulp::format::rack::mm_to_px ( double mm)
inlineconstexpr

◆ widget_class()

const char * pulp::format::rack::widget_class ( ControlKind k)
inline

The Rack widget class this control maps to.

Kept as a string because it is emitted into generated C++ and named in the panel manifest; the mapping is data, not a switch buried in the code generator.

Variable Documentation

◆ kHpMm

double pulp::format::rack::kHpMm = 5.08
inlineconstexpr

Eurorack geometry.

1 HP is 5.08 mm; a 3U panel is 380 px at Rack's 75 dpi, which is 128.6933 mm — NOT the 128.5 mm quoted in the VCV manual. Authoring at 128.5 mm renders a panel one pixel short.

◆ kJackRadiusMm

double pulp::format::rack::kJackRadiusMm = 4.11
inlineconstexpr

Jack footprint (PJ301M is 24.3 px square).

◆ kLightRadiusMm

double pulp::format::rack::kLightRadiusMm = 1.39
inlineconstexpr

Medium LED (3 mm).

◆ kPanelHeightMm

double pulp::format::rack::kPanelHeightMm = 380.0 / 75.0 * 25.4
inlineconstexpr

◆ kRackDpi

double pulp::format::rack::kRackDpi = 75.0
inlineconstexpr