I've been wanting to expand my earlier tutorial with a section dealing with
\editionModList since I think the convenience of it can be useful to many
users. However, it is not a solution for every situation. Particularly, it
is not useful when you need to insert objects as part of your edition if
they are going to need tweaks (for example, slurs that need to be shaped).
Also, in these situations it takes away the convenience of the point and
click support of Frescobaldi.

I've been thinking about the cases where \editionModList is not useful, and
I think that a simple wrapping function should be enough. I had not had
time to write it but it should be pretty easy to do something like this:

\quickEditionModSettings target-edition target-context

\qM 1 2/4 ^"I'm a quick Mod. I reduce redundancy"
>

Where the \qM command would translate to \editionMod target-edition 1 2/4
target-context ^"blabla". With proper input file structure this shouldn't
impair readability of the code. The only thing that I can think of that
could further decrease redundancy is to make it so that the position in the
measure defaults to 0 if it is absent, but this is unnecessary in my
opinion.

But the above represents the way I prefer to structure my files. Given the
way you (David) structured the code in your original post, perhaps a
wrapper that works like this would be closer to your intentions?

\qMSet 'edition test
>
  \qMSet 'measure 1
>
    \qM 0/4 Voice \(
>
    \qM 1/4 Lyrics #(make-music 'ExtenderEvent)
>
  \qMSet 'measure 2
>
    \qMSet 'moment 0/4
>
      \qMSet 'context Score
>
        \qM \time 3/4
>
        \qM \tempo "Allegro" 4=135
>
      \qMSet 'context Voice
>
        \qM \p
>
        \qM \<
>
    \qMSet 'moment 1/4
>
      \qM Lyrics #(make-music 'HyphenEvent)
>

As far as I know something like that could be done, although admittedly
it's not as minimalistic as your desired example with brackets. It does
have the logical structure you seem to prefer though.

2018-02-19 11:34 GMT-03:00 Jan-Peter Voigt <jp.vo...@gmx.de>:

> Hi David,
>
> Urs already answered. I understand your concerns about the input and I am
> always open for ideas to ease the input for the edition-engraver. Like Urs
> already mentioned your proposal will be difficult to implement because it
> doesn't use the standard parser schemes. But it sheds light on how others
> might expect an easy/consistent input.
>
> What is not explained in the demo files (yet) is: You are always free to
> use constructs like
>
> \editionMod test 1 0/4 Voice {
>   <>(
>   \once \override NoteHead.color = #red
>   \once \override Beam.color = #red
> }
>
> To address multiple time steps at once you can use \editionModList, to
> address multiple contexts at once you can use regular expressions and
> wildcards like in https://github.com/openlilylib
> /edition-engraver/blob/master/usage-examples/development-3.ly
>
> Your example implies that it would be a useful feature if one can split
> timing and context information into several layers. I'll think about it.
>
> I am going to focus on the edition-engraver development in April or May.
>
> Jan-Peter
>
>
>
> Am 19.02.2018 um 11:59 schrieb David Sumbler:
>
>> As a newcomer to using Edition Engraver, and looking at the example
>> files etc., I wondered why they were written with so much repetition.
>>   "Perhaps it is just to keep things easy for newcomers like me to
>> understand," I thought.
>>
>> So I experimented with reformatting using braces as Lilypond does,
>> which seemed the method most likely method.  For instance,
>>
>> \editionMod test 1 0/4 Voice \(
>> \editionMod test 1 1/4 Lyrics #(make-music 'ExtenderEvent)
>> \editionMod test 1 2/8 Voice [
>> \editionMod test 2 0/4 Score \time 3/4
>> \editionMod test 2 0/4 Score \tempo "Allegro" 4=135
>> \editionMod test 2 0/4 Voice \p
>> \editionMod test 2 0/4 Voice \<
>> \editionMod test 2 1/4 Lyrics #(make-music 'HyphenEvent)
>>
>> might become
>>
>> \editionMod test {
>>    1 {
>>      0/4 Voice \(
>>      1/4 Lyrics #(make-music 'ExtenderEvent)
>>      2/8 Voice [
>>      }
>>    2 {
>>      0/4 {
>>        Score {
>>         \time 3/4
>>         \tempo "Allegro" 4=135
>>        }
>>        Voice {
>>          \p
>>          \<
>>        }
>>      }
>>      1/4 Lyrics #(make-music 'HyphenEvent)
>>    }
>> }
>>
>> This is much clearer to me, and it would potentially be much easier to
>> find one's way around the file for maintenance and the addition of new
>> items.  I appreciate that one might not necessarily want all entries in
>> the order they appear in the score.
>>
>> Unfortunately, what I wrote doesn't work.
>>
>> Is there any likelihood that something similar to what I have suggested
>> might be added to Edition Engraver in the forseeable future?
>>
>> And how near are we to seeing Edition Engraver included in Lilypond
>> itself?
>>
>> David
>>
>> _______________________________________________
>> lilypond-user mailing list
>> lilypond-user@gnu.org
>> https://lists.gnu.org/mailman/listinfo/lilypond-user
>>
>>
>
> _______________________________________________
> lilypond-user mailing list
> lilypond-user@gnu.org
> https://lists.gnu.org/mailman/listinfo/lilypond-user
>
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to