David Nalesnik writes:

> Hi Sam,
>
> On Fri, Oct 24, 2014 at 5:39 PM, Samuel DA MOTA <da.mota....@gmail.com>
> wrote:
>
>> Hi,
>>
>> I'm trying to write a scheme engraver and I'm blocked at some point.
>> I'm trying to determine if the left-neighbor of a grob is a (semi-)tie
>> or not.
>>
>> Can someone provide some help on how to achieve that, or point me a link
>> that explain it?
>>
>>
> It would be helpful to know what your engraver is attempting to do, but
> possibly a start would be to add an acknowledger for 'semi-tie-interface.
> Then you could collect LaissezVibrer or RepeatTie grobs.
>
> Hope this helps,
> --David

Hi,

I was trying to improve the event-listener a bit.
What I was actually trying to do is to determine when a note was played,
or tied to the previous one.

The output of the event-listener is "wrong" when there are ties as you
can't tell apart "played" note and tied note.

After looking at several way to achieve (including mapping the
event-listener output to the midi file), I thought I could achieve this
by looking at the left neighbour of a note-head and see if it is a tie.

Of course I had to ask on the mailing list just to realise that
a) it won't work if there is an accidental on that note head
b) the proper solution was to add on the format-note function the
following:

          (music (ly:event-property event 'music-cause))
          (articulations (ly:music-property music 'articulations))

And then look into the articulations list if one of them is names TieEvent.

Thanks,
--
Sam

_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to