[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Transposable guitar fret diagrams
From: |
Carl D. Sorensen |
Subject: |
Re: Transposable guitar fret diagrams |
Date: |
Mon, 4 Aug 2008 18:04:38 -0600 |
On 8/1/08 9:39 AM, "Han-Wen Nienhuys" <address@hidden> wrote:
> On Fri, Aug 1, 2008 at 1:10 AM, Carl D. Sorensen <address@hidden> wrote:
>
>> Would you like me to see if I can define a function that will be used in
>> both places? If so, where should I put the function?
>
> Yes please. Probably music-functions.scm is the best place.
I've attached the latest diff patch to this email.
After further review, I found that most of the (get-chord-pitches ...)
functionality was aimed at extracting the EventChord from the music stream.
I could find no other place that was done, as most of the code gets run
after the appropriate music is passed to it by engravers.
So I added some functions to music-functions.scm to handle the general
problem, with EventChord as a specific instance.
I also added a base-chord-shapes alist to define some base chord shapes
that can be moved around the fretboard to give chords in different keys. I
added a music function to add chord-shapes to the alist, and I've added
functions to retrieve the chord-shapes from base-chord-shapes and to offset
the fret to change keys. I redefined the predefined Fretboards to use the
chord-shapes functionality.
I changed the name of the ly/*.ly file to ly/predefined-fretboards.ly from
ly/predefined-fretboards-init.ly, because my current thinking is that it
wouldn't be loaded automatically. However, if you think we ought to have it
be loaded automatically we can certainly do so.
I have a regression test ready to be added and documentation ready to be
included as soon as I get the go ahead to commit this functionality.
Is it good to go?
Thanks,
Carl
0001-Add-predefined-fret-diagrams-to-fretboards-with-void.patch
Description: 0001-Add-predefined-fret-diagrams-to-fretboards-with-void.patch