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


Python Spanner.__init__方法代码示例

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


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

示例1: __init__

# 需要导入模块: from abjad.tools.spannertools.Spanner import Spanner [as 别名]
# 或者: from abjad.tools.spannertools.Spanner.Spanner import __init__ [as 别名]
 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,代码行数:28,代码来源:GeneralizedBeam.py

示例2: __init__

# 需要导入模块: from abjad.tools.spannertools.Spanner import Spanner [as 别名]
# 或者: from abjad.tools.spannertools.Spanner.Spanner import __init__ [as 别名]
 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,代码行数:28,代码来源:Hairpin.py

示例3: __init__

# 需要导入模块: from abjad.tools.spannertools.Spanner import Spanner [as 别名]
# 或者: from abjad.tools.spannertools.Spanner.Spanner import __init__ [as 别名]
 def __init__(
     self,
     overrides=None,
     ):
     Spanner.__init__(
         self,
         overrides=overrides,
         )
开发者ID:rulio,项目名称:abjad,代码行数:10,代码来源:TextSpanner.py

示例4: __init__

# 需要导入模块: from abjad.tools.spannertools.Spanner import Spanner [as 别名]
# 或者: from abjad.tools.spannertools.Spanner.Spanner import __init__ [as 别名]
 def __init__(
     self,
     color='white',
     overrides=None,
     ):
     Spanner.__init__(
         self,
         overrides=overrides,
         )
     self._color = color
开发者ID:josiah-wolf-oberholtzer,项目名称:consort,代码行数:12,代码来源:ColorBracket.py

示例5: __init__

# 需要导入模块: from abjad.tools.spannertools.Spanner import Spanner [as 别名]
# 或者: from abjad.tools.spannertools.Spanner.Spanner import __init__ [as 别名]
 def __init__(
     self, 
     components=None,
     overrides=None,
     ):
     Spanner.__init__(
         self, 
         components,
         overrides=overrides,
         )
开发者ID:Alwnikrotikz,项目名称:abjad,代码行数:12,代码来源:TextScriptSpanner.py

示例6: __init__

# 需要导入模块: from abjad.tools.spannertools.Spanner import Spanner [as 别名]
# 或者: from abjad.tools.spannertools.Spanner.Spanner import __init__ [as 别名]
 def __init__(
     self,
     clef='percussion',
     overrides=None,
     ):
     Spanner.__init__(
         self,
         overrides=overrides,
         )
     clef = indicatortools.Clef(clef)
     self._clef = clef
开发者ID:DnMllr,项目名称:abjad,代码行数:13,代码来源:ClefSpanner.py

示例7: __init__

# 需要导入模块: from abjad.tools.spannertools.Spanner import Spanner [as 别名]
# 或者: from abjad.tools.spannertools.Spanner.Spanner import __init__ [as 别名]
 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,代码行数:13,代码来源:Glissando.py

示例8: __init__

# 需要导入模块: from abjad.tools.spannertools.Spanner import Spanner [as 别名]
# 或者: from abjad.tools.spannertools.Spanner.Spanner import __init__ [as 别名]
 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,代码行数:13,代码来源:StaffLinesSpanner.py

示例9: __init__

# 需要导入模块: from abjad.tools.spannertools.Spanner import Spanner [as 别名]
# 或者: from abjad.tools.spannertools.Spanner.Spanner import __init__ [as 别名]
 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,代码行数:14,代码来源:ComplexTrillSpanner.py

示例10: __init__

# 需要导入模块: from abjad.tools.spannertools.Spanner import Spanner [as 别名]
# 或者: from abjad.tools.spannertools.Spanner.Spanner import __init__ [as 别名]
 def __init__(
     self,
     components=[],
     direction=None,
     overrides=None,
     ):
     Spanner.__init__(
         self,
         components,
         overrides=overrides,
         )
     self.direction = direction
开发者ID:Alwnikrotikz,项目名称:abjad,代码行数:14,代码来源:DirectedSpanner.py

示例11: __init__

# 需要导入模块: from abjad.tools.spannertools.Spanner import Spanner [as 别名]
# 或者: from abjad.tools.spannertools.Spanner.Spanner import __init__ [as 别名]
 def __init__(
     self, 
     components=None,
     overrides=None,
     ):
     Spanner.__init__(
         self, 
         components,
         overrides=overrides,
         )
     self.kind = 'sustain'
     self.style = 'mixed'
开发者ID:Alwnikrotikz,项目名称:abjad,代码行数:14,代码来源:PianoPedalSpanner.py

示例12: __init__

# 需要导入模块: from abjad.tools.spannertools.Spanner import Spanner [as 别名]
# 或者: from abjad.tools.spannertools.Spanner.Spanner import __init__ [as 别名]
 def __init__(
     self, 
     components=None, 
     mark='',
     overrides=None,
     ):
     Spanner.__init__(
         self, 
         components,
         overrides=overrides,
         )
     self.mark = mark
开发者ID:Alwnikrotikz,项目名称:abjad,代码行数:14,代码来源:DynamicTextSpanner.py

示例13: __init__

# 需要导入模块: from abjad.tools.spannertools.Spanner import Spanner [as 别名]
# 或者: from abjad.tools.spannertools.Spanner.Spanner import __init__ [as 别名]
 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,代码行数:14,代码来源:TrillSpanner.py

示例14: __init__

# 需要导入模块: from abjad.tools.spannertools.Spanner import Spanner [as 别名]
# 或者: from abjad.tools.spannertools.Spanner.Spanner import __init__ [as 别名]
 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,代码行数:14,代码来源:StemTremoloSpanner.py

示例15: __init__

# 需要导入模块: from abjad.tools.spannertools.Spanner import Spanner [as 别名]
# 或者: from abjad.tools.spannertools.Spanner.Spanner import __init__ [as 别名]
 def __init__(
     self,
     direction=None,
     overrides=None,
     ):
     Spanner.__init__(
         self,
         overrides=overrides,
         )
     direction = stringtools.arg_to_tridirectional_lilypond_symbol(
         direction)
     self._direction = direction
开发者ID:jefftrevino,项目名称:abjad,代码行数:14,代码来源:Tie.py


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