code wiki / _hdl_build / nx_voice_v2_gate.nx

nx_voice_v2_gate.nx

buildroot/runtime/_hdl_build/nx_voice_v2_gate.nx

6345 B117 linesdepth 5pulls 9 transitivereach 0 importersview sourcekind gate/prooftopic voice
docsdependenciesstructsconstsfunctions

about

nx_voice_v2_gate.nx -- proves the NishiVoice v2 q/bit path end-to-end: real LPC residual + entropy coding + inverse synthesis (what nx_voice_codec.nx says is "the v2 path"). Chain: autocorr -> levinson (LPC coeffs a[1..p] Q30) -> analysis filter e[n]=s[n]+Sum a[k]s[n-k] -> quantise -> nx_resid_entropy range-code -> decode -> nx_lpc_synth s[n]=e[n]-Sum a[k]s[n-k]. All on the x86_64 LPC lineage (one syscalls module). MEASURES the entropy compression of the residual + the reconstruction fidelity. The entropy lever itself was already proven (nx_resid_entropy_gate -46%).

dependencies 6 imports · 0 importers

nx_syscalls_x86_64.nx nx_lpc_autocorr.nx nx_lpc_levinson.nx nx_lpc_synth.nx nx_resid_entropy.nx nx_gate_verdict.nx nx_voice_v2_gate.nx

imports: nx_syscalls_x86_64.nxnx_lpc_autocorr.nxnx_lpc_levinson.nxnx_lpc_synth.nxnx_resid_entropy.nxnx_gate_verdict.nx

imported by: nobody (leaf or entry point)

structs

none

consts

none

functions

13func g_puts(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
14func g_pn(v: i64) -> i64
24func g_check(name: *u8, cond: i64) -> i64
28func g_abs(v: i64) -> i64 { if v < 0 { return 0 - v } return v }
29func st16(buf: *u8, idx: i64, v: i64) -> i64 { var x: i64 = v; if x < 0 { x = x + 65536 } buf[idx*2] = x & 0xff; buf[idx*2+1] = (x >> 8) & 0xff; return 0 }
30func ld16(buf: *u8, idx: i64) -> i64 { var v: i64 = buf[idx*2] | (buf[idx*2+1] << 8); if v >= 32768 { v = v - 65536 } return v }
31func ld64(buf: *u8, idx: i64) -> i64
37func main() -> i64