meter~
Visual peak level indicator
Description
Use the meter~ object to monitor any signal in the range -1 and 1 (other signals should be scaled first).
Discussion
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. mc.meter~ can be used to monitor multichannel signals, and automatically adapts to the number of channels received.
Arguments
None.
Attributes
bgcolor[4 floats]
Sets the RGBA values for the background color of the meter~ object.
dbperled[int]: 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.
interval[atom_long]: 50
monotone[int]: 0
7.0.0
Toggles single-color display for level indicators
nhotleds[int]: 3
Sets the total number "hot" warning LEDs displayed on the meter~ object (corresponding to the color set by the message).
ntepidleds[int]: 3
Sets the total number "tepid" mid-range LEDs displayed on the meter~ object (corresponding to the color set by the message).
numleds[int]: 12
The word meter~ object. The range is 10-20 LEDs.
, followed by a number between 10 and 20, sets the total number of LEDs displayed on the
nwarmleds[int]: 3
Sets the total number "warm" lower-mid-range LEDs displayed on the meter~ object (corresponding to the color set by the message).
offcolor[4 floats]
7.0.0
Sets the color for the "off" level indicators. The
attribute is mapped to the style color.
oncolor[4 floats]
7.0.0
Sets the color for the "on" level indicators. The
attribute is mapped to the style color.
orientation[int]: 0
8.0.0
Sets the orientation of the meter~ object. When set to 0 (automatic), the orientation will automatically change based on the dimensions of the object.
Possible values:
0 = 'Automatic'
1 = 'Horizontal'
2 = 'Vertical'
style[symbol]:
7.0.0
Sets the style to be applied to the object. Styles can be set using the Format Palette.
Common Box Attributes
annotation[symbol]
Sets the text that will be displayed in the Clue window when the user moves the mouse over the object.
background[int]: 0
Adds or removes the object from the patcher's background layer.
adds the object to the background layer, removes it. Objects in the background layer are shown behind all objects in the default foreground layer.
color[4 floats]
Sets the color for the object box outline.
fontface[int]
Sets the type style used by the object. The options are:
plain
bold
italic
bold italic
Possible values:
0 = 'regular'
1 = 'bold'
2 = 'italic'
3 = 'bold italic'
fontname[symbol]
Sets the object's font.
fontsize[float]
Sets the object's font size (in points).
Possible values:
'8'
'9'
'10'
'11'
'12'
'13'
'14'
'16'
'18'
'20'
'24'
'30'
'36'
'48'
'64'
'72'
hint[symbol]
Sets the text that will be displayed in as a pop-up hint when the user moves the mouse over the object in a locked patcher.
ignoreclick[int]: 0
Toggles whether an object ignores mouse clicks in a locked patcher.
jspainterfile[symbol]
JS Painter File
patching_rect[4 floats]: 0. 0. 100. 0.
Sets the position and size of the object in the patcher window.
position[2 floats]
write-only
Sets the object's x and y position in both patching and presentation modes (if the object belongs to its patcher's presentation), leaving its size unchanged.
presentation[int]: 0
Sets whether an object belongs to the patcher's presentation.
presentation_rect[4 floats]: 0. 0. 0. 0.
Sets the x and y position and width and height of the object in the patcher's presentation, leaving its patching position unchanged.
rect[4 floats]
write-only
Sets the x and y position and width and height of the object in both patching and presentation modes (if the object belongs to its patcher's presentation).
size[2 floats]
write-only
Sets the object's width and height in both patching and presentation modes (if the object belongs to its patcher's presentation), leaving its position unchanged.
textcolor[4 floats]
Sets the color for the object's text in RGBA format.
textjustification[int]
Sets the justification for the object's text.
Possible values:
0 = 'left'
1 = 'center'
2 = 'right'
varname[symbol]
Sets the patcher's scripting name, which can be used to address the object by name in pattr, scripting messages to thispatcher, and the js object.
Messages
int
Converted to
. A 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).- input-peak-value
[int]
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).
- input-peak-value
[float]
(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. When a multichannel signal is received, the peak amplitude of each channel will be displayed.
Output
float
The peak (absolute) value received in the previous update interval is sent out the outlet when audio processing is on. For mc.meter~ only the peak value for the first channel is output.
See Also
Name | Description |
---|---|
average~ | Multi-mode signal average |
gridmeter~ | Display signal levels as brightness |
scope~ | Visualize an audio signal |