Jan-Peter Voigt <[email protected]> writes:
> in lilypond you achieve less typing with defining music-funtions:
>
> --snip--
> partialInline = #(define-music-function (parser location nom den
> mus)(integer? integer? ly:music?)
> #{
> \set Timing.measureLength = #(ly:make-moment $nom $den)
> $mus
> \unset Timing.measureLength
> #})
>
> \relative c' {
> \time 4/4
> \partial 4
> \repeat volta 2 { c4 | e g a } \alternative {
> { b | c b a } { \partialInline #1 #4 b | a g f }
> }
> c8 d | c1 |
> }
With the current development version, you can write this as
partialInline = #(define-music-function (parser location dur mus)
(ly:duration? ly:music?)
#{
\set Timing.measureLength = $dur
$mus
\unset Timing.measureLength % Sure you need to unset?!?
#})
\relative c' {
\time 4/4
\partial 4
\repeat volta 2 { c4 | e g a } \alternative {
{ b | c b a } { \partialInline 4 b | a g f }
}
c8 d | c1 |
}
--
David Kastrup
_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user