[Top][All Lists]

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

Re: \offset and mutable properties

From: Simon Albrecht
Subject: Re: \offset and mutable properties
Date: Wed, 22 Jul 2015 01:25:42 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.8.0

And I forgot to mention: Unfortunately, your file doesn’t place the dynamics in the middle of the staff symbol as they should be – probably because of outside-staff-priority?

Thanks in advance,

Am 21.07.2015 um 22:17 schrieb David Nalesnik:
Hi Simon,

On Tue, Jul 21, 2015 at 12:26 PM, Simon Albrecht <address@hidden> wrote:

while developing a workaround (or solution?) for issue 4316 <>, I encountered the following problem: \offset cannot be used on X and Y offset properties, apparently because these are mutable, and as the doc string for (offsetter) in scm/music-functions.scm states, \offset is limited to work only on immutable properties. (I haven’t really gotten behind the distinction of mutable/immutable properties…)
Now, I don’t really know how to circumvent this, and it seems like a really important usecase for \offset. Do you have any ideas here?

The issue of mutable properties is actually only a problem with Hairpin.X-offset in your example.  You'll note that each of the other properties you offset has a default value in scm/define-grobs.scm to calculate a displacement against.

The problem with these other properties is that "unpure-pure containers" are involved, and the current implementation of \offset has no provision for dealing with this situation.  If it could, a number of use cases would be opened up--some very handy ones at that.

It is straightforward to redefine \offset to extract the unpure component in such cases and use that to offset against.  (See attached.)  I haven't noticed any problems, but I do wonder if a problem might occur, say, if the change to the property should properly result in a different line break.

Now, whether it would be feasible to offset against mutable properties I'm not sure.  I've never had success getting changes to values stored there to have any effect on output.  Too late in the game?

Hope this helps,


reply via email to

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