Construction
This commit is contained in:
@@ -162,12 +162,12 @@ def validate_comping(document: dict) -> None:
|
||||
raise ValueError('acoustic comping requires quarter/eighth notes or authored sustains')
|
||||
events.append((start, end))
|
||||
events.sort()
|
||||
# Distinct lanes can overlap. The physical validator still checks sounding
|
||||
# strings and grip span, including staggered releases after voice merging.
|
||||
# A combined attack is one interval with both lanes. Separate attacks must
|
||||
# be sequential, including bass/upper alternation and cross-bar ties.
|
||||
for i, a in enumerate(events):
|
||||
for b in events[i + 1:]:
|
||||
if a[1] > b[0] and groups[a] & groups[b]:
|
||||
raise ValueError('acoustic attacks overlap within the same lane')
|
||||
if a[1] > b[0]:
|
||||
raise ValueError('acoustic sound must release before the next attack')
|
||||
spans = []
|
||||
for span in generator.harmonic_time.read(document['staves'][0]):
|
||||
if spans and generator.accompaniment.same_chord(spans[-1].chord, span.chord):
|
||||
|
||||
Reference in New Issue
Block a user