Skip to content

feat/time-signature-milestone-2 - #118

Merged
TwDover merged 1 commit into
mainfrom
feat/time-signature-milestone-2
Jul 29, 2026
Merged

feat/time-signature-milestone-2#118
TwDover merged 1 commit into
mainfrom
feat/time-signature-milestone-2

Conversation

@TwDover

@TwDover TwDover commented Jul 29, 2026

Copy link
Copy Markdown
Owner

Non-4/4 Milestone 2: full songs + overflow-safe generators + UI selector

Threads the Meter end-to-end through the song services and generators so non-4/4 songs generate with correctly-sized bars, and no generator spills notes past a short/odd bar.

Song services: song_builder passes time_signature to every section request and scales all bar→beat math (offsets, tease/outro, ending bar). Arrangement helpers (_song_tempo_map, _apply_section_ramp, apply_arrangement_dynamics, apply_melodic_pickups, _section_end_bars, _section_markers) take a meter and place ramps/dropouts/pickups/tempo-map/markers at meter-scaled positions. Regen/replay/undo persist time_signature in song_meta.json and thread it back.
Generators: walking bass steps one note per felt pulse (meter.pulse_positions); drum grid clips its 16-step patterns / double-kick / jazz ride / bar-2 anticipation kicks and shifts end-of-bar fills to the real bar end (fill_shift = bar_beats − 4); riff cells space/clip to bar_beats.
Frontend: a Time-signature selector (curated simple/compound/odd list) on both the loop and song forms; round-trips through replay.
Tests: new test_meter_placement.py (81 tests) across 4/4·3/4·2/4·6/8·9/8·12/8·7/8·5/8; 4/4 stays byte-identical (216 backend + 123 frontend green).
Deferred: idiomatic compound (6/8) / odd (7/8) drum feel — current non-4/4 drums are correct and non-overflowing but still groove like a clipped 4/4; best tuned with the app running for ear-validation.

@TwDover
TwDover merged commit bfd8b22 into main Jul 29, 2026
3 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