BowContactSpanner

class spannertools.BowContactSpanner(overrides=None)

Bow contact spanner.

>>> staff = Staff()
>>> staff.extend(r"c'4. c'8 \times 2/3 { c'4 c'4 c'4 }")
>>> selector = select().by_leaf(flatten=True)
>>> leaves = selector(staff)
>>> attach(indicatortools.BowMotionTechnique('jete'), leaves[0])
>>> attach(indicatortools.BowContactPoint((1, 4)), leaves[0])
>>> attach(indicatortools.BowContactPoint((3, 4)), leaves[1])
>>> attach(indicatortools.BowContactPoint((1, 2)), leaves[2])
>>> attach(indicatortools.BowMotionTechnique('circular'),
...     leaves[3])
>>> attach(indicatortools.BowContactPoint((1, 1)), leaves[3])
>>> attach(indicatortools.BowContactPoint((0, 1)), leaves[4])
>>> attach(Clef('percussion'), staff)
>>> override(staff).bar_line.transparent = True
>>> override(staff).dots.staff_position = -8
>>> override(staff).flag.Y_offset = -8.5
>>> override(staff).glissando.bound_details__left__padding = 1.5
>>> override(staff).glissando.bound_details__right__padding = 1.5
>>> override(staff).glissando.thickness = 2
>>> override(staff).script.staff_padding = 3
>>> override(staff).staff_symbol.transparent = True
>>> override(staff).stem.direction = Down
>>> override(staff).stem.length = 8
>>> override(staff).stem.stem_begin_position = -9
>>> override(staff).time_signature.stencil = False
>>> attach(spannertools.BowContactSpanner(), leaves)
>>> show(staff) 

Use BowContactPoint(None) to indicate un-bowed actions, such as pizzicato.

>>> staff = Staff()
>>> staff.extend(r"c'4 c'4 c'4 c'4")
>>> leaves = staff[:]
>>> attach(indicatortools.BowContactPoint(None), leaves[0])
>>> attach(indicatortools.BowContactPoint((3, 4)), leaves[1])
>>> attach(indicatortools.BowContactPoint((1, 2)), leaves[2])
>>> attach(indicatortools.BowContactPoint(None), leaves[3])
>>> attach(Clef('percussion'), staff)
>>> override(staff).bar_line.transparent = True
>>> override(staff).dots.staff_position = -8
>>> override(staff).flag.Y_offset = -8.5
>>> override(staff).glissando.bound_details__left__padding = 1.5
>>> override(staff).glissando.bound_details__right__padding = 1.5
>>> override(staff).glissando.thickness = 2
>>> override(staff).script.staff_padding = 3
>>> override(staff).staff_symbol.transparent = True
>>> override(staff).stem.direction = Down
>>> override(staff).stem.length = 8
>>> override(staff).stem.stem_begin_position = -9
>>> override(staff).time_signature.stencil = False
>>> attach(spannertools.BowContactSpanner(), leaves)
>>> show(staff) 

Lineage

digraph InheritanceGraph { graph [background=transparent, bgcolor=transparent, color=lightslategrey, fontname=Arial, outputorder=edgesfirst, overlap=prism, penwidth=2, rankdir=LR, root="__builtin__.object", splines=spline, style="dotted, rounded", truecolor=true]; node [colorscheme=pastel19, fontname=Arial, fontsize=12, penwidth=2, style="filled, rounded"]; edge [color=lightsteelblue2, penwidth=2]; subgraph cluster_abctools { graph [label=abctools]; "abjad.tools.abctools.AbjadObject.AbjadObject" [color=1, group=0, label=AbjadObject, shape=box]; "abjad.tools.abctools.AbjadObject.AbstractBase" [color=1, group=0, label=AbstractBase, shape=box]; "abjad.tools.abctools.AbjadObject.AbstractBase" -> "abjad.tools.abctools.AbjadObject.AbjadObject"; } subgraph cluster_spannertools { graph [label=spannertools]; "abjad.tools.spannertools.BowContactSpanner.BowContactSpanner" [color=black, fontcolor=white, group=2, label=<<B>BowContactSpanner</B>>, shape=box, style="filled, rounded"]; "abjad.tools.spannertools.Spanner.Spanner" [color=3, group=2, label=Spanner, shape=box]; "abjad.tools.spannertools.Spanner.Spanner" -> "abjad.tools.spannertools.BowContactSpanner.BowContactSpanner"; } subgraph cluster_builtins { graph [label=builtins]; "builtins.object" [color=2, group=1, label=object, shape=box]; } "abjad.tools.abctools.AbjadObject.AbjadObject" -> "abjad.tools.spannertools.Spanner.Spanner"; "builtins.object" -> "abjad.tools.abctools.AbjadObject.AbstractBase"; }

Bases

Attribute summary

components Gets components in spanner.
name Gets spanner name.
overrides Gets overrides.
__contains__(expr) Is true when spanner contains expr.
__copy__(\*args) Copies spanner.
__eq__(expr) Is true when ID of expr equals ID of Abjad object.
__format__([format_specification]) Formats Abjad object.
__getitem__(expr) Gets item from spanner.
__hash__() Hashes Abjad object.
__len__() Gets number of components in spanner.
__lt__(expr) Is true when spanner is less than expr.
__ne__(expr) Is true when Abjad object does not equal expr.
__repr__() Gets interpreter representation of Abjad object.

Read-only properties

(Spanner).components

Gets components in spanner.

Returns selection.

(Spanner).name

Gets spanner name.

Returns string.

(Spanner).overrides

Gets overrides.

Returns dict.

Special methods

(Spanner).__contains__(expr)

Is true when spanner contains expr. Otherwise false.

Returns true or false.

(Spanner).__copy__(*args)

Copies spanner.

Does not copy spanner components.

Returns new spanner.

(AbjadObject).__eq__(expr)

Is true when ID of expr equals ID of Abjad object. Otherwise false.

Returns true or false.

(AbjadObject).__format__(format_specification='')

Formats Abjad object.

Set format_specification to ‘’ or ‘storage’. Interprets ‘’ equal to ‘storage’.

Returns string.

(Spanner).__getitem__(expr)

Gets item from spanner.

Returns component.

(AbjadObject).__hash__()

Hashes Abjad object.

Required to be explicitly redefined on Python 3 if __eq__ changes.

Returns integer.

(Spanner).__len__()

Gets number of components in spanner.

Returns nonnegative integer.

(Spanner).__lt__(expr)

Is true when spanner is less than expr. Otherwise false.

Trivial comparison to allow doctests to work.

Returns true or false.

(AbjadObject).__ne__(expr)

Is true when Abjad object does not equal expr. Otherwise false.

Returns true or false.

(AbjadObject).__repr__()

Gets interpreter representation of Abjad object.

Returns string.