lilypond-user
[Top][All Lists]
Advanced

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

Re: how to add barre indications to automatic fret diagrams?


From: Carl Sorensen
Subject: Re: how to add barre indications to automatic fret diagrams?
Date: Thu, 21 May 2015 19:06:05 +0000
User-agent: Microsoft-MacOutlook/14.4.8.150116


On 5/21/15 8:39 AM, "pls" <address@hidden> wrote:
>
>> 
>> I thought about this issue quite a bit when I was creating predefined
>>fret
>> diagrams.  There, we introduced the idea of a chord shape.  There is a
>> function that shifts a chord shape by N frets (offset-fret).  At
>>present,
>> it adds N to the fret number for every dot.  I thought about setting the
>> fret number to N for every open string, but elected not to do it
>>because I
>> wouldn't know what to do with the finger.  I guess it's possible to set
>>it
>> to 1.
>
>I would argue that it would make a lot of sense to "set the fret number
>to N for every open stringĀ² and to automatically add a barre indication
>when transposing open chord shapes.  Otherwise these resulting diagrams
>look really daunting and unplayable.

There is a difference between transposing and shape shifting.

Shape shifting is done on chord shapes, rather than music.  It would be
trivial to set the fret to N and the finger to 1 when shifting a chord
shape.  I think that probably makes sense to do.

Transposing doesn't work on chord shapes.  Transposing works on notes.
The automatic fretboard creator looks at the notes and creates a
fretboard.  At that point, it has no knowledge of a chord shape, so we
can't do the shape shifting algorithm there.

Do you represent an E chord as

<e, b,-3 e-4 gis-2 b e'>
or
<e,-0 b,-3 e-4 gis-2 b-0 e'-c> ?

If the latter, you will get a warning when you try to transpose the chord,
because you're asking for open strings, and the transposed notes don't
work on open strings.  It makes for an incorrect diagram, with the finger
listed as 0 and a dot on the fret corresponding to the transposition.

\new FretBoards {
 <e,-0 b,-3 e-4 gis-2 b-0 e'-0>1
 \transpose e f <e,-0 b,-3 e-4 gis-2 b-0 e'-0>1
}



If you use the former notation, you get an incomplete fretboard when you
transpose the code,
because you:

1) Don't have the barre indicator
2) Don't have the finger listed for the barred notes

However, you don't get the warning, and you don't have the inconsistency
of asking for an open string and showing a dot simultaneously.

\new FretBoards {
 <e, b,-3 e-4 gis-2 b  e'>1
 \transpose e f <e, b,-3 e-4 gis-2 b  e'>1
   
  }

It would be possible to employ some code like the following:

If (some notes have fingers given) and
   (there is more than one dot on the lowest fret in the diagram)
then
   make a barre on the lowest fret and set the fingering of all the dots
on the lowest fret to 1

Or alternatively 

If (some notes have fingers given) and
   (a note has a finger of 0 and a fret >= 1)
then
   give that note a finger of 1

If (we have more than one note with the same finger)
then
   make a barre from the lowest note to the highest note on that finger



Do you think either of these algorithms would do what you want?

Thanks,

Carl





reply via email to

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