Re: [tablatures] transposing tablature

[ Thread Index | Date Index | More lilynet.net/tablatures Archives ]




On 1/6/10 3:55 PM, "Patrick Schmidt" <p.l.schmidt@xxxxxx> wrote:

> Hi all (happy new year btw),
> 
> I often use the \transpose-function in combination with TabStaffs. Here is an
> example of some of the problems I encounter in this context:
> 
> \version "2.13.10"
> 
> music = {
>         <b fis' b\3>1
>         \set TabStaff.minimumFret = #2
>         <b fis' b\3>1
>         %\set TabStaff.minimumFret = #2
>         <b fis' b>1
>         \set TabStaff.minimumFret = #0
>         <c e g c e>1
> }
> 
> \score {
>         <<
>           \new Staff = "1" <<
>           \relative c' {\music }
>>> 
>                
>           \new TabStaff = "Tab 1" <<
>           \relative c {\music }
>>> 
>                
>           \new Staff = "2" <<
>           \transpose c d {\relative c' {\music } }
>>> 
>                
>           \new TabStaff = "Tab 2" <<
>           \transpose c d {\relative c {\music } }
>>> 
>>> 
> }
> 

As I see it, the problem is that you aren't telling LilyPond what you want.
If you want to keep the notes on the same strings and just shift the
fretboard position, you should just specify the string for each note.

version "2.13.10"

music = { 
        <b\5 fis'\4 b\3>1
        \set TabStaff.minimumFret = #2
        <b\5 fis'\4 b\3>1
        %\set TabStaff.minimumFret = #2
        <b\5 fis'\4 b\3>1
        \set TabStaff.minimumFret = #0
        <c\5 e\4 g\3 c\2 e\1>1
}

\score {
        <<  
          \new Staff = "1" {
          %\override StringNumber #'stencil = ##f
          \override StringNumber #'transparent = ##t
          \relative c' {\music }
          }   

          \new TabStaff = "Tab 1" <<
          \relative c {\music }
          >>  

          \new Staff = "2" {
          %\override StringNumber #'stencil = ##f
          \override StringNumber #'transparent = ##t
          \transpose c d {\relative c' {\music } }
          }   

          \new TabStaff = "Tab 2" <<
          \transpose c d {\relative c {\music } }
          >>  
        >>  
}


Once you do that, everything works properly.

I don't see a need for any new commands.

Thanks,

Carl




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/