Save
This commit is contained in:
@@ -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'))
|
||||
|
||||
Reference in New Issue
Block a user