Save
This commit is contained in:
@@ -89,7 +89,7 @@ def _candidates(notes, fixed, harmony, library, register, purpose='connect'):
|
||||
if not span or not span.scale:
|
||||
return ()
|
||||
contexts=tuple((harmony.at(n.start).scale if harmony.at(n.start) else None,
|
||||
types.permitted(harmony.choices,n.start,n.end),
|
||||
types.permitted(harmony.choices,n.start,n.end) & (harmony.members(n.start,n.end) if n.end-n.start>=2 else frozenset(range(12))),
|
||||
n.pitch.number() if n.event_id in fixed or i==len(notes)-1 else None) for i,n in enumerate(notes))
|
||||
if not hasattr(harmony,'pitch_routes'):harmony.pitch_routes={}
|
||||
key=(first.pitch,contexts,id(library),register,harmony.profile)
|
||||
@@ -175,6 +175,11 @@ def pitch_paths(first, contexts, library, register, profile=None):
|
||||
low,high=generator.fretboard.single_register((register[0]-7,register[1]+5))
|
||||
low, high = max(low, profile.register[0]), min(high, profile.register[1])
|
||||
result=[]
|
||||
# Reattacks are an explicit primitive, separate from interval catalog paths
|
||||
# (whose zero steps are deliberately excluded). Tied holds remain one event.
|
||||
if all(first.number()%12 in allowed and (fixed is None or fixed==first.number())
|
||||
for _,allowed,fixed in contexts):
|
||||
result.append(((first,)*len(contexts),('primitive:repeated_attack',)))
|
||||
for path in paths:
|
||||
realized=[first]
|
||||
for (scale,allowed,fixed),step in zip(contexts[1:],path.steps):
|
||||
|
||||
Reference in New Issue
Block a user