[Top][All Lists]

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

RE: guitar chord diagrams

From: Han-Wen Nienhuys
Subject: RE: guitar chord diagrams
Date: Tue, 10 Feb 2004 19:52:22 +0100

address@hidden writes:
> I can see that it's reasonable (as a first cut) to have the input file
> required to contain diagram information.
> However, it seems to me that the diagram should be outside of the music
> expression passed to the ChordDiagrams context.  If the diagram
> information is going to be in the music expression, then we need to make
> all other contexts ignore the diagram information, which seemed to me to
> be a bigger job than forcing the ChordDiagram context to know the chord
> name in order to find the diagram.
> I'm happy to move in another direction if it makes more sense.  I'm very
> much a newbie in regards to lilypond internals, and I appreciate the
> feedback you've given me so far.

I think you are approaching the problem from the wrong
side. Typesetting should always start at the output end, not the input

1. First you should make the code for typesetting the diagram. It
should probably be something that can be called from \markup { .. },
so that users can put them on top of their music by doing

  \lyrics { \markup { \chorddiagram #...stuff... } 

2. Then there should be code that generates diagrams given a set of
pitches (ie. a chord).  I was under the impression that a
chord-diagram can be constructed from pitch + string information,
which are already represented in Lilypond. Hence, there should be an
engraver that takes a bunch of NoteEvents and StringNumberEvents, and
translates those to a chord-diagram.

This is the

  \context ChordDiagrams { <c\5 e\4 g\3> } 


3. Finally, there are default string and fret combinations for common
chords (at least, that is what I suppose). We can invent some sort of
shorthand, shortcut or lookup-table for those, so that

  <c e g>

is automatically typeset as  the diagram for

  <c\5 e\4 g\3>

If you put the bulk of the work of 2. in a Scheme function (or C++
function callable from Scheme), then you could also use it to generate
the default diagrams for 3.

 Han-Wen Nienhuys   |   address@hidden   | 

reply via email to

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