bug-lilypond
[Top][All Lists]
Advanced

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

Re: Bug with (banjo) tablature rendering (workaround possible)


From: David Kastrup
Subject: Re: Bug with (banjo) tablature rendering (workaround possible)
Date: Thu, 29 Dec 2011 22:23:14 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux)

Dirk De Wachter <address@hidden> writes:

>> I'm not top posting.
> The script should explain it all. 
> It is written for the latest stable lilypond.
> It is somewhat lengthy as 4 different cases are shown.

Try the following.  The problem is that you start some contexts at the
beginning of bar 1 by setting the tabulature format to that of a banjo,
but since other contexts start _earlier_ with a grace note, they
establish the layout of the entire StaffGroup before that.  You either
need to start your "late" tabulature staffs with spacer rest grace
notes, or you need to use context modifications like that shown below to
have the contexts receive the tab style settings not at the start of bar
1, but rather at the start of their existence whenever that may be.

% A grace note (\grace, \acciaccatura, \appoggiatura) at the beginning 
%   of a score results in a 6 bar tablature for (5-string) banjo with 
%   noteheads between lines instead of upon the line, except for this 
%   first grace note. (case 2 & 3).
% This does not happen if no grace note is at the beginning of the 
%   score (case 1 & 4)
\version "2.14.2"

gracemusic = { \acciaccatura g8\5 }
music =  {
        <b\2 d,\4>4 \gracemusic <<{c4.\2( b8\2)} \\ {e,4\4}>>
        g16\5(a\2 b c\5)
}
extraPause = { \partial 8 s8 }

normalmusic = { \gracemusic \music }
noGrace = { \music }
withPause = { \extraPause \gracemusic \music }

sarabandeN = \context Staff 
        \relative c'' { \noGrace }
sarabande = \context Staff 
        \relative c'' { \normalmusic }
sarabandeP = \context Staff 
        \relative c'' { \withPause }

sarabandeBN = \context TabStaff \with {
        tablatureFormat = #fret-number-tablature-format-banjo
        stringTunings = #banjo-open-g-tuning
}
<<
        \relative c'' { \noGrace }
>>
sarabandeB = \context TabStaff \with {
        tablatureFormat = #fret-number-tablature-format-banjo
        stringTunings = #banjo-open-g-tuning
}
<<
        \relative c'' { \normalmusic }
>>
sarabandeBP = \context TabStaff \with {
        tablatureFormat = #fret-number-tablature-format-banjo
        stringTunings = #banjo-open-g-tuning
}
<<
        \relative c'' { \withPause }
>>

\book
{
        \markuplines { \column {
\bold \large "Wrong number of Tablature lines with grace note"
" A grace note (\grace, \acciaccatura, \appoggiatura) at the start of a score" 
"   results in a 6 bar tablature for banjo"
"   with noteheads between lines instead of"
"   on the line, except for this first grace note. (case 2 & 3)."
" This does not happen if no grace note is at the beginning of the score"
"  (case 1 & 4)"
                \hspace #40
        } }
        \score { 
                \new StaffGroup 
                << 
                        \sarabandeN 
                        \sarabandeBN
                >>
                \header { 
                        piece = 
"1. No grace note at beginning: correct rendering" }
        }
        \score { 
                \new StaffGroup 
                << 
                        \sarabande 
                        \sarabandeB
                >>
                \header { 
                        piece = 
                                \markup { 
                                \wordwrap { 
"2. " \bold {"With"} " grace note at beginning:"
\bold {" Incorrect"} " rendering with 6 bars." 
"Grace note is on the line, while other noteheads are between tablature lines." 
"First grace note fret is completely wrong"} } }
        }
        \score { 
                \new StaffGroup 
                << 
                        \sarabande 
                        \sarabandeBN
                >>
                \header { 
                        piece = \markup { \wordwrap {
"3. Even with the grace note not in the Tablature but only in the music Staff," 
"rendering is faulty with 6 lines in the Tablature." } } }
        }
        \score { 
                \new StaffGroup 
                << 
                        \sarabandeP 
                        \sarabandeBP
                >>
                \header { 
                        piece = 
"4. With something in front of the grace note, rendering is OK." }
        }
}
-- 
David Kastrup

reply via email to

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