Skip to content

Add the --auto CLI flag + docs - #39

Open
yumiaura wants to merge 1 commit into
feat/auto-enginefrom
feat/auto-cli
Open

Add the --auto CLI flag + docs#39
yumiaura wants to merge 1 commit into
feat/auto-enginefrom
feat/auto-cli

Conversation

@yumiaura

Copy link
Copy Markdown
Owner

Summary

Phase B of the --auto feature - the user-facing surface. Stacked on #38
(base branch feat/auto-engine); review/merge #38 first.

audio8bit -i song.mp3 --auto picks the melody source, note method, voices,
transpose and duty from the song's own features and prints what it chose. Any
flag you also set explicitly still wins (--auto -V lead forces lead, auto does
the rest).

  • cli.py: add --auto (store_true). The auto-eligible options (source,
    method, voices, transpose, duty, key-snap, arrange, echo,
    dither) now default to None so explicit-vs-auto is detectable, and pass
    straight through to convert(); a switch() helper maps the on/off flags to
    bool-or-None. Without --auto, convert() resolves each None to its module
    default, so behaviour is unchanged.
  • README.md + all 10 docs/README_*.md: two usage examples and an --auto
    options bullet, synced across translations, ASCII punctuation only.
  • CHANGELOG.md: Added entry under a new ## Unreleased, naming both branches.

Test plan

  • python main.py -i input.mp3 --auto prints the chosen settings
    (instrumental/nes, transpose +24, E-minor) with a passing quality report.
  • --auto -V lead (override) keeps lead, auto-picks the rest.
  • Plain run without --auto is unchanged (chords).
  • --help lists --auto; smoke-import of audio8bit.cli OK.
  • All 10 translations updated (+7 lines each), no em/en dashes introduced.
  • CI build + smoke-import green.

Note on scope

--auto fixes method=transcribe (never auto-selects the lighter pitch
path): monophonic material is already served by voices=lead, so transcribe is
the right general choice and --method pitch remains available to force it. The
plan allowed auto-selecting pitch for a clean monophonic vocal; I kept it simple
and honest instead of adding a flaky pre-transcription heuristic. Happy to
revisit if you want it.

Expose the auto-settings engine on the command line. `audio8bit -i song.mp3
--auto` picks the melody source, note method, voices, transpose and duty from
the song and prints what it chose; any flag you also pass explicitly still wins.

- cli.py: add --auto (store_true). The auto-eligible options (source, method,
  voices, transpose, duty, key-snap, arrange, echo, dither) now default to None
  so "explicit vs let-auto-decide" is detectable, and are passed straight
  through to convert(); a switch() helper maps the on/off flags to bool-or-None.
  Without --auto, convert() still resolves each None to its module default, so
  behaviour is unchanged. Help text notes what --auto fills in.
- README.md: two usage examples (plain --auto, and --auto with one forced flag)
  and an --auto entry in the options list.
- docs/README_*.md: the same two additions synced into all 10 translations,
  ASCII punctuation only.
- CHANGELOG.md: Added entry under a new Unreleased section, naming the branches.

Verified end to end: `python main.py -i input.mp3 --auto` prints the chosen
settings (instrumental/nes, centred register, E-minor key) with a passing quality
report; a plain run without --auto is unchanged; --help lists the flag.
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