Hi Alasdair,

> It looks like the sort of thing that would be best incorporated in a 
> function, called something like, say "bracketise", which can then be easily 
> called in the score as " \bracketise b' ".  I'll go back through my scores to 
> see if I can re-teach myself how to write, and use, a function.

Not trying to keep you from learning how to fish, but…  ;)

Here’s one example that I believe works as you want:

%%%  SNIPPET BEGINS
\version "2.25.11"

#(define-public (bracket-stencils grob)
  (let ((lp (grob-interpret-markup grob (markup #:fontsize 8 #:vcenter 
#:center-align #:bold "[")))
        (rp (grob-interpret-markup grob (markup #:fontsize 8 #:vcenter 
#:center-align #:bold "]"))))
    (list lp rp)))

bracketize =
  #(define-music-function (bMusic) (ly:music?)
   #{
     \new CueVoice {
       \shiftOff \stemUp
       \tweak Parentheses.stencils #bracket-stencils
       \parenthesize $bMusic
     }
   #})

\new Staff <<
  b, \bracketize b'
>>
%%%  SNIPPET ENDS

Hope that helps!
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.


Reply via email to