fix: support '.' and 'NC' in --prefix argument
_encode_prefix now handles hold ('.') and no-chord ('NC') tokens
alongside chord symbols, and returns (ids, n_positions) so that
pos_in_bar is tracked correctly regardless of token type.
Fixes ChordParseError when dots were passed in --prefix.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+2
-1
@@ -79,7 +79,8 @@ def main() -> None:
|
||||
help="Optional output MIDI file path.")
|
||||
ap.add_argument("--prefix", default=None,
|
||||
help='Space-separated chord symbols in the requested key, '
|
||||
'e.g. "Cmaj7 Am7". Used as generation context.')
|
||||
'e.g. "Cmaj7 . Am7 .". Use "." for held positions '
|
||||
'and "NC" for no-chord positions.')
|
||||
ap.add_argument("--no-tonic-anchor", action="store_true", dest="no_tonic_anchor",
|
||||
help="Do not prepend the tonic chord when --prefix is not given.")
|
||||
ap.add_argument("--temperature", type=float, default=1.0,
|
||||
|
||||
Reference in New Issue
Block a user