lilypond-user
[Top][All Lists]
Advanced

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

Re: parenthesize groups of notes


From: Jerome Wolbert
Subject: Re: parenthesize groups of notes
Date: Sun, 8 May 2011 10:11:45 -0700 (PDT)

Much thanks, Janek and Gilles.  Now I have two solutions and a great deal more understanding how lilypond works.

Jerome



From: Gilles THIBAULT <address@hidden>
To: Jerome Wolbert <address@hidden>; address@hidden
Sent: Sun, May 8, 2011 3:44:03 AM
Subject: Re: parenthesize groups of notes


> 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]