@@ -350,6 +350,9 @@ def local_sounding(notes):
|
||||
|
||||
def contract_valid(draft, notes):
|
||||
by_id = {n.event_id: n for n in local_sounding(notes)}
|
||||
for tail in draft.sustained_tails:
|
||||
if not any(n.pitch.number() == tail.pitch and n.start <= tail.start and n.end >= tail.end for n in by_id.values()):
|
||||
return False, f'{tail.start}-{tail.end}: required sounding arrival tail changed'
|
||||
original = {n.event_id: n for n in draft.notes}
|
||||
for identity in (*draft.structural, *draft.protected):
|
||||
before, after = original[identity], by_id.get(identity)
|
||||
|
||||
Reference in New Issue
Block a user