Cleanup
This commit is contained in:
@@ -14,14 +14,11 @@ import generator.harmony
|
||||
import generator.model
|
||||
import generator.score
|
||||
import generator.solo.analysis
|
||||
import generator.solo.planning
|
||||
import generator.solo.placement
|
||||
import generator.solo.realization
|
||||
import tests.solo_fixtures
|
||||
import tests.test_acoustic_voicing
|
||||
import tests.test_musicxml
|
||||
import tests.test_solo
|
||||
import tests.test_solo_development
|
||||
|
||||
def position(string, fret):
|
||||
return generator.fretboard.TabPosition(string, fret, dict(generator.fretboard.STANDARD_TUNING)[string] + fret)
|
||||
@@ -144,20 +141,3 @@ class FretPolicyTests(unittest.TestCase):
|
||||
with self.assertRaisesRegex(ValueError, 'each sounding chord requires an anchor'):
|
||||
generator.score.write_json(output, target)
|
||||
self.assertFalse(output.exists())
|
||||
def test_solo_candidates_and_anchors_are_reachable_before_placement(self):
|
||||
choices = tests.test_solo_development.choices(end=32)
|
||||
options = generator.solo.realization.options(choices, fractions.Fraction(), fractions.Fraction(4), (59, 84))
|
||||
self.assertTrue(options)
|
||||
self.assertLessEqual(max(p.number() for p in options), 76)
|
||||
source = tests.test_solo.song(count=8, chords=('CM7',))
|
||||
plans = generator.solo.planning.plans(generator.solo.analysis.analyze(source), source['staves'][0]['measures'], choices, fractions.Fraction(32), 'electric', tests.solo_fixtures.library())
|
||||
self.assertTrue(plans)
|
||||
for plan in plans:
|
||||
self.assertLessEqual(plan.register[1], 76)
|
||||
self.assertTrue(plan.anchor_options)
|
||||
for anchors in plan.anchor_options:
|
||||
self.assertTrue(all(generator.solo.placement.positions(a.pitch.number()) for a in anchors))
|
||||
motif = generator.solo.planning.new_motif(tests.solo_fixtures.library(), fractions.Fraction(4), choices=choices, register=(70, 84), seed='high')
|
||||
self.assertTrue(all(generator.solo.placement.positions(n.pitch.number()) for n in motif.notes))
|
||||
high = tests.test_solo_development.note(0, 1, 'f', octave=5)
|
||||
self.assertIsNone(generator.solo.placement.place((high,), fractions.Fraction(120)))
|
||||
|
||||
Reference in New Issue
Block a user