コード例 #1
0
    def __call__(self, prefix, parsed_args, **kwargs):
        composer = parsed_args.composer
        composition = parsed_args.composition

        if composer and composition:
            factory = DiceGameFactory()
            instruments = factory.get_instruments(composer, composition)

            l = []
            for instrument_list in instruments:
                l.extend(instrument_list)
            return list(set(l))

        return []
コード例 #2
0
from musical_games.base import MidiOptions
from musical_games.dice_games.factory import DiceGameFactory
from musical_games.utils import correct_indent, write_lilypond_book, auto_convert_lilypond_file

__author__ = 'Robbert Harms'
__date__ = "2015-12-05"
__maintainer__ = "Robbert Harms"
__email__ = "*****@*****.**"

factory = DiceGameFactory()

# print(factory.get_instruments('Kirnberger', 'Polonaise'))
# print(factory.get_composition_parts('Stadler', 'Menuet Trio'))
#
#
# def print_info_tree(factory):
#     for composer in factory.get_composers():
#         print(composer)
#
#         for composition in factory.get_compositions(composer):
#             print('\t' + composition)
#
#             instruments = factory.get_instruments(composer, composition)
#             composition_parts = factory.get_composition_parts(composer, composition)
#
#             for instr_part in zip(composition_parts, instruments):
#                 print(instr_part)
#
# print_info_tree(factory)

# composition = factory.get_composition('Stadler', 'Menuet Trio', 'Piano')
コード例 #3
0
 def __call__(self, prefix, parsed_args, **kwargs):
     composer = parsed_args.composer
     if composer:
         factory = DiceGameFactory()
         return factory.get_compositions(composer)
     return []
コード例 #4
0
from musical_games.base import MidiOptions
from musical_games.dice_games.factory import DiceGameFactory
from musical_games.utils import correct_indent, write_lilypond_book, auto_convert_lilypond_file

__author__ = 'Robbert Harms'
__date__ = "2015-12-05"
__maintainer__ = "Robbert Harms"
__email__ = "*****@*****.**"


factory = DiceGameFactory()

# print(factory.get_instruments('Kirnberger', 'Polonaise'))
# print(factory.get_composition_parts('Stadler', 'Menuet Trio'))
#
#
# def print_info_tree(factory):
#     for composer in factory.get_composers():
#         print(composer)
#
#         for composition in factory.get_compositions(composer):
#             print('\t' + composition)
#
#             instruments = factory.get_instruments(composer, composition)
#             composition_parts = factory.get_composition_parts(composer, composition)
#
#             for instr_part in zip(composition_parts, instruments):
#                 print(instr_part)
#
# print_info_tree(factory)