lilypond-user
[Top][All Lists]
Advanced

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

Re: invisible rest that takes no horizontal space


From: Peter Van Kranenburg
Subject: Re: invisible rest that takes no horizontal space
Date: Fri, 18 Jun 2010 15:44:22 +0200
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4

On 6/18/10 3:19 PM, Dmytro O. Redchuk wrote:
I've found http://lsr.dsi.unimi.it/LSR/Snippet?id=333 and tried this:

%-------------8<-------------------------
stopThisMeasure = \applyContext
#(lambda (x)
   (ly:context-set-property!
     (ly:context-property-where-defined x 'measurePosition)
       'measurePosition
       (ly:context-property x 'measureLength)))

\relative c'' {
   \override Score.BarNumber #'break-visibility = #all-visible
   \time 3/4
   d4. e8 fis4 |
   d4 \stopThisMeasure
   \bar ":|:"
   fis2 g4 |
}
%-------------8<-------------------------

I actually don't understand how it works .) And whether it does at all .)

It seems it does what's you are looking for, but i am not sure.

Well, bar numbers increase but not shown, i would like to know how to
workaround this, but can not look for that any further now.


It does.

I got the bar number printed using a little hack:

stopThisMeasure = \applyContext
#(lambda (x)
  (ly:context-set-property!
    (ly:context-property-where-defined x 'measurePosition)
      'measurePosition
(ly:moment-sub (ly:context-property x 'measureLength) (ly:make-moment 1 128) )))

then "\stopThisMeasure s128" has the desired effect. Probably because the measure is ended in the normal way. Still some horizontal space is inserted by this, but it is minimal because of the 128th rest. I can live with that.

Thanks a lot!

Peter

Hope, it will be useful for you,
and/or someone more knowledgeable will help you :-)

Sorry for the noise.


best,
Peter

Not tested at all, sorry .)






reply via email to

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