nx_chord_grade_gate.nx
buildroot/runtime/nx_chord_grade_gate.nx
about
nx_chord_grade_gate.nx -- REFEREE for LG-4 chord-aware grading (nx_chord_grade).
SONG (4 slots): A3 | A-major(A3,C#4,E4) | power-5th(A3,E4) | C-major(C4,E4,G4).
Three performances are synthesized (sum-of-sine chords per slot) and graded:
GOOD : every slot played correctly -> 1000, all HIT
BAD : disjoint wrong notes every slot -> 0, all WRONG (neg-control)
PARTIAL : A3 | only 2 of 3 | SILENT | C-maj -> 666, [HIT,PARTIAL,MISS,HIT]
Evidence -> stdout + knowledge/status/chord_grade_gate.log. Exit 0 GREEN / 1 RED.
Sovereign x86_64 throughout. license_tier: ORIGINAL
dependencies 4 imports · 0 importers
imports: nx_syscalls_x86_64.nxnx_chord_grade.nxnx_polypitch.nxnx_note.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
| 16 | const SLOT: i64 = 1536 |
| 17 | const NS: i64 = 6144 |
| 18 | const FS: i64 = 8000 |
| 19 | const AMP: i64 = 10000 |
| 20 | const TWO_PI: i64 = 411775 |
functions
| 22 | func gp(logfd: i64, s: *u8) -> i64 |
| 29 | func gn(logfd: i64, v: i64) -> i64 called by 1: report |
| 44 | func add_sine_region(acc: *i64, start: i64, dur: i64, f: i64, amp: i64) -> i64 |
| 58 | func add_note(acc: *i64, tbl: *i64, slotstart: i64, midi: i64) -> i64 |
| 62 | func normalize(acc: *i64, buf: *u8, total: i64) -> i64 called by 1: main |
| 79 | func zero(acc: *i64, total: i64) -> i64 called by 1: main |
| 84 | func setslot(song: *i64, s: i64, start: i64, nt: i64, m0: i64, m1: i64, m2: i64) -> i64 called by 1: main |
| 93 | func report(logfd: i64, label: *u8, score: i64, v: *i64) -> i64 |
| 103 | func main() -> i64 |