The LilyPond Snippet Repository ♪♫

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

Results 41−50 of 359 for markup

Creating fret diagrams with chord names but no staff/staves using fret diagram markup [0.25000]

…names but no staff/staves using fret diagram markup

…with the fret diagrams specified using fret diagram markup. The first example in the "Fret diagram markups" … …6f/lily-b213fdb4.ly) is defined using fret diagram markup, so I have used that example as the …

Creating fret diagrams with chord names but no staff/staves using fret diagram markup

Removing items from only voiceTwo using a Scheme filter [0.24777]

…each voice has all dynamics, articulations, ornaments and markup text assigned. However, when combining them as two … …engraver creates both the rest itself and all markup attached to it. Using the second approach, one …

…372 %here starts the snippet: \header { title = "Removing markup, dynamics etc. from voiceTwo" } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% Description of the problem … …voiceOne \mI } \context Voice = "v2" \with { % Dynamics, text markup, articulations, ornaments etc. can be % removed from one … …approach! } { \voiceTwo \mII } >> \context Staff = "bothFiltered" \with { instrumentName = \markup \column { "Combined," "using" "filters" } } << \context Voice = "v1Filtered" { \voiceOne \…

Removing items from only voiceTwo using a Scheme filter

Draw a box spanning multiple staves [0.24777]

…boxes around objects on different staves. Syntax is ^\markup\myMarker #width #height or ^\markup\myBox #width #height

…props colorWidth colorHeight) (number? number?) (interpret-markup layout props (markup #:line (#:with-dimensions (cons 0 0)(cons 0 0) (… …lineto) -1.7 (* myHeight -1)) (list (quote closepath)))))))) \markup { \vspace #2 \italic "Option 2:" } << << \new Voice = VOne \… …autoBeamOff \time 3/4 s2 b8 c' | aes ^\markup\myBox #7.5 #15 %% #width #height aes } \new …

Draw a box spanning multiple staves

Three-sided box [0.24554]

This example shows how to add a markup command to get a three sided box around some text (or other markup).

…Y DOWN x-rule 0.0)) stencil)) % The corresponding markup command, based on the \box command defined % in … …m thickness pad))) % Test it: \relative c' { c1^\markup { \NWS-box ABCD } c1^\markup { \NWS-box \note {4} #1.0 } }

Three-sided box

Dynamics with attributes aligned on dynamic sign (e.g. "poco f" aligned on "f") [0.24554]

…the "forte". In this snippet we define a markup command to align a line-markup on the center … …forte". X-offset is tweaked to 0, because otherwise markup halign will not work and so overriding will …

…props ...) #(define-markup-command (center-dyn layout props atr-text dyn)(markup? string?) "x-align on center of dynamic" (let* ((text (… …atr-x dyn-x) ) 0.5) 2))) (interpret-markup layout props (markup #:halign x-align #:concat (#:normal-text #:italic text #:dynamic dyn))))) % … …#(define (make-atr-dynamic-script atr dyn) (let ((dynamic (make-dynamic-script (markup #:center-dyn atr dyn)))) #{ \tweak X-offset 0 $dynamic …

Dynamics with attributes aligned on dynamic sign (e.g. "poco f" aligned on "f")

Preventing long \mark objects to stretch a measure [0.24107]

When you put a long \markup text in a \mark object, LilyPond stretches the measure to encompass the complete markup. This can be avoided by overriding the 'X-extent …

…override Score.RehearsalMark.self-alignment-X = #left R1 R1 \mark \markup { "long markup with default horizontal extent" } R1*2 } \… …override Score.RehearsalMark.self-alignment-X = #left R1 R1 \mark \markup { "long markup with default horizontal extent" } \override Score.RehearsalMark.X-extent = …

Preventing long \mark objects to stretch a measure

Creating guitar scales on fretboards [0.24107]

…5 you can wrap this up in a markup command for building up a list of scales cpenta = \markup \scale-diagramm #'((5 3) (5 5 ) (4 3) (…

…arg2 arg3) (list? integer? number?) (interpret-markup layout props (markup (#:override (cons 'size arg3 ) (#:override '(fret-diagram-details . ( (finger-code . in-dot) (… …1 7) (1 8)) #7 #1.0 dmajor=\markup\scale-diagramm #'((5 5) (5 7) (4 4) (… …1 9) (1 10)) #7 #1.35 cpenta=\markup\scale-diagramm #'((5 3) (5 5) (4 3) (…

Creating guitar scales on fretboards

Color Gradient using Postscript [0.24107]

…has no way of creating color gradients. This markup function duplicates the path markup, converts it to postscript and uses postscript's …

…ps (path->ps path)) (markup-test (ly:text-interface::interpret-markup layout props (markup #:line (#:path 0.1 path)))) (xextnt (ly:stencil-extent markup-test … …xextls)) (colored (map (lambda (a r g b) (markup #:line (#:with-color (list r g b) a))) (reverse … …curveto -50 -50 -50 50 -10 0) (closepath)) \markup \translate #'(40 . -20) %% \with-dimensions is needed to …

Color Gradient using Postscript

Encapsulated text [0.24107]

\capsule arg (markup). Draw a capsule around arg. Use thickness, x-padding, … …to determine line thickness and padding around the markup.

…interval-center y-ext)))))) #(define-markup-command (capsule layout props arg) (markup?) #:category graphic #:properties ((thickness 1) (font-size 0) (x-padding … …and padding around the markup. @lilypond[verbatim,quote] \\markup { \\capsule { Hi } } @end lilypond" (let ((th (* (ly:output-def-lookup layout '… …capsule-stencil m th pad-x pad-y))) %%%% Defs end %%%%%%%%%% %%%% Tests: \markup { \italic "Default:" \capsule "Hi" } \markuplist { \vspace #1 \italic "…

Encapsulated text

Customized accidentals [0.23214]

…in three steps: Replace the alteration with a \markup object (which is printed by the text-interface) Specify the \markup itself (as we still want an alteration to … …command) Add a \postscript simple design in the markup, using simple commands like lineto or moveto. Notice …

…Accidental.stencil = #ly:text-interface::print \once \override Voice.Accidental.text = \markup {\musicglyph "accidentals.sharp" \postscript "gsave 0.17 setlinewidth … …Accidental.stencil = #ly:text-interface::print \once \override Voice.Accidental.text = \markup {\musicglyph "accidentals.flat" \postscript "0.17 setlinewidth -2 …

Customized accidentals

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