UI Volume Fader
Audio fader in decibels.
Type: UIVolumeFaderNode · Category: UI & Interface · Also found as: uivolumefader
Properties
Section titled “Properties”| Property | Type | Default | Description |
|---|---|---|---|
size |
vec2 | (96, 320) |
Width and height (px). Range 4 to 1280. |
label |
string | "Master" |
Caption shown next to the control. |
valueDb |
number | 0 |
Level (dB). Range -60 to 6. |
minDb |
number | -60 |
Bottom of the fader (dB). Range -100 to 0. |
maxDb |
number | 6 |
Top of the fader (dB). Range 0 to 24. |
defaultDb |
number | 0 |
Level restored by reset (dB). Range -60 to 6. |
Plus the common properties every node has.
Lua methods
Section titled “Lua methods”Call them on the node (self.node in its script, or self.node:get_node("path")). Every node also has the Node methods.
UIVolumeFaderNode:connect(event, handler)
Section titled “UIVolumeFaderNode:connect(event, handler)”Connects a handler to one of this node’s events: value_changed (The value changed); the tree events; custom ones.
self.node:connect("value_changed", function(value, source) Log.info("value_changed") end)eventUIVolumeFaderNodeEvent|stringhandlerfun(value:any, source: UIVolumeFaderNode)
Returns integer id Connection id for disconnect
UIVolumeFaderNode:get_property(path)
Section titled “UIVolumeFaderNode:get_property(path)”Reads an Inspector property by its path (vectors and colours as tables); “script.
local value = self.node:get_property("size")pathUIVolumeFaderNodeProperty|string
Returns any
UIVolumeFaderNode:set_property(path, value, y)
Section titled “UIVolumeFaderNode:set_property(path, value, y)”Sets an Inspector property by its path: vectors as {x, y} or x, y; colours as {r, g, b[, a]} 0..1 or “#rrggbb[aa]”; enums by name; “script.
self.node:set_property("size", 100, 50)pathUIVolumeFaderNodeProperty|stringvalueanyy?number
In a scene file
Section titled “In a scene file”{ "type": "UIVolumeFaderNode", "name": "UIVolumeFader", "position": [ 0, 0 ], "properties": { "size": [ 96, 320 ], "label": "Master", "valueDb": 0 }}