contexttools.TimeSignatureMark

Inheritance diagram of abjad.tools.contexttools.TimeSignatureMark.TimeSignatureMark.TimeSignatureMark

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

New in version 2.0.

Abjad model of a time signature:

abjad> staff = Staff("c'8 d'8 e'8 f'8")
abjad> contexttools.TimeSignatureMark((4, 8))(staff[0])
TimeSignatureMark((4, 8))(c'8)
abjad> f(staff)
\new Staff {
    \time 4/8
    c'8
    d'8
    e'8
    f'8
}

Abjad time signature marks target staff context by default.

Initialize time signature marks to score context like this:

abjad> contexttools.TimeSignatureMark((4, 8), target_context = Score)
TimeSignatureMark((4, 8), target_context = Score)

Time signatures are immutable.

Read-only Properties

TimeSignatureMark.duration[source]

Read-only duration of time signature mark:

abjad> time_signature = contexttools.TimeSignatureMark((3, 8))
abjad> time_signature.duration
Duration(3, 8)

Return fraction.

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

TimeSignatureMark.format[source]

Read-only LilyPond format of time signature mark:

abjad> time_signature = contexttools.TimeSignatureMark((3, 8))
abjad> time_signature.format
'\\time 3/8'

Return string.

TimeSignatureMark.is_nonbinary[source]

Read-only indicator true when time siganture mark is nonbinary:

abjad> time_signature = contexttools.TimeSignatureMark((3, 8))
abjad> time_signature.is_nonbinary
False

Return boolean.

TimeSignatureMark.multiplier[source]

Read-only multiplier of time signature mark:

abjad> time_signature = contexttools.TimeSignatureMark((3, 8))
abjad> time_signature.multiplier
Fraction(1, 1)

Return fraction.

TimeSignatureMark.pair[source]

New in version 2.8.

Read-only numerator / denominator pair of time signature:

abjad> time_signature = contexttools.TimeSignatureMark((3, 8))
abjad> time_signature.pair
(3, 8)

Return length-2 tuple.

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

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

TimeSignatureMark.denominator[source]

Get denominator of time signature mark:

abjad> time_signature = contexttools.TimeSignatureMark((3, 8))
abjad> time_signature
TimeSignatureMark((3, 8))
abjad> time_signature.denominator
8

Set denominator of time signature mark:

abjad> time_signature.denominator = 16
abjad> time_signature.denominator
16

Return integer.

TimeSignatureMark.numerator[source]

Get numerator of time signature mark:

abjad> time_signature = contexttools.TimeSignatureMark((3, 8))
abjad> time_signature.numerator
3

Set numerator of time signature mark:

abjad> time_signature.numerator = 4
abjad> time_signature.numerator
4

Set integer.

TimeSignatureMark.partial[source]

Get partial measure pick-up of time signature mark:

abjad> time_signature = contexttools.TimeSignatureMark((3, 8), partial = Duration(1, 8))
abjad> time_signature.partial
Duration(1, 8)

Set partial measure pick-up of time signature mark:

abjad> time_signature.partial = Duration(1, 4)
abjad> time_signature.partial
Duration(1, 4)

Set fraction or none.

Methods

TimeSignatureMark.attach(start_component)

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

Note

Inherited from contexttools.ContextMark

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

Special Methods

TimeSignatureMark.__call__(*args)

Note

Inherited from marktools.Mark

TimeSignatureMark.__delattr__(*args)

Note

Inherited from marktools.Mark

TimeSignatureMark.__eq__(arg)[source]
TimeSignatureMark.__ge__(arg)[source]
TimeSignatureMark.__gt__(arg)[source]
TimeSignatureMark.__hash__() <==> hash(x)

Note

Inherited from __builtin__.object

TimeSignatureMark.__le__(arg)[source]
TimeSignatureMark.__lt__(arg)[source]
TimeSignatureMark.__ne__(arg)[source]
TimeSignatureMark.__nonzero__()[source]
TimeSignatureMark.__repr__()[source]
TimeSignatureMark.__setattr__()

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

Note

Inherited from __builtin__.object

TimeSignatureMark.__str__()[source]

Table Of Contents

This Page