The LilyPond Snippet Repository ♪♫

What's this? Searching the LSR Browse Contributing Snippet database

Results 1−10 of 359 for markup

Using lyrics as markup text [0.42857]

Using lyrics as markup text

…snippet allows to re-use the lyrics as a markup, e.g., for extracting a libretto. It defines … …italic ker \nl Du \markup \italic lil -- \markup \italic le fis -- ker } \markup { \override #'(line-width . 40) % set the line width \…

…Unnest list one level, but don't flatten markup constructs!" ;; The check for markup? is likely not … …markup \line \bold { With visible line break character } \markup { \override #'(display-nl . #t) \verse #words } %{ %% To have left-aligned word-wrapping with %% long lines, use \markup { \override #`(make-line . ,make-wordwrap-markup) \verse #words } %% (the default …

Using lyrics as markup text

Using header fields in arbitrary markup [0.42634]

Using header fields in arbitrary markup

This snippet adds a markup function that allows one to use header fields (… …This does not work for toplevel markup or markup inside a score, so \fromproperty returns an empty string in this case. The \markupWithHeader markup function defined in this snippet fixes this problem …

…calling mark-up-title. Also, I don't extract the % markup from the header block, but use the given … …The \fromproperty #'header:field are now properly % interpreted. \markup\markupWithHeader \testMarkup \markup\markupWithHeader { \wordwrap { This is a long text, which …

Using header fields in arbitrary markup

Implementing a counter in markup text [0.42411]

Implementing a counter in markup text

…implement a counter in LilyPond for use in markup texts. Whenever you call the \counter #"name" … …first call will print 1 by default. Example: \markup { Initial value of the counter: \counter #"mycounter". … …snippet also implements a \setcounter #"name" newvalue markup command to set the the counter to a …

…counter-alist (assoc-set! counter-alist name newval)) (interpret-markup layout props (markup (number->string newval))))) #(define-markup-command (setcounter layout props … …mycounter" } \markup { It is increasing: \counter #"mycounter" } \markup { It is increasing: \counter #"mycounter" } \markup { Second counter is increasing: \counter #"myothercounter" }

Implementing a counter in markup text

Of the ubiquity of markup objects [0.42411]

Of the ubiquity of markup objects

…as simple strings between double quotes or as \markup blocks that can accept a variety of advanced … …paper block such as evenHeaderMarkup for page numbers. \markup may additionally be used for lyrics, in chord … …dynamics. In fact, it is possible to use \markup to customize the appearance of virtually any object, …

…paper-width = 8\cm paper-height = 8\cm } \header { title = \markup "Header" tagline = \markup "(tagline)" } \markup "Top-level markup" dyn = … …Rest.stencil = #(lambda (grob) (grob-interpret-markup grob #{ \markup "Rest" #})) r4 } } \new Lyrics \lyricmode { \markup "LyricText" 1 } \new Dynamics { s1\dyn } >> }

Of the ubiquity of markup objects

Easily enter music expressions in markup [0.40179]

Easily enter music expressions in markup

…add a simple snippet of music into a markup function. Constructing the different notation elements manually can … …out of manually constructing these music expressions in \markup mode. When this command is useful: For creating … …Basically, \ezscore is a wrapper for the \score markup command that puts everything on a RhythmicStaff, but …

…ly:music?) #:properties ((size 0)) (interpret-markup layout props #{ \markup { \score { \new RhythmicStaff { $mus } \layout { \context { \RhythmicStaff \remove … …StaffSymbol.thickness = #(magstep size) } indent = 0 } } } #})) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \markup { Let's try something simple: \note {8} #UP + \… …4} #UP } . Yikes! Not so easy by hand. } \markup { Much easier: \note {8} #UP + \note {8} #UP = % …

Easily enter music expressions in markup

Absolute positioning of markup elements (laying out tables) [0.39286]

Absolute positioning of markup elements (laying out tables)

Positioning markup elements relative to one another is complicated by … …arguments. The \overlay-markup command takes a list of markup elements, it becomes much easier to lay out complex markup into specific arrangements, such as tables.

\paper { tagline = ##f } \markup { \overlay { \justify-string "Tabular arrangement of elements" \translate #'(… …fret-diagram "6-x;5-x;4-2-2;3-1-1;2-1-1;1-4-4;c:2-3-1;" } } } \markup \null \markup { \overlay { \translate #'(0 . 7) \justify-string "Musical notation …

Absolute positioning of markup elements (laying out tables)

Multi-measure rest markup [0.38839]

Multi-measure rest markup

…To expand a multi-measure rest to fit the markup, use an empty chord with an attached markup before the multi-measure rest. Text attached to a …

\relative c' { \compressMMRests { \textLengthOn <>^\markup { [MAJOR GENERAL] } R1*19 <>_\markup { \italic { Cue: ... it is yours } } <>^\markup { A } R1*30^\markup { [MABEL] } \textLengthOff c4^\markup { CHORUS } d f c } }

Multi-measure rest markup

Customizing markup fret diagrams [0.38393]

Customizing markup fret diagrams

…diagram properties can be set through 'fret-diagram-details. For markup fret diagrams, overrides can be applied to the Voice.TextScript object or directly to the markup.

…no barre, using defaults % terse style c'1^\markup { \fret-diagram-terse "x;3-3;2-2;o;1-1;o;" } %% C … …or left, small mute label font c'1^\markup { \override #'(fret-diagram-details . ( (finger-code . below-string) (number-type . arabic) (label-dir . … …dots, fewer frets % label below string d'1^\markup { \override #'(fret-diagram-details . ( (finger-code . below-string) (dot-radius . 0.35) (…

Customizing markup fret diagrams

Using markup for a staff's instrumentName [0.35714]

Using markup for a staff's instrumentName

…staff or a staff group can take arbitrary markup. For example, rather than writing Percussion , you can … …example also shows how to combine several text markup objects and properly shift them before overlaying them.

…Item?id=515 \new Staff = "Percussion" << %Use a markup as the instrumentName for the staff! \set Staff.instrumentName = \markup { \combine \translate #(cons -1.25 0) \combine \…

Using markup for a staff's instrumentName

Rewriting the Stem stencil using markup paths [0.35714]

Rewriting the Stem stencil using markup paths

This snippet rewrites ly:stem::print using a markup, which can be used as a base to create markup path stems. The example given produces stems shaped …

…interval-length X-ext)) (len (interval-length Y-ext))) (ly:stencil-translate (grob-interpret-markup grob (markup (#:path width (list (list 'moveto 0 0) (list '… …interval-length X-ext)) (len (interval-length Y-ext))) (ly:stencil-translate (grob-interpret-markup grob (markup (#:path width (list (list 'moveto 0 0) (list '…

Rewriting the Stem stencil using markup paths

1 2 3 4 5 6 7 8 9 10 Next ⇨