I have a case where I need to put parenthesis around some notes (not all notes) for a given instrument to emphasize a specific thing at certain points.

I thought this might be a case where tags would come in handy.

But the following doesn't add the parenthesis. What am I missing?  Is the problem related to having tags within a function? Or would there be a better way to do this.

\version "2.26.0"

par = #(define-music-function (note) (ly:music?)
   #{
   \tag #'(piano)  { #note }
   \tag #'(guitar)  { \parenthesize #note }
   #})

music = {c'1}

\score {
  {
    \keepWithTag #'piano {\par \music}
  }
}
\score {
  {
    \keepWithTag #'guitar {\par \music}
  }
}

Reply via email to