lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: changing a snippet in the LSR


From: Marc Hohl
Subject: Re: changing a snippet in the LSR
Date: Sat, 31 Oct 2009 21:55:32 +0100
User-agent: Thunderbird 2.0.0.23 (X11/20090817)

Marc Hohl schrieb:
Hello,

how can a snippet in the LSR be corrected?

http://lsr.dsi.unimi.it/LSR/Snippet?id=633

is not perfect, it should look like

---[snip]---

%LSR Contributed by Frederico Bruni

%% Hide fret number: useful to draw slide into/from a casual point of
%% the fretboard.
hideFretNumber = { \once \override TabNoteHead #'transparent = ##t \once \override NoteHead #'transparent = ##t \once \override Stem #'transparent = ##t
                  \once \override NoteHead #'no-ledgers = ##t %<--- NEW
}
Oh, I forgot: it would look even better (since the LSR is on 2.12) with the following
additions:

% the next definition and the layout block are necessary only for versions <2.13.6:

#(define-public (glissando::calc-tab-extra-dy grob)
 (let* ((original (ly:grob-original grob))
        (left-bound (ly:spanner-bound original LEFT))
        (right-bound (ly:spanner-bound original RIGHT))
        (left-pitch (ly:event-property (event-cause left-bound) 'pitch))
        (right-pitch (ly:event-property (event-cause right-bound) 'pitch)))

   (if (< (ly:pitch-semitones right-pitch) (ly:pitch-semitones left-pitch))
       -0.75
        0.75)))

\layout {
 \context {
   \TabVoice
   \override Glissando #'extra-dy = #glissando::calc-tab-extra-dy
 }
}

music= \relative c' {
     \grace { \hideFretNumber d8\2 \glissando s2 } g2\2
     \grace { \hideFretNumber g8\2 \glissando s2 } d2 |
\grace { \hideFretNumber c,8 \glissando s } f4\5^\markup \tiny "Slide into"
     \grace { \hideFretNumber f8 \glissando s } a4\4
\grace { \hideFretNumber e'8\3 \glissando s } b4\3^\markup \tiny "Slide from"
     \grace { \hideFretNumber b'8 \glissando s2 } g4 |
   }

\score {
 <<
   \new Staff {
     \clef "G_8" % <--- NEW
     \music    }
   \new TabStaff {
     \music    }
 >>
}

---[snip]---

otherwise the tablature won't fit to the displayed notes; moreover, the ledger lines of the hidden notes are still visible (ok, if the clef is G_8, then the ledger lines won't be there anymore, but for sake of maximum usability, the snippet should be prepared for users sliding around on the sixth string :-).

Thanks

Marc




_______________________________________________
lilypond-user mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/lilypond-user






reply via email to

[Prev in Thread] Current Thread [Next in Thread]