Uh, "bass_8"... that's a news.
I still use the relative to prevent some ' and , from the code. Since I also 
have (in the real code) also fingering and sting numbers, it will become a real 
mess otherwise.
Here is the now working code:

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\version "2.18.0"

verse = 
\relative c,,
{
    a'4 b c a | a b c a | \break
}

chorus =
\relative c,,
{
    a'4 b c d | d e f g | \break
}

song = 
{
    \repeat volta 2
    {
        \verse
    }
    \chorus
    \verse
    \chorus
    \bar "|."
}

bass =  {
    <<
    \new Staff \with {
        \clef "bass_8"
        \omit Voice.StringNumber
    }
    { 
        \song
    }
    
    \new TabStaff \with {
        \clef moderntab
        stringTunings = #bass-tuning
    }
    {     
        \song 
    }
    \set Staff.instrumentName = #"Bass" 
    >>
}

\score {    
  \bass
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Since to avoid all ' and , I have to still declare "\relative c" in the two 
sections to use traspose, I preferred to use the "\relative c,," and remove the 
score transpose.

Thanks guys!

Il Lunedì 12 Maggio 2014 11:56, Pierre Perol-Schneider 
<pierre.schneider.pa...@gmail.com> ha scritto:
 
2014-05-12 11:42 GMT+02:00 Carlo Vanoni <vanoniiscrizi...@yahoo.it>:

 

As said, this set all verse/note to the correct pitch, but the tabs pitch will 
be wrong (the \relative definition in the TabScore section will be ignored).
>
 

Hi Carlo,

If you want to have the right pitch you have to put the right clef in the staff 
(\clef "bass_8").

Now if that causes you problem, why are you coding in a relative mode ?

You can do something like :

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\version "2.18.0"


verse = {
   a4 b c' a | a b c' a | \break
}
chorus = {
   a4 b c' d' | d' e' f' g' | \break
}
song = {
    \repeat volta 2 { \verse }
    \chorus
    \verse
    \chorus
    \bar "|."
}

bass = \transpose c c,, {
<<
     \new Staff 
        \with {
            \clef "bass_8"
            \omit Voice.StringNumber
   }
   {
            \song
    }
  \new TabStaff 
    \with {
              \clef moderntab
              stringTunings = #bass-tuning
          }
          { 
              \song
          }
        \set Staff.instrumentName = #"Bass"
    >>
  }
  \score { 
    \bass
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to