Esempio n. 1
0
 def _update_groupings(self, meter):
     self.TERNARY_GROUPINGS = note_length_groupings.get_grouping(meter,
                                                                 "terns")
     self.HEAVY_GROUPINGS = note_length_groupings.get_grouping(meter,
                                                               "heavy")
     self.DEFAULT_GROUPINGS = note_length_groupings.get_grouping(meter,
                                                                 "default")
     self.FAST_GROUPINGS = note_length_groupings.get_grouping(meter,
                                                              "first")
Esempio n. 2
0
def test_all_meters_have_groupings():
    for meter in meters.METERS:
        note_length_groupings.get_grouping(meter, "default")
Esempio n. 3
0
def test_get_grouping():
    assert (note_length_groupings.get_grouping((5, (2, 3)), "heavy") ==
            sum(note_length_groupings.groupings[(5, (2, 3))]["heavy"], []))
    assert note_length_groupings.get_grouping((8, (4, 4)), "heavy") == sum(note_length_groupings.groupings[(8, (4, 4,))]["heavy"], [])