lilypond-user
[Top][All Lists]
Advanced

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

Re: Multi-rest with automatic bar number before and after it


From: Simon Albrecht
Subject: Re: Multi-rest with automatic bar number before and after it
Date: Thu, 18 Feb 2016 18:44:26 +0100

Hello Jacques,

there are two possible approaches:

%%%%%%%%%%
\version "2.18.2"

multiROne =
#(define-music-function (parser location bar-count)(rational?)
   (let ((display-bar-num #{
  \once\override Score.BarNumber.break-visibility = ##(#f #t #t)
          #})
     (dur (ly:make-duration 0 0 bar-count)))
   #{
     $display-bar-num
     R $dur
     $display-bar-num
   #}))
multiRTwo =
#(define-music-function (parser location dur)(ly:duration?)
   (let ((display-bar-num #{
  \once\override Score.BarNumber.break-visibility = ##(#f #t #t)
          #}))
   #{
     $display-bar-num
     R $dur
     $display-bar-num
   #}))

{
  c''1
  \multiROne 3
  b'
  \multiRTwo 1*3
  a'
}
%%%%%%%%%%%%

HTH, Simon

On 18.02.2016 18:12, Menu Jacques wrote:
Hello folks,

With the following definitions:


myDisplayBarNummber = {
   \once\override Score.BarNumber.break-visibility = ##(#f #t #t)
}

multiROne =
#(define-music-function (parser location barsNumber)(number?)
    #{
      \myDisplayBarNummber
      R1*#barsNumber  % <—-- not allowed
      \myDisplayBarNummber
    #})


I’d like to be able to replace:

   \myDisplayBarNummber
   R1*2 |
   \myDisplayBarNummber

by:

   multiROne 2


Is there a way to achieve that?

Thanks for your help!

JM


_______________________________________________
lilypond-user mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/lilypond-user




reply via email to

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