[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Accessing a grob from within a music function
From: |
Urs Liska |
Subject: |
Accessing a grob from within a music function |
Date: |
Thu, 16 Mar 2017 14:23:34 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.6.0 |
Hi,
I'm trying to write a function to push a note column like this:
pushLeftBroken =
#(define-music-function ()()
#{
\once \override NoteColumn.X-offset = 3
#})
But I need to make that "3" depend on some characteristics of the actual
note column. Basically I need the width of the note column, including
attached accidentals.
I know how to get to the accidental(s) within a note column, but if I'm
not mistaken there's no actual grob inside that.
Probably music-function isn't the right approach?
What I need is a way to say something like
\once \override NoteColumn.X-offset = #(+ 3
extent-of-all-accidentals-in-the-note-column)
Any ideas?
TIA
Urs
--
address@hidden
https://openlilylib.org
http://lilypondblog.org
Re: Accessing a grob from within a music function, Thomas Morley, 2017/03/16