lilypond-devel
[Top][All Lists]
Advanced

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

Re: how close are we to having an "addAt" or "insertAt" feature?


From: Jan-Peter Voigt
Subject: Re: how close are we to having an "addAt" or "insertAt" feature?
Date: Thu, 16 Jan 2014 09:54:26 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.2.0

Hi Kieren,

Am 16.01.2014 03:16, schrieb Kieren MacMillan:
> 1. What — if any — drawbacks are there?
- if you use it without any template mechanism, you have to assign
proper edition-engraver id-paths - I can't say, what that means in
production.
- right now it is just ripped out of my working framework and might or
might not work as expected ... but this doesn't need to be called a
drawback, but a challenge ;)

> 2. Why is this not exactly (or even a superset of) the \addAt feature I 
> requested?
it propably is ... but in your feature request, you exposed a command
that modifies music given as an argument - without the knowledge of a
context. The technique I showed is engraver-based, so it is
context-based. That leads to two different input-schemes:

1. I want to change the music \A at measure X and moment Y
2. I want to change the output in context A at measure X and moment Y

Using the first input-scheme, one has to know the run of the music to
know the current time-signature and if this music is stored in variables
and is used more than once, the modification will show up on all places
this var is used. That might or might not be expected behaviour.

I started with the second input-scheme, because I wanted to modify the
display of the music (slurs, breaks and such) based on my first printout
for correction. But this approach makes it difficult to add (for
example) notes to the score. (It should be possible, but one has to deal
with a lot of things, lilypond already does ... reimplement the wheel(?) )
Addressing the right context can be tricky, if there are multiple voices
involved.
My intention with this engraver is, to modify the layout without
tweaking the actual music source.

To try a conclusion: Your first post on this request called for
layout-overrides outside the music definition:

>     global = \repeat unfold 100 s1
>     music = \addAt (4 3/8) \global \once \override RehearsalMark.extra-offset 
> #’(-1 . 0)

This could be done with the edition-engraver I proposed:

    \editionMod full 4 3/8 my.global.id.Score.A \once \override
RehearsalMark.extra-offset #’(-1 . 0)

if the Score context \consists \editionEngraver my.global.id

I always look at this in my lalily-world. So I would need some
comments/input how it should work without my great ;) template machine
... well, I will extract that too - when time has come - and then it
will appear restructured in openlilylibs snippets.

Best, Jan-Peter




reply via email to

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