theory: add hook-first song generator#2
Merged
Talador12 merged 4 commits intoMay 7, 2026
Conversation
98bb63b to
9d9aaa5
Compare
b03b098
into
feat/terminal-visualizer-ci-cleanup
5 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds hook-first generation helpers for turning strong harmonic motion into runnable, memorable musical sketches.
This is stacked on #1 because
mainstill has pre-existing repo-wide Ruff lint debt. #1 contains the CI lint-scope cleanup; this PR keeps the hook generator diff focused.Changes
hook_progression,generate_hook, andgenerate_hook_songtocode_music.theory.samples/chords/hook_circle.pysample.Validation
../code-music/.venv/bin/python -m ruff check --fix code_music/theory/generation.py code_music/theory/__init__.py tests/test_hooks.py samples/chords/hook_circle.py../code-music/.venv/bin/python -m ruff format code_music/theory/generation.py code_music/theory/__init__.py tests/test_hooks.py samples/chords/hook_circle.py../code-music/.venv/bin/python -m ruff check code_music/theory/generation.py code_music/theory/__init__.py tests/test_hooks.py samples/chords/hook_circle.py../code-music/.venv/bin/python -m pytest tests/test_hooks.py tests/test_full_song_generator.py tests/test_genre_classifier.py../code-music/.venv/bin/pytest tests/ -v../code-music/.venv/bin/python -m code_music.cli samples/chords/hook_circle.py -o /tmp/hook_circle.wav