lilypond-user
[Top][All Lists]
Advanced

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

Re: parenthesize groups of notes


From: Gilles THIBAULT
Subject: Re: parenthesize groups of notes
Date: Sun, 8 May 2011 09:44:03 +0200


I tried to parenthesize a whole group of notes by enclosing them in braces, as:
\parenthesize { a b c }
but no parentheses appear.

You can try that :

%%%%%%%%%%%%%%%%%%
startParenthesis = {
 \once \override ParenthesesItem #'stencils = #(lambda (grob)
       (let ((par-list (parentheses-item::calc-parenthesis-stencils grob))
              (right-par (grob-interpret-markup grob (markup #:null))))
         (list (car par-list)right-par )))
}

endParenthesis = {
 \once \override ParenthesesItem #'stencils = #(lambda (grob)
       (let ((par-list (parentheses-item::calc-parenthesis-stencils grob))
              (left-par (grob-interpret-markup grob (markup #:null))))
         (list left-par (cadr par-list))))
}

{
 \startParenthesis \parenthesize c'
 d' e' f'
 \endParenthesis \parenthesize g'
}
%%%%%%%%%%%%%%%%%%

I take the way of how works ParenthesesItem #'stencils from here
http://lsr.dsi.unimi.it/LSR/Item?id=564

It's probably possible to automate a bit more but that is the general idea.





reply via email to

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