Example #1
0
 def __init__(
     self,
     preprolated_duration=1,
     is_pitched=True,
     name=None,
     ):
     RhythmTreeNode.__init__(
         self,
         preprolated_duration=preprolated_duration,
         name=name,
         )
     self.is_pitched = is_pitched
 def __init__(self, children=None, preprolated_duration=1, name=None):
     RhythmTreeNode.__init__(
         self,
         preprolated_duration=preprolated_duration,
         name=name,
         )
     self._children = []
     if isinstance(children, type(None)):
         pass
     elif isinstance(children, (list, str, tuple)):
         self.extend(children)
     else:
         message = 'can not instantiate {} with {!r}.'
         raise ValueError(message.format(type(self), children))
Example #3
0
 def __init__(self, children=None, preprolated_duration=1, name=None):
     RhythmTreeNode.__init__(
         self,
         preprolated_duration=preprolated_duration,
         name=name,
         )
     self._children = []
     if isinstance(children, type(None)):
         pass
     elif isinstance(children, (list, str, tuple)):
         self.extend(children)
     else:
         message = 'can not instantiate {} with {!r}.'
         raise ValueError(message.format(type(self), children))