Skip to content

Fill a dropped M:/L:/K: header so a plan is sung instead of thrown away - #24

Open
timoncool wants to merge 5 commits into
ServeurpersoCom:masterfrom
timoncool:score-fill-header
Open

timoncool wants to merge 5 commits into
ServeurpersoCom:masterfrom
timoncool:score-fill-header

Conversation

@timoncool

Copy link
Copy Markdown

Builds on #21 (plan_retries) — this branch is plan-retries plus one commit, so the diff shows #21's commits until it merges; please take #21 first, then this rebases cleanly onto master.

A planned score whose only fault is a missing or malformed M:/L:/K: header is retried on new seeds and then discarded once the retries are spent — in our telemetry the top failure for finished-but-rejected songs. When the body is otherwise singable (a voice with bars, no stray colons in the note runs), yue2_score_fill_header now fills the header with the conventions the model is trained on — M:4/4, L:1/16, K:C, meter and unit length before the key — and the plan is kept. yue2_score_problem re-checks the filled score, so a plan wrong in any other way still fails exactly as before.

  • src/score-check.h: yue2_score_fill_header + the header-only check.
  • src/pipeline.h: fill then re-check before the semantic stage.
  • tests/test-score-check.cpp: a headerless-but-singable plan is filled; a plan with stray colons is still rejected.

…ith bars, colons in the note runs) stops the request before the semantic stage, in seconds, with the reason
…efault 2, up to 8) draws song i's attempt k with lm_seed + i + k * lm_batch_size before the request stops
…thrown away

A plan whose only fault is a missing or malformed M:/L:/K: header was
retried on new seeds and then thrown away once the retries were spent -
the top telemetry failure for generated songs. When the body is otherwise
singable (a voice with bars, no stray colons), the header is now filled in
with the conventions the model is trained on (M:4/4, L:1/16, K:C), the
meter and length ahead of the key, and the plan is kept. yue2_score_problem
re-checks the result, so a plan wrong in other ways still fails as before.
@timoncool

Copy link
Copy Markdown
Author

Added 2d7c874: when the filled-in header still leaves the score unsingable, the error now names what is left wrong (e.g. no voice with bars) instead of the missing header.

…te before the first voice

A plan that lost its K: often carries junk header lines too ("Qtre Ins2=", ": VocalIns ...|"), and the junk then counted as a note run with stray colons, so the filled-in plan still failed. Before the first V: line only fields, comments and blank lines are kept when the header is filled in, and K: goes in right before the first voice. A well-formed header is still left untouched.
cynodesmus added a commit to cynodesmus/yue2.cpp that referenced this pull request Nov 19, 2026
[PR ServeurpersoCom#24] Fill a dropped M:/L:/K: header so a plan is sung instead of thrown away
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant