code wiki / _hdl_build / nx_skill_coach_chord.nx
nx_skill_coach_chord.nx
buildroot/runtime/_hdl_build/nx_skill_coach_chord.nx
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
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
structs
| none |
consts
| none |
functions
| 9 | func 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 } |
| 14 | func cc_putn(v: i64) -> i64 { nxi_out(v); return 0 } |
| 16 | func cc_pcname(pc: i64) -> *u8 called by 1: cc_print_mask |
| 31 | func cc_mask(notes: *i64, n: i64) -> i64 called by 1: cc_attempt |
| 38 | func cc_print_mask(mask: i64) -> i64 |
| 48 | func cc_grade(detected: i64, target: i64, mout: *i64, eout: *i64) -> i64 called by 1: cc_attempt |
| 58 | func cc_drill(verdict: i64, missing: i64, extra: i64) -> i64 |
| 70 | func cc_attempt(notes: *i64, n: i64, target: i64) -> i64 |
| 79 | func main() -> i64 |