code wiki / _hdl_build / nx_skill_coach_audio.nx

nx_skill_coach_audio.nx

buildroot/runtime/_hdl_build/nx_skill_coach_audio.nx

4310 B69 linesdepth 3pulls 4 transitivereach 0 importersview sourcekind tooltopic skill
docsdependenciesstructsconstsfunctions

about

nx_skill_coach_audio.nx -- SKILL-COACH (singing/instrument) audio vertical, rung R1: the COACH LOOP that turns a detected pitch into ACTIONABLE FEEDBACK (the operator's ask: "feedback on what exercises/training to get skills up"). Verify-don't-rebuild: the hard PERCEPTION already exists + is gated (nx_pitch YIN-F0 -> PCM, nx_note 12-TET cents); this composes nx_note into GRADE -> DIAGNOSE -> recommend a DRILL. The shared coach ENGINE + rubric-store + gamification + /coach publish are the team-build spec (knowledge/specs, routed to the team). NO floats. Self-gate: 5 known pitches vs target A4 -> correct verdict + drill. license_tier: ORIGINAL

dependencies 3 imports · 0 importers

nx_note.nx nx_itoa_lib.nx nx_syscalls.nx nx_skill_coach_audio.nx

imports: nx_note.nxnx_itoa_lib.nxnx_syscalls.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main sc_puts sys_write sys_mmap nx_note_table sc_attempt coach_grade sys_mmap ↻ nx_note_of sc_puts ↻ sc_putn nxi_out nxi_fd sys_mmap ↻ ccz_cat_num sys_write ↻ sys_munmap coach_drill sc_putn ↻

structs

none

consts

11const TOL_CENTS: i64 = 20 // |cents| <= TOL = "in tune" (data-driven threshold; R2 -> rubric store, rule #11)

functions

13func sc_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 }
called by 2: sc_attemptmain calls 1: sys_write
18func sc_putn(v: i64) -> i64 { nxi_out(v); return 0 }
called by 2: sc_attemptmain calls 1: nxi_out
21func coach_grade(sung_f0: i64, target_midi: i64, tbl: *i64, cout: *i64, mout: *i64) -> i64
called by 1: sc_attempt calls 2: sys_mmapnx_note_of
38func coach_drill(verdict: i64) -> *u8
called by 1: sc_attempt
46func sc_attempt(f0: i64, target_midi: i64, tbl: *i64, cout: *i64, mout: *i64) -> i64
52func main() -> i64