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: Alasdair McAndrew
Subject: Re: Alternative small note in brackets?
Date: Tue, 6 Aug 2024 15:44:33 +1000

Hi Kieren,

That's just fantastic - thank you so very much!  Even though I've used Lilypond a fair bit, my abilities at its more advanced capabilities (such as writing functions) are very poor indeed.  Yet even I find that there are occasional things which need some tweaking to get right.

For me it's mainly renaissance and baroque music arranged for various combinations of recorders and viols, being mindful of the capabilities and limitations of each instrument. And I like to use notation from the time as closely as I can.

Thanks again,
Alasdair

On Mon, 5 Aug 2024, 11:08 pm Kieren MacMillan, <kieren@kierenmacmillan.info> wrote:
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]