illustrators


Functions

attach_markup_struts

LilyPond workaround.

components

Wraps components in LilyPond file for doc examples.

components_to_score_markup_string

Changes components to score markup string.

illustrate

Illustrates item.

lilypond

Gets LilyPond format of argument.

make_piano_score

Makes piano score from leaves.

abjad.illustrators.attach_markup_struts(lilypond_file)[source]

LilyPond workaround.

LilyPond’s multisystem cropping currently removes intersystem whitespace.

These transparent markup struts force LilyPond’s cropping to preserve whitespace.

abjad.illustrators.components(components, time_signatures=None, *, includes=None)[source]

Wraps components in LilyPond file for doc examples.

Sets LilyPond proportionalSpacingDuration to 1/24.

abjad.illustrators.components_to_score_markup_string(components)[source]

Changes components to score markup string.

abjad.illustrators.illustrate(item, **keywords)[source]

Illustrates item.

abjad.illustrators.lilypond(argument, *, site_comments=False, tags=False)[source]

Gets LilyPond format of argument.

abjad.illustrators.make_piano_score(leaves=None, lowest_treble_pitch='B3')[source]

Makes piano score from leaves.

REGRESSION. Function preserves tweaks:

>>> note = abjad.Note("c'4")
>>> abjad.tweak(note.note_head, r"\tweak color #red")
>>> score = abjad.illustrators.make_piano_score([note])
>>> abjad.show(score)  
>>> chord = abjad.Chord("<c d a' bf'>4")
>>> abjad.tweak(chord.note_heads[0], r"\tweak color #red")
>>> abjad.tweak(chord.note_heads[1], r"\tweak color #red")
>>> abjad.tweak(chord.note_heads[2], r"\tweak color #blue")
>>> abjad.tweak(chord.note_heads[3], r"\tweak color #blue")
>>> score = abjad.illustrators.make_piano_score([chord])
>>> abjad.show(score)  

REGRESSION. Function preserves markup:

>>> note = abjad.Chord("<c bf'>4")
>>> markup = abjad.Markup(r"\markup loco")
>>> abjad.attach(markup, chord, direction=abjad.UP)
>>> markup = abjad.Markup(r"\markup ped.")
>>> abjad.attach(markup, chord, direction=abjad.DOWN)
>>> score = abjad.illustrators.make_piano_score([chord])
>>> abjad.show(score)