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

AhdsrController

File: Rhapsodist/Processors/AhdsrController.js. Standalone MIDI Processor script.

Overview

Controls the knobs of every Flex AHDSR envelope modulator in the tree whose ID contains GainFlexAhdsr.

Nine knobs, one per AHDSR parameter (Attack, Hold, Decay, Sustain, Release, Attack Level, and Attack/Decay/Release Curve). Changing a knob applies its value to every matching modulator at once.

EnvelopePanel is the widget provided to drive this processor: its own knobs bind to it automatically via processorId/parameterId.

Parameters

IDDescription
AttackAttack time, in ms.
HoldHold time, in ms.
DecayDecay time, in ms.
SustainSustain level.
ReleaseRelease time, in ms.
AttackLevelAttack level.
AttackCurveAttack curve shape.
DecayCurveDecay curve shape.
ReleaseCurveRelease curve shape.

Usage

Load into a Script Processor slot anywhere in the tree; it resolves its target modulators by ID pattern rather than by chain position, so placement doesn’t matter.

Give every Flex AHDSR modulator that should be controlled together an ID containing GainFlexAhdsr.

Internal Reference

FunctionDescriptionReturns
createKnobs()Builds the nine AHDSR knobs from a table of knob properties and wires each one to onAhdsrControl.Array
onAhdsrControl(component, value)Knob control callback; looks up which knob changed and calls setModuleProperty with its index.—
setModuleProperty(knobIndex: number, value: number)Maps a knob index to the matching AHDSR attribute and applies value to every modulator in mods.—