I think that the snippet Documentation/new/guitar-slides.ly needs some
adjustments.

First of all, guitar slides are supported by default by lilypond, so I
would choose a more specific title, e.g.: guitar-slides-into-or-out.ly
I've found a good description on wikibooks.org:

"Less commonly, tablature can instruct the guitarist to "slide into" or
"slide out of" a note. In printed tablature, they are notated identically
except, in the case of slide-into, the first note is omitted, and in the
case of slide-out-of, the second note is omitted. In other words, the note
slides in from nowhere, or out to nowhere. It simply tells the guitarist to
quickly slide from or to an arbitrary point, usually only a few frets away."

from: http://en.wikibooks.org/wiki/Guitar/Slides

This is what the snippet is about, but it is not described nor notated
correctly, because in the current version the hidden note is always on the
left side of the glissando. I would replace hideFretNumber with a better
name, since the function hides both the note in Staff and in TabStaff.

Also, I'll change the durations, otherwise I have to use \afterGrace to put
a grace note at the end of bar (and I don't want to make it look harder
than it is). And there are other warnings about "insane spring distance"
when using 2+2 time.

Note that the string number influences the direction of slur in TabStaff,
 so it is needed even for hidden notes.
Spacers inside the hidden grace block to make the glissando longer are not
an elegant way,  I think. I've added minimum-length and other options in
the layout block.

Find attached my proposal.
\version "2.17.30"

\header {
  lsrtags = "fretted-strings"

  texidoc = "
Slides may go from an imprecise point of the fretboard to a specific
fret (slide into) or viceversa (slide out). A good way to do that is
to add a grace hidden note before or after the note which is actually
played, as demonstrated in the following example.
"
  doctitle = "Guitar slides from or to an arbitrary point"
}

%% Hide fret number: useful to draw slide into/from a casual point of
%% the fretboard.
onceHideNote = {
  \once \hide TabNoteHead
  \once \hide NoteHead
  \once \hide Stem
  \once \override NoteHead.no-ledgers = ##t
  \once \override Glissando.bound-details.left.padding = #0.3
}

music= \relative c' {
  \grace { \onceHideNote a8\3^\markup \tiny { Slide into } \glissando } b4\3 s
  \grace { \onceHideNote d8 \glissando } f4\2 s |
  
  f4\3^\markup \tiny { Slide from } \glissando \onceHideNote \grace { c8\3 } s4
  e,4\5 \glissando \grace { \onceHideNote c8 } s4 |
}

\score {
  <<
    \new Staff {
      \clef "G_8"
      \music
    }
    \new TabStaff {
      \music
    }
  >>
  \layout {
    \context {
      \Score
      \override Glissando.minimum-length = #4
      \override Glissando.springs-and-rods = #ly:spanner::set-spacing-rods
      \override Glissando.thickness = #2
    }
    \context {
      \Staff
      \omit StringNumber
    }
  }
}
_______________________________________________
bug-lilypond mailing list
bug-lilypond@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-lilypond

Reply via email to