Hi Simon,
> I’d like to share two approaches I’ve developed for such issues.
Thanks for all this!
> Firstly, I couldn’t take time to study your setup and how that makes these
> approaches viable or not—sorry for that.
No worries — I recognize it’s a lot for anyone to try to wrap their head around
if they’re not already in it to begin with.
> Secondly, if possible, I always try to use vanilla LilyPond tools
Me, too!
> I prefer using tags as far as they may take me over using the editionEngraver
Me, too! I just: (a) consider the Edition-Engraver to fall under the “vanilla
Lilypond” rubric in the same way as other bespoke Scheme code does; and (b)
have a lower limit than other people on how far tags “optimally go”. ;)
> I prefer complicated \include setups with Scheme conditionals over using
> make. This is in an attempt to improve maintainability and reduce overhead.
100%.
>> I don’t believe quoted music can be transposed directly (i.e., you need to
>> create a second, pre-transposed, quotation)
> What I’ve started doing after running into this problem is for example
>
> sop = { %{soprano music%} }
> \addQuote "sop" \sop
> \addQuote "sop8vb" \transpose c c, \sop
Yes, that’s what I do (cf. “you need to create a second, pre-transposed,
quotation”). I just wish it didn’t require that.
> Recently I even put this into my standard include files to avoid having that
> third (or more) lines from the example:
That’s quite useful, actually. Thanks! (I really need to get more sugar in my
Lilypond “diet”… I’m just working so hard on so many things that I never seem
to have time to sit back and refine the sugar. <sigh>)
> Another technique is this:
>
> %%% from my library/ly-utility.ily file
> musicFunctionDummy = #(define-music-function (mus) (ly:music?) mus)
>
> addToplevelMusicFunctions =
> #(define-scheme-function (names) (symbol-list-or-symbol?)
> (let* ((name-list (if (list? names) names (list names)))
> (lookup-function
> (lambda (name) (let ((fn (ly:parser-lookup name)))
> (if (equal? fn '())
> (begin
> (ly:warning "Cannot find music function
> ~a to add to toplevel functions.\n" name)
> musicFunctionDummy)
> fn))))
> (fn-list (map lookup-function name-list)))
> (set! toplevel-music-functions
> (append fn-list toplevel-music-functions))))
> %%%
>
> Example usage:
>
> %%%
> transposer = \transpose g f \etc
> enharmonicsChooser = \keepWithTag #'originalSpelling \etc
> \addToplevelMusicFunctions transposer,enharmonicsChooser
> %%%
Currently I’m neither quite sure how this works, nor if/how it might be useful
to me… but I appreciate the example, and will look into it!
Thanks,
Kieren.
______________________________________________
My work day may look different than your work day. Please do not feel obligated
to read or respond to this email outside of your normal working hours.