Klang C++ 0.7.15
Language Reference (draft)
Loading...
Searching...
No Matches
PitchBend

Language Guide / Controls and Parameters · Generated API signature

PitchBend

klang::PitchBend

Creates a MIDI pitch-bend control.

Add a pitch-bend wheel to receive the MIDI pitch-bend value. Its centre and initial value are 8192. The model maps that value to its chosen bend range. The label and range are built in.

Basic use

Add the control to the model’s Controls collection during setup.

controls = { PitchBend() };

Optional placement and size

Pass Control::Size as the only argument. Its values are x, y, width, and height. Omit it for automatic layout.

controls = { PitchBend({ 0, 0, 32, 96 }) };