code wiki / _hdl_build / nx_skill_coach_chord.nx

nx_skill_coach_chord.nx

buildroot/runtime/_hdl_build/nx_skill_coach_chord.nx

5129 B99 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind tooltopic skill
docsdependenciesstructsconstsfunctions

about

nx_skill_coach_chord.nx -- SKILL-COACH instrument vertical, rung R3 (guitar/bass/piano chords). Composes the gated nx_polypitch contract (it returns detected MIDI notes -> out_notes) the same way R1 composed nx_note: detected chord -> GRADE vs a target chord -> DIAGNOSE the missing/extra note -> recommend a DRILL. Compared by PITCH CLASS (mod 12) so voicing/octave don't matter. Rubric inline at R3; R2 moves it to a seg_store (rule#11). Self-gate: 4 known chord cases vs target C major. NO floats. license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_itoa_lib.nx nx_skill_coach_chord.nx

imports: nx_syscalls.nxnx_itoa_lib.nx

imported by: nobody (leaf or entry point)

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

main cc_puts sys_write sys_mmap cc_attempt cc_mask sys_mmap ↻ cc_grade cc_puts ↻ cc_print_mask cc_puts ↻ cc_pcname cc_drill cc_puts ↻ cc_print_mask ↻ cc_putn nxi_out nxi_fd sys_mmap ↻ ccz_cat_num sys_write ↻ sys_munmap

structs

none

consts

none

functions

9func cc_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 cc_putn(v: i64) -> i64 { nxi_out(v); return 0 }
called by 1: main calls 1: nxi_out
16func cc_pcname(pc: i64) -> *u8
called by 1: cc_print_mask
31func cc_mask(notes: *i64, n: i64) -> i64
called by 1: cc_attempt
38func cc_print_mask(mask: i64) -> i64
called by 2: cc_drillcc_attempt calls 2: cc_putscc_pcname
48func cc_grade(detected: i64, target: i64, mout: *i64, eout: *i64) -> i64
called by 1: cc_attempt
58func cc_drill(verdict: i64, missing: i64, extra: i64) -> i64
called by 1: cc_attempt calls 2: cc_putscc_print_mask
70func cc_attempt(notes: *i64, n: i64, target: i64) -> i64
79func main() -> i64