Skip to content

theory: add hook-first song generator#2

Merged
Talador12 merged 4 commits into
feat/terminal-visualizer-ci-cleanupfrom
feat/hook-generator-theory
May 7, 2026
Merged

theory: add hook-first song generator#2
Talador12 merged 4 commits into
feat/terminal-visualizer-ci-cleanupfrom
feat/hook-generator-theory

Conversation

@Talador12
Copy link
Copy Markdown
Owner

@Talador12 Talador12 commented May 6, 2026

Summary

Adds hook-first generation helpers for turning strong harmonic motion into runnable, memorable musical sketches.

This is stacked on #1 because main still has pre-existing repo-wide Ruff lint debt. #1 contains the CI lint-scope cleanup; this PR keeps the hook generator diff focused.

Changes

  • Add hook_progression, generate_hook, and generate_hook_song to code_music.theory.
  • Add EDM, Coltrane, and symphonic hook-song styles.
  • Add a runnable samples/chords/hook_circle.py sample.
  • Add tests covering circle-of-fifths harmony, hook repetition, and full song generation.

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

@Talador12 Talador12 changed the base branch from main to feat/terminal-visualizer-ci-cleanup May 6, 2026 19:38
@Talador12 Talador12 force-pushed the feat/hook-generator-theory branch from 98bb63b to 9d9aaa5 Compare May 6, 2026 19:42
@Talador12 Talador12 merged commit b03b098 into feat/terminal-visualizer-ci-cleanup May 7, 2026
5 checks passed
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