TempoInterface

class abjad.tempo.interface.TempoInterface(_client, _updateInterface)

Bases: abjad.core.observer._Observer, abjad.core.grobhandler._GrobHandler, abjad.core.backtracking._BacktrackingInterface, abjad.spanner.receptor._SpannerReceptor

Handle LilyPond MetronomeMark grob and Abjad Tempo spanner.

The implementation of effective given here allows for tempo indication to be set either be a tempo spanner or by a forced value set directly on the tempo interface. As such, TempoInterface implements two different and competing patterns for the way in which tempo indications can be set.

This probably isn’t the best situation and, in fact, the implementation will clean up considerably is we allow for only one way to set tempo indications, most likely through spanners only.

Both patterns remain for now, though this situation is unstable and should probably resolve at some point in the future.

chain
Return tuple of all leaves in spanner, if spanned; otherwise return 1-tuple of client.
change
True when core attribute changes at client, otherwise False.
count
Return number of spanners attaching to client.
effective
Effective tempo governing client. Decisions here arbitrate between spanner and forced attribute.
first
True when client is first in spanner, otherwise False.
forced
last
True when client is last in spanner, otherwise False.
only
True when client is only leaf in spanner, otherwise False.
parented
True when spanner attached to any component in parentage of client, including client, otherwise False.
position
Return zero-indexed position of client in spanner.
spanned
True when client is spanned.
spanner
Return first spanner attaching to client.
spanner_in_parentage
Return first spanner attaching to parentage of client.
spanners
Return all spanners attaching to client.
unspan()
Remove all spanners attaching to client.

Previous topic

StemInterface

Next topic

TextInterface

This Page