Hi Janne,

2012/3/9 -Eluze <elu...@gmail.com>:
>
>
> Janne Uusitalo wrote:
>>
>> Hi everyone,
>>
>> I'm hoping to Lilypond something not at all uncommon in pop sheet
>> music but missing from the snippet repository and eluding my search
>> phrases. It's basically an inline block of coda set apart from the
>> bars preceding it, like so:
>>
>> http://imgur.com/asy1o
>> http://imgur.com/ReROt
>>
>> The first image is a scanned example of what I've been trying to
>> reproduce, and the second where I've gotten so far—which is pretty
>> close. The only thing missing is the systemStartBracket, and I'm stuck
>> with no idea how to insert one in the middle of a system. Does anybody
>> reading this happen to know the secret ingredient?
>>
> I don't think I've ever seen a systemStartBracket not at the beginning of a
> score or a line - wondering if somebody finds a solution, though!
>
> Eluze

some month ago I created the attached workaround.

HTH,
  Harm
\version "2.14.2"

rochadeAlpha = {
\override Score.BreakAlignment #'break-align-orders =
  #(make-vector 3 '(left-edge 
          ambitus 
          breathing-sign
          staff-bar
          clef	
          key-cancellation   
          key-signature 
          time-signature 
          custos)) 
          
\once \override Score.TimeSignature #'space-alist = #'( 
			(first-note fixed-space . 2.0) 
			(right-edge extra-space . 0.5) 
			(staff-bar minimum-space . 2.5))
}

move = {
        \rochadeAlpha
        \once \override Score.BarLine #'extra-offset = #'(-1 . 0)
        \once \override Score.SpanBar #'X-offset = #'-1
        \once \override Score.Clef #'extra-offset = #'(-1 . 0)
        \once \override Score.KeyCancellation #'extra-offset = #'(-1 . 0)
        \once \override Score.KeySignature #'extra-offset = #'(-1 . 0)
        \once \override Score.TimeSignature #'extra-offset = #'(-1 . 0)
}  

onceTextLengthOn = {
        \once\override TextScript #'extra-spacing-width = #'(0 . 0)
        \once\override TextScript #'extra-spacing-height = #'(-inf.0 . +inf.0)
}

staffStop = {
        \onceTextLengthOn
        \stopStaff
        \cadenzaOn
}

staffStart = {
        \once\override Score.BarNumber #'break-visibility = #'#(#f #t #t)
        \startStaff
        \cadenzaOff
        \set Staff.forceClef = ##t
}

braceBar =
#(define-music-function (parser location braceExt)(number?)
  #{
      #(define ((braceBarLine markup) grob)
        (ly:stencil-combine-at-edge (ly:bar-line::print grob)
          X LEFT (grob-interpret-markup grob markup) 0.4 0))
       
      #(define braceMarkup
      (make-line-markup 
        (list
          (make-with-dimensions-markup '(0 . 0) '(0 . 0) 
            (make-translate-markup
            		(cons 0 (+ 0.2 (/ $braceExt -10)))
              (make-left-brace-markup (+ $braceExt 20)))))))
  
      \once\override Score.BarLine #'hair-thickness = #'1.6
      \once \override Staff.BarLine #'stencil = #(braceBarLine braceMarkup)
      \once \override Score.Clef #'(space-alist next-note) = #'(extra-space . 0) 
      \bar "|"
      \move
  #})

space = 
#(define-music-function (parser location width) (number?)
                #{
                   \staffStop
                   \onceTextLengthOn
                   s1*1/1000000-\markup \with-dimensions #(cons 0 $width) #'(0 . 0) \null
                   \once \override Score.Clef #'font-size = #'2
                   \staffStart
                #})
                
%--------------------------- Test ----------------------------------------------

\paper {
        ragged-right = ##f
}

one =   
  \relative c'' {
          \key f \major
          a1 b c d
          \bar ":|" 
%5     
          \space #8
          \braceBar #92
          \key d\major
          \time 2/2
          \grace s8	% trick to print the bar at correct position. TODO IN ALL VOICES !!
          \bar "|:"
          e4 e e e f4 f f f
          \bar ":|"
  }

two =   
  \relative c { 
%1
          \clef bass
          \key f\major
          a1 b c d
%5
          \space #8
          \clef treble
          \key d\major
          \grace s8	% trick to print the bar at correct position. TODO IN ALL VOICES !!
          b'1 c
  }
  
three =   
  \relative c, { 
%1
          \clef bass
          \key f\major
          a1 b c d
%5
          \space #8
          \key d\major
          \grace s8	% trick to print the bar at correct position. TODO IN ALL VOICES !!
          b1 c
  }

\score {
        %\new PianoStaff
        \new GrandStaff 
        <<
          \new Staff 
          << 
            \new Voice \one
          >>
             
          \new Staff \two
          \new Staff \three
        >>
        \layout { } 
}

<<attachment: braceBarTest.png>>

_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to