ParameterWidget
One row of a node's parameter window: a name, a slider or a toggle, and a value.
| Declared in | src/libs/libbahn/bahn/tracker/ui/ParameterWidget.hpp |
| Inherits | QWidget |
| Group | bahn |
Detailed description
setParameter() binds the row to one parameter of one bahn::Node. A switch parameter shows an On and Off toggle. Every other parameter shows a slider and its value. The node's processor can give its own name for the row and its own text for the value, and the row shows them when it does.
A change to the control sets the processor's live value at once. When the sequencer records, the row also writes the value into the node's first pattern, at the row for the play position.
updateFromNode() reads the live value back from the processor, so the row follows a value that the pattern or another control changes.
Member function documentation
refreshName
void ParameterWidget::refreshName()
Draw the label the node asks for, falling back to the schema's own name.
specs/bahn-live-feedback §BLD-3b, extended to the control's name. A machine that folds several models into one slot renames the slot when the model changes — the drum machine's bass drum is Tone and Decay on a TR-808 and Tune, Attack and Decay on a TR-909.
The name is set here rather than only in setParameter because the model is a knob like any other, so the label has to follow it without the window being rebuilt.