contexttools.TempoMark

Inheritance diagram of abjad.tools.contexttools.TempoMark.TempoMark.TempoMark

class abjad.tools.contexttools.TempoMark.TempoMark.TempoMark(*args, **kwargs)[source]

New in version 2.0.

Abjad model of a tempo indication:

abjad> score = Score([])
abjad> staff = Staff("c'8 d'8 e'8 f'8")
abjad> score.append(staff)
abjad> contexttools.TempoMark(Duration(1, 8), 52)(staff[0])
TempoMark(Duration(1, 8), 52)(c'8)
abjad> f(score)
\new Score <<
    \tempo 8=52
    \new Staff {
        c'8
        d'8
        e'8
        f'8
    }
>>

Tempo marks target score context by default.

Initialization allows many different types of input argument structure.

Read-only Properties

TempoMark.effective_context

Read-only reference to effective context of context mark:

abjad> note = Note("c'4")
abjad> context_mark = contexttools.ContextMark()(note)
abjad> context_mark.effective_context is None
True

Return context mark or none.

Note

Inherited from contexttools.ContextMark

TempoMark.format[source]

Read-only LilyPond format of tempo mark:

abjad> tempo = contexttools.TempoMark(Duration(1, 8), 52)
abjad> tempo.format
'\\tempo 8=52'
abjad> tempo.textual_indication = 'Gingerly'
abjad> tempo.format
'\\tempo "Gingerly" 8=52'
abjad> tempo.units_per_minute = (52, 56)
abjad> tempo.format
'\\tempo "Gingerly" 8=52~56'

Return string.

TempoMark.is_imprecise[source]

True if tempo mark is entirely textual, or if tempo mark’s units_per_minute is a range:

abjad> contexttools.TempoMark(Duration(1, 4), 60).is_imprecise
False
abjad> contexttools.TempoMark('Langsam', 4, 60).is_imprecise
False
abjad> contexttools.TempoMark('Langsam').is_imprecise
True
abjad> contexttools.TempoMark('Langsam', 4, (35, 50)).is_imprecise
True
abjad> contexttools.TempoMark(Duration(1, 4), (35, 50)).is_imprecise
True

Return boolean.

TempoMark.quarters_per_minute[source]

Read-only quarters per minute of tempo mark:

abjad> tempo = contexttools.TempoMark(Duration(1, 8), 52)
abjad> tempo.quarters_per_minute
Duration(104, 1)

Return fraction, or tuple if units_per_minute is a range, or None if tempo mark is imprecise.

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

TempoMark.target_context

Read-only reference to target context of context mark:

abjad> note = Note("c'4")
abjad> context_mark = contexttools.ContextMark()(note)
abjad> context_mark.target_context is None
True

Return context mark or none.

Note

Inherited from contexttools.ContextMark

Read/write Properties

TempoMark.duration[source]

Get duration of tempo mark:

abjad> tempo = contexttools.TempoMark(Duration(1, 8), 52)
abjad> tempo.duration
Duration(1, 8)

Set duration of tempo mark:

abjad> tempo.duration = Duration(1, 4)
abjad> tempo.duration
Duration(1, 4)

Return duration, or None if tempo mark is imprecise.

TempoMark.textual_indication[source]

Get textual indication of tempo mark:

abjad> tempo = contexttools.TempoMark('Langsam', Duration(1, 8), 52)
abjad> tempo.textual_indication
'Langsam'

Return string or None.

TempoMark.units_per_minute[source]

Get units per minute of tempo mark:

abjad> tempo = contexttools.TempoMark(Duration(1, 8), 52)
abjad> tempo.units_per_minute
52

Set units per minute of tempo mark:

abjad> tempo.units_per_minute = 56
abjad> tempo.units_per_minute
56

Return number.

Methods

TempoMark.attach(start_component)

Make sure no context mark of same type is already attached to start component.

Note

Inherited from contexttools.ContextMark

TempoMark.detach()

Detach mark:

abjad> note = Note("c'4")
abjad> context_mark = contexttools.ContextMark()(note)
abjad> context_mark.start_component
Note("c'4")
abjad> context_mark.detach()
ContextMark()
abjad> context_mark.start_component is None
True

Return context mark.

Note

Inherited from contexttools.ContextMark

TempoMark.is_tempo_mark_token(expr)[source]

True when expr has the form of a tempo mark initializer:

abjad> tempo_mark = contexttools.TempoMark(Duration(1, 4), 72)
abjad> tempo_mark.is_tempo_mark_token((Duration(1, 4), 84))
True

Otherwise false:

abjad> tempo_mark.is_tempo_mark_token(84)
False

Return boolean.

Special Methods

TempoMark.__add__(expr)[source]
TempoMark.__call__(*args)

Note

Inherited from marktools.Mark

TempoMark.__delattr__(*args)

Note

Inherited from marktools.Mark

TempoMark.__div__(expr)[source]
TempoMark.__eq__(expr)[source]
TempoMark.__ge__(arg)

Abjad objects by default do not implement this method.

Raise exception.

Note

Inherited from abctools.AbjadObject

TempoMark.__gt__(arg)

Abjad objects by default do not implement this method.

Raise exception

Note

Inherited from abctools.AbjadObject

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

Note

Inherited from __builtin__.object

TempoMark.__le__(arg)

Abjad objects by default do not implement this method.

Raise exception.

Note

Inherited from abctools.AbjadObject

TempoMark.__lt__(arg)

Abjad objects by default do not implement this method.

Raise exception.

Note

Inherited from abctools.AbjadObject

TempoMark.__mul__(multiplier)[source]
TempoMark.__ne__(arg)

Note

Inherited from marktools.Mark

TempoMark.__repr__()

Note

Inherited from marktools.Mark

TempoMark.__setattr__()

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

Note

Inherited from __builtin__.object

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

Note

Inherited from __builtin__.object

TempoMark.__sub__(expr)[source]

Table Of Contents

This Page