Commit Graph

36 Commits

Author SHA1 Message Date
tyler 5c3c88dc22 feat: scale time zoom by duration, decouple the two axes
The minimum visible time window was a flat 2% of the file, but view.start
and view.end are normalized to the whole signal — so the achievable time
resolution scaled with file length. A 30-minute recording could never show
less than a 36-second span, while a 30-second one reached 0.6 s. Long
captures were effectively unreadable at the sample level no matter how far
you scrolled.

Derive the floor from the STFT hop instead (MinTimeViewWidth): segments sit
fftSize/HOP_RATIO samples apart, so the real limit is the point where only
a handful of segments span the viewport and further zoom would interpolate
rather than reveal. The floor is now a constant ~43 ms at 48 kHz/1024
regardless of duration — an 844x improvement on a 30-minute file, and it
tightens further with a smaller FFT. Guards cover the unloaded (sampleRate
0) and shorter-than-the-floor cases.

Zooming is also no longer forced to move both axes together. The bare wheel
keeps the existing coupled behaviour; Shift+wheel is time-only and
Ctrl+wheel frequency-only, so a long capture can be stretched along time
without collapsing the frequency range to match.

Time-axis labels now pick their precision from the span between adjacent
ticks (1 to 4 decimals, and m:ss.sss past a minute). At the spans this
change makes reachable the old fixed "%.1fs" printed the same value in
every slot, which read as a frozen axis.

Adds a `wheel X Y N [mod]` action to shot_input.sh for exercising zoom
headlessly, and known_bugs.md for behaviour that is unspecified rather
than broken.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V8ZWfr5XZyyDttvkhJUgHN
2026-08-12 00:19:36 -07:00
tyler 398be34aaf build: document system deps, add check-deps, auto-glob web modules
- README: rewrite Build section for the hand-written Makefile (make /
  make DEBUG=1 / run / test / bench). Add a "System dependencies" table
  with the X11+GL dev packages per distro (apt/dnf/pacman/zypper/apk),
  since a clone won't build without them and the error is otherwise
  cryptic. Fix stale ./bin/Debug paths to ./bin/Release.
- Makefile: add `make check-deps` — probes for the required X11/GL dev
  headers and prints the install command for the detected distro on
  failure (via /etc/os-release).
