[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Access Score.NoteColumn from a given note column
From: |
Urs Liska |
Subject: |
Access Score.NoteColumn from a given note column |
Date: |
Mon, 3 Apr 2017 13:57:06 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.6.0 |
Hi,
the following simplified example successfully shifts a note column of a
notehead with a given 'id.
However, as you can see from the output it (expectedly) does so only in
the current staff. As I'm dealing with an actual NoteColumn object in a
callback I can't simply say \once \override Score.NoteColumn etc.
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?
Thanks
Urs
\version "2.19.54"
#(define mods
'(("one" . 5)))
\new PianoStaff <<
\new Staff
\relative {
\override Score.NoteHead.before-line-breaking =
#(lambda (nh)
(let*
((nc (ly:grob-parent nh Y))
(id (ly:grob-property nh 'id))
(mod (assoc-ref mods id))
)
(if mod
;(overrideProperty '(Score NoteColumn X-offset) 5))
(ly:grob-set-property! nc 'X-offset mod))
))
c'1 ~ \tweak #'id "one" c2 e
}
\new Staff
\relative {
R1
c'2 c
}
>>
--
address@hidden
https://openlilylib.org
http://lilypondblog.org
- Access Score.NoteColumn from a given note column,
Urs Liska <=