Fix Generation
This commit is contained in:
+6
-1
@@ -236,7 +236,12 @@ class EventPlacement:
|
||||
|
||||
def acoustic_candidates(span: generator.acoustic.HarmonySpan):
|
||||
required, allowed, bass = chord_requirements(span.harmony, 'acoustic')
|
||||
for shape in chord_positions(required, allowed, bass, profile='acoustic'):
|
||||
basses = {bass}
|
||||
degrees = generator.harmony.degrees(span.harmony)
|
||||
if 'bass' not in span.harmony and 'inversion' not in span.harmony and 5 in degrees:
|
||||
basses.add((bass + generator.harmony.degree_semitones(5, degrees[5])) % 12)
|
||||
shapes = sorted({shape for value in sorted(basses) for shape in chord_positions(required, allowed, value, profile='acoustic')})
|
||||
for shape in shapes:
|
||||
active = tuple((str(p.string_number), p) for p in shape)
|
||||
choices = tuple(EventPlacement(note, (), tuple(p for p in shape if (p.string_number >= 5) == (note['_guitar_lane'] == 'bass'))) for note in span.notes)
|
||||
yield AttackCandidate(active, choices, shape, voicing_cost(shape, 'acoustic', allowed))
|
||||
|
||||
Reference in New Issue
Block a user