Number
Overview
The Number effect is a diagnostic matrix effect that displays a numeric value or time at the maximum possible text size on a matrix. It inherits from the Texter2d effect and is designed for real-time monitoring, debugging, and displaying time on LED matrices.
Features
Maximum Text Size: Automatically displays numbers or time at the largest size that fits on the matrix
Real-time Updates: Updates the displayed value every render frame (time modes update regardless of audio input)
Stable Display: Configurable digit width ensures the text size remains stable regardless of the actual value
Time Display: Can display current time in HH:MM or HH:MM:SS format
Easy Integration: Simple interface for setting diagnostic values from anywhere in the codebase
Audio Integration: By default displays audio metrics (BPM, BPM Confidence), but also supports time display
Configuration
number exposes the following configuration options. Settings are grouped as follows:
Normal Settings: Commonly used options for typical use.
Advanced Settings: Options for fine-tuning appearance or behavior.
Normal Settings
Key |
Type |
Default |
Description |
|---|---|---|---|
|
string |
BPM |
Source of the value to display (BPM, BPM Confidence, Time (HH:MM), Time (HH:MM:SS)). |
|
int |
3 |
Number of digits to reserve before decimal point (for stable text size, numeric modes only). |
|
int |
2 |
Number of digits to display after decimal point (for stable text size, numeric modes only). |
|
bool |
false |
Support negative values (include negative sign in sizing, numeric modes only). |
Advanced Settings
Key |
Type |
Default |
Description |
|---|---|---|---|
|
color |
#ffffff |
Text color. |
|
string |
Press Start 2 P |
Font name or path. |
|
string |
LANCZOS |
Image resize method for text rendering. |
|
float |
1.0 |
Background brightness level. |
|
string |
additive |
Background display mode. |
|
color |
#000000 |
Background color. |
Notes:
whole_digitsanddecimal_digitscontrol the template used for sizing in numeric modes, so the text size remains stable as the value changes. These settings do not apply to time display modes.If
negativeis enabled, space is reserved for a minus sign in the template sizing, and negative values will display with a ‘-’ prefix. This only applies to numeric modes.Time modes (HH:MM and HH:MM:SS) update every frame regardless of audio input, ensuring the clock is always accurate.
The effect is automatically centered (enforced internally).
display_valueis an instance attribute that can be set programmatically but is not a config option.