On Mar 17, 2011, at 5:55 AM, christophe 1710 wrote:
> Hello all,
>
> i'm working on the different modal structure from a score and i woud like to
> print the half or full ton from one not to the next one!
>
> \version "2.12.3"
> \include "italiano.ly"
> \header { }
> TimeKey = { \key do \minor \time 12/8}
> One= \relative mi' {
> \clef treble
> \override Score.BarLine #'stencil = ##f
> \override Stem #'transparent = ##t
> \override Staff.TimeSignature #'stencil = ##f
>
> sib4 dob reb mib fab solb
> }
> \score {
> \new Staff {
> \new voice = "Violon" { \One}
> }
> \layout {}
> }
>
> \startGroup and \stopGroup could be a solution but how to write bellow in the
> middle of the bracket the interval "1/2T" or "1T"
>
> Thanks for your help all
>
> regard
> chris
> _______________________________________________
> lilypond-user mailing list
> lilypond-user@gnu.org
> http://lists.gnu.org/mailman/listinfo/lilypond-user
Analysis brackets currently do not allow for text. You can do it, though, with
a hack.
\layout {
\context {
\Voice \consists "Horizontal_bracket_engraver"
}}
#(define (foo txt height padding)
(lambda (grob)
(let* ((x-len (interval-length (ly:stencil-extent
(ly:horizontal-bracket::print grob) X)))
(dir (ly:grob-property grob 'direction))
(text (grob-interpret-markup grob txt))
(text-x (interval-length (ly:stencil-extent text X)))
(text-y (interval-length (ly:stencil-extent text Y))))
(ly:stencil-add
(ly:stencil-translate text (cons (- (/ x-len 2) (/ text-x 2)) (* dir (+
(+ padding height) text-y))))
(ly:stencil-add
(make-line-stencil 0.1 0 0 (/ x-len 2) dir)
(make-line-stencil 0.1 (/ x-len 2) dir x-len 0))))))
\relative c'' {
\once \override HorizontalBracket #'stencil = #(foo "T" 1 0.2)
c2\startGroup d\stopGroup
\once \override HorizontalBracket #'stencil = #(foo "1/2T" 1 0.2)
d2\startGroup ees\stopGroup
}
Cheers,
MS
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user