Example #1
0
 def __init__(self, music=None, context_name='Context', name=None):
     Container.__init__(self, music=music)
     self.context_name = context_name
     self._consists_commands = []
     self._remove_commands = []
     self._name = None
     self.name = name
     self.is_nonsemantic = False
Example #2
0
 def __init__(self, music=None, context_name='Context', name=None):
     Container.__init__(self, music=music)
     self.context_name = context_name
     self._consists_commands = []
     self._remove_commands = []
     self._name = None
     self.name = name
     self.is_nonsemantic = False
Example #3
0
 def __init__(
     self,
     music=None,
     context_name='Context',
     is_simultaneous=None,
     name=None,
 ):
     Container.__init__(
         self,
         is_simultaneous=is_simultaneous,
         music=music,
         name=name,
     )
     self.context_name = context_name
     self._consists_commands = []
     self._remove_commands = []
     self.is_nonsemantic = False
Example #4
0
 def _copy_with_indicators_but_without_children_or_spanners(self):
     new = Container._copy_with_indicators_but_without_children_or_spanners(self)
     new._consists_commands = copy.copy(self.consists_commands)
     new._remove_commands = copy.copy(self.remove_commands)
     new.context_name = copy.copy(self.context_name)
     new.name = copy.copy(self.name)
     new.is_nonsemantic = copy.copy(self.is_nonsemantic)
     return new
Example #5
0
 def __init__(
     self,
     music=None,
     context_name='Context',
     is_simultaneous=None,
     name=None,
     ):
     Container.__init__(
         self,
         is_simultaneous=is_simultaneous,
         music=music,
         name=name,
         )
     self.context_name = context_name
     self._consists_commands = []
     self._remove_commands = []
     self.is_nonsemantic = False
Example #6
0
 def _copy_with_indicators_but_without_children_or_spanners(self):
     new = Container._copy_with_indicators_but_without_children_or_spanners(
         self)
     new._consists_commands = copy.copy(self.consists_commands)
     new._remove_commands = copy.copy(self.remove_commands)
     new.context_name = copy.copy(self.context_name)
     new.name = copy.copy(self.name)
     new.is_nonsemantic = copy.copy(self.is_nonsemantic)
     return new
Example #7
0
    def __repr__(self):
        r'''Gets interpreter representation of context.

        ::

            >>> context
            Context()

        Returns string.
        '''
        from abjad.tools import scoretools
        if all(isinstance(x, scoretools.Leaf) for x in self):
            return Container.__repr__(self)
        return self._get_abbreviated_string_format()
Example #8
0
    def __repr__(self):
        r'''Gets interpreter representation of context.

        ::

            >>> context
            Context()

        Returns string.
        '''
        from abjad.tools import scoretools
        if all(isinstance(x, scoretools.Leaf) for x in self):
            return Container.__repr__(self)
        return self._get_abbreviated_string_format()
Example #9
0
    def __repr__(self):
        r'''Gets interpreter representation of context.

        ::

            >>> context = scoretools.Context(
            ...     name='MeterVoice',
            ...     context_name='TimeSignatureContext',
            ...     )
            >>> repr(context)
            'Context()'

        Returns string.
        '''
        from abjad.tools import scoretools
        if all(isinstance(x, scoretools.Leaf) for x in self):
            return Container.__repr__(self)
        return self._get_abbreviated_string_format()
Example #10
0
    def __repr__(self):
        r'''Gets interpreter representation of context.

        ::

            >>> context = scoretools.Context(
            ...     name='MeterVoice',
            ...     context_name='TimeSignatureContext',
            ...     )
            >>> repr(context)
            'Context()'

        Returns string.
        '''
        from abjad.tools import scoretools
        if all(isinstance(x, scoretools.Leaf) for x in self):
            return Container.__repr__(self)
        return self._get_abbreviated_string_format()
Example #11
0
 def __init__(self, target_duration=None, music=None, **kwargs):
     Container.__init__(self, music=music, **kwargs)
     target_duration = target_duration or durationtools.Duration(1, 4)
     target_duration = durationtools.Duration(target_duration)
     assert 0 < target_duration
     self._target_duration = target_duration
Example #12
0
 def _copy_with_indicators_but_without_children_or_spanners(self):
     new = Container._copy_with_indicators_but_without_children_or_spanners(
         self)
     new.kind = self.kind
     return new
Example #13
0
 def __init__(self, music=None):
     Container.__init__(self, music)
     self.is_simultaneous = False
Example #14
0
 def __init__(self, music=None, kind='grace'):
     # self._carrier is a reference to the leaf carrying grace music
     self._carrier = None
     Container.__init__(self, music)
     self.kind = kind
Example #15
0
 def __init__(self, music=None, kind='grace'):
     # self._carrier is a reference to the leaf carrying grace music
     self._carrier = None
     Container.__init__(self, music)
     self.kind = kind
Example #16
0
 def _copy_with_indicators_but_without_children_or_spanners(self):
     new = Container._copy_with_indicators_but_without_children_or_spanners(self)
     new.kind = self.kind
     return new
Example #17
0
 def __init__(self, music=None):
     Container.__init__(self, music)
     self.is_simultaneous = False