Artur Dobija <arturdob...@gmail.com> writes:

> Dear Experts,
>
> I am working on writing my own function which combines several notes into
> one custom symbol (ligature).
> (For the context, I now about Mensural_ligature_engraver, but I want to
> create something that will allow for more flexibility, as I try to engrave
> symbols as close to one of different manuscripts from different eras and by
> different hands)
>
> My code is like:
> \relative { a \customLigatura { b c d } f }
>
> In my approach, I want to remove all the notes except the first, which will
> receive the ligature stencil.

I can't figure out your function details, but assuming you have
sequential music mus that should (in \relative) follow relative rules
but only have the first note affect the sequence, you would wrap it in

(make-relative (mus) (make-music 'EventChord mus)
  ...)

This works by casting the expression to an EventChord before running it
through the \relative wringer (in case this occurs in \relative) but
making the permanent effect on \relative come from the first element.

The ... itself is never seen by \relative, only the EventChord is.  The
result can, of course, end up something that isn't a valid chord but it
is only used for passing through \relative and then thrown away.


-- 
David Kastrup

Reply via email to