nx_actor_role_audio_grader.nx
buildroot/runtime/nx_actor_role_audio_grader.nx
about
nx_actor_role_audio_grader.nx -- audio-scene-grading actor role.
Per CARDINAL [[feedback-parallel-companion-multimodal-dnd-real-time]]:
the parallel companion runs DIFFERENT modalities concurrently --
LLM token gen + audio grading + image grading all interleaved. This
adapter wraps [[nx_audio_scene_quality]] (other-agent primitive) as
a cooperative actor so the substrate can drive heterogeneous work,
not just LLM clones.
Cooperative phases:
Phase 0 (INIT): no-op (reserved for future warmup)
Phase 1 (GRADE): calls nx_audio_scene_grade with caller bins/rms/n_sources
Phase 2 (EMIT): pushes AUDIO_FRAME message containing the verdict
overall_score (Q14) as the payload handle
Phase 3 (DONE): terminal
Composes [[project-conductor-arc-phases-c-d-integrate-with-nishi-ai-
2026-05-19]] -- audio grading runs through the same actor + message +
multiplexer substrate as LLM inference.
dependencies 6 imports · 4 importers
imports: nx_syscalls.nxnx_tier.nxnx_layer_verdict.nxnx_audio_scene_quality.nxnx_actor.nxnx_message.nx
imported by: nx_actor_role_audio_grader_test.nxnx_quad_companion_compose_test.nxnx_quad_real_emit_test.nxnx_triple_companion_compose_test.nx
structs
| 49 | struct NxAudioGraderCtx |
consts
| 30 | const NX_AG_PHASE_INIT: nx_int = 0 |
| 31 | const NX_AG_PHASE_GRADE: nx_int = 1 |
| 32 | const NX_AG_PHASE_EMIT: nx_int = 2 |
| 33 | const NX_AG_PHASE_DONE: nx_int = 3 |
| 34 | const NX_AG_PHASE_N: nx_int = 4 |
| 38 | const NX_AG_V_STEPPED: nx_int = 0 |
| 39 | const NX_AG_V_COMPLETED: nx_int = 1 |
| 40 | const NX_AG_V_FAILED_GRADE: nx_int = 2 |
| 41 | const NX_AG_V_INVALID: nx_int = 3 |
| 42 | const NX_AG_V_NULL: nx_int = 4 |
| 43 | const NX_AG_V_N: nx_int = 5 |
| 61 | const NX_AG_CTX_BYTES: nx_int = 72 // 9 fields * 8 |
functions
| 65 | func nx_ag_phase_is_valid(p: nx_int) -> nx_int called by 1: main |
| 71 | func nx_ag_v_is_valid(v: nx_int) -> nx_int called by 1: main |
| 79 | func nx_ag_actor_new(spectral_bins: *i64, |
| 105 | func _ag_step_grade(ctx: *NxAudioGraderCtx) -> nx_int |
| 123 | func _ag_step_emit(ctx: *NxAudioGraderCtx, |
| 135 | func nx_ag_actor_step(ctx: *NxAudioGraderCtx, called by 4: mainmainmainmain calls 5: _ag_step_grade_ag_step_emitnx_ac_stepnx_ac_completenx_ac_fail |
| 162 | func nx_ag_actor_phase(ctx: *NxAudioGraderCtx) -> nx_int called by 1: main |
| 167 | func nx_ag_actor_score_q14(ctx: *NxAudioGraderCtx) -> nx_int |
| 172 | func nx_ag_actor_is_done(ctx: *NxAudioGraderCtx) -> nx_int called by 1: main |
| 178 | func nx_ag_actor_axis_q14(ctx: *NxAudioGraderCtx, axis: nx_int) -> nx_int called by 1: main |