Il giorno Mon, 25 Jan 2010 21:17:19 +0100
Oscar van Eijk <oscar.van.e...@oveas.com> ha scritto:

> At some locations I add a second voice, as in the snippet I includes
> with this mail, but that doesn't work for tabs; the new voice is twice
> interpreted as a normal voice and an extra normal (G clef) staff is
> added.

I guess the problem is that you've inserted \new Voice inside a
variable.
I'm not sure if this is correct.. I think \new commands must be placed
in \score blocks. Right?
The examples on the website are implicitly in a \score block.

Also, I suggest you to use bar checks: there was an error in you input
(a half note missing).
It's also useful having a line break after each bar and always putting
the note value for first note of a bar (even though it's the same value
of the last note of the earlier bar).. so it's easier to find errors and
read the code.

I attach the file.
It works, but I have two warnings:
warning: maybe input should specify polyphonic voices
warning: adding note head to incompatible stem (type = 4)

I can't help with that.. I'm used to put each voice in a different
variable and then specify them in \score, so I've never come across this
problem.

Cheers,
Federico
-- 
http://gnurag.net/blog/
http://fsfe.org/
http://groups.fsf.org/wiki/LibrePlanetItalia

\version "2.12.2"

guitar = \relative c' {
a,4 a16 e' bes' cis g'( e)~ e4. |

<<
  {
    \voiceOne
    \hideNotes bes'4\( \unHideNotes a8( g) a g
    \set TabStaff.minimumFret= #2
    f e~ |
    e2 \grace { e16 } e2\turn\) |
    \set TabStaff.minimumFret = #0
    \hideNotes bes'4\( \unHideNotes a8( g) a g
    \set TabStaff.minimumFret= #2
    f e~ |
    e2 \hideNotes e2 \)\unHideNotes |
  }
  %\new Voice {
  {  \voiceTwo
    <a,, f' bes d bes'>2\arpeggio a |
    a2 a |
    <a f' bes d bes'>2\arpeggio s | % I've added an 's' here, now bar checks are OK
    a2 a |
  }
>>

\oneVoice

<a e' a cis e>16
<a e' a cis e>
<a e' a cis e>
<a e' a cis e>
<a e' a cis e>2.\fermata |
}

\score {
  \new StaffGroup <<
    \new Staff="Accoustic guitar" <<
      \set Staff.instrumentName="Accoustic guitar"
      \clef "G_8"
      \guitar
      >>
    \new TabStaff="Accoustic guitartabs" <<
      \set TabStaff.instrumentName="Guitartabs"
      \set StaffGroup.instrumentName="Accoustic guitar"
      \guitar
    >>
  >>


%{  <<
    \new StaffGroup <<
    \context Staff="Accoustic guitar" <<
      \set Staff.instrumentName="Accoustic guitar"
      \clef "G_8"
      \guitar
    >>
    \context TabStaff="Accoustic guitartabs" <<
      \set TabStaff.instrumentName="Guitartabs"
      \set StaffGroup.instrumentName="Accoustic guitar"
      \guitar
    >>
  >>
>>  %}
\layout{}

}
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to