PLUG'N SCRIPT
rapid plugin development
Tutorial
DSP
KUIML
How-to
Scripts
  • Overview
  • Tutorial
    • Hello world
    • Main skin and subskins
    • Displaying text
    • Changing text on the fly
    • Printing from the DSP
    • Displaying and controlling parameters
    • Params 101
  • Reference
  • Built-in variables
  • Runtime model
  • Parameters mapping
  • Script converter
  • LetiMix
KUIMLTutorialDisplaying and controlling parameters
March 31, 2021

Displaying and Controlling Parameters

This is probably the most important feature a plugin GUI should offer, and fortunately, Plug'n Script and KUIML provide plenty of tools for displaying and controlling values.

Let's take a quick look at some basic controls available:

Here's the code for that:

  1. <PARAM id="drive" min="0" max="100" default="50" unit="%" value_format=".0" />
  2. <ROW spacing="20">
  3. <PARAM_TEXT_CONTROL param_id="drive" />
  4. <CUS_DARK_SMALL_BLUE_KNOB param_id="drive" />
  5. <PNS_VINTAGE_SWITCH param_id="drive" />
  6. <CUS_FADER param_id="drive" />
  7. <PNS_ANALOG_VU_SQUARE param_id="drive" />
  8. </ROW>

There are many PARAM-related widgets in KUIML, but these are the most basic ones:

  1. PARAM_TEXT and PARAM_TEXT_CONTROL. The first one only shows param value, the second one also allows changing that value with mouse and keyboard.
  2. Knobs can be made using IMAGE_PARAM_KNOB (the CUS_DARK_SMALL_BLUE_KNOB in the example above is exactly that element with some predefined values).
  3. For buttons and switches, use IMAGE_PARAM_BUTTON (PNS_VINTAGE_SWITCH is an example). For momentary switches (which are "on" only while pressed), use IMAGE_PARAM_TOGGLE_SWITCH.
  4. IMAGE_PARAM_SLIDER is used for making sliders and faders (just like CUS_FADER).
  5. You can create meters like PNS_ANALOG_VU_SQUARE using IMAGE_PARAM_METER or IMAGE_PARAM_LINEAR_METER.

Beyond these, you can have 2D and 3D parameter controls using elements like XY_PARAM_PAD, XY_ZOOM_SELECT_PAD, XYZ_PARAM_SCRATCH_PAD, and XYZ_PARAM_CLICK_PAD. You can add draggable "joysticks" with XYZ_IMAGE_PARAM_JOYSTICK, dropdown menus with INVISIBLE_PARAM_MENU_BUTTON, text edit boxes with PARAM_TEXT_EDIT_BOX, tooltips with PARAM_TOOLTIP and much more.

The best part is that you can create your own widgets by combining different elements and wrapping them in a TEMPLATE.

For example, these faders from LM Skin are made using the CANVAS element (which allows drawing) with an INVISIBLE_PARAM_SLIDER on top for mouse handling.

Params 101


Comments

Please, authorize to view and post comments.

2020 - 2026 © Site by LetiMix · Donate  |  Plug'n Script and KUIML by Blue Cat Audio