lilypond-user
[Top][All Lists]
Advanced

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

Re: Change event properties before sending to engraver


From: Saul Tobin
Subject: Re: Change event properties before sending to engraver
Date: Mon, 20 Mar 2023 14:19:13 -0600

Is your idea to have a second engraver at the Voice level to prepare the events? You should be able to have an engraver listen to the event and modify it before it's listened by the Staff level engraver, as long as they are \consist'ed in the right order.

On Mon, Mar 20, 2023, 1:40 PM Valentin Petzel <valentin@petzel.at> wrote:
Hello,

this is a more technical question targeted to the more experienced members of
the list.

One thing that is stupidly hard to do in Lilypond is getting Slurs, Ties and
other spanners to work between different Voices. The general approach is to use
hidden notes, which is not at all nice to do or nice to read, and will require
many extra voices in more complicated cases.

So one approach I’ve been trying to attempt is to move the respectable
Engravers to a higher context (Staff or even higher) and then make use of
Spanner ids to get the default behaviour.

Basically each Voice context would be assigned a unique voice ID, and this ID
is by default used as spanner id. Then

<<
  { c8( d e d) } \\ { c( b) c( b) }
>>

would still work, as these are Slurs with different spanner ids, but we can
simply write

<<
  { c16\=1( d s8 } \\ { s c b\=1) }
>>

to get a Slur between these Voices.

Of course this would still require some additional handling, as this will add
unwanted support elements from other voices.

But the point here is that while the events have to eventually be handled on
the Staff level we kind of need to "prepare" them at the Voice level to have
the correct spanner id.

Thus I wanted to inquire if Lilypond has any mechanic that can be used for
something like this?

Alternatively one could use something like context properties to have
engravers communicate and send events and grobs to other engravers, but surey
that would be messy.

Cheers,
Valentin

reply via email to

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