lilypond-user
[Top][All Lists]
Advanced

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

Re: Manipulating instrument names and staff group names


From: josh
Subject: Re: Manipulating instrument names and staff group names
Date: Sun, 31 Oct 2021 16:51:08 -0400
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.2.1

I was able to use a combination of approaches with one last hurdle and I am still completely lost when it comes to this facet of Lilypond.

I have used the following input to create the bracket in the attached image.

#(define-markup-command (openBracket layout props heitgh) (number?)
  (interpret-markup layout props
    (markup #:line (#:with-dimensions (cons 0 0) (cons 0 0)
      (#:path 0.1
        (list (list (quote moveto) 0 0)
        (list (quote lineto) -1 0)
        (list (quote lineto) -1 (* heitgh -1))
        (list (quote lineto) 0 (* heitgh -1))))))))

\new StaffGroup \with { instrumentName = \markup \concat { \rotate #90 { \center-column { \override #'(font-name . "Libre Franklin Light") \smallCaps "Clarinets" \raise #1.5 \rotate #-90 \openBracket #30 \lower #2.5 " " }}}}

As you can see in the image, the bracket isn't "center aligned" (for lack of a better term) beneath the staff group name ("Clarinets"). Is there a way to tweak what I have so far to align the bracket beneath the center of the staff group name?

Thanks a ton.
On 10/29/2021 3:04 PM, Kieren MacMillan wrote:
Hi all,

I don’t know of a good way to get this
There are a whole bunch of ways to clothe that particular cat… Here’s one:

%%%  SNIPPET BEGINS  %%%
\version "2.22.1"

\paper { indent = 1\in }

\layout {
     \context {
        \Score
        \override InstrumentName.self-alignment-X = #RIGHT
        \override InstrumentName.padding = #2
     }
}

\new StaffGroup
   \with { instrumentName = \markup \concat { \rotate #90 { \center-column { "Sax." 
\raise #1.5 \draw-line #'(10 . 0) \lower #3.5 " " } } } }
<<
   \new Staff \with { instrumentName = "Sax 1" } s1
   \new Staff \with { instrumentName = "Sax 2" } s1
%%%  SNIPPET BEGINS  %%%

Some syntactic sugar — and maybe a really well-designed engraver — would be 
nice, though…

Hope this helps!
Kieren.
________________________________

Kieren MacMillan, composer (he/him/his)
‣ website: www.kierenmacmillan.info
‣ email: kieren@kierenmacmillan.info

Attachment: close.png
Description: PNG image


reply via email to

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