lilypond-user
[Top][All Lists]
Advanced

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

Change event properties before sending to engraver


From: Valentin Petzel
Subject: Change event properties before sending to engraver
Date: Mon, 20 Mar 2023 20:38:01 +0100

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

Attachment: signature.asc
Description: This is a digitally signed message part.


reply via email to

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