Struct UiMetrics
#[repr(C)]pub struct UiMetrics {Show 29 fields
pub input_rms_db: f32,
pub output_rms_db: f32,
pub input_peak_db: f32,
pub output_peak_db: f32,
pub gain_reduction_db: f32,
pub tube_plate_current: [f32; 12],
pub tube_dissipation: [f32; 12],
pub tube_count: u8,
pub transformer_flux: [f32; 4],
pub transformer_count: u8,
pub signal_min: f32,
pub signal_max: f32,
pub lfo_phase: f32,
pub supply_voltage: f32,
pub supply_sag: f32,
pub stage_levels: [f32; 16],
pub stage_count: u8,
pub nr_solve_count: u32,
pub nr_total_iterations: u32,
pub nr_max_iterations: u16,
pub nr_nonconverged_count: u16,
pub nr_max_residual: f32,
pub stage_nr_iterations: [u16; 16],
pub stage_nr_residual: [f32; 16],
pub stage_nr_nonconverged: [u8; 16],
pub nonfinite_count: u32,
pub blowup_count: u32,
pub max_abs_sample: f32,
pub block_counter: u32,
}Expand description
Metrics exported from the audio thread for UI visualization.
This struct is written by the audio thread every block_size samples
(typically 128 or 256) and read by the UI thread at ~60fps.
Fields§
§input_rms_db: f32Input RMS level (dB, typically -60 to +6).
output_rms_db: f32Output RMS level (dB).
input_peak_db: f32Input peak level (dB) — instant attack, slow decay in accumulator.
output_peak_db: f32Output peak level (dB).
gain_reduction_db: f32Gain reduction in dB (0 = no reduction, negative = compression).
tube_plate_current: [f32; 12]Per-tube plate current (mA). Higher current = brighter glow.
tube_dissipation: [f32; 12]Per-tube plate dissipation (watts = Vpk * Ip).
tube_count: u8Number of active tubes in this circuit.
transformer_flux: [f32; 4]Core flux as fraction of saturation (0.0 = idle, 1.0 = saturating).
transformer_count: u8Number of active transformers in this circuit.
signal_min: f32Minimum sample value in this block (for envelope display).
signal_max: f32Maximum sample value in this block (for envelope display).
lfo_phase: f32LFO phase (0.0-1.0) for tremolo/vibrato pulse indicator.
supply_voltage: f32Current B+ voltage. Drops under load (tube sag).
supply_sag: f32Supply sag as fraction (0.0 = full voltage, 1.0 = max sag).
stage_levels: [f32; 16]RMS level at each circuit stage (normalized 0-1 for shader).
stage_count: u8Number of active stages.
nr_solve_count: u32Total nonlinear/coupled solve calls observed in this metrics block.
nr_total_iterations: u32Total Newton/fixed-point iterations across solve calls in this block.
nr_max_iterations: u16Maximum iterations used by any solve in this block.
nr_nonconverged_count: u16Number of solves that did not converge in this block.
nr_max_residual: f32Maximum final residual observed in this block.
stage_nr_iterations: [u16; 16]Per-stage maximum iterations observed in this block.
stage_nr_residual: [f32; 16]Per-stage maximum final residual observed in this block.
stage_nr_nonconverged: [u8; 16]Per-stage non-convergence counts, saturated at u8::MAX.
nonfinite_count: u32Non-finite inputs, intermediate values, or outputs observed this block.
blowup_count: u32Samples whose magnitude exceeded a conservative blowup threshold.
max_abs_sample: f32Largest absolute signal magnitude observed this block.
block_counter: u32Block counter (monotonic, wraps at u32::MAX).