lilypond-user
[Top][All Lists]
Advanced

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

Re: Are these brackets alongside a staff group possible?


From: Ben
Subject: Re: Are these brackets alongside a staff group possible?
Date: Thu, 4 Jul 2019 13:23:14 -0400
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2

On 7/4/2019 1:01 PM, Pierre Perol-Schneider wrote:
Hi Ben,
How about:

\version "2.19.83"

half-brace = \markup\concat {
  \hspace #.5
  \path #0.2 #'((moveto .5 0) (lineto 0 0)
                 (lineto 0 -15)) % <= to be set
}

%%%%% Example:
someMusic = {
  \tempo "Andante."  
  \time 3/4
  \key c \minor
  c'2. r8
}

\paper { indent = 40 }

\layout {
  \context {
    \Staff
    \override InstrumentName.font-size = #-1
  }
  \context {
    \StaffGroup
    \name ViolinGroup
    \alias StaffGroup
    systemStartDelimiter = #'SystemStartBrace
  }
  \context {
    \StaffGroup
    \name WindGroup
    \alias StaffGroup
    systemStartDelimiter = #'SystemStartBracket
    \override SystemStartBracket.collapse-height = #1
  }
  \context {
    \StaffGroup
    \name StringGroup
    \alias StaffGroup
    \accepts ViolinGroup
    systemStartDelimiter = #'SystemStartBracket
  }
  \context {
    \StaffGroup
    \name OrchestraGroup
    \accepts WindGroup
    \accepts StringGroup
    systemStartDelimiter = #'SystemStartSquare
    \override SystemStartSquare.stencil = ##f
    \override InstrumentName.extra-offset = #'(-2 . 0)
    instrumentName = \markup {
      \override #'(baseline-skip . 0)
      \override #'(thickness . 2)
      \center-column {
        \half-brace \vspace #-.05 \circle "xxx" \vspace #-.05 \scale #'(1 . -1) \half-brace
      }
    }
  }
  \context {
    \GrandStaff
    \remove "System_start_delimiter_engraver"
    \accepts OrchestraGroup
    \accepts StaffGroup
  }
}

\score {
  \new GrandStaff <<
    \new OrchestraGroup <<
      \new WindGroup <<
        \new Staff \with {
          instrumentName = "Oboe"
          \override InstrumentName.padding = #-11
        } \someMusic
      >>
      \new StringGroup <<
        \new ViolinGroup <<
          \new Staff \with {
            instrumentName = "Violino I"
            \override InstrumentName.padding = #-8
          } \someMusic
          \new Staff \with {
            instrumentName = "Violino II"
            \override InstrumentName.padding = #-8
          } \someMusic
        >>
        \new Staff \with {
            instrumentName = "Viola"
            \override InstrumentName.padding = #-11
          } { \clef C \someMusic }
      >>
    >>
    \new StaffGroup <<
      \new Staff \with {
      instrumentName = "Soprano"
      \override InstrumentName.padding = #-8
      } \someMusic
      \new Staff \with {
      instrumentName = "Alto"
      \override InstrumentName.padding = #-10
      } { \clef C \someMusic }
    >>
  >>
}

HTH, Cheers,
Pierre

Le jeu. 4 juil. 2019 à 17:52, Ben <address@hidden> a écrit :
On 7/4/2019 10:30 AM, Kieren MacMillan wrote:
Hi Ben,

How would you suggest I go about creating the bracket markings that separate big sections, like in a piece with two orchestras or similar?
Create a custom StaffGroup context.

ideally I'd prefer the circle symbol in the bracket to always be centered alongside the staff group
The InstrumentName is center-able — override it.  =)

Hope that helps!
Kieren.
________________________________

Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: address@hidden

Kieren,

I just came across this link!

It helps me visually see how to approach this better. But I'm confused how to create a custom 'bracket' rather...

I'll keep at it. If you have any hints, I welcome them. :) Thank you!

https://leighverlag.blogspot.com/2015/01/advanced-staff-grouping.html




Pierre,

Wow this is incredibly helpful. I see now how the overrides work beautifully with your custom group! How do you recommend I go about creating a second bracket though, for the other orchestra? (1 and 2, instead of 1 and 1 - see attached). I don't understand the best way to duplicate the context in this case.

%%%%% Here is my code based on your template %%%%%

\version "2.19.83"

half-brace = \markup\concat {
  \hspace #.5
  \path #0.2 #'((moveto .5 0) (lineto 0 0)
                 (lineto 0 -15)) % <= to be set
}

%%%%% Example:
someMusic = {
  \tempo "Andante."
  \time 3/4
  \key c \minor
  c'2. r8
}

\paper { indent = 40 }

\layout {
  \context {
    \Staff
    \override InstrumentName.font-size = #-1
  }
  \context {
    \StaffGroup
    \name ViolinGroup
    \alias StaffGroup
    systemStartDelimiter = #'SystemStartBrace
  }
  \context {
    \StaffGroup
    \name WindGroup
    \alias StaffGroup
    systemStartDelimiter = #'SystemStartBracket
    \override SystemStartBracket.collapse-height = #1
  }
  \context {
    \StaffGroup
    \name StringGroup
    \alias StaffGroup
    \accepts ViolinGroup
    systemStartDelimiter = #'SystemStartBracket
  }
  \context {
    \StaffGroup
    \name OrchestraGroup
    \accepts WindGroup
    \accepts StringGroup
    systemStartDelimiter = #'SystemStartSquare
    \override SystemStartSquare.stencil = ##f
    \override InstrumentName.extra-offset = #'(-2 . 0)
    instrumentName = \markup {
      \override #'(baseline-skip . 0)
      \override #'(thickness . 2)
      \center-column {
        \half-brace \vspace #-.05 \circle " 1. " \vspace #-.05 \scale #'(1 . -1) \half-brace
      }
    }
  }
  \context {
    \GrandStaff
    \remove "System_start_delimiter_engraver"
    \accepts OrchestraGroup
    \accepts StaffGroup
  }
}

\score {
  \new GrandStaff <<
    \new OrchestraGroup <<
      \new WindGroup <<
        \new Staff \with {
          instrumentName = "Oboe"
          \override InstrumentName.padding = #-11
        } \someMusic
      >>
      \new StringGroup <<
        \new ViolinGroup <<
          \new Staff \with {
            instrumentName = "Violino I"
            \override InstrumentName.padding = #-8
          } \someMusic
          \new Staff \with {
            instrumentName = "Violino II"
            \override InstrumentName.padding = #-8
          } \someMusic
        >>
        \new Staff \with {
          instrumentName = "Viola"
          \override InstrumentName.padding = #-11
        } { \clef C \someMusic }
      >>
    >>
    \new StaffGroup <<
      \new OrchestraGroup <<
        \new Staff \with {
          instrumentName = "Violino I"
          \override InstrumentName.padding = #-8
        } \someMusic
        \new Staff \with {
          instrumentName = "Violino II"
          \override InstrumentName.padding = #-8
        } \someMusic

        \new Staff \with {
          instrumentName = "Viola"
          \override InstrumentName.padding = #-9
        } { \clef C \someMusic }

        \new Staff \with {
          instrumentName = "Cello"
          \override InstrumentName.padding = #-9
        } { \clef C \someMusic }

        \new Staff \with {
          instrumentName = "Bass"
          \override InstrumentName.padding = #-9
        } { \clef C \someMusic }
      >>
    >>


  >>

}



Attachment: multi-orch-2-or8.png
Description: PNG image


reply via email to

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