lilypond-devel
[Top][All Lists]
Advanced

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

RE: guitar chord diagrams


From: Carl D. Sorensen
Subject: RE: guitar chord diagrams
Date: Tue, 10 Feb 2004 15:30:14 -0700

Han-Wen writes: 

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

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

> part

The "standard" chord diagrams that I generally use when playing the
guitar don't generally come directly from  the standard forms of the
chord.  For example, the standard Dmaj chord consists of the notes d\4
a\3 d\2 g\1.

There's generally, in my experience, a disconnect between the notes I'd
see in a piano accompaniment and the notes I'd see in a chord diagram.
That's why I was working from a different point of view.

That being said, I can really see the benefits of approaching it the way
you suggest.  I will certainly approach it that way -- and I really like
the fact that this approach gives me an incremental approach to
implementing additional functionality.


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

So it seems to me that as I develop 1. above, I'll probably be using
Scheme that will do the bulk of 2. and be useful in 3.  That's where
I'll start.

Thanks for the insight in how to approach the problem.  You've saved me
a _bunch_ of time.

Carl Sorensen


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





reply via email to

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