当前位置: 首页>>代码示例>>Python>>正文


Python Spanner.Spanner类代码示例

本文整理汇总了Python中abjad.tools.spannertools.Spanner.Spanner的典型用法代码示例。如果您正苦于以下问题:Python Spanner类的具体用法?Python Spanner怎么用?Python Spanner使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了Spanner类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

 def __init__(
     self,
     descriptor='<',
     direction=None,
     include_rests=False,
     overrides=None,
     ):
     Spanner.__init__(
         self,
         overrides=overrides,
         )
     direction = stringtools.expr_to_tridirectional_lilypond_symbol(
         direction)
     self._direction = direction
     self._include_rests = include_rests
     start_dynamic, shape_string, stop_dynamic = \
         self._parse_descriptor(descriptor)
     self._descriptor = descriptor
     assert shape_string in ('<', '>')
     self._shape_string = shape_string
     if start_dynamic is not None:
         start_dynamic = indicatortools.Dynamic(start_dynamic)
     self._start_dynamic = start_dynamic
     if stop_dynamic is not None:
         stop_dynamic = indicatortools.Dynamic(stop_dynamic)
     self._stop_dynamic = stop_dynamic
开发者ID:andrewyoung1991,项目名称:abjad,代码行数:26,代码来源:Hairpin.py

示例2: _copy_keyword_args

 def _copy_keyword_args(self, new):
     Spanner._copy_keyword_args(self, new)
     new._direction = self.direction
     new._include_rests = self.include_rests
     new._shape_string = self.shape_string
     new._start_dynamic = self.start_dynamic
     new._stop_dynamic = self.stop_dynamic
开发者ID:andrewyoung1991,项目名称:abjad,代码行数:7,代码来源:Hairpin.py

示例3: __init__

 def __init__(
     self,
     durations=None,
     include_long_duration_notes=False,
     include_long_duration_rests=False,
     isolated_nib_direction=None,
     use_stemlets=False,
     vertical_direction=None,
     ):
     Spanner.__init__(
         self,
         )
     if durations:
         durations = tuple(durationtools.Duration(x) for x in durations)
     self._durations = durations
     self._include_long_duration_notes = bool(include_long_duration_notes)
     self._include_long_duration_rests = bool(include_long_duration_rests)
     assert isolated_nib_direction in (Left, Right, None)
     self._isolated_nib_direction = isolated_nib_direction
     if self._durations is not None:
         self._span_points = mathtools.cumulative_sums(self.durations)[1:]
     else:
         self._span_points = [self._get_duration()]
     self._use_stemlets = bool(use_stemlets)
     assert vertical_direction in (Up, Down, Center, None)
     self._vertical_direction = vertical_direction
开发者ID:gkthiruvathukal,项目名称:abjad,代码行数:26,代码来源:GeneralizedBeam.py

示例4: __init__

 def __init__(
     self,
     overrides=None,
     ):
     Spanner.__init__(
         self,
         overrides=overrides,
         )
开发者ID:rulio,项目名称:abjad,代码行数:8,代码来源:TextSpanner.py

示例5: __init__

 def __init__(
     self,
     color='white',
     overrides=None,
     ):
     Spanner.__init__(
         self,
         overrides=overrides,
         )
     self._color = color
开发者ID:josiah-wolf-oberholtzer,项目名称:consort,代码行数:10,代码来源:ColorBracket.py

示例6: __init__

 def __init__(
     self, 
     components=None,
     overrides=None,
     ):
     Spanner.__init__(
         self, 
         components,
         overrides=overrides,
         )
开发者ID:Alwnikrotikz,项目名称:abjad,代码行数:10,代码来源:TextScriptSpanner.py

示例7: __init__

 def __init__(
     self,
     clef='percussion',
     overrides=None,
     ):
     Spanner.__init__(
         self,
         overrides=overrides,
         )
     clef = indicatortools.Clef(clef)
     self._clef = clef
开发者ID:DnMllr,项目名称:abjad,代码行数:11,代码来源:ClefSpanner.py

示例8: __init__

 def __init__(
     self,
     include_tied_leaves=False,
     overrides=None,
     ):
     Spanner.__init__(
         self,
         overrides=overrides,
         )
     assert isinstance(include_tied_leaves, bool), repr(include_tied_leaves)
     self._include_tied_leaves = include_tied_leaves
开发者ID:jefftrevino,项目名称:abjad,代码行数:11,代码来源:Glissando.py

示例9: __init__

 def __init__(self, lines=5, overrides=None):
     Spanner.__init__(self, overrides=overrides)
     if isinstance(lines, int) and 0 < lines:
         self._lines = lines
     elif isinstance(lines, (tuple, list)) and all(isinstance(x, (int, float)) for x in lines):
         self._lines = tuple(lines)
     else:
         message = "must be integer or a sequence of integers: {!r}."
         message = message.format(lines)
         raise ValueError(message)
     self._lines = lines
开发者ID:jefftrevino,项目名称:abjad,代码行数:11,代码来源:StaffLinesSpanner.py

示例10: __init__

 def __init__(
     self, 
     components=None, 
     mark='',
     overrides=None,
     ):
     Spanner.__init__(
         self, 
         components,
         overrides=overrides,
         )
     self.mark = mark
开发者ID:Alwnikrotikz,项目名称:abjad,代码行数:12,代码来源:DynamicTextSpanner.py

示例11: __init__

 def __init__(
     self, 
     components=None,
     overrides=None,
     ):
     Spanner.__init__(
         self, 
         components,
         overrides=overrides,
         )
     self.kind = 'sustain'
     self.style = 'mixed'
开发者ID:Alwnikrotikz,项目名称:abjad,代码行数:12,代码来源:PianoPedalSpanner.py

示例12: __init__

 def __init__(
     self,
     minimum_duration=None,
     overrides=None,
     ):
     Spanner.__init__(
         self,
         overrides=overrides,
         )
     if minimum_duration is not None:
         minimum_duration = durationtools.Duration(minimum_duration)
     self._minimum_duration = minimum_duration
开发者ID:ajyoon,项目名称:abjad,代码行数:12,代码来源:StemTremoloSpanner.py

示例13: __init__

 def __init__(
     self,
     overrides=None,
     pitch=None,
     ):
     Spanner.__init__(
         self,
         overrides=overrides,
         )
     if pitch is not None:
         pitch = pitchtools.NamedPitch(pitch)
     self._pitch = pitch
开发者ID:jefftrevino,项目名称:abjad,代码行数:12,代码来源:TrillSpanner.py

示例14: __init__

 def __init__(
     self,
     overrides=None,
     interval=None,
     ):
     Spanner.__init__(
         self,
         overrides=overrides,
         )
     if interval is not None:
         interval = pitchtools.NamedInterval(interval)
     self._interval = interval
开发者ID:jonathanmarmor,项目名称:abjad,代码行数:12,代码来源:ComplexTrillSpanner.py

示例15: __init__

 def __init__(
     self,
     components=[],
     direction=None,
     overrides=None,
     ):
     Spanner.__init__(
         self,
         components,
         overrides=overrides,
         )
     self.direction = direction
开发者ID:Alwnikrotikz,项目名称:abjad,代码行数:12,代码来源:DirectedSpanner.py


注:本文中的abjad.tools.spannertools.Spanner.Spanner类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。