예제 #1
0
 def test_animationtypes(self):
     m = Mispel()
     m.parse(r"""
     with track 0:
         a4_4\vol{mp, easeOutQuad} b c d\vol{f, easeOutElastic, 2, 0.01}
     """)
     vols = [v for v in m.dynamics_for_section(0)]
     self.assertListEqual(
         vols, [(('num', 'static', 70),
                 ('sym', 'anim', 'mp', ['easeOutQuad']), 0),
                (('sym', 'anim', 'mp', ['easeOutQuad']),
                 ('sym', 'anim', 'f', ['easeOutElastic', 2.0, 0.01]), 3),
                (('sym', 'anim', 'f', ['easeOutElastic', 2.0, 0.01]),
                 ('sym', 'anim', 'f', ['easeOutElastic', 2.0, 0.01]), 1)])
예제 #2
0
 def test_dynamicsforsection(self):
     m = Mispel()
     m.parse(r"""
     with track 0:
         a3_8\vol[mf] b c4_4 d\vol{ff} e f\vol{30} e f-- r ax d\vol[20] c 
     """)
     self.assertListEqual(m.notes_for_section(0), [
         "a3", "b3", "c4", "d4", "e4", "f4", "e4", "f--4", "r", "ax4", "d4",
         "c4"
     ])
     self.assertListEqual(
         m.dynamics_for_section(0),
         [(('num', 'static', 70), ('sym', 'static', 'mf'), 0),
          (('sym', 'static', 'mf'), ('sym', 'anim', 'ff'), 3),
          (('sym', 'anim', 'ff'), ('num', 'anim', 30), 2),
          (('num', 'anim', 30), ('num', 'static', 20), 5),
          (('num', 'static', 20), ('num', 'static', 20), 2)])