Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

ArticulationList

File: Rhapsodist/Widgets/ArticulationList.js · Namespace: ArticulationList.

Overview

Builds a scrollable list of the current patch’s articulations (name + keyswitch note), with a small gain slider per row backed by an articulationGain module (see ArticulationGain). Built on ListPanel for the scrolling and selection mechanics.

Selection and gain sliders

Each row’s gain slider supports double-click to set it to default, and diagonal drag to adjust it. Selecting a row changes the current articulation via ArticulationSwitcher.

The list repopulates automatically on patch change, and keeps the selected row visible (scrolling as needed) on articulation change.

Usage

const pnlArticulationList = ArticulationList.create("pnlCard1", {});

Options

OptionDescriptionDefault
rowHeightRow height in pixels, passed through to the underlying ListPanel.35
marginVertical gap between rows, passed through to ListPanel.5
borderPadding around the list viewport, passed through to ListPanel.10

Look and Feel

FunctionDraws
drawArticulationListContainerThe container panel’s background.
drawArticulationListThe whole list, in place of the built-in per-row drawing below.
drawArticulationListItemEach row, in place of the built-in row background/keyswitch/name drawing.
drawSelectedArticulationIndicatorThe selected row’s highlight, in place of the built-in selection/hover fill.

Public API

FunctionDescriptionReturns
create(panelId: string, options: JSON)Builds the articulation list UI inside panelId. Requires ListPanel.js and ArticulationSwitcher.js. For the per-row gain sliders, the module tree also needs an articulationGain module (ArticulationGain.js).object

Internal Reference

FunctionDescriptionReturns
checkRequirements()Verifies ListPanel.js and ArticulationSwitcher.js are available before create() proceeds, printing a console error if not.number
onpnlArticulationListControl(component, value)Handles row selection: bypasses the articulation-changed broadcaster while calling ArticulationSwitcher.changeArticulation(), so the switch doesn’t trigger a redundant update back to the list.—
createGainSliders(panel: ScriptObject)Rebuilds all per-row gain sliders.—
addGainSlider(parentPanel: ScriptObject, index: number)Builds a single per-row gain slider.ScriptObject

Broadcasters

BroadcasterDescription
bcPatchChangedAttached to knbPatch’s value. On patch change, repopulates the list from ArticulationDataManager.getAllArticulations() and rebuilds the gain sliders.
bcArticulationChangedAttached to knbArticulation’s value. On articulation change, updates the list’s selection and scrolls it into view.