nx_sound.nx
buildroot/runtime/nx_sound.nx
about
nx_sound.nx -- audio primitives (windowing + spectrogram).
Building on V7 FFT. Ships the foundation for short-time spectral
analysis -- the math that powers speech, music, and any temporal
signal-frequency analysis.
What this unlocks:
+ spectrogram (time x frequency intensity map)
+ voice activity detection (energy in voice band)
+ pitch detection (harmonic structure)
+ beat detection (periodic energy spikes)
+ room-tone characterization
+ noise vs signal discrimination
All Q14 windows. Cosine table reused at 5-degree resolution; window
precision +-2% (sufficient for most analysis tasks).
genealogy_id: harris_1978_windowing + allen_rabiner_1977_stft
lineage_id: windowed_short_time_fft
dependencies 2 imports · 1 importers
imports: syscalls.nxnx_fft.nx
imported by: nx_sound_test.nx
structs
| none |
consts
| 30 | const NX_SOUND_Q: i64 = 16384 // Q14 |
functions
| 34 | func nx_sound_cos_q10(deg_x5: i64) -> i64 |
| 57 | func nx_sound_hann_window(N: i64, win: *i64) -> i64 |
| 76 | func nx_sound_hamming_window(N: i64, win: *i64) -> i64 |
| 95 | func nx_sound_apply_window(signal: *i64, win: *i64, N: i64) -> i64 |
| 108 | func nx_sound_frame_energy(signal: *i64, N: i64) -> i64 called by 1: main |
| 126 | func nx_sound_stft(signal: *i64, sig_len: i64, N: i64, hop: i64, called by 1: main calls 4: nx_sound_hann_windownx_sound_apply_windownx_fft_forwardnx_fft_power_spectrum |