lilypond-user
[Top][All Lists]
Advanced

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

Re: scheme engraver and left-neighbor


From: Samuel DA MOTA
Subject: Re: scheme engraver and left-neighbor
Date: Sat, 25 Oct 2014 17:40:26 +0100

David Nalesnik writes:

> Hi Sam,
>
> On Fri, Oct 24, 2014 at 5:39 PM, Samuel DA MOTA <address@hidden>
> 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



reply via email to

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