marktools.Annotation

Inheritance diagram of abjad.tools.marktools.Annotation.Annotation.Annotation

class abjad.tools.marktools.Annotation.Annotation.Annotation(*args)[source]

New in version 2.0.

User-defined annotation:

abjad> staff = Staff("c'8 d'8 e'8 f'8")
abjad> f(staff)
\new Staff {
    c'8
    d'8
    e'8
    f'8
}
abjad> marktools.Annotation('special pitch', pitchtools.NamedChromaticPitch('ds'))(staff[0])
Annotation('special pitch', NamedChromaticPitch('ds'))(c'8)
abjad> f(staff)
\new Staff {
    c'8
    d'8
    e'8
    f'8
}

Annotations contribute no formatting.

Annotations implement __slots__.

Read-only Properties

Annotation.start_component

Read-only reference to mark start component:

abjad> note = Note("c'4")
abjad> mark = marktools.Mark()(note)
abjad> mark.start_component
Note("c'4")

Return component or none.

Note

Inherited from marktools.Mark

Read/write Properties

Annotation.name[source]

Get name of annotation:

abjad> annotation = marktools.Annotation('special_pitch', pitchtools.NamedChromaticPitch('ds'))
abjad> annotation.name
'special_pitch'

Set name of annotation:

abjad> annotation.name = 'revised special pitch'
abjad> annotation.name
'revised special pitch'

Set string.

Annotation.value[source]

Get value of annotation:

abjad> annotation = marktools.Annotation('special_pitch', pitchtools.NamedChromaticPitch('ds'))
abjad> annotation.value
NamedChromaticPitch('ds')

Set value of annotation:

abjad> annotation.value = pitchtools.NamedChromaticPitch('e')
abjad> annotation.value
NamedChromaticPitch('e')

Set arbitrary object.

Methods

Annotation.attach(start_component)

Attach mark to start_component:

abjad> note = Note("c'4")
abjad> mark = marktools.Mark()
abjad> mark.attach(note)
Mark()(c'4)
abjad> mark.start_component
Note("c'4")

Return mark.

Note

Inherited from marktools.Mark

Annotation.detach()

Detach mark:

abjad> note = Note("c'4")
abjad> mark = marktools.Mark()(note)
abjad> mark.start_component
Note("c'4")
abjad> mark.detach()
Mark()
abjad> mark.start_component is None
True

Return mark.

Note

Inherited from marktools.Mark

Special Methods

Annotation.__call__(*args)

Note

Inherited from marktools.Mark

Annotation.__delattr__(*args)

Note

Inherited from marktools.Mark

Annotation.__eq__(arg)[source]
Annotation.__ge__(arg)

Abjad objects by default do not implement this method.

Raise exception.

Note

Inherited from abctools.AbjadObject

Annotation.__gt__(arg)

Abjad objects by default do not implement this method.

Raise exception

Note

Inherited from abctools.AbjadObject

Annotation.__hash__() <==> hash(x)

Note

Inherited from __builtin__.object

Annotation.__le__(arg)

Abjad objects by default do not implement this method.

Raise exception.

Note

Inherited from abctools.AbjadObject

Annotation.__lt__(arg)

Abjad objects by default do not implement this method.

Raise exception.

Note

Inherited from abctools.AbjadObject

Annotation.__ne__(arg)

Note

Inherited from marktools.Mark

Annotation.__repr__()

Note

Inherited from marktools.Mark

Annotation.__setattr__()

x.__setattr__(‘name’, value) <==> x.name = value

Note

Inherited from __builtin__.object

Annotation.__str__() <==> str(x)

Note

Inherited from __builtin__.object

Table Of Contents

This Page