lilypond-user
[Top][All Lists]
Advanced

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

Re: French tablature?


From: Malte Meyn
Subject: Re: French tablature?
Date: Fri, 30 Dec 2016 09:38:07 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1


Am 30.12.2016 um 09:27 schrieb Malte Meyn:
Then you can add the following code to the \layout-\context-\TabStaff
block (f. e. after setting tablatureFormat):

      \override TabNoteHead.before-line-breaking =
        #(lambda (grob)
          (ly:grob-set-property! grob 'Y-offset
            (+  (ly:grob-property grob 'Y-offset) 0.5)))

I just noticed that this naturally moves also the bass strings. If you want to have them at their original position (with some space between them and the TabStaff) you’ll need a small change to this; see the code below.

\version "2.19.53"

% maybe this could be automatically extracted from mel?
rh = {
  4*3 8*2 4. 8*5 4*2 8*4 16*4 8. 16 8*2 4 2*2 1
}

mel = \relative {
  a,,4 b c d8 e f4. g8
  a b c d e4 f g8
  a b c d16 e f g
  a8. b16 c8 cis d4
  d,2 d, d,1
}

\score {
  <<
    \new RhythmicStaff \rh
    \new TabStaff \mel
    \new Staff { \clef "treble_8" \mel }
  >>
  \layout {
    \context {
      \TabStaff
      tablatureFormat = #fret-letter-tablature-format
      \override TabNoteHead.before-line-breaking =
      #(lambda (grob)
         (if (not (< (ly:grob-property grob 'Y-offset) -4))
             (ly:grob-set-property! grob 'Y-offset
               (+  (ly:grob-property grob 'Y-offset) 0.5))))
      stringTunings = \stringTuning <a, d f a d' f'>
      additionalBassStrings = \stringTuning <a,, b,, c, d, e, f, g,>
      % don’t use j as a fret label:
      fretLabels = #'("a" "b" "c" "d" "e" "f" "g" "h" "i" "k")
    }
    \context {
      \RhythmicStaff
      \override StaffSymbol.line-count = 0
      \autoBeamOff
      \remove Bar_engraver
      \override VerticalAxisGroup.staff-staff-spacing.basic-distance = 7
      % you might want
      % 1. no time signature:
      \remove Time_signature_engraver
      % 2. straight flags:
      %\override Flag.stencil = #old-straight-flag
      % 3. other note head shape or no note heads:
      \override NoteHead.style = #'petrucci
      %\omit NoteHead
    }
  }
}

Attachment: full.png
Description: PNG image


reply via email to

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