FilmStripBooleanControl

A boolean control that displays frames from a filmstrip sprite sheet, supporting the industry-standard bitmap-based control representation.

FilmStripBooleanControl is a boolean control that displays frames from a filmstrip sprite sheet. It supports the widely-used industry standard for control representation: bitmap sprite sheets (filmstrips).

While bitmap-based visualization is more constrained than SVG (no dynamic theming, fixed visual appearance), this component shares the same layout, parameter model, interaction, and accessibility as other controls (vector, raster, and control primitives); see the Raster introduction.

Typically uses 2 frames: frame 0 for false/off, frame 1 for true/on.

Note:

No Theming Support: This component does NOT support themable props (color, roundness, thickness) as visuals are entirely determined by the image content.

Props

NameTypeDefaultRequiredDescription
valuebooleanYesCurrent value of the control
onChange(event: AudioControlEvent<boolean>) => voidNoHandler for value changes
latchbooleanfalseNoWhether the button operates in latch (toggle) mode or momentary mode
labelstringNoLabel displayed below the component
frameWidthnumberYesWidth of a single frame in the filmstrip (pixels)
frameHeightnumberYesHeight of a single frame in the filmstrip (pixels)
frameCountnumberYesTotal number of frames in the filmstrip sprite sheet (typically 2 for boolean controls)
imageHrefstringYesURL to the sprite sheet/filmstrip image
orientation"vertical" | "horizontal"verticalNoOrientation of the filmstrip (frames stacked vertically or horizontally)
frameRotationnumber0NoOptional frame rotation in degrees
invertValuebooleanfalseNoIf true, inverts the normalized value (0.0 -> 1.0 and 1.0 -> 0.0). Useful for filmstrips where frame 0 represents "on" and frame 1 represents "off"
adaptiveSizebooleanfalseNoWhether the component stretches to fill its container
size"xsmall" | "small" | "normal" | "large" | "xlarge"normalNoSize of the component
parameterBooleanParameterNoAudio Parameter definition (Model). If provided, overrides label/latch from ad-hoc props

Basic Usage

FilmStripBooleanControl requires a filmstrip sprite sheet image with typically 2 frames (off and on states):

BasicFilmStripBoolean.tsx

Modes of Operation

Latch Mode (Toggle)

In latch mode, the button toggles between pressed and released states:

LatchFilmStripBoolean.tsx

Momentary Mode

In momentary mode, the button is only active while being pressed:

MomentaryFilmStripBoolean.tsx

Filmstrip Configuration

Frame Dimensions

Specify the dimensions of a single frame:

FrameDimensions.tsx

Orientation

Control whether frames are stacked vertically or horizontally:

Orientation.tsx

Frame Rotation

Rotate the entire filmstrip container:

FrameRotation.tsx

Value Inversion

Invert the value mapping for filmstrips where frame 0 represents "on" and frame 1 represents "off":

ValueInversion.tsx

Frame Mapping

The component maps boolean values to frames:

  • false (normalized 0.0) → Frame 0
  • true (normalized 1.0) → Frame 1

When invertValue is true, the mapping is reversed:

  • false → Frame 1
  • true → Frame 0

Parameter Model

Use a parameter model for integration with audio parameter systems. The following example uses ad-hoc props; with the full library you would use createBooleanParameter and the parameter prop:

FilmStripBooleanParameterModel.tsx

Adaptive Sizing

The FilmStripBooleanControl component supports both fixed sizes and adaptive sizing. By default, the size of the component is driven by the Size System and their size attribute:

FilmStripBooleanSizing.tsx

Adaptive sizing allows the component to adapt to the size of its parent container, adjusting its dimensions intelligently without causing distortion (scaleToFit display mode). The fill display mode makes the component fill the entire container, potentially distorting it.

FilmStripBooleanAdaptiveSize.tsx

Common Use Cases

Power Switch

PowerSwitch.tsx

Momentary Button

MomentaryButton.tsx

Metal Switch

MetalSwitch.tsx

Filmstrip Image Format

Filmstrip images should follow these conventions:

  • Frame count: Typically 2 frames for boolean controls (off and on)
  • Vertical orientation (default): Frames stacked top to bottom
  • Horizontal orientation: Frames stacked left to right
  • Frame dimensions: All frames must have identical dimensions
  • Compatibility: Works with filmstrips exported from WebKnobMan and other VST development tools

Next Steps