lilypond-user
[Top][All Lists]
Advanced

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

Re: Access Score.NoteColumn from a given note column


From: David Nalesnik
Subject: Re: Access Score.NoteColumn from a given note column
Date: Mon, 3 Apr 2017 08:04:23 -0500

On Mon, Apr 3, 2017 at 6:59 AM, Urs Liska <address@hidden> wrote:
>
>
> Am 03.04.2017 um 13:57 schrieb Urs Liska:
>> Is there a way to either affect the Grob in the Score context (probably
>> not) or to retrieve a list/array of all NoteColumns that happen at the
>> same time in other contexts?
>

The associated paper column will contain grobs from other contexts:

\new PianoStaff <<
  \new Staff
  \relative {
    \override Score.NoteHead.before-line-breaking =
    #(lambda (nh)
       (let*
        ((col (ly:item-get-column nh))
         (elts (ly:grob-array->list (ly:grob-object col 'elements)))
         (ncs (filter (lambda (elt) (grob::has-interface elt
'note-column-interface)) elts))
         (nc (ly:grob-parent nh Y))
         (id (ly:grob-property nh 'id))
         (mod (assoc-ref mods id)))
        (if mod
            (for-each (lambda (n)
                        (ly:grob-set-property! n 'X-offset mod))
              ncs))
        ))
    c'1 ~ \tweak #'id "one" c2 e
  }
  \new Staff
  \relative {
    R1
    c'2 c
  }
>>

HTH,
David



reply via email to

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