Skip to content

NOTES

Support — Debug Tools for Headless Systems

ASCII waveform/spectrum visualization + statistics. Quickly verify DSP output during embedded development.


Algorithm

ASCII Scope

  1. Find min/max of \(x[n]\)
  2. Map amplitude to ASCII canvas height
  3. One column per sample, * at the quantized amplitude row
  4. Zero line marked with +

Auto-decimates when signal exceeds canvas width.

Statistics (Welford single-pass)

Maintains running mean, variance, min/max with positions in one numerically stable pass.


API Reference

// Signal waveform (oscilloscope-like)
void tiny_view_signal_f32(const float *signal, int len,
                          int width, int height);

// Spectrum (dB scale, auto peak annotation)
void tiny_view_spectrum_f32(const float *spectrum, int len,
                            float sample_rate, int width, int height);

// Formatted array print
void tiny_view_array_f32(const float *data, int len);

// Statistics (mean, variance, min/max positions)
void tiny_view_statistics_f32(const float *data, int len);

Notes

Invaluable for debugging

ASCII waveform + statistics = poor man's oscilloscope. Use it before deploying to headless edge devices.

Keep canvas modest

Most terminals are 80×24. A canvas that's too large will wrap and become unreadable.

Verify on PC, deploy on device

Confirm filter output shape with tiny_view_signal_f32 on PC, then deploy with confidence.