%% http://lsr.di.unimi.it/LSR/Item?id=622
%% see also http://www.lilypond.org/doc/v2.18/Documentation/snippets/tweaks-and-overrides#tweaks-and-overrides-displaying-grob-ancestry
-#(define (grob-name grob)
- (if (ly:grob? grob)
- (assoc-ref (ly:grob-property grob 'meta) 'name)
- #f))
+%% Remark:
+%% grob::name is in the source since 2.19.x could be deleted during next LSR-upgrade
+#(define (grob::name grob)
+ (assq-ref (ly:grob-property grob 'meta) 'name))
#(define (get-ancestry grob)
- (if (not (null? (ly:grob-parent grob X)))
- (list (grob-name grob)
- (get-ancestry (ly:grob-parent grob X))
- (get-ancestry (ly:grob-parent grob Y)))
- (grob-name grob)))
+ (if (not (null? (ly:grob-parent grob X)))
+ (list (grob::name grob)
+ (get-ancestry (ly:grob-parent grob X))
+ (get-ancestry (ly:grob-parent grob Y)))
+ (grob::name grob)))
#(define (format-ancestry lst padding)
(string-append
(format (current-error-port)
"~3&~a~2%~a~&"
(make-string 36 #\-)
- (format-ancestry (get-ancestry grob) 0)))
+ (if (ly:grob? grob)
+ (format-ancestry (get-ancestry grob) 0)
+ (format #f "~a is not a grob" grob))))
\relative c' {
\once \override NoteHead.before-line-breaking = #display-ancestry
+++ /dev/null
-\version "2.18.0"
-
-\header {
- lsrtags = "paper-and-layout, vocal-music"
-
- texidoc = "
-Sometimes you may want to put lyrics for different performers on a
-single line: where there is rapidly alternating text, for example.
-This snippet shows how this can be done with @code{\\override
-VerticalAxisGroup.nonstaff-nonstaff-spacing.minimum-distance =
-##f}.
-
-"
- doctitle = "Arranging separate lyrics on a single line"
-}
-\layout {
- \context {
- \Lyrics
- \override VerticalAxisGroup.nonstaff-nonstaff-spacing.minimum-distance = ##f
- }
-}
-
-aliceSings = \markup { \smallCaps "Alice" }
-eveSings = \markup { \smallCaps "Eve" }
-
-<<
- \new Staff <<
- \new Voice = "alice" {
- f'4^\aliceSings g' r2 |
- s1 |
- f'4^\aliceSings g' r2 |
- s1 | \break
- % ...
-
- \voiceOne
- s2 a'8^\aliceSings a' b'4 |
- \oneVoice
- g'1
- }
- \new Voice = "eve" {
- s1 |
- a'2^\eveSings g' |
- s1 |
- a'2^\eveSings g'
- % ...
-
- \voiceTwo
- f'4^\eveSings a'8 g' f'4 e' |
- \oneVoice
- s1
- }
- >>
- \new Lyrics \lyricsto "alice" {
- may -- be
- sec -- ond
- % ...
- Shut up, you fool!
- }
- \new Lyrics \lyricsto "eve" {
- that the
- words are
- % ...
- …and then I was like–
- }
->>
+++ /dev/null
-\version "2.18.0"
-
-\header {
- lsrtags = "really-simple, vocal-music"
-
- texidoc = "
-Fonts can be changed independently for each stanza, including the font
-used for printing the stanza number.
-
-"
- doctitle = "Changing stanza fonts"
-}
-
-\new Voice {
- \time 3/4
- g2 e4
- a2 f4
- g2.
-}
-\addlyrics {
- \set stanza = #"1. "
- Hi, my name is Bert.
-}
-\addlyrics {
- \override StanzaNumber.font-name = #"DejaVu Sans"
- \set stanza = #"2. "
- \override LyricText.font-family = #'typewriter
- Oh, ché -- ri, je t'aime
-}
+++ /dev/null
-\version "2.18.0"
-
-\header {
- lsrtags = "text, tweaks-and-overrides"
-
- texidoc = "
-The default font families for text can be overridden with
-@code{make-pango-font-tree}.
-
-"
- doctitle = "Changing the default text font family"
-}
-
-\paper {
- % change for other default global staff size.
- myStaffSize = #20
- %{
- run
- lilypond -dshow-available-fonts blabla
- to show all fonts available in the process log.
- %}
-
- #(define fonts
- (make-pango-font-tree "Times New Roman"
- "Nimbus Sans,Nimbus Sans L"
- "Luxi Mono"
-;; "Helvetica"
-;; "Courier"
- (/ myStaffSize 20)))
-}
-
-\relative c'' {
- c4^\markup {
- roman: foo \bold bla \italic bar \italic \bold baz
- }
- c'4_\markup {
- \override #'(font-family . sans)
- {
- sans: foo \bold bla \italic bar \italic \bold baz
- }
- }
- c'2^\markup {
- \override #'(font-family . typewriter)
- {
- mono: foo \bold bla \italic bar \italic \bold baz
- }
- }
-}
+++ /dev/null
-\version "2.19.22"
-
-\header {
- lsrtags = "fretted-strings, specific-notation, tweaks-and-overrides"
-
- texidoc = "
-If you want to move the position of a fret diagram, for example, to
-avoid collision, or to place it between two notes, you have various
-possibilities:
-
-1) modify #'padding or #'extra-offset values (as shown in the first
-snippet)
-
-2) you can add an invisible voice and attach the fret diagrams to the
-invisible notes in that voice (as shown in the second example).
-
- If you need to move the fret according with a rythmic position inside
-the bar (in the example, the third beat of the measure) the second
-example is better, because the fret is aligned with the third beat
-itself.
-
-"
- doctitle = "How to change fret diagram position"
-}
-harmonies = \chordmode
-{
- a8:13
-% THE FOLLOWING IS THE COMMAND TO MOVE THE CHORD NAME
- \once \override ChordNames.ChordName.extra-offset = #'(10 . 0)
- b8:13 s2.
-% THIS LINE IS THE SECOND METHOD
- s4 s4 b4:13
-}
-
-\score
-{
- <<
- \new ChordNames \harmonies
- \new Staff
- {a8^\markup { \fret-diagram #"6-x;5-0;4-2;3-0;2-0;1-2;" }
-% THE FOLLOWING IS THE COMMAND TO MOVE THE FRET DIAGRAM
- \once \override TextScript.extra-offset = #'(10 . 0)
- b4.~^\markup { \fret-diagram #"6-x;5-2;4-4;3-2;2-2;1-4;" } b4. a8\break
-% HERE IS THE SECOND METHOD
- <<
- { a8 b4.~ b4. a8}
- { s4 s4 s4^\markup { \fret-diagram #"6-x;5-2;4-4;3-2;2-2;1-4;" }
- }
- >>
- }
- >>
-}
+++ /dev/null
-\version "2.18.0"
-
-\header {
- lsrtags = "tweaks-and-overrides, pitches, staff-notation"
-
- texidoc = "
-It is possible to change the slope of the Ottava spanner.
-
-"
- doctitle = "Modifying the Ottava spanner slope"
-}
-
-\relative c'' {
- \override Staff.OttavaBracket.stencil = #ly:line-spanner::print
- \override Staff.OttavaBracket.bound-details =
- #`((left . ((Y . 0) ; Change the integer here
- (attach-dir . ,LEFT)
- (padding . 0)
- (stencil-align-dir-y . ,CENTER)))
- (right . ((Y . 5) ; Change the integer here
- (padding . 0)
- (attach-dir . ,RIGHT)
- (text . ,(make-draw-dashed-line-markup (cons 0 -1.2))))))
- \override Staff.OttavaBracket.left-bound-info =
- #ly:line-spanner::calc-left-bound-info-and-text
- \override Staff.OttavaBracket.right-bound-info =
- #ly:line-spanner::calc-right-bound-info
- \ottava #1
- c1
- c'''1
-}
\key c \major
\relative c''
{
- % disable the following line to see the noteheads while writing the song
+ % disable the following line to see the the noteheads while writing the song
\NoNoteHead
\override NoteHead.no-ledgers = ##t