[prev in list] [next in list] [prev in thread] [next in thread]
List: lilypond-user
Subject: Re: Articulation with parenthesis-open and with parenthesis-close?
From: Reinhold Kainhofer <reinhold () kainhofer ! com>
Date: 2012-09-28 11:34:57
Message-ID: 50658B61.5040407 () kainhofer ! com
[Download RAW message or body]
On 28/09/2012 12:06, Rutger Hofman wrote:
> in my current score, there are long, consecutive lists of notes with
> articulations (dashes) in parentheses. Now it would improve
> readability a lot if the first of these parenthesized dashes has only
> a parenthesis-open, the last has only a parenthesis-close, and the
> rest has a regular parenthesis. I have seen this in printed music more
> than once.
Coincidentally, I had the same problem the day before yesterday. Here is
what I have (using the \parenthesize command and modifying its behavior):
%%%%%%%%%%%%%
#(define-public (parentheses-item::calc-parenthesis-left-stencils grob)
(let* ((font (ly:grob-default-font grob)))
(list (ly:font-get-glyph font "accidentals.leftparen") empty-stencil)))
#(define-public (parentheses-item::calc-parenthesis-right-stencils grob)
(let* ((font (ly:grob-default-font grob)))
(list empty-stencil (ly:font-get-glyph font "accidentals.rightparen"))))
parenthesizeLeft = #(define-music-function (parser loc arg) (ly:music?)
#{
-\tweak ParenthesesItem #'stencils
#parentheses-item::calc-parenthesis-left-stencils
-\parenthesize $arg
#})
parenthesizeRight = #(define-music-function (parser loc arg) (ly:music?)
#{
-\tweak ParenthesesItem #'stencils
#parentheses-item::calc-parenthesis-right-stencils
-\parenthesize $arg
#})
%%%%%%%%%%%%%
The \parenthesizeLeft and \parenthesizeRight work exactly like
\parenthesize, i.e.:
e4.-\parenthesizeLeft->\> <e c>4.-\parenthesizeRight-> | % 3
HTH,
Reinhold
--
------------------------------------------------------------------
Reinhold Kainhofer, reinhold@kainhofer.com, http://www.kainhofer.com
* Financial & Actuarial Math., Vienna Univ. of Technology, Austria
* http://www.fam.tuwien.ac.at/, DVR: 0005886
* Edition Kainhofer, Music Publisher, http://www.edition-kainhofer.com
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic