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

MicrotuningPanel

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

Overview

Creates an interactive UI for 12-tone microtuning: a sliderpack with note-name labels, a Reset button, and Shift-left/Shift-right buttons that rotate the twelve stored values. The widget only builds the UI, it does not implement microtuning itself.

Alt-clicking the sliderpack resets every value to 0, independent of the dedicated Reset button.

Usage

const pnlMicrotune = MicrotuningPanel.create("pnlMicrotuneContainer", "microtuner", {});

Options

OptionDescriptionDefault
widthWidth of the microtuning sliderpack.pnlMicrotune.getWidth() - 32
heightHeight of the microtuning sliderpack.pnlMicrotune.getHeight() - 85

Look and Feel

FunctionDraws
drawMicrotuningPanelThe panel’s note-name labels below the sliderpack.
drawMicrotuningSliderPackTextPopupThe value popup shown while dragging a slider.
drawMicrotuningSliderEach of the 12 sliders, including black/white key shading and its value text.
drawMicrotuningResetButtonThe Reset button.
drawMicrotuningShiftButtonThe Shift-left/Shift-right buttons.

Public API

FunctionDescriptionReturns
create(panelId: string, processorId: string, options: JSON)Builds the sliderpack, labels, Reset button, and Shift-left/Shift-right buttons inside panelId. Binds the 12-slot slpMicrotune sliderpack directly to processorId.ScriptObject

Broadcasters

BroadcasterDescription
data.sliderpackMouseFires on clicks on the sliderpack; alt-clicking resets every value to 0.
data.bcResetButtonValueFires when the Reset button is clicked; resets every value to 0.
data.bcShiftButtonValueFires when a Shift button is clicked; rotates the twelve stored values one step left or right.

Internal Reference

FunctionDescriptionReturns
shiftSliderPackValues(sliderpack: ScriptObject, direction: int)Rotates the twelve stored values one step left or right, called by the Shift-left/Shift-right buttons.—