lilypond-user
[Top][All Lists]
Advanced

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

Re: rest collision in tabstaff


From: Trevor Bača
Subject: Re: rest collision in tabstaff
Date: Mon, 19 Feb 2007 16:23:32 -0600

On 2/19/07, Hernan <address@hidden> wrote:
I don't understand why this simple .ly file gives me the warning (a lot ; i copy
here only one measure) which states (twice) :

"warning: can't resolve rest collision: rest direction not set "


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

top = \transpose c c' { <e, b, e g >4 <e, b, e g >4 a8\rest a8
}

bass = \transpose c c { e,4 e,4 c4\rest
}

thescoreTab = \score { << \new Staff    {
 \clef "G_8"  \time 3/4  \key e \minor  <<
         \voiceOne  { \stemUp   \top  }
         \new Voice { \voiceTwo \bass } >>
}       {
        \context TabStaff {      <<
  \context TabVoice { \top  }
  \new     TabVoice { \bass }    >>
}
} >>
 \layout {}
}
\book { \paper {}
\score { \thescoreTab }
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


The problem seems to be with the tabstaff. (BTW, I'd like to have a way to
suppress rests and beams and ... in tab notation; yes, I know I can make them
transparent, but that doesn't satisfy me: thay might be transparent, but they
are still there; they affect spacings ... and collisions; and the spacing-rods
thing does not seem to help much).

The result (version 2.10.19-1.mingw) can be see here:
http://hjg.com.ar/varios/ej2x.png
Notice that there is no visible collision. Further, I couldnt supress the
warning by moving the rests in the tab (with ExtraOffset), nor by turning them
transparent.

Hi Hernan,

That warning shows up when you have rests in two different voices
which coincide. Here's a minimal example.

%%% BEGIN %%%

\version "2.11.18"

\new Staff <<
  \new Voice {
     r4
  }
  \new Voice {
     r4
  }


%%% END %%%

GNU LilyPond 2.11.18
Processing `0122.ly'
Parsing...
Interpreting music...
Preprocessing graphical objects...
0122.ly:5:6: warning: cannot resolve rest collision: rest direction not set

     r4
0122.ly:5:6: warning: cannot resolve rest collision: rest direction not set

     r4
Layout output to `0122.ps'...
Converting to `0122.pdf'...


The warning goes away if we override the #'direction property of the Rest grob:

%%% BEGIN %%%

version "2.11.18"

\new Staff <<
  \new Voice {
     \override Rest #'direction = #up
     r4
  }
  \new Voice {
     \override Rest #'direction = #down
     r4
  }


%%% END %%%

GNU LilyPond 2.11.18
Processing `0122.ly'
Parsing...
Interpreting music...
Preprocessing graphical objects...
Layout output to `0122.ps'...
Converting to `0122.pdf'...


The warning also goes away if we turn one of the rests into a skip:

%%% BEGIN %%%

\version "2.11.18"

\new Staff <<
  \new Voice {
     r4
  }
  \new Voice {
     s4
  }


%%% END %%%

Note that, with a skip, we lose the appearance of two voices.


Since your tab has two true voices, we use the first solution:

%%% BEGIN %%%

\version "2.11.18"

top = \transpose c c' {
  \override Rest #'direction = #up
  <e, b, e g >4 <e, b, e g >4 a8\rest a8
}

bass = \transpose c c {
  \override Rest #'direction = #down
  e,4 e,4 c4\rest
}

thescoreTab = \score { << \new Staff    {
\clef "G_8"  \time 3/4  \key e \minor  <<
       \voiceOne  { \stemUp   \top  }
       \new Voice { \voiceTwo \bass } >>
}       {
      \context TabStaff {      <<
\context TabVoice { \top  }
\new     TabVoice { \bass }    >>
}
} >>
\layout {}
}
\book { \paper {}
\score { \thescoreTab }
}

%%% END %%%

... which now compiles without warnings.


In regards to your other points, I'm not (completely) clear on what
you mean by "suppress rests and beams", but here are some options that
will probably help:

* Turn r4 rests into s4 skips

* Set autoBeaming = ##f in the Score context to draw no beams (only flags)

* If you want truly rigid spacing, consider using some of the
proportional notation settings; I can forward over an advance copy of
a new chapter on this in the manual if you decide to go that direction

* extra-offset applies after *all* other typesetting finishes, so
extra-offset will never cause a warning to go away



--
Trevor Bača
address@hidden

reply via email to

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