Esempio n. 1
0
 def __init__(
     self,
     direction=None,
     isolated_nib_direction=False,
     overrides=None,
     span_beam_count=1,
 ):
     ComplexBeam.__init__(
         self,
         direction=direction,
         isolated_nib_direction=isolated_nib_direction,
         overrides=overrides,
     )
     assert isinstance(span_beam_count, (int, type(None)))
     self._span_beam_count = span_beam_count
Esempio n. 2
0
 def __init__(
     self,
     direction=None,
     isolated_nib_direction=False,
     overrides=None,
     span_beam_count=1,
     ):
     ComplexBeam.__init__(
         self,
         direction=direction,
         isolated_nib_direction=isolated_nib_direction,
         overrides=overrides,
         )
     assert isinstance(span_beam_count, (int, type(None)))
     self._span_beam_count = span_beam_count
Esempio n. 3
0
 def __init__(
     self, 
     direction=None,
     durations=None, 
     isolated_nib_direction=False, 
     nibs_towards_nonbeamable_components=True,
     overrides=None,
     span_beam_count=1, 
     ):
     ComplexBeam.__init__(
         self, 
         direction=direction,
         isolated_nib_direction=isolated_nib_direction,
         overrides=overrides,
         )
     durations = self._coerce_durations(durations)
     self._durations = durations
     assert isinstance(nibs_towards_nonbeamable_components, bool)
     self._nibs_towards_nonbeamable_components = \
         nibs_towards_nonbeamable_components
     assert isinstance(span_beam_count, (int, type(None)))
     self._span_beam_count = span_beam_count
Esempio n. 4
0
 def __init__(
     self,
     direction=None,
     durations=None,
     isolated_nib_direction=False,
     nibs_towards_nonbeamable_components=True,
     overrides=None,
     span_beam_count=1,
 ):
     ComplexBeam.__init__(
         self,
         direction=direction,
         isolated_nib_direction=isolated_nib_direction,
         overrides=overrides,
     )
     durations = self._coerce_durations(durations)
     self._durations = durations
     assert isinstance(nibs_towards_nonbeamable_components, bool)
     self._nibs_towards_nonbeamable_components = \
         nibs_towards_nonbeamable_components
     assert isinstance(span_beam_count, (int, type(None)))
     self._span_beam_count = span_beam_count
Esempio n. 5
0
 def _fracture_right(self, i):
     self, left, right = ComplexBeam._fracture_right(self, i)
     weights = [
         inspect_(left).get_duration(), 
         inspect_(right).get_duration(),
         ]
     assert sum(self.durations) == sum(weights)
     split_durations = sequencetools.split_sequence(
         self.durations, 
         weights, 
         cyclic=False, 
         overhang=False,
         )
     left_durations, right_durations = split_durations
     left._durations = left_durations
     right._durations = right_durations
     return self, left, right
Esempio n. 6
0
 def _fracture_right(self, i):
     self, left, right = ComplexBeam._fracture_right(self, i)
     weights = [
         inspect_(left).get_duration(),
         inspect_(right).get_duration(),
     ]
     assert sum(self.durations) == sum(weights)
     split_durations = sequencetools.split_sequence(
         self.durations,
         weights,
         cyclic=False,
         overhang=False,
     )
     left_durations, right_durations = split_durations
     left._durations = left_durations
     right._durations = right_durations
     return self, left, right
Esempio n. 7
0
 def _copy_keyword_args(self, new):
     ComplexBeam._copy_keyword_args(self, new)
     if self.durations is not None:
         new._durations = self.durations[:]
     new._span_beam_count = self.span_beam_count
Esempio n. 8
0
 def _reverse_components(self):
     ComplexBeam._reverse_components(self)
     durations = reversed(self.durations)
     durations = tuple(durations)
     self._durations = durations
Esempio n. 9
0
 def _copy_keyword_args(self, new):
     ComplexBeam._copy_keyword_args(self, new)
     new._span_beam_count = self.span_beam_count
Esempio n. 10
0
 def _reverse_components(self):
     ComplexBeam._reverse_components(self)
     durations = reversed(self.durations)
     durations = tuple(durations)
     self._durations = durations
Esempio n. 11
0
 def _copy_keyword_args(self, new):
     ComplexBeam._copy_keyword_args(self, new)
     if self.durations is not None:
         new._durations = self.durations[:]
     new._span_beam_count = self.span_beam_count
Esempio n. 12
0
 def _copy_keyword_args(self, new):
     ComplexBeam._copy_keyword_args(self, new)
     new._span_beam_count = self.span_beam_count