lilypond-user
[Top][All Lists]
Advanced

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

Re: \bracketize?


From: Lukas-Fabian Moser
Subject: Re: \bracketize?
Date: Sun, 1 Nov 2020 16:57:44 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

Hi Jun,

Am 01.11.20 um 14:07 schrieb 田村淳:
Hello,

I’m looking for a “bracket” version of “\parenthesize” function to enclose an articulation or ornamentation mark within a pair of square brackets. I’d like to use parenthesis and brackets to indicate two different types of editorial additions. I achieved the same for dynamics marks by slightly modifying the LSR code “Creating "real" parenthesized dynamics”
http://lsr.di.unimi.it/LSR/Item?id=382
http://lsr.di.unimi.it/LSR/Snippet?id=382
Is there an easy way to create “\bracketize” function?

Thanks in advance and best regards.

It's not ideal since the X-extent is hardcoded, but as a starting point:

\version "2.20"

bracketify =
  \tweak ParenthesesItem.stencil #ly:text-interface::print
  \tweak ParenthesesItem.font-size -3.7
  \tweak ParenthesesItem.text \markup \general-align #Y #CENTER {
    \hspace #0.6  \center-align \line { [ \hspace #1 ] } }
  \parenthesize \etc

\relative {
  c'4 \bracketify d \parenthesize e f
  e\bracketify --
}

Lukas




reply via email to

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