rolandnsharp 9d65aa1f94 Remove C helper, use pure Nim dynlib imports; better defaults
- Replaced avhelper.c with direct {.dynlib.} pragma imports
- Grid off by default
- Higher default gain and time zoom

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-05 20:08:12 +10:00
2026-04-05 19:56:14 +10:00
2026-04-05 12:47:30 +10:00
2026-04-05 13:43:15 +10:00
2026-04-05 14:10:18 +10:00
2026-04-05 13:43:15 +10:00
2026-04-05 19:41:39 +10:00

terminal-oscilloscope

A terminal-based oscilloscope with CRT phosphor physics, written in Nim using illwill.

demo

Features

  • CRT boot/shutdown animations — phosphor ramp, beam sweep, vertical collapse, dot fade
  • Y-T and X-Y modes — time-domain waveform or Lissajous figures
  • Phosphor persistence — beam bloom, decay trails, intensity-based shading
  • Half-block rendering — 2x vertical resolution using Unicode ▀▄█ characters
  • Live audio capture — direct libav bindings via dlopen, zero dependencies

Install

Requires Nim 2.x.

git clone https://github.com/rolandnsharp/terminal-oscilloscope.git
cd terminal-oscilloscope
nimble build
./osc

Controls

Key Action
m Toggle Y-T / X-Y mode
+ / - Increase / decrease gain (amplitude)
] / [ Zoom in / out time axis
g Cycle grid: full → crosshair → off
space Freeze display
q Quit (with CRT shutdown effect)

Audio

Captures system audio by opening the PulseAudio/PipeWire monitor of your default output sink directly via libavformat and libavdevice. Libraries are loaded at runtime with dlopen — no dev packages, no subprocess, no extra dependencies.

Credits

CRT turn-on/off animations inspired by AetherTune.

Description
Terminal-based oscilloscope with CRT phosphor physics, written in Nim
Readme MIT 57 MiB
Languages
Nim 92.4%
Nix 7.6%