lilypond-devel
[Top][All Lists]
Advanced

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

Re: Transposable guitar fret diagrams


From: Han-Wen Nienhuys
Subject: Re: Transposable guitar fret diagrams
Date: Tue, 5 Aug 2008 00:00:56 -0300

Various random remarks:

- (eq? '() x) => (null? x)
- there are list? typechecks.  list? is rather expensive, since it has
to check for cycles.  You probably want pair? ?
-
+"Extract named music @code{music-name} from each element

what's the return type ? (I assume list of musics?)  Reading the other
helper, actually it seems you only want to extract one instance?  I
think it's more general to extract all instances, and let the caller
get the 1st one, or panic if there is more than 1.  In any case, be
specific about this.

- the 2 functions called in extract-named-music do not seem very
generally applicable. Consider nesting the functions in
extract-named-music.

- predefined-fretboards.ly has a large body of scheme code.  Is it
possible to put this in .scm somewhere?

- same file: looks as if there is a stray %} at the end.

-
+
+  predefinedDiagramTable = ##f

I'd think the predef'd tables are preferable to the autogenerated ones?

On Mon, Aug 4, 2008 at 9:04 PM, Carl D. Sorensen <address@hidden> wrote:

> 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
>
>



-- 
Han-Wen Nienhuys - address@hidden - http://www.xs4all.nl/~hanwen




reply via email to

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