Hello,

I later discovered that durations other than 16 are required for the doubled 
note later in the score (dotted 4th note for example), so I ended up doing 
something like this:

GR = #(define-music-function (m p1 p2 p3 p4 p5 p6)
        (ly:music? ly:pitch? ly:pitch? ly:pitch? ly:pitch? ly:pitch? ly:pitch?)
        #{
          <<
            $m
            \\
            { $p1 16[^( $p2 $p3 $p4 $p5 $p6 ])  }
          >>
        #})

This makes it necessary to write the first pitch twice, (e.g. \GR f''8 f a, f 
a, c, f,) but it’s not a huge deal compared to having to write the whole << {} 
\\ {} >> construct every time. Now, on to figure out how to make a nice 
“knee’d” beam (3+3) for those notes.

 Thanks for the help!
-E



> On 22 Feb 2019, at 19.26, elmeri <emiett...@gmail.com> wrote:
> 
> Hi,
> 
> I’m working on a score that has a lot of arpeggios where the first note of 
> the 6-note group of 16th notes is doubled as a dotted 4th note. Having a 
> macro/function to turn e.g. the pattern "f16 c a f c f,” into “<< { f4. } \\ 
> { f16 c a f c f, } >>”, or even more preferably “<< { f4. } \\ { f16([ c a f 
> c f,)] } >>” would save me a lot of typing and trouble. 
> 
> What I’ve been tinkering around with is something like:
> 
> GR = #(define-music-function (parser location p1 p2 p3 p4 p5 p6)
>         (ly:music? ly:music? ly:music? ly:music? ly:music? ly:music?)
>         #{
>           <<
>             {$p1}
>             \\
>             {$p1 $p2 $p3 $p4 $p5 $p6}
>           >>
>         #})
> 
> \GR f16 c a f c f,
> 
> which results in a ton of errors (at least on LilyPond 2.18.2).
> 
> Another one I’ve tried is this:
> 
> GR = #(define-music-function (parser location p1 DUMMY DURATION p2 p3 p4 p5 
> p6)
>         (ly:pitch? string? ly:duration? ly:music? ly:music? ly:music? 
> ly:music? ly:music?)
>         #{
>           <<
>             {$p1 $DURATION}
>             \\
>             {$p1 16 $p2 $p3 $p4 $p5 $p6}
>           >>
>         #})
> 
> \GR f ”” 16 c a f c f,
> 
> And another set of errors are generated. The DUMMY is (apparently) necessary 
> on LilyPond 2.18.2.
> 
> Any help is appreciated!
> 
> Thanks!
> 
> -Elmo
> 
> 
> 

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

Reply via email to