![]() |
Klang C++ 0.7.15
Language Reference (draft)
|
Language Guide / Controls and Parameters · Generated API signature Creates a meter for a value supplied by the model. Use a meter to display a value calculated by the model. Write to it as the value changes. The optional minimum, maximum, and initial value default to 0, 1, and 0. Set the range in the same units as the measurement. Add the control to the model’s Controls collection during setup. Choose a range and initial value in the units your model sends to the meter. This example displays a level from −60 to 0 dB and starts at −60 dB. Pass Meter
klang::MeterBasic use
controls = { Meter("Output") };Optional properties
controls = { Meter("Output", -60, 0, -60) };Optional placement and size
Control::Size as the last argument. Its values are x, y, width, and height. Omit it for automatic layout.controls = { Meter("Output", 0, 1, 0, { 0, 0, 120, 24 }) };