marktools.LilyPondComment

Inheritance diagram of abjad.tools.marktools.LilyPondComment.LilyPondComment.LilyPondComment

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

New in version 2.0.

Changed in version 2.3: Changed Comment to LilyPondComment.

User-defined comment:

abjad> note = Note("c'4")
abjad> marktools.LilyPondComment('this is a comment')(note)
LilyPondComment('this is a comment')(c'4)
abjad> f(note)
% this is a comment
c'4

Initialize LilyPond comment from contents string; or contents string and format slot; or from other LilyPond comment; or from other LilyPond comment and format slot.

LilyPond comments implement __slots__.

Read-only Properties

LilyPondComment.format[source]

Read-only LilyPond input format of comment:

abjad> comment = marktools.LilyPondComment('this is a comment.')
abjad> comment.format
'% this is a comment.'

Return string.

LilyPondComment.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

LilyPondComment.contents_string[source]

Get contents string of comment:

abjad> comment = marktools.LilyPondComment('comment contents string')
abjad> comment.contents_string
'comment contents string'

Set contents string of comment:

abjad> comment.contents_string = 'new comment contents string'
abjad> comment.contents_string
'new comment contents string'

Set string.

LilyPondComment.format_slot[source]

New in version 2.3.

Get format slot of LilyPond comment:

abjad> note = Note("c'4")
abjad> lilypond_comment = marktools.LilyPondComment('comment')
abjad> lilypond_comment.format_slot
'before'

Set format slot of LiyPond comment:

abjad> note = Note("c'4")
abjad> lilypond_comment = marktools.LilyPondComment('comment')
abjad> lilypond_comment.format_slot = 'after'
abjad> lilypond_comment.format_slot
'after'

Set to 'before', 'after', 'opening', 'closing', 'right' or none.

Methods

LilyPondComment.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

LilyPondComment.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

LilyPondComment.__call__(*args)

Note

Inherited from marktools.Mark

LilyPondComment.__delattr__(*args)

Note

Inherited from marktools.Mark

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

Abjad objects by default do not implement this method.

Raise exception.

Note

Inherited from abctools.AbjadObject

LilyPondComment.__gt__(arg)

Abjad objects by default do not implement this method.

Raise exception

Note

Inherited from abctools.AbjadObject

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

Note

Inherited from __builtin__.object

LilyPondComment.__le__(arg)

Abjad objects by default do not implement this method.

Raise exception.

Note

Inherited from abctools.AbjadObject

LilyPondComment.__lt__(arg)

Abjad objects by default do not implement this method.

Raise exception.

Note

Inherited from abctools.AbjadObject

LilyPondComment.__ne__(arg)

Note

Inherited from marktools.Mark

LilyPondComment.__repr__()

Note

Inherited from marktools.Mark

LilyPondComment.__setattr__()

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

Note

Inherited from __builtin__.object

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

Note

Inherited from __builtin__.object

Table Of Contents

This Page