|
From: | Craig Dabelstein |
Subject: | Re: Multi-rest with automatic bar number before and after it |
Date: | Fri, 19 Feb 2016 06:34:36 +1000 |
Hello Simon,
Excellent, thanks, that solves my issue!
It’s a nice lesson on using Scheme, too.
JM
> Le 18 févr. 2016 à 18:44, Simon Albrecht <address@hidden> a écrit :
>
> 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
>
>
> _______________________________________________
> lilypond-user mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/lilypond-user
_______________________________________________
lilypond-user mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/lilypond-user
[Prev in Thread] | Current Thread | [Next in Thread] |