Re: VoltaBracket flipped vertically

2015-05-31 Thread Thomas Morley
2015-05-26 18:09 GMT+02:00 Thomas Morley thomasmorle...@gmail.com:
 2012-12-19 16:15 GMT+01:00 Daniel Rosen drose...@gmail.com:
 I'm trying to get VoltaBrackets to appear both above and below the Score. 
 I've come up with the solution below, which works quite well, but I'd like 
 to get the volta text to appear inside the bracket, as it does when 
 VoltaBracket #'direction is not altered. Is there a way to do this? I can't 
 seem to find a separate layout object for the volta text.

 %%% example starts

 \version 2.16.1
 
   \new Voice { \repeat unfold 12 { c' } }
   \new Dynamics \with {
 \consists Volta_engraver
 \override VoltaBracket #'direction = #-1
   } {
 \repeat volta 2 { s1 }
 \alternative { { s1 } { s1 } }
   }


 %%% example ends

 DR

 Hi all,

 I revive this (very) old thread, because of a request in the german Forum.

Noone with an idea?

 Is there really no other possibility than poking in the stencul-expr,
 which will likely break soon?

 \version 2.19.20

 \layout {
   indent = #0
   \context { \Score \remove Volta_engraver }
 }

 \new Staff \with {
   \consists Volta_engraver
   \override VoltaBracket.direction = #DOWN
   \override VoltaBracketSpanner.direction = #DOWN

   \override VoltaBracket.after-line-breaking =
   #(lambda (grob)
 (let* ((default-stil (ly:volta-bracket-interface::print grob))
(x-ext (ly:stencil-extent default-stil X))
(y-ext (ly:stencil-extent default-stil Y))
(stencil-expr (ly:stencil-expr default-stil)))

 (ly:grob-set-property! grob 'stencil
   (ly:make-stencil
 (cons 'combine-stencil
   (cons
 (append
   (list 'translate-stencil '(0 . 2.3))
   (list (cadr (third stencil-expr 
 (cddr (third stencil-expr

x-ext
y-ext
 }

 
 %% EXAMPLE
 

 \relative c' {
   \repeat volta 2 { c1 }
   \alternative {
 { c }
 { c }
   }
   c
 }


 Cheers,
   Harm

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


Re: VoltaBracket flipped vertically

2015-05-31 Thread David Nalesnik
Hi,

On Sun, May 31, 2015 at 10:20 AM, Thomas Morley thomasmorle...@gmail.com
wrote:

 2015-05-26 18:09 GMT+02:00 Thomas Morley thomasmorle...@gmail.com:
  2012-12-19 16:15 GMT+01:00 Daniel Rosen drose...@gmail.com:
  I'm trying to get VoltaBrackets to appear both above and below the
 Score. I've come up with the solution below, which works quite well, but
 I'd like to get the volta text to appear inside the bracket, as it does
 when VoltaBracket #'direction is not altered. Is there a way to do this? I
 can't seem to find a separate layout object for the volta text.
 
  %%% example starts
 
  \version 2.16.1
  
\new Voice { \repeat unfold 12 { c' } }
\new Dynamics \with {
  \consists Volta_engraver
  \override VoltaBracket #'direction = #-1
} {
  \repeat volta 2 { s1 }
  \alternative { { s1 } { s1 } }
}
 
 
  %%% example ends
 
  DR
 
  Hi all,
 
  I revive this (very) old thread, because of a request in the german
 Forum.

 Noone with an idea?

  Is there really no other possibility than poking in the stencul-expr,
  which will likely break soon?


Well, looking at the stencil function in lily/volta-bracket.cc, it looks
pretty simple to displace the number based on the direction of the
bracket.  That way, you wouldn't have to accommodate broken volta brackets.

It looks like I'll have to update my LilyDev to compile anything, though.

Anyway, small point, but why not override 'stencil directly than go through
'after-line-breaking?

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


Re: VoltaBracket flipped vertically

2015-05-26 Thread Thomas Morley
2012-12-19 16:15 GMT+01:00 Daniel Rosen drose...@gmail.com:
 I'm trying to get VoltaBrackets to appear both above and below the Score. 
 I've come up with the solution below, which works quite well, but I'd like to 
 get the volta text to appear inside the bracket, as it does when VoltaBracket 
 #'direction is not altered. Is there a way to do this? I can't seem to find a 
 separate layout object for the volta text.

 %%% example starts

 \version 2.16.1
 
   \new Voice { \repeat unfold 12 { c' } }
   \new Dynamics \with {
 \consists Volta_engraver
 \override VoltaBracket #'direction = #-1
   } {
 \repeat volta 2 { s1 }
 \alternative { { s1 } { s1 } }
   }


 %%% example ends

 DR

Hi all,

I revive this (very) old thread, because of a request in the german Forum.

Is there really no other possibility than poking in the stencul-expr,
which will likely break soon?

\version 2.19.20

\layout {
  indent = #0
  \context { \Score \remove Volta_engraver }
}

\new Staff \with {
  \consists Volta_engraver
  \override VoltaBracket.direction = #DOWN
  \override VoltaBracketSpanner.direction = #DOWN

  \override VoltaBracket.after-line-breaking =
  #(lambda (grob)
(let* ((default-stil (ly:volta-bracket-interface::print grob))
   (x-ext (ly:stencil-extent default-stil X))
   (y-ext (ly:stencil-extent default-stil Y))
   (stencil-expr (ly:stencil-expr default-stil)))

(ly:grob-set-property! grob 'stencil
  (ly:make-stencil
(cons 'combine-stencil
  (cons
(append
  (list 'translate-stencil '(0 . 2.3))
  (list (cadr (third stencil-expr 
(cddr (third stencil-expr

   x-ext
   y-ext
}


%% EXAMPLE


\relative c' {
  \repeat volta 2 { c1 }
  \alternative {
{ c }
{ c }
  }
  c
}


Cheers,
  Harm

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


VoltaBracket flipped vertically

2012-12-19 Thread Daniel Rosen
I'm trying to get VoltaBrackets to appear both above and below the Score. I've 
come up with the solution below, which works quite well, but I'd like to get 
the volta text to appear inside the bracket, as it does when VoltaBracket 
#'direction is not altered. Is there a way to do this? I can't seem to find a 
separate layout object for the volta text.

%%% example starts

\version 2.16.1

  \new Voice { \repeat unfold 12 { c' } }
  \new Dynamics \with {
\consists Volta_engraver
\override VoltaBracket #'direction = #-1
  } {
\repeat volta 2 { s1 }
\alternative { { s1 } { s1 } }
  }


%%% example ends

DR



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