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
+4 -1
View File
@@ -31,11 +31,14 @@ def compose(analysis, measures, part, end, *, scales, sequences, rhythms, initia
raise ValueError(f'{part} solo, source measure {choice.span.source_measure}, beat {choice.span.beat}, {generator.harmony.symbol(choice.span.chord)}: No exact match within the permitted catalog')
from generator.solo import leads
context = context if context is not None else generator.solo.realization.SearchContext()
context.expressions_enabled = enclosures_enabled
options = leads.solo_options(analysis, measures, part, end, choices, sequences, rhythms, context, stage, mode)
result = options[0][1]
result.diagnostics['strict_composition_seconds'] = time.monotonic()-started
from generator.solo import expressions
result = expressions.refine(result,enclosures_enabled and stage=='elaborated' and mode=='thematic')
if mode!='thematic':result = expressions.refine(result,False)
result.diagnostics['enclosures_enabled']=enclosures_enabled
result.diagnostics['expressions_selected']=[e.kind for p in result.phrases for e in p.draft.expressions]
validate(result)
return result