this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

update docs

alice 89ca7139 0d897b68

+12 -5
+2 -2
AGENTS.md
··· 51 51 - Memory ops (`peek/poke` 1/2/4/8‑bit, `memcpy`, `memset`) implemented; VRAM updates reflect on screen. 52 52 - CLI loads bundled default cart or a provided `.lua` path. 53 53 - Audio capture foundation: `cpal` input stream with mono downmix into a lock‑free ring buffer (8192 samples); CLI flags `--list-audio`, `--audio-device`, `--audio-vu`, `--audio-disable`; simple VU feedback prints peak dBFS once per second. 54 - - FFT foundation: 2k R2C (`realfft`) updates on the tick thread; maintains raw/smoothed/normalized buffers with peak tracking; `--debug-fft` prints first bins; Lua APIs pending. 54 + - FFT: 2k R2C (`realfft`) on tick thread; maintains raw/smoothed/normalized buffers with peak tracking; `--debug-fft` throttled print; Lua `fft/ffts/fftr/fftrs` wired with C-identical clamping/sum semantics; headless tests added; simple cart at `assets/fft_test.lua`. 55 55 56 56 **Near-Term Backlog** 57 57 - FFT implementation (cpal + realfft) per `docs/specs/audio_fft_vqt.md` (see Implementation TODOs section); add headless tests and Lua `fft/ffts/fftr/fftrs`. ··· 97 97 - Implemented audio capture with `cpal`: device selection/listing, mono downmix, ring buffer. 98 98 - Added CLI: `--list-audio`, `--audio-device`, `--audio-vu`, `--audio-disable`. 99 99 - Integrated a 1s VU peak readout for manual verification. 100 - - Implemented 2k FFT analysis (realfft) with normalized/smoothed buffers and debug print flag. 100 + - Implemented 2k FFT analysis (realfft) with normalized/smoothed buffers and debug print flag; wired Lua FFT APIs; added headless tests and an FFT test cart. 101 101 - Kept clippy/tests green; documented the FFT/VQT plan and linked TODOs. 102 102 103 103 **Docs Index**
+1 -1
docs/specs/audio_fft_vqt.md
··· 87 87 88 88 Status 89 89 - Phase 1 implemented: `cpal` capture + mono downmix + ring buffer + CLI flags + VU feedback. 90 - - Phase 2 implemented: FFT 2k using `realfft` (tick‑thread), raw/smoothed/normalized buffers and peak tracking; optional `--debug-fft`. Lua wiring and tests next. 90 + - Phase 2 implemented: FFT 2k using `realfft` (tick‑thread), raw/smoothed/normalized buffers and peak tracking; Lua `fft/ffts/fftr/fftrs` wired (C-identical semantics), headless tests added; optional `--debug-fft`. 91 91 92 92 Phase 1: Audio (cpal) 93 93 - Device listing: Add `--list-audio` to print capture devices and default.
+3 -2
docs/specs/implementation_status.md
··· 35 35 - Bins 0..1023 maintained (Nyquist dropped), magnitudes scaled by 2.0 to match C behavior. 36 36 - Buffers: raw, raw‑smoothed (0.6), normalized, normalized‑smoothed, with peak tracking (`fPeakMin=0.01`, `fPeakSmooth=0.995`). 37 37 - Optional `--debug-fft` prints the first 16 smoothed normalized bins periodically. 38 - - Lua APIs pending wiring (`fft/ffts/fftr/fftrs`). 38 + - Lua APIs implemented: `fft/ffts/fftr/fftrs` with C-identical clamping/sum semantics. 39 + - Tests: headless unit tests cover raw-peak behavior and Lua bridging; additional clamp/sum range tests added. 39 40 40 41 Behavioral Notes 41 42 - Triangles: top-left inclusion; CCW orientation enforced internally; half-open bounding box prevents shared-edge double draws. ··· 53 54 - Audio 54 55 - `sfx`, `music`; audio mixer/synth; capture ring for analysis. 55 56 - Analysis 56 - - `fft/ffts/fftr/fftrs`, `vqt/vqts/vqtr/vqtrs` and whitening variants; behavior per CLAUDE.md. 57 + - `vqt/vqts/vqtr/vqtrs` and whitening variants; behavior per CLAUDE.md. 57 58 - Sprite flags 58 59 - `fget`, `fset`. 59 60
+6
docs/testing/test_catalog.md
··· 44 44 - `memcpy_and_memset_affect_vram`: VRAM writes via memcpy/memset reach the screen. 45 45 - `peek_poke_bits_general_ram`: 1/4-bit addressing in general RAM behaves correctly. 46 46 47 + ## FFT Tests 48 + - `tic80_rust/tests/fft_tests.rs` 49 + - `fft_query_peak_at_bin`: Bin-aligned sine produces a distinct raw peak at the expected bin versus neighbors. 50 + - `lua_fft_returns_normalized_bin`: Verifies Lua `fft(k)` returns normalized magnitude by gating a pixel. 51 + - `fft_query_range_clamps_and_sums`: Clamping and inclusive sum behavior matches C (OOB handling and range sums). 52 + 47 53 Notes 48 54 - Tests prefer headless framebuffer inspection over image baselines. 49 55 - Hashing uses FNV‑1a over VRAM palette indices for portability and stability.