This commit is contained in:
khodowany
2026-10-04 15:51:18 -05:00
parent 405066eb43
commit f234dd6d51
54 changed files with 2104 additions and 330 deletions
+8 -1
View File
@@ -79,6 +79,9 @@ class RhythmCell:
duration: F
purpose: str
difficulty: str | None = None
subdivision: str = 'binary'
entry: str = 'attack'
exit: str = 'continue'
def rhythm_cells(tempo, purpose=None):
@@ -100,4 +103,8 @@ def rhythm_cells(tempo, purpose=None):
cursor += duration
if difficulty and len(notes) > limits['burst_attacks']:
continue
yield RhythmCell(cell['id'], tuple(notes), cursor, cell['purpose'], difficulty)
from generator.solo import groups
realized=groups.describe(tuple(notes),source=cell['id'])
family=cell.get('subdivision','binary')
if family=='triplet' and not any(g.family=='triplet' for g in realized):raise ValueError(cell['id']+': missing complete tuplet group')
yield RhythmCell(cell['id'],tuple(notes),cursor,cell['purpose'],difficulty,family,cell.get('entry','attack'),cell.get('exit','continue'))