Module

Halogen.Widgets.DoubleKnob

Package
purescript-halogen-widgets
Repository
afcondon/purescript-halogen-widgets

A concentric two-layer knob — the Strymon / Chase Bliss pattern where one physical control hosts two parameters: an outer ring (primary, more visible) and an inner ring (secondary, more subtle). Each layer has its own value, its own range, and its own drag — both report through a single Output ADT tagged by which layer changed.

This is "DoubleKnob" in the producing-with-your-feet sense: concentric layers, not a 2D-drag (one axis per parameter). A 2D-drag variant could be a future DoubleKnob2D.

Geometry, SVG primitives, and drag-tracking machinery share the same conventions as Knob (300° sweep, 140 px = full range, document-level mousemove/mouseup subscription on mousedown).

#Layer Source

type Layer = { color :: String, max :: Number, min :: Number, value :: Number }

Per-layer config + value. Each layer is independently controlled.

#Input Source

type Input = { debounce :: Milliseconds, disabled :: Boolean, inner :: Layer, label :: Maybe String, outer :: Layer, size :: Number }

#Output Source

data Output

A change request, tagged by layer. The parent fans it back to the appropriate outer.value / inner.value in Input.

Constructors

#Query Source

data Query a

Constructors

#component Source

#defaultInput Source