FoscWellformednessManager

Returns a FoscWellformednessManager.


Description

Wellformedness manager.


Attributes Summary

Instance Properties

’’’

Instance Methods: Special Methods

’’’

Instance Methods

’’’
’’’
’’’
’’’
’’’
’’’
’’’
’’’
’’’
’’’
’’’
’’’
’’’
’’’
’’’
’’’
’’’
’’’
’’’
’’’
’’’
’’’


Instance Properties


’’’

  1. Is true when manager allows percussion clef. Otherwise false.

    Returns true, false or none.


Instance Methods: Special Methods


’’’

  1. Calls all wellformedness checks on argument.

    Returns triples.


Instance Methods


’’’

  1. Checks to make sure there are no beamed quarter notes.

    Returns violators and total.


’’’

  1. Checks for conflicting clefs.

    Conflicting clefs defined equal to the situation in which a first clef is attached to a container and a second clef is attached to a child of the container that starts at the same time as the container.

    Situation does not usually arise because an exception raises on attempt to attach a clef to any component that starts at the same time as some other component in the score tree.

    But advanced users can stumble into this situation as described in the following examples.

    Returns violators and total.


’’’

  1. Checks for discontiguous spanners.

    There are now two different types of spanner. Most spanners demand that spanner components be logical-voice-contiguous. But a few special spanners (like MetronomeMark) do not make such a demand. The check here consults the experimental _contiguity_constraint.

    Returns violators and total.


’’’

  1. Checks to make sure there are no components with duplicated IDs.

    Returns violators and total.


’’’

  1. Checks to make sure there are no empty containers in score.

    Returns violators and total.


’’’

  1. Checks to make sure there are no hairpins in score with intervening

    dynamic marks.

    Returns violators and total.


’’’

  1. Checks to make sure there are no misdurated measures in score.

    Returns violators and total.


’’’

  1. Checks that time signature duration equals measure contents

    duration for every measure.

    Returns violators and total.


’’’

  1. Checks mismatched enchained hairpins.

    • Example —

    Checks mismatched enchained hairpins:

    ::

    staff = abjad.Staff(“c’4 d’ e’ f’”) abjad.attach(abjad.Hairpin(‘p < f’), staff[:2]) abjad.attach(abjad.Hairpin(‘p > pp’), staff[1:])

    ::

    agent = abjad.inspect(staff) print(agent.tabulate_well_formedness_violations()) 0 / 4 beamed quarter notes 0 / 1 conflicting clefs 0 / 2 discontiguous spanners 0 / 5 duplicate ids 0 / 1 empty containers 0 / 2 intermarked hairpins 0 / 0 misdurated measures 0 / 0 misfilled measures 2 / 2 mismatched enchained hairpins 0 / 0 mispitched ties 0 / 4 misrepresented flags 0 / 5 missing parents 0 / 0 nested measures 0 / 4 notes on wrong clef 0 / 4 out of range notes 0 / 0 overlapping beams 0 / 0 overlapping glissandi 0 / 2 overlapping hairpins 0 / 0 overlapping octavation spanners 0 / 0 overlapping ties 0 / 2 short hairpins 0 / 0 tied rests

    Enchained hairpins are fine so long as hairpin ends match.

    Returns violators and total.


’’’

  1. Checks for mispitched notes.

    • Example —

    Checks for mispitched ties attached to notes:

    ::

    staff = abjad.Staff(“c’4 ~ c’”) staff[1].written_pitch = abjad.NamedPitch(“d’”)

    ::

    agent = abjad.inspect(staff) print(agent.tabulate_well_formedness_violations()) 0 / 2 beamed quarter notes 0 / 1 conflicting clefs 0 / 1 discontiguous spanners 0 / 3 duplicate ids 0 / 1 empty containers 0 / 0 intermarked hairpins 0 / 0 misdurated measures 0 / 0 misfilled measures 0 / 0 mismatched enchained hairpins 1 / 1 mispitched ties 0 / 2 misrepresented flags 0 / 3 missing parents 0 / 0 nested measures 0 / 2 notes on wrong clef 0 / 2 out of range notes 0 / 0 overlapping beams 0 / 0 overlapping glissandi 0 / 0 overlapping hairpins 0 / 0 overlapping octavation spanners 0 / 1 overlapping ties 0 / 0 short hairpins 0 / 0 tied rests

    • Example —

    Checks for mispitched ties attached to chords:

    ::

    staff = abjad.Staff(“<c’ d’ bf’>4 ~ <c’ d’ bf’>”) staff[1].written_pitches = [6, 9, 10]

    ::

    agent = abjad.inspect(staff) print(agent.tabulate_well_formedness_violations()) 0 / 2 beamed quarter notes 0 / 1 conflicting clefs 0 / 1 discontiguous spanners 0 / 3 duplicate ids 0 / 1 empty containers 0 / 0 intermarked hairpins 0 / 0 misdurated measures 0 / 0 misfilled measures 0 / 0 mismatched enchained hairpins 1 / 1 mispitched ties 0 / 2 misrepresented flags 0 / 3 missing parents 0 / 0 nested measures 0 / 2 notes on wrong clef 0 / 2 out of range notes 0 / 0 overlapping beams 0 / 0 overlapping glissandi 0 / 0 overlapping hairpins 0 / 0 overlapping octavation spanners 0 / 1 overlapping ties 0 / 0 short hairpins 0 / 0 tied rests

    Does not check tied rests, chords or skips.

    Returns violator ties together with total number of ties.


