Abjad / abjad

Abjad is a Python API for building LilyPond files. Use Abjad to make PDFs of music notation.
https://abjad.github.io
GNU General Public License v3.0
234 stars 41 forks source link

FIXED. abjad.beam(..., stemlet_length=0.75) formats \revert correctly. #1542

Closed trevorbaca closed 1 year ago

trevorbaca commented 1 year ago
EXAMPLE.

    >>> voice = abjad.Voice("c'8 d' e' f'")
    >>> abjad.beam(voice[:], stemlet_length=0.75)
    >>> string = abjad.lilypond(voice)

OLD:

    >>> print(string)
    \new Voice
    {
        \override Staff.Stem.stemlet-length = 0.75
        c'8
        [
        d'8
        e'8
        \revert Staff.Stem.stemlet-length
        f'8
        ]
    }

NEW:

    >>> print(string)
    \new Voice
    {
        \override Staff.Stem.stemlet-length = 0.75
        c'8
        [
        d'8
        e'8
        f'8
        ]
        \revert Staff.Stem.stemlet-length
    }

CHANGED. abjad.illustrators.make_piano_score() includes explicit voices.

OLD:

    >>> score = abjad.illustrators.make_piano_score()
    >>> string = abjad.lilypond(score)
    >>> print(string)
    \context Score = "Score"
    <<
        \context PianoStaff = "Piano_Staff"
        <<
            \context Staff = "Treble_Staff"
            {
            }
            \context Staff = "Bass_Staff"
            {
            }
        >>
    >>

NEW:

    >>> score = abjad.illustrators.make_piano_score()
    >>> string = abjad.lilypond(score)
    >>> print(string)
    \context Score = "Score"
    <<
        \context PianoStaff = "Piano_Staff"
        <<
            \context Staff = "Treble_Staff"
            {
                \context Voice = "Treble_Voice"
                {
                }
            }
            \context Staff = "Bass_Staff"
            {
                \context Voice = "Bass_Voice"
                {
                }
            }
        >>
    >>