![]() |
Klang C++ 0.7.15
Language Reference (draft)
|
Language Guide / Controls and Parameters · Generated API signature Creates a rotary control. Use a dial for a continuous value such as cutoff in Hz. The optional minimum, maximum, and initial value default to 0, 1, and 0. The initial value uses the same units as the range. Add the control to the model’s Controls collection during setup. Set the minimum, maximum, and initial value in the same units. This cutoff dial ranges from 20 to 12,000 Hz and starts at 1,000 Hz. Pass Dial
klang::DialBasic use
controls = { Dial("Cutoff") };Optional properties
controls = { Dial("Cutoff", 20, 12000, 1000) };Optional placement and size
Control::Size as the last argument. Its values are x, y, width, and height. Omit it for automatic layout.controls = { Dial("Cutoff", 20, 12000, 1000, { 0, 0, 48, 48 }) };