lilypond-user
[Top][All Lists]
Advanced

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

Re: Chords and what they mean


From: Thomas Morley
Subject: Re: Chords and what they mean
Date: Sat, 19 Sep 2015 01:43:46 +0200

2015-09-19 1:39 GMT+02:00 Thomas Morley <address@hidden>:
> 2015-09-19 1:05 GMT+02:00  <address@hidden>:
>> On 2015-09-19 00:13, David Kastrup wrote:
>>>
>>> Noeck <address@hidden> writes:
>>>
>>>> Having different *input* syntax for different people according to their
>>>> taste is more complicated and it's doubtable that this is a good aim for
>>>> LilyPond. Exchanging code gets more complicated and small snippets are
>>>> not necessarily self-consistent. You always would have to specify the
>>>> definitions. One example where it is possible is the input language of
>>>> notes (e.g. \language english): In my German (\language deutsch) code <c
>>>> e g b> is a C7 chord not a Cmaj7. For note names I like that.
>>>> What I am trying to say: Adjustable input syntax also makes life more
>>>> complicated in other circumstances.
>>>
>>> \language is usually a closed set, so editors like Frescobaldi can be
>>> taught to convert from one to another.  Conversions of freely
>>> user-defined syntaxes is something entirely else, though.
>>>
>> My imagination of the procedure is, as I wrote before, not to change
>> anything internal of LilyPond, but to use some kind of pre processor. This
>> should, by means of a translation table, take my input and translate it into
>> LP code. So when I write c:sus this will be changed to e.g. c:sus4 (or
>> perhaps c:1.4.5) before it is dealt with by LP, and when I write c:5 it is
>> translated into c:1.5.
>>
>> However because of the discussion which has followed my question, I begin to
>> believe that the answer is no. Such a pre processor does not exist today.
>> /Kaj
>
> Such a preprocessor does not exist yet.
> Ofc someone could write a script to transform your input _before_
> LilyPond will see it, but why?
>
> Instead I tackled 'construct-chord-elements' from chord-entry.scm to
> do what you want.
>
> Making equivalent:
>
> \transpose c cis'
> \chordmode {
>     \powerChords
>     c:sus
>     c:5
>     c:5-
>     c:5+
> }
>
> \transpose c cis'
> \chordmode {
>     \powerChords
>     c:sus4
>     c^3
>     c:5-
>     c:5+
> }
>
> png attached
>
> Limitation:
> c:sus will not accept any additional argument after sus, c:7sus will
> work, though.
>
> I tried to make it available from inside a user-file, juggling around
> module-this-and-that. It needs to be known in lily-imports.cc. But
> without success.
> Honestly, even if possible, it's beyond my skills.
>
> Thus, you have to put it in chord-entry.scm. Best for now: rename the
> current 'construct-chord-elements' to something else and paste the
> attached code in there then.

Please delete:

          (display-scheme-music
                (if (ly:pitch? (car flat-mods))
                    (ly:pitch-alteration (car flat-mods))
                    )
                          )

It's some forgotten debugging-code.

>
> Please note, it's not really tested.
>
> Actually my OS is heavily broken, likely I'll need to do a complete
> new set up, which I will not tackle before having done a thorough
> back-up.
> But up to now I have not found the time to buy a backup-disk ...
>
> More, I'm not able to use git sufficiently atm, thus, if someone wants
> to turn the code into a patch, please do.
>
> HTH,
>  Harm



reply via email to

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