Re: [tablatures] transposing tablature

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




On 1/8/10 7:50 PM, "Carl Sorensen" <c_sorensen@xxxxxxx> wrote:

> 
> 
> 
> 
> On 1/8/10 12:05 PM, "Patrick Schmidt" <p.l.schmidt@xxxxxx> wrote:
> 
>> First of all I propose to have transposable tablature because in my opinion
>> this function is helpful but does not exist, yet. Let me demonstrate the
>> problem:
>> 
>> What happens in tablature when you transpose a 5-note c major common chord in
>> first position to D major?
>> 
>> \version "2.13.10"
>> music = { <c e g c e>1 }
>> \score {
>>         <<
>>           \new Staff = "1" <<
>>           \transpose c d {\relative c' {\music }}
>>>> 
>> 
>>           \new TabStaff = "Tab 1" <<
>>           \transpose c d {\relative c {\music }}
>>>>         
>>>> 
>> }
>> 
>> You get an inverted 4-note d major (sixth) chord in first position. The root
>> of the former c major chord got lost in transposition by default because the
>> root of the resulting d major chord would be on the fifth fret of the fifth
>> string. LilyPond tries to find the corresponding pitches in the first four
>> frets of the guitar because the default value of minimumFret is zero. In my
>> opinion this behaviour is wrong because not all the pitches of the new chord
>> can be found in first position.
> 
> This is a bug.  Minimum fret should not default to zero.  It should default
> to unset, and the code should be able to find the correct chord.
> 
> I had missed this problem before in your code.  I apologize for not
> understanding it.
> 
> I think I can fix this bug.  I'll try to get to it in the next couple of
> hours.

Patrick,

Can you add a FretBoards context and do some experimenting to see if the
chords transpose properly in the FretBoards context?

For the particular case you gave, the FretBoards function works properly.

If the FretBoards function works properly to give the tablature you want,
I'll adjust the tab-note-head engraver so it uses the same note-to-fret
function that the FretBoards engraver uses.

I think this is the proper thing to have happen, anyway.

Here's my sample code:

\version "2.13.10"
music = { <c e g c e>1 }
\score {
        <<
          \new FretBoards {
            \transpose c d {\relative c {\music}}
          }
          \new Staff = "1" <<
          \transpose c d {\relative c' {\music }}
          >>

          \new TabStaff = "Tab 1" <<
%          \set TabStaff.minimumFret = #2
          \transpose c d {\relative c {\music }}
          >>
        >>
}


Thanks,

Carl




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