lilypond-devel
[Top][All Lists]
Advanced

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

Re: Architecture for Fret Diagrams


From: Carl Sorensen
Subject: Re: Architecture for Fret Diagrams
Date: Fri, 23 Jul 2004 22:48:21 -0400

On Thu, 2004-07-22 at 16:24, Han-Wen Nienhuys wrote:

> I would not base anything on the chord name itself (ie. the output
> string). Systems for chord names are highly non-standard, so they're
> not a good basis to interpret.  I suppose that you would have to
> devise some kind of lookup structure, and given a chord in standard
> format, it looks up the standard fingerings for guitar.

Right now, there is a lilypond syntax for entering chords by "name" (or
perhaps I should say by included notes" that is used in  \chords.  I'll
call that a chord notation, for want of a better term.

As far as I can tell, when \chords processes a chord notation, it
creates a music event for each of the notes in the chord.  The ChordName
engraver catches all those notes, and creates a chord name.

In dummy fretdiagram mode, I'd like to take that same set of notes,
determine either a chord name or some standard chord notation symbol
that would allow me to look up a fret diagram from a table.  I realize
that there are a bunch of ways to play any given chord, and for complex
songs it's often important to get the "right" way, but for simple songs,
the simple chord diagrams work.

To me, a major benefit of this dummy mode is that I can enter a piece of
music with simple chord names, transpose it, and get an accurate,
playable lead sheet out, without any manual work at all.  This is _my_
objective for working on fret diagrams.  And it seems to me that to do
it, I somehow have to work with the \chords notation.

> 
> It would even be cooler if there could be an automated system that
> generates a suitable fingering for a chord, given the pitches of the
> chord and the tuning of the strings. I suspect that that might not be
> easy to keep track of limitations of the human hand, though.
> 

I ran across a website last week where a guy had a piece of code that
automatically generated a bunch of possible fret diagrams for any
chord.  It knew about the limits of four fingers, and it would only use
four frets, but it didn't guarantee that the diagram was actually
playable.  I'll see if I can find the URL; it was on my other computer,
and I can't seem to find it now.

I can foresee at least three different modes for fret diagrams:

1) dummy mode, as described above.  Takes \chords notation and produces
vanilla fret diagrams.  Provides capability for users to define their
own diagrams for any of the chords they want to use (i.e., if they want
to use C as a barre chord, rather than an open chord, they overwrite the
open definition).  This mode is very amenable to transposition.

2) explicit mode.  Uses chords that are entered in <...> syntax, with
string (and optional fingering) numbers.  Coupled with StringTunings,
this can easily calculate frets and generate diagrams.

3) expert mode.  Takes chords that are entered in <...> syntax, and
automatically generates suitable fingering.

Right now, I don't even want to tackle mode 3.  I think I'll dive in on
mode 2 as a way to explore making an engraver.  But my _personal_
objective is mode 1, so I'd appreciate any thoughts on what the most
appropriate object is to use as a pointer to standard chord diagrams.

> In any case, it would probably be a good idea if you would send the
> first tries to the mailing list as patches.

I assume that this means you'd like me to do my initial development,
send patches to the lilypond-devel list, and then when things appear to
be working well enough, we'll add to the CVS.  I'm happy to do that.

Thanks for the feedback.  I'm hitting a heavy point in work, so I
imagine I'll not be very fast on the next set of updates, but I will
keep them on my table and get to them when I can.

Carl





reply via email to

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