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
| ID | Description |
|---|---|
Attack | Attack time, in ms. |
Hold | Hold time, in ms. |
Decay | Decay time, in ms. |
Sustain | Sustain level. |
Release | Release time, in ms. |
AttackLevel | Attack level. |
AttackCurve | Attack curve shape. |
DecayCurve | Decay curve shape. |
ReleaseCurve | Release 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
| Function | Description | Returns |
|---|---|---|
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. | — |