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 23:43:30 +0000
User-agent: Microsoft-MacOutlook/14.4.8.150116

On 5/21/15 4:42 PM, "pls" <address@hidden> wrote:

>
>On 21.05.2015, at 21:06, Carl Sorensen <address@hidden> wrote:
>
>> 
>> 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.
>
>Ah, ok, now I¹m beginning to understand the problem.  The line between
>transposing and shape shifting is sometimes very thin, though.  (The
>notes of) Some chord structures like e.g. 1.3.5.8.10.15 (G shape) or
>1.5.8.10.12.15 (E shape) cannot be transposed without also shifting and
>thus keeping their shapes.  Transposing the notes of other chord
>structures like 1.5.8.10 could mean using either the same shape (shape
>shifting) or switching to at least one (sometimes two) alternative
>shape(s) (A shape, D shape, E shape)

Actually, this is not what I meant.

I am now speaking solely in LilyPond internals terms.  When \transpose is
applied to a chord, it changes the pitches of the chord, but does not
change the fingerings.  And there is no reasonable system I can imagine
that would allow \transpose to do the right thing on both chords and
single notes, relative to fingerings.  So \transpose is almost guaranteed
*not* to work effectively on automatically-generated fret diagrams.

That is *why* there is a predefined fretboard capability defined in
LilyPond.  You are free to define the set of chords you want to work with,
complete with fingerings.  And if you do that, the predefined fretboards
will work *exactly* the way you want them to work when you transpose.

As part of the predefined fretboard code, to make it easy to define
fretboards, we have the concept of a chord shape (e.g. E-shape, A-shape,
D-shape).  And we can define other chords as these shapes shifted by a
certain number of frets.  That is what I meant by shape shifting.  Not
changing shapes, but moving a shape along the fretboard by a given number
of frets.  I apologize for my lack of clarity.

In the current usage of predefined-guitar-fretboards, we actually don't
use E-shape, because it is missing the barre.  So we use F-shape (which
has the barre) and then slide it along the fretboard wherever we want to
go, to get F#, G, G#, etc.  Same with A-shape.  We use bes-shape (because
it has the barre) and then slide it along the fretboard.

The predefined fretboards are really quite robust to LilyPond
transposition, meaning you can apply \transpose to a music expression
going to a FretBoards context, and it will give you what you want.  The
only problem is if you don't like the predefined fretboards, you'll have
to make your own predefined fret diagram table, but that is a one-time
thing.

>
>Hm, I¹d either use <e,-0 b,-3 e-4 gis-2 b-0 e¹-0>

Yes, that is what I meant to type -- the other was a typo.

>or (even more likely) <e,-0 b,-2 e-3 gis-1 b-0 e¹-0>,

This is my most often played E-chord.  But if this is used with automatic
(not predefined) fretboards, it will not be transposable.

>the latter making it even more complicated! When transposing this open
>chord to a barred chord all fingers would have to be raised by 1.

Yes, and this rule would apply in the case of E, but would not apply in
the case of A if you are playing the A as a barre on fret 2.  And I can
imagine no straightforward means of configuring the transposition if you
don't like the default output.  That's why we have predefined fret
diagrams.
>
>They both sound fine to me!  Are they mutually exclusive? I¹d suggest
>another condition:
>
>if we make a barre on the lowest fret and set the fingering of all the
>dots on the lowest fret to 1, the other fingers should be automatically
>raised by one.

It does make sense, but I can find some counterexamples, so I don't think
that rule should be implemented.

I've made some changes to the automatic fret diagram generator code that
will add barres, as long as you have fingerings listed in the diagram.
I've attached it to this email.

If you would like to try it out, copy translation-functions.scm to the
scm/ subdirectory of your lilypond installation.  Make a copy of the
original, of course.

Thanks,

Carl


Attachment: translation-functions.scm
Description: translation-functions.scm

Attachment: automatic-fretboards-barre.ly
Description: automatic-fretboards-barre.ly


reply via email to

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