’’’

  1. Checks to make sure there are no misrepresented flags in score.

    Returns violators and total.


’’’

  1. Checks to make sure there are no components in score with missing

    parent.

    Returns violators and total.


’’’

  1. Checks to make sure there are no nested measures in score.

    Returns violators and total.


’’’

  1. Checks notes and chords on wrong clef.

    • Example —

    ::

    staff = abjad.Staff(“c’8 d’8 e’8 f’8”) clef = abjad.Clef(name=alto) abjad.attach(clef, staff[0]) violin = abjad.instrumenttools.Violin() abjad.attach(violin, staff[0]) show(staff) # doctest: +SKIP

    .. docs::

    f(staff) Staff { Staff.instrumentName = Staff.shortInstrumentName = “alto” c’8 d’8 e’8 f’8 }

    ::

    agent = abjad.inspect(staff) print(agent.tabulate_well_formedness_violations()) 0 / 4 beamed quarter notes 0 / 1 conflicting clefs 0 / 0 discontiguous spanners 0 / 5 duplicate ids 0 / 1 empty containers 0 / 0 intermarked hairpins 0 / 0 misdurated measures 0 / 0 misfilled measures 0 / 0 mismatched enchained hairpins 0 / 0 mispitched ties 0 / 4 misrepresented flags 0 / 5 missing parents 0 / 0 nested measures 4 / 4 notes on wrong clef 0 / 4 out of range notes 0 / 0 overlapping beams 0 / 0 overlapping glissandi 0 / 0 overlapping hairpins 0 / 0 overlapping octavation spanners 0 / 0 overlapping ties 0 / 0 short hairpins 0 / 0 tied rests

    • Example —

    Allows percussion clef:

    ::

    staff = abjad.Staff(“c’8 d’8 e’8 f’8”) clef = abjad.Clef(name=percussion) abjad.attach(clef, staff[0]) violin = abjad.instrumenttools.Violin() abjad.attach(violin, staff[0]) show(staff) # doctest: +SKIP

    .. docs::

    f(staff) Staff { Staff.instrumentName = Staff.shortInstrumentName = “percussion” c’8 d’8 e’8 f’8 }

    ::

    agent = abjad.inspect(staff) print(agent.tabulate_well_formedness_violations( … allow_percussion_clef=True, … )) 0 / 4 beamed quarter notes 0 / 1 conflicting clefs 0 / 0 discontiguous spanners 0 / 5 duplicate ids 0 / 1 empty containers 0 / 0 intermarked hairpins 0 / 0 misdurated measures 0 / 0 misfilled measures 0 / 0 mismatched enchained hairpins 0 / 0 mispitched ties 0 / 4 misrepresented flags 0 / 5 missing parents 0 / 0 nested measures 0 / 4 notes on wrong clef 0 / 4 out of range notes 0 / 0 overlapping beams 0 / 0 overlapping glissandi 0 / 0 overlapping hairpins 0 / 0 overlapping octavation spanners 0 / 0 overlapping ties 0 / 0 short hairpins 0 / 0 tied rests

    • Example —

    Forbids percussion clef:

    ::

    agent = abjad.inspect(staff) print(agent.tabulate_well_formedness_violations( … allow_percussion_clef=False, … )) 0 / 4 beamed quarter notes 0 / 1 conflicting clefs 0 / 0 discontiguous spanners 0 / 5 duplicate ids 0 / 1 empty containers 0 / 0 intermarked hairpins 0 / 0 misdurated measures 0 / 0 misfilled measures 0 / 0 mismatched enchained hairpins 0 / 0 mispitched ties 0 / 4 misrepresented flags 0 / 5 missing parents 0 / 0 nested measures 4 / 4 notes on wrong clef 0 / 4 out of range notes 0 / 0 overlapping beams 0 / 0 overlapping glissandi 0 / 0 overlapping hairpins 0 / 0 overlapping octavation spanners 0 / 0 overlapping ties 0 / 0 short hairpins 0 / 0 tied rests

    Returns true or false.


