beautypg.com

Slider( param, x, y, w, h, orient, u, v, du, dv ), Button( id, label, x, y, w, h, u, v ) – Expert Sleepers Augustus Loop v2.4.1 User Manual

Page 48

background image

u, v specify the location in the renderer’s image of the sub-image to be used to draw the
button.

The optional ‘hold’ parameter lets you create a button that sets the parameter value to 1.0
while the button is held down; without this option, the button toggles the parameter value
each time it’s pressed.

E.g.:

loopButtonsGroup:add( paramButton( "Tap Tempo",

0*kButtonSpaceH, 0*kButtonSpaceV,

kButtonW, kButtonH, 3*kButtonW, 2*kButtonH ) )

loopButtonsGroup:add( paramButton( "Tap Tempo", 1*kButtonSpaceH, 0*kButtonSpaceV,

kButtonW, kButtonH, 5*kButtonW, 0*kButtonH, true ) );

slider( param, x, y, w, h, orient, u, v, du, dv )

Creates a slider to control the named parameter.

x, y, w, h specify the position, width and height of the slider.

‘orient’ specifies the slider orientation. It should be one of "horizontal" or "vertical".

u, v, du, dv specify the position and size of the sub-image within the renderer’s image to
be used to draw the slider’s handle.

E.g.:

pitchSliderGroup:add( slider( "Pitch", px, kPitchButtonH+5, pitchSliderW, kPitchSliderH,

"horizontal",

2*kPitchButtonW+1, 4*kButtonH+2*12+1, 14, 20 ) )

button( id, label, x, y, w, h, u, v )

Creates a button which activates a pre-defined system function when pressed. The func-
tion is specified via the ‘id’ parameter. Currently, there is only one option: “Prefs”, which
brings up the Preferences dialog.

x, y, w, h specify the position, width and height of the button.

u, v specify the position of the sub-image within the renderer’s image to be used to draw
the button.

E.g.:

miscButtonsGroup:add( button( "Prefs", "Prefs",

1*kButtonSpaceH, 0*kButtonSpaceV, kButtonW, kButtonH, 0*kButtonW, 0*kButtonH ) )

luaButton( function, label, tooltip, type, x, y, w, h, u, v )

Creates a button which calls a Lua function (defined in the script) when pressed.

‘type’ should be either “toggle” or “push”.