nx_song_grade_gate.nx
buildroot/runtime/nx_song_grade_gate.nx
about
nx_song_grade_gate.nx -- REFEREE for the learn-game grader (LG-2, nx_song_grade).
SONG = 4 target notes [A2=45, A3=57, E2=40, E3=52] at 1024-sample slots.
Three performances are synthesized (impulse-train tones in each slot) and graded:
GOOD : correct note in every slot -> score 1000, all HIT
BAD : a wrong note in every slot -> score low, all WRONG (neg-control)
PARTIAL : correct, SILENT, correct, wrong -> score 500, verdicts HIT/MISS/HIT/WRONG
The BAD case is the neg-control: a wrong performance MUST score low, or the
grader can't tell right from wrong.
Evidence -> stdout + knowledge/status/song_grade_gate.log. Exit 0 GREEN / 1 RED.
Sovereign x86_64 throughout. license_tier: ORIGINAL
dependencies 3 imports · 0 importers
imports: nx_syscalls_x86_64.nxnx_song_grade.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
| 17 | const SLOT: i64 = 1024 |
| 18 | const NSAMP: i64 = 4096 |
functions
| 20 | func gp(logfd: i64, s: *u8) -> i64 |
| 27 | func gn(logfd: i64, v: i64) -> i64 called by 1: report |
| 41 | func setnote(sc: *i64, i: i64, midi: i64, start: i64, dur: i64) -> i64 called by 1: main |
| 48 | func put_tone(player: *u8, start: i64, dur: i64, period: i64) -> i64 called by 1: main |
| 57 | func report(logfd: i64, label: *u8, score: i64, verdicts: *i64, n: i64) -> i64 |
| 67 | func main() -> i64 |