コード例 #1
0
ファイル: testmispel.py プロジェクト: rabarar/expremigen
 def test_chord(self):
     m = Mispel()
     m.parse("with track 0 : a3_4\\vol[20] <c e g> a\\vol[30]")
     notes = [n for n in m.note_generator_for_section(0)]
     self.assertListEqual(notes, ['a3', Pchord(['c3', 'e3', 'g3']), 'a3'])
     vols = [v for v in m.dynamics_generator_for_section(0)]
     self.assertListEqual(vols, [20.0, 20.0, 30.0])
コード例 #2
0
ファイル: testmispel.py プロジェクト: rabarar/expremigen
 def test_dynamicsgeneratorforsection1(self):
     m = Mispel()
     m.parse(r"""
     with track 0:
         a3_8\vol[mf] b c4_4 d\vol{10} e f\vol[30] e f-- r ax d\vol{90} c 
     """)
     vols = [v for v in m.dynamics_generator_for_section(0)]
     self.assertListEqual(vols,
                          [90, 90, 90, 10, 20, 30, 30, 30, 30, 30, 90, 90])
コード例 #3
0
ファイル: testmispel.py プロジェクト: rabarar/expremigen
 def test_animationtypes_generator(self):
     m = Mispel()
     m.parse(r"""
     with track 0:
         a4_4\vol{mp, easeOutQuad} b c d\vol{f, easeOutElastic, 50, 0.1} e f g a b c d e f g a b c d e f g a b c d e f g\vol[mp]
     """)
     vols2 = [v for v in m.dynamics_generator_for_section(0)]
     self.assertListEqual(vols2, [
         80.0, 91.11111111111111, 97.77777777777777, 100.0, 80, 100, 80,
         100, 80, 80, 100, 80, 100, 80, 100, 80.62500000000003, 80,
         95.3611067738703, 80, 88.42426702280262, 80, 80, 82.14053136466876,
         80, 82.32220556599769, 80, 80.629068677026, 80.0
     ])