lilypond-user
[Top][All Lists]
Advanced

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

Re: Crosses in tablature


From: Simon Bailey
Subject: Re: Crosses in tablature
Date: Fri, 12 Dec 2008 10:51:10 +0100

hi marius,

On Dec 12, 2008, at 2:13 AM, Marius Andersen wrote:
These commands, when used in the Staff context, give me nice cross noteheads -- i.e., stopped/dampened notes as far as guitar is concerned. However, they have NO effect in the TabStaff context:

   \new TabStaff {
     % This doesn't work

     \override NoteHead  #'style = #'cross
     c c c c

     \override NoteHead  #'style = #'default

     \tweak #'style #'cross c
   }

In other words, I cannot get an "X" on one of the tablature lines, and so, cannot write dampened notes for guitar.


try this:

<<<<
#(define (x-tab-format str context event)
    (let*
      ((tuning (ly:context-property context 'stringTunings))
        (pitch (ly:event-property event 'pitch)))
      (make-whiteout-markup
        (make-vcenter-markup
          (markup #:musicglyph "noteheads.s2cross")))))


crosshead = \set tablatureFormat = #x-tab-format
uncrosshead = \unset tablatureFormat

\new TabStaff {
    \crosshead
    c c c c
    \uncrosshead
    c c
    \crosshead
    c
    \uncrosshead
    c
}>>>>

(callously nicked from the letter tablature formatting on http://lilypond.org/doc/v2.11/input/lsr/lilypond-snippets/Fretted-strings#Fretted-strings ).

regards,
sb
--
Simon Bailey
Oompa Loompa of Science
+43 699 190 631 25





reply via email to

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