lilypond-user
[Top][All Lists]
Advanced

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

functions to ignore grob during spacing calculations


From: Kieren MacMillan
Subject: functions to ignore grob during spacing calculations
Date: Tue, 15 Aug 2017 13:35:49 -0400

Hello all,

In the following snippet, there are three macros which "trick" the spacing 
engine into ignoring a grob during horizontal and/or vertical spacing 
calculations:

%%%%  SNIPPET BEGINS
\version "2.19.64"

ignoreH =
    \tweak horizontal-skylines #f
    \tweak extra-spacing-width #empty-interval
    \etc

ignoreV =
    \tweak vertical-skylines #f
    \tweak extra-spacing-height #empty-interval
    \etc

ignore = \ignoreH \ignoreV \etc

{ c''4\fffff c''-\fffff c''2\fffff }

{ c''4\fffff c''-\ignore -\fffff c''2\fffff }

%{ \ignore DynamicText c''4\fffff c''-\fffff c''2\fffff }  % uncomment this to 
see the problem
%%%%  SNIPPET ENDS

I'd like to have a non-tweak version of this behaviour, which can be turned on 
and off (or used \once) in a given context. But I'm unsure of the best way of 
implementing it. (Uncommenting the last [pseudo-code] line of the snippet shows 
the problem with the naive approach.) I tried to create a music function, but 
couldn't figure out how to abstract the grob type (which is obviously 
essential, if this function is to be universally applicable).

Any pointers or hints would be appreciated.

Thanks,
Kieren.
________________________________

Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: address@hidden




reply via email to

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