[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Proposed chord name font (PDF included)
From: |
Erik Sandberg |
Subject: |
Re: Proposed chord name font (PDF included) |
Date: |
Mon, 6 Aug 2007 10:59:50 +0200 |
User-agent: |
KMail/1.9.6 |
On Sunday 29 July 2007, PabloZum wrote:
> > I'm not sure why the new font is important. What are the new symbols
> > that are
>
> provided in the font that aren't in the Lilypond default font?
>
> It just *looks* as if it's a regular font. Actually, for instance, a sharp
> sign over a flat sign is scored just by pressing the semicolon key, and
> '11' stacked over '13' by pressing the letter 'z' key, so that you can
> score a C7#11b13 chord just by pressing four keys: "c7;z".
>
> This would work fine for me *if* I knew two things:
>
> 1. how to change the default font used for chords so that I could use my
> font freely
>
> and, more importantly,
>
> 2. how do disable the chord parsing functionality and its consequences, so
> as to make chord naming independent from the limited possibilities now
> available and allow users to write out virtually *any* chord, even crazy
> things like A#7b12#8/Dm14, and *still* be able to transpose that to, say,
> E7b12#8/Abm14.
>
> I understand I could do all that by introducing a new chord name code, and
> I very much would like to contribute with something. Problem is, I don't
> know the first thing about code-writing, and have no idea where to start,
> how to go on and when to stop. :.)
The "LilyPond way" of doing things, as mentioned by Carl, is based on the
ambition that .ly code as much as possible should be a representation of
the "semantics" of the music. When it comes to chords, this means that you
describe the intended function of a chord, which together with a preferred
chord naming convention produces the desired output. If you want to produce a
chord name which lilypond currently can't produce, I suppose the most
lilypondish thing to do would be to:
- extend the current chord style with the given new chord name
- produce a chord which is translated to this chord name
I suppose you could achieve what you want by:
- creating a new music property (say manual-chord-markup), containing a string
in your proposed syntax ("c:9[#11/13]")
- creating a new chord style, which reads the pitch and this new music
property, parses the string, and produces a markup.
- create a new music function (say \foo), which takes a string and produces a
chord music expression with the manual-chord-markup property set, and make it
use your new chord style.
Then you could use \foo #"c:9[#11/13]" to render a chord.
(A slightly nicer alternative could be to move the string parsing to the music
function, and store some internal representation in the manual-chord-markup
property)
Disclaimer: I haven't hacked lilypond for about a year now, and my work back
then wasn't focused on chords, so my knowledge may both be incorrect and
outdated. It may however be possible that the above can be achieved entirely
in Scheme, i.e., without having to modify the lilypond binary.
Erik