lilypond-user
[Top][All Lists]
Advanced

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

Re: drawing brackets spanning multiple staves - spacing issue


From: Kieren MacMillan
Subject: Re: drawing brackets spanning multiple staves - spacing issue
Date: Thu, 27 Jul 2017 13:27:11 -0400

Hi Eby,

> here is my code, the note column won't shift on the second staff, even if you 
> put Score.NoteColumn in the "left hand" section.

I hope the attached modified version of your snippet helps.
Note that I also made some other changes, to make the code more efficient, 
readable, etc.
(Oh, and you should probably upgrade to a more recent version of Lilypond!)

Cheers,
Kieren.

%%%%   SNIPPET BEGINS
\version "2.16.2"

%%% SNIPPET FOR BRACKETS %%%

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

#(define-markup-command (closeBracket layout props height) (number?)
 (interpret-markup layout props
   (markup #:line (#:with-dimensions (cons 0 0) (cons 0 0)
     (#:path 0.13
       (list (list (quote moveto) 1.3 0)
       (list (quote lineto) 2.3 0)
       (list (quote lineto) 2.3 (* height -1))
       (list (quote lineto) 1.3 (* height -1))))))))

%%% SNIPET END %%%

global = {
  \time 4/4
  \key d \major
  s1
  \mark \markup { \box B } % SECTION B
}

%%%%%
rightOne = \relative c'' {
  d1 | 
  \once \override TextScript #'extra-offset = #'(2.75 . 0)
  \once \override TextScript #'X-offset = #1.5
  <>^\markup { \openBracket #19.3 }
  <>_\markup { \small \rounded-box "II: Principal Chorus"  }
  d4 \once \override Score.NoteColumn #'X-offset = #1 a d e | 
}

%%%%%
rightTwo = \relative c'' {
  s1 | % SECTION B
  a4 s b a | 
}

%%%%%
leftOne = \relative c' {
  d1 | % SECTION B
  fis4 e d e | 
}

%%%%%
leftTwo = \relative c {
  <fis a>1 | % SECTION B
  <a d>4 a <fis b> <a cis> | 
}

%%%%%
pedal = \relative c {
  d,1 | % SECTION B
  d'4 cis b a |
}

\score {
 <<
   \new PianoStaff \with {
     instrumentName = "Manuals"
   } <<
     \new Staff = "right" \with {
        printPartCombineTexts = ##f
        midiInstrument = "church organ"
     } { << \global \partcombine \rightOne \rightTwo >> }
     \new Staff = "left" \with {
        printPartCombineTexts = ##f 
        midiInstrument = "church organ"
     } { << \global \clef bass \partcombine \leftOne \leftTwo >> }
    >>
   %%  instrumentName = "Pedal"
   \new Staff = "pedal" \with {
     midiInstrument = "church organ"
   } { << \global \clef bass \pedal >> }
 >>
 \layout { }
}
%%%%  SNIPPET ENDS


________________________________

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




reply via email to

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