예제 #1
0
 def __init__(
     self,
     articulation_list=None,
     minimum_duration=None,
     maximum_duration=None,
     minimum_written_pitch=None,
     maximum_written_pitch=None,
     skip_ties=False,
     ):
     ArticulationHandler.__init__(
         self,
         minimum_duration=minimum_duration,
         maximum_duration=maximum_duration,
         minimum_written_pitch=minimum_written_pitch,
         maximum_written_pitch=maximum_written_pitch,
         )
     articulation_list = articulation_list or ()
     if isinstance(articulation_list, str):
         articulation_list = [articulation_list]
     for articulation in articulation_list:
         if not isinstance(articulation, str):
             message = 'not articulation: {!r}'.format(articulation)
             raise TypeError(message)
     self._articulation_list = articulation_list
     self._skip_ties = skip_ties
 def __init__(
     self,
     articulation_lists=None,
     minimum_duration=None,
     maximum_duration=None,
     minimum_written_pitch=None,
     maximum_written_pitch=None,
     ):
     ArticulationHandler.__init__(
         self,
         minimum_duration=minimum_duration,
         maximum_duration=maximum_duration,
         minimum_written_pitch=minimum_written_pitch,
         maximum_written_pitch=maximum_written_pitch,
         )
     if articulation_lists is not None:
         for articulation_list in articulation_lists:
             prototype = (tuple, list, type(None))
             if not isinstance(articulation_list, prototype):
                 message = 'not articulation list: {!r}.'
                 message = message.format(articulation_list)
                 raise TypeError(message)
             if articulation_list is not None:
                 for articulation in articulation_list:
                     if not isinstance(articulation, str):
                         message = 'not articulation: {!r}.'
                         message = message.format(articulation)
                         raise TypeError(message)
     self._articulation_lists = articulation_lists
예제 #3
0
 def __init__(
     self,
     articulation_list=None,
     minimum_duration=None,
     maximum_duration=None,
     minimum_written_pitch=None,
     maximum_written_pitch=None,
     pattern=None,
     skip_ties=False,
     ):
     ArticulationHandler.__init__(
         self,
         minimum_duration=minimum_duration,
         maximum_duration=maximum_duration,
         minimum_written_pitch=minimum_written_pitch,
         maximum_written_pitch=maximum_written_pitch,
         )
     articulation_list = articulation_list or ()
     if isinstance(articulation_list, str):
         articulation_list = [articulation_list]
     for articulation in articulation_list:
         if not isinstance(articulation, str):
             message = 'not articulation: {!r}'.format(articulation)
             raise TypeError(message)
     self._articulation_list = articulation_list
     if pattern is not None:
         prototype = (patterntools.Pattern, patterntools.CompoundPattern)
         assert isinstance(pattern, prototype), repr(pattern)
     self._pattern = pattern
     self._skip_ties = skip_ties
 def __init__(
     self,
     articulation_lists=None,
     minimum_duration=None,
     maximum_duration=None,
     minimum_written_pitch=None,
     maximum_written_pitch=None,
 ):
     ArticulationHandler.__init__(
         self,
         minimum_duration=minimum_duration,
         maximum_duration=maximum_duration,
         minimum_written_pitch=minimum_written_pitch,
         maximum_written_pitch=maximum_written_pitch,
     )
     if articulation_lists is not None:
         for articulation_list in articulation_lists:
             prototype = (tuple, list, type(None))
             if not isinstance(articulation_list, prototype):
                 message = 'not articulation list: {!r}.'
                 message = message.format(articulation_list)
                 raise TypeError(message)
             if articulation_list is not None:
                 for articulation in articulation_list:
                     if not isinstance(articulation, str):
                         message = 'not articulation: {!r}.'
                         message = message.format(articulation)
                         raise TypeError(message)
     self._articulation_lists = articulation_lists
 def __init__(
     self,
     articulation_list=None,
     minimum_duration=None,
     maximum_duration=None,
     minimum_written_pitch=None,
     maximum_written_pitch=None,
     pattern=None,
     skip_ties=False,
 ):
     ArticulationHandler.__init__(
         self,
         minimum_duration=minimum_duration,
         maximum_duration=maximum_duration,
         minimum_written_pitch=minimum_written_pitch,
         maximum_written_pitch=maximum_written_pitch,
     )
     articulation_list = articulation_list or ()
     if isinstance(articulation_list, str):
         articulation_list = [articulation_list]
     for articulation in articulation_list:
         if not isinstance(articulation, str):
             message = 'not articulation: {!r}'.format(articulation)
             raise TypeError(message)
     self._articulation_list = articulation_list
     if pattern is not None:
         prototype = (patterntools.Pattern, patterntools.CompoundPattern)
         assert isinstance(pattern, prototype), repr(pattern)
     self._pattern = pattern
     self._skip_ties = skip_ties