’’’

  1. Checks to make sure notes and chords are within traditional

    instrument ranges.

    • Example —

    Out of range:

    ::

    staff = abjad.Staff(“c’8 r8 8 r8”) violin = abjad.instrumenttools.Violin() abjad.attach(violin, staff[0]) show(staff) # doctest: +SKIP

    .. docs::

    f(staff) Staff { Staff.instrumentName = Staff.shortInstrumentName = c’8 r8 8 r8 }

    ::

    agent = abjad.inspect(staff) print(agent.tabulate_well_formedness_violations()) 0 / 4 beamed quarter notes 0 / 1 conflicting clefs 0 / 0 discontiguous spanners 0 / 5 duplicate ids 0 / 1 empty containers 0 / 0 intermarked hairpins 0 / 0 misdurated measures 0 / 0 misfilled measures 0 / 0 mismatched enchained hairpins 0 / 0 mispitched ties 0 / 4 misrepresented flags 0 / 5 missing parents 0 / 0 nested measures 0 / 4 notes on wrong clef 1 / 2 out of range notes 0 / 0 overlapping beams 0 / 0 overlapping glissandi 0 / 0 overlapping hairpins 0 / 0 overlapping octavation spanners 0 / 0 overlapping ties 0 / 0 short hairpins 0 / 2 tied rests

    Returns true or false.


’’’

  1. Checks to make sure there are no overlapping beams in score.

    Returns violators and total.


’’’

  1. Checks to make sure there are no overlapping glissandi in score.

    Returns violators and total.


’’’

  1. Checks to make sure there are no overlapping hairpins in score.

    • Example —

    Checks overlapping hairpins:

    ::

    staff = abjad.Staff(“c’4 d’ e’ f’”) abjad.attach(abjad.Hairpin(‘<’), staff[:]) abjad.attach(abjad.Hairpin(‘>’), staff[:])

    ::

    agent = abjad.inspect(staff) print(agent.tabulate_well_formedness_violations()) 0 / 4 beamed quarter notes 0 / 1 conflicting clefs 0 / 2 discontiguous spanners 0 / 5 duplicate ids 0 / 1 empty containers 0 / 2 intermarked hairpins 0 / 0 misdurated measures 0 / 0 misfilled measures 0 / 2 mismatched enchained hairpins 0 / 0 mispitched ties 0 / 4 misrepresented flags 0 / 5 missing parents 0 / 0 nested measures 0 / 4 notes on wrong clef 0 / 4 out of range notes 0 / 0 overlapping beams 0 / 0 overlapping glissandi 2 / 2 overlapping hairpins 0 / 0 overlapping octavation spanners 0 / 0 overlapping ties 0 / 2 short hairpins 0 / 0 tied rests

    Enchained hairpins are fine so long as hairpin ends match.

    Returns violators and total.


’’’

  1. Checks to make sure there are no overlapping octavation spanners in

    score.

    Returns violators and total.


’’’

  1. Checks to make sure there are no overlapping ties in score.

    • Example —

    Checks overlapping ties:

    ::

    staff = abjad.Staff(“c’4 c’ c’ c’’”) abjad.attach(abjad.Tie(), staff[:2]) tie = abjad.Tie() tie._ignore_attachment_test = True abjad.attach(tie, staff[1:3])

    ::

    agent = abjad.inspect(staff) print(agent.tabulate_well_formedness_violations()) 0 / 4 beamed quarter notes 0 / 1 conflicting clefs 0 / 2 discontiguous spanners 0 / 5 duplicate ids 0 / 1 empty containers 0 / 0 intermarked hairpins 0 / 0 misdurated measures 0 / 0 misfilled measures 0 / 0 mismatched enchained hairpins 0 / 2 mispitched ties 0 / 4 misrepresented flags 0 / 5 missing parents 0 / 0 nested measures 0 / 4 notes on wrong clef 0 / 4 out of range notes 0 / 0 overlapping beams 0 / 0 overlapping glissandi 0 / 0 overlapping hairpins 0 / 0 overlapping octavation spanners 2 / 2 overlapping ties 0 / 0 short hairpins 0 / 0 tied rests

    Returns violators and count of total ties.


’’’

  1. Checks to make sure that hairpins span at least two leaves.

    Returns violators and total.


’’’

  1. Checks to make sure there are no tied rests.

    Returns violators and total.