meter~

Visual peak level indicator

Description

meter~ is a simple signal level meter that can be attached to any signal whose level is between -1 and 1. Other signals should be scaled first. Each "LED" on the meter represents a change of 3dB from the previous step, by default. The red "over" LED comes on if the signal is greater than or equal to 1, and lasts for about a second. You can change the redrawing interval with the interval message. Resizing the meter gives its vertical or horizontal orientation, depending on whether its height is greater than its width or vice versa. meter~ outputs the peak signal value received every redrawing interval. Additional appearance settings, such as number of LEDs, and their colors can be set using the object's Inspector.

Arguments

None.

Messages

int input-peak-value [int]
Converted to float.
float input-peak-value [float]
A float value will set the meter to react as though a signal with equal amplitude peak-value has been passed to its input. Corresponding LEDs will light up and the peak-level value will be passed out the outlet (0.0 will show silence, 0.0 through 1.0 will light up to any but the overload LED, and anything above 1.0 will light all LEDs including overload).
(mouse) When the patcher window is unlocked, you can reorient a meter~ from horizontal to vertical by dragging its resize area and changing its shape.
signal The peak amplitude of the incoming signal is displayed by the LEDs of the on-screen level meter.

Attributes

Name Type g/s Description
bgcolor float Sets the RGBA values for the background color of the meter~ object.
bordercolor float Sets the RGBA values for the border color of the meter~ object.
coldcolor float Sets the RGBA values for the cold signal color of the meter~ object.
dbperled int
def.:3
Sets the amount of signal level in deciBels represented by each LED. By default each LED represents a 3dB change in volume from its neighboring LEDs.
hotcolor float Sets the RGBA values for the LED color for the upper "hot" range of the meter~ object.
interval int
def.:50
Sets the update-time interval, in milliseconds, of the meter~ display. The minimum update-interval is 10 milliseconds, the maximum is 2 seconds, and the default is 50 milliseconds. This message also sets the rate at which meter~ sends out the peak value received in that time interval.
nhotleds int
def.:3
Sets the total number "hot" warning LEDs displayed on the meter~ object (corresponding to the color set by the rgba2 message).
ntepidleds int
def.:3
Sets the total number "tepid" mid-range LEDs displayed on the meter~ object (corresponding to the color set by the rgba5 message).
numleds int
def.:12
The word numleds, followed by a number between 10 and 20, sets the total number of LEDs displayed on the meter~ object. The range is 10-20 LEDs.
nwarmleds int
def.:3
Sets the total number "warm" lower-mid-range LEDs displayed on the meter~ object (corresponding to the color set by the rgba4 message).
overloadcolor float Sets the RGBA values for the LED color for the "over" indicator of the meter~ object.
tepidcolor float Sets the RGBA values for the LED color for the lower-middle "tepid" range of the meter~ object.
warmcolor float Sets the RGBA values for the LED color for upper-middle "warm" range of the meter~ object.

Information for box attributes common to all objects

Output

float: The peak (absolute) value received in the previous update interval is sent out the outlet when audio processing is on.

Examples

meter~ displays and sends out the peak amplitude of a signal

See Also

Name Description
average~ Multi-mode signal average
scope~ Signal oscilloscope
MSP Tutorial 23: Viewing Signal Data MSP Tutorial 23: Viewing Signal Data