contexttools.get_key_signature_mark_attached_to_component

abjad.tools.contexttools.get_key_signature_mark_attached_to_component.get_key_signature_mark_attached_to_component(component)[source]

New in version 2.3.

Get key signature mark attached to component:

abjad> staff = Staff("c'8 d'8 e'8 f'8")
abjad> contexttools.KeySignatureMark('c', 'major')(staff)
KeySignatureMark(NamedChromaticPitchClass('c'), Mode('major'))(Staff{4})
abjad> f(staff)
\new Staff {
    \key c \major
    c'8
    d'8
    e'8
    f'8
}
abjad> contexttools.get_key_signature_mark_attached_to_component(staff)
KeySignatureMark(NamedChromaticPitchClass('c'), Mode('major'))(Staff{4})

Return key signature mark.

Raise missing mark error when no key signature mark attaches to component.

This Page