Articulation

digraph InheritanceGraph { graph [bgcolor=transparent, color=lightsteelblue2, fontname=Arial, fontsize=10, outputorder=edgesfirst, overlap=prism, penwidth=2, rankdir=LR, splines=spline, style="dashed, rounded", truecolor=true]; node [colorscheme=pastel19, fontname=Arial, fontsize=10, height=0, penwidth=2, shape=box, style="filled, rounded", width=0]; edge [color=lightslategrey, penwidth=1]; subgraph "cluster_abjad.indicators" { graph [label="abjad.indicators"]; node [color=1]; "abjad.indicators.Articulation.Articulation" [URL="../api/abjad/indicators/Articulation.html#abjad.indicators.Articulation.Articulation", color=black, fontcolor=white, label=Articulation, target=_top]; } subgraph "cluster_abjad.system" { graph [label="abjad.system"]; node [color=2]; "abjad.system.AbjadObject.AbjadObject" [URL="../api/abjad/indicators/../system/AbjadObject.html#abjad.system.AbjadObject.AbjadObject", label="Abjad\nObject", target=_top]; "abjad.system.AbjadValueObject.AbjadValueObject" [URL="../api/abjad/indicators/../system/AbjadValueObject.html#abjad.system.AbjadValueObject.AbjadValueObject", label="Abjad\nValue\nObject", target=_top]; "abjad.system.AbjadObject.AbjadObject" -> "abjad.system.AbjadValueObject.AbjadValueObject"; } subgraph cluster_builtins { graph [label=builtins]; node [color=3]; "builtins.object" [URL="https://docs.python.org/3.6/library/functions.html#object", label=object, target=_top]; } "abjad.system.AbjadValueObject.AbjadValueObject" -> "abjad.indicators.Articulation.Articulation"; "builtins.object" -> "abjad.system.AbjadObject.AbjadObject"; }

class abjad.indicators.Articulation.Articulation(name=None, *, direction=None, tweaks=None)

Articulation.

Initializes from name:

>>> abjad.Articulation('staccato')
Articulation('staccato')

Initializes from abbreviation:

>>> abjad.Articulation('.')
Articulation('.')

Initializes from other articulation:

>>> articulation = abjad.Articulation('staccato')
>>> abjad.Articulation(articulation)
Articulation('staccato')

Initializes with direction:

>>> abjad.Articulation('staccato', direction=abjad.Up)
Articulation('staccato', Up)

Use attach() to attach articulations to notes, rests or chords:

>>> note = abjad.Note("c'4")
>>> articulation = abjad.Articulation('staccato')
>>> abjad.attach(articulation, note)
>>> abjad.show(note) 

Todo

Simplify initializer. Allow only initialization from name. Implement new from_abbreviation() and from_articulation() methods to replace existing initializer polymorphism.

Works with new:

>>> abjad.new(abjad.Articulation('.'))
Articulation('.')

Attributes Summary

__format__ Formats articulation.
__illustrate__ Illustrates articulation.
__str__ Gets string representation of articulation.
direction Gets direction of articulation.
name Gets name of articulation.
tweaks Gets tweaks

Special methods

(AbjadValueObject).__copy__(*arguments)

Copies Abjad value object.

Returns new Abjad value object.

(AbjadValueObject).__eq__(argument)

Is true when all initialization values of Abjad value object equal the initialization values of argument.

Returns true or false.

__format__(format_specification='')

Formats articulation.

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

Return type:str
(AbjadValueObject).__hash__()

Hashes Abjad value object.

Returns integer.

__illustrate__()

Illustrates articulation.

Returns LilyPond file.

(AbjadObject).__repr__()

Gets interpreter representation of Abjad object.

Returns string.

__str__()

Gets string representation of articulation.

Return type:str

Read-only properties

direction

Gets direction of articulation.

Without direction:

>>> articulation = abjad.Articulation('staccato')
>>> articulation.direction is None
True

With direction:

>>> articulation = abjad.Articulation('staccato', direction=abjad.Up)
>>> articulation.direction
Up
Return type:Optional[VerticalAlignment]
name

Gets name of articulation.

Staccato:

>>> articulation = abjad.Articulation('staccato')
>>> articulation.name
'staccato'

Tenuto:

>>> articulation = abjad.Articulation('tenuto')
>>> articulation.name
'tenuto'
Return type:str
tweaks

Gets tweaks

>>> note = abjad.Note("c'4")
>>> articulation = abjad.Articulation('marcato')
>>> abjad.tweak(articulation).color = 'blue'
>>> abjad.attach(articulation, note)
>>> abjad.show(note) 
>>> note = abjad.Note("c'4")
>>> articulation = abjad.Articulation(
...     'marcato',
...     tweaks=[('color', 'blue')],
...     )
>>> abjad.attach(articulation, note)
>>> abjad.show(note) 
Return type:Optional[LilyPondTweakManager]