- build_web.sh: auto-discover app modules from src/*.c (drop the
  hardcoded APP_MODULES list that had to be hand-synced), matching the
  desktop Makefile. Excludes the desktop platform backends. Remove the
  stale rspektrum.make reference.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-06 21:19:23 -07:00
tyler 3b2e5517bf Update README.md 2026-06-06 03:08:38 +00:00
tyler 7916e8a24e docs+chore: add screenshot to README; drop committed export PNGs and junk
- README: embed resources/Screenshot.png under the intro
- remove accidentally-committed app export outputs (spectrogram_full.png,
  spectrogram_export.png) and gitignore them so they don't return
- remove unused resources/wabbit_alpha.png and stray .qwen/settings.json.orig

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-05 15:51:12 -07:00
tyler 5c3c452133 docs: rewrite README as a fresh project overview + usage guide
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-05 15:40:44 -07:00
tyler fb7bc5486e feat: true no-X headless --render (CPU spectrogram bitmap + overlay)
Rewrite --render to compute the spectrogram and write a PNG entirely on the
CPU, with no window, no GL context, and no X server. Previously it opened a
hidden GL window and grabbed LoadImageFromScreen(), which still required an X
server (Xvfb); the output was a UI screenshot rather than the spectrogram data.

The new path (RunHeadlessRender) loads the WAV, computes the STFT, colorizes
the bitmap at native STFT resolution, bakes the mLnL annotation overlay onto
it, and exports — all CPU-only. render.c gains a GL-free colorize
(BuildSpectrogramImageCPU), a CPU font loader (LoadFontCPU), and a CPU overlay
drawer (DrawAnnotationsToImage).

Annotations draw outline + label only: mLnL captures contain many overlapping
full-band boxes whose translucent fills alpha-stack to opaque and bury the
signal. The outline marks each region while the spectrogram reads through; a
dark backing strip keeps labels legible. Note: MeasureTextEx/ImageText* bail
when font.texture.id == 0, so the CPU font sets a sentinel non-zero id (the
draw path reads glyph images, never the texture).

Render options: --annotation-opacity (overlay strength), --annotation-kinds
(comma-separated kind filter), --width (resize; default native). Removed the
obsolete --pane/--height window options and the screenshot workaround.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-03 22:37:38 -07:00
tyler 95be6f6c22 docs: rewrite README to characterize rspektrum accurately
Replaces the stale Unity-port README (wrong controls, premake build,
missing features). Documents the mLink/mLnL focus, real keybindings,
make-based build, headless --render mode, and the Xvfb GUI-driving
primer. Consolidates the old SPECTROGRAM_README.md into README.md.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-29 23:50:29 -07:00
Jeffery Myers 4cf96e771f add info about software render target 2026-01-13 11:47:28 -08:00
Jeffery Myers c8e40f3845 Revise license section in README.md
Updated license information to reflect CC0 1.0.
2026-01-06 16:34:47 -08:00
Peter0x44 8853ece16a Update README.md 2026-01-06 23:18:43 +00:00
Jeffery Myers 31630dded8 add more clear description on how to get the template 2025-12-09 11:36:37 -08:00
Peter0x44 e5415bcb6e Add rename folder step to all platform sections
Fixes #30
2025-12-03 05:31:26 +00:00
Jeffery Myers 1861d659a5 tweaks to lib info 2025-11-20 15:47:24 -08:00
Youness SBAI cf453b5601 Add clarification on external library dependencies in README 2025-11-20 19:36:37 +01:00
Jeffery Myers 55b448e122 Update README.md 2025-07-17 10:53:07 -07:00
Jeffery Myers 284a5f8b42 update to premake5 beta 7
replace gmake2 with gmake
2025-07-14 11:14:09 -07:00
Jeffery Myers d218555489 Update README.md 2025-02-02 11:59:51 -08:00
Jeffery Myers 2edcc85178 Update README.md 2025-01-29 12:40:10 -08:00
Jeffery Myers f498cccb69 Update README.md 2025-01-29 12:39:53 -08:00
Jeffery Myers 589d8c5f8b Update README.md 2025-01-29 12:39:17 -08:00
Jeffery Myers 48f409b15c Update README.md 2025-01-29 09:11:04 -08:00
Jeffery Myers 6fa6fab5e9 note the obvious that you need a compiler for vscode. 2025-01-15 19:13:31 -08:00
Nathan Iszlaub 312433ae8b use code formatting for commands, files, and paths 2024-11-24 00:33:27 +08:00
Nathan Iszlaub ec8968b0f3 fix minor typos and adjust casing+punctuation for consistency 2024-11-24 00:32:28 +08:00
Jeffery Myers 94a0a75d69 typo 2024-11-18 15:48:51 -08:00
Zelwaris eb20ab2d56 Update README.md 2024-09-30 20:57:20 +02:00
Jeffery Myers f8fb323310 update readme to say it uses git main 2024-09-27 07:41:45 -07:00
Jeff Myers 3f9ed218fb Make clean on MinGW-W64 batch.
Add notes to readme for how to swap to C++ or use your own code.
2024-09-20 15:56:00 -07:00
Jeffery Myers e5b0c478bb update OSX docs, they don't use the same bin as linux. 2024-08-23 07:09:36 -07:00
Jeffery Myers 9049a646a1 Updates 2024-08-17 08:53:09 -07:00
Jeffery Myers 0523db4ad6 Update README.md 2024-08-16 08:24:54 -07:00
Jeffery Myers 134bb017ee Update README.md 2024-08-14 19:36:33 -07:00
Jeffery Myers d79c7ae9af Update README.md 2024-08-14 19:35:12 -07:00
Jeffery Myers 1c30e84c38 linux info, ignores 2024-08-14 19:33:30 -07:00
Jeff Myers 3f023baa2f inital code drop. 2024-08-14 17:09:43 -07:00
Jeffery Myers fe934db383 Initial commit 2024-08-14 17:08:10 -07:00