uvi-script
Musical event scripting with Lua
Loading...
Searching...
No Matches
AudioMeter Class Reference

AudioMeter widget. More...

Inheritance diagram for AudioMeter:
Widget

Public Member Functions

 AudioMeter (string name, Element element, bool isVertical, int busId, bool useOutput)
 creates an AudioMeter widget on the user interface.
 
void setStripImage (string imagePath, int numImages)
 

Public Attributes

string backgroundColour
 background colour.
 
string foregroundColour
 foregroun colour.
 
string textColour
 text colour.
 
string overColour
 overflow (> 0dB) colour.
 
string ⠀0dBColour
 use ["0dBColour"] notation as the script does not like
 
string ⠀3dBColour
 use ["3dBColour"] notation as the script does not like
 
string ⠀6dBColour
 use ["6dBColour"] notation as the script does not like
 
string ⠀10dBColour
 use ["10dBColour"] notation as the script does not
 
bool displayScale
 should we display the dB scale
 
bool displayAsMono
 should we display only one meter (sum) for multichannel bus
 
- Public Attributes inherited from Widget
string name
 widget name
 
string displayName
 widget display name
 
string tooltip
 widget tooltip, default is name
 
int x
 x position in pixels
 
int y
 y position in pixels
 
int width
 widget width in pixels
 
int height
 widget height in pixels
 
table size
 widget size {width, height}
 
table position
 widget position {x,y}
 
table bounds
 widget bounding rect {x,y,width,height}
 
number alpha
 transparency value between 0.0 and 1.0
 
bool enabled
 boolean flag to enable / disable the widget
 
bool visible
 boolean flag to toggle widget visibility
 
bool interceptsMouseClicks
 boolean flag to toggle mouse handling on widget
 
bool showLabel
 show widgets label if any
 
bool persistent
 flag to tell if the widget values should be serialized when saving.
 
function changed
 callback function used by child widgets to be notified of changes
 

Detailed Description

AudioMeter widget.

Creates an AudioMeter widget on the user interface.

meter = AudioMeter("out", Program, true, 0, true)
meter.bounds = {250, 0, 40, 100}
-- meter.0dBColour is not a valid Lua identifier, use bracket notation:
meter["0dBColour"] = "red"
meter["10dBColour"] = "blue"
AudioMeter(string name, Element element, bool isVertical, int busId, bool useOutput)
creates an AudioMeter widget on the user interface.
A Patch that represents a monotimbral instrument.
Definition Engine.cpp:238
table bounds
widget bounding rect {x,y,width,height}
Definition ui.cpp:766

Constructor & Destructor Documentation

◆ AudioMeter()

AudioMeter::AudioMeter ( string name,
Element element,
bool isVertical,
int busId,
bool useOutput )

creates an AudioMeter widget on the user interface.

Parameters
namethe name to give to the widget –
elementthe element bus to listen to (ex Program, Program.layers[1]) –
isVerticalvertical or horizontal audio meter –
busId0 by default –
useOutputuse either input or output of the bus

Member Function Documentation

◆ setStripImage()

void AudioMeter::setStripImage ( string imagePath,
int numImages )
Parameters
imagePathpath to audio meter strip image. Supports Retina @2x variants.
numImagesnumber of images in strip

Member Data Documentation

◆ ⠀0dBColour

string AudioMeter::⠀0dBColour

use ["0dBColour"] notation as the script does not like

properties that start with a number. [-3, -10] dB colour. It can be either a named colour like "blue" or "red" or an hexadecimal string in RGB ("#FF00CC") or ARGB ("#3C00FECD") format

◆ ⠀10dBColour

string AudioMeter::⠀10dBColour

use ["10dBColour"] notation as the script does not

like properties that start with a number. [-inf, -10] dB colour. It can be either a named colour like "blue" or "red" or an hexadecimal string in RGB ("#FF00CC") or ARGB ("#3C00FECD") format

◆ ⠀3dBColour

string AudioMeter::⠀3dBColour

use ["3dBColour"] notation as the script does not like

properties that start with a number. [-6, -3] dB colour. It can be either a named colour like "blue" or "red" or an hexadecimal string in RGB ("#FF00CC") or ARGB ("#3C00FECD") format

◆ ⠀6dBColour

string AudioMeter::⠀6dBColour

use ["6dBColour"] notation as the script does not like

properties that start with a number . [-10, -6] dB colour. It can be either a named colour like "blue" or "red" or an hexadecimal string in RGB ("#FF00CC") or ARGB ("#3C00FECD") format

◆ backgroundColour

string AudioMeter::backgroundColour

background colour.

It can be either a named colour like "blue" or "red" or an hexadecimal string in RGB ("#FF00CC") or ARGB ("#3C00FECD") format

◆ foregroundColour

string AudioMeter::foregroundColour

foregroun colour.

It can be either a named colour like "blue" or "red" or an hexadecimal string in RGB ("#FF00CC") or ARGB ("#3C00FECD") format

◆ overColour

string AudioMeter::overColour

overflow (> 0dB) colour.

It can be either a named colour like "blue" or "red" or an hexadecimal string in RGB ("#FF00CC") or ARGB ("#3C00FECD") format

◆ textColour

string AudioMeter::textColour

text colour.

It can be either a named colour like "blue" or "red" or an hexadecimal string in RGB ("#FF00CC") or ARGB ("#3C00FECD") format