Re: Create a macro for doubling the note in an arpeggio pattern
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 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
Create a macro for doubling the note in an arpeggio pattern
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
Changing clef automatically when pitch falls between a user-defined range of pitches
Hey ML, I asked a similar question on the Music Practice & Theory Stack Exchange site, and I was told that the idea of changing clef automatically is - in most cases - a bad idea, at least musically/practically speaking. Nevertheless, I would like to ask for pointers as to how to accomplish this with pre-existing LilyPond capabilities or just try to implement it myself -- I am not at all familiar with the codebase. The ideal situation would be that there's some kind of \clefAutoChange or similar command, and a mechanism to override the changing points would also be provided. This also needs to work for \transpose'd music. For example, a cellist told me that when there's a passage that lingers long enough above E1 (but not too much above A1 or so), the music is usually written with the tenor clef. A similar rule (of thumb) applies to viola music and its use of the treble clef, bassoon music etc. Any pointers or thoughts on this? Thank you, -Elmo P.S. here is the link to the SE question: https://music.stackexchange.com/questions/75217/how-to-change-clef-automatically-when-note-falls-between-a-certain-range-in-lily/ ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user