예제 #1
0
 def test_1(self):
     fm = FractalMusic(tempo=60, quarter_duration=10)
     fm.midi_generator.midi_range = [60, 72]
     fm.add_layer()
     fm.add_info('fractal_order')
     score = fm.get_score(layer_number=fm.number_of_layers)
     xml_path = path + '_test_1.xml'
     score.write(path=xml_path)
     self.assertCompareFiles(xml_path)
예제 #2
0
 def test_3(self):
     fm = FractalMusic(tempo=60, quarter_duration=10)
     fm.midi_generator.midi_range = [60, 72]
     fm.add_layer()
     fm.add_layer()
     fm.add_info('midi_value')
     score = fm.get_score()
     xml_path = path + '_test_3.xml'
     score.write(path=xml_path)
     self.assertCompareFiles(xml_path)
예제 #3
0
 def test_4(self):
     fm = FractalMusic(tempo=60, quarter_duration=10)
     fm.midi_generator.midi_range = [60, 72]
     fm.add_layer()
     fm.add_layer()
     fm.add_info((lambda node: int(node.midi_value) if int(node.midi_value) == node.midi_value else node.midi_values,
                  'above'))
     score = fm.get_score()
     xml_path = path + '_test_4.xml'
     score.write(path=xml_path)
     self.assertCompareFiles(xml_path)