code wiki / _hdl_build / nx_skill_coach_audio.nx
nx_skill_coach_audio.nx
buildroot/runtime/_hdl_build/nx_skill_coach_audio.nx
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
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
structs
| none |
consts
| 11 | const TOL_CENTS: i64 = 20 // |cents| <= TOL = "in tune" (data-driven threshold; R2 -> rubric store, rule #11) |
functions
| 13 | func 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 } |
| 18 | func sc_putn(v: i64) -> i64 { nxi_out(v); return 0 } |
| 21 | func coach_grade(sung_f0: i64, target_midi: i64, tbl: *i64, cout: *i64, mout: *i64) -> i64 |
| 38 | func coach_drill(verdict: i64) -> *u8 called by 1: sc_attempt |
| 46 | func sc_attempt(f0: i64, target_midi: i64, tbl: *i64, cout: *i64, mout: *i64) -> i64 |
| 52 | func main() -> i64 |