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 LilyPond input format of comment:
abjad> comment = marktools.LilyPondComment('this is a comment.')
abjad> comment.format
'% this is a comment.'
Return string.
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
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.
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.
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
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
Note
Inherited from marktools.Mark
Note
Inherited from marktools.Mark
Abjad objects by default do not implement this method.
Raise exception.
Note
Inherited from abctools.AbjadObject
Abjad objects by default do not implement this method.
Raise exception
Note
Inherited from abctools.AbjadObject
Note
Inherited from __builtin__.object
Abjad objects by default do not implement this method.
Raise exception.
Note
Inherited from abctools.AbjadObject
Abjad objects by default do not implement this method.
Raise exception.
Note
Inherited from abctools.AbjadObject
Note
Inherited from marktools.Mark
Note
Inherited from marktools.Mark
x.__setattr__(‘name’, value) <==> x.name = value
Note
Inherited from __builtin__.object
Note
Inherited from __builtin__.object