lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Alternative small note in brackets?


From: Kieren MacMillan
Subject: Re: Alternative small note in brackets?
Date: Mon, 5 Aug 2024 09:08:17 -0400

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

[Prev in Thread] Current Thread [Next in Thread]