2014-10-05 16:13 GMT+02:00 Thomas Morley <[email protected]>:
> 2014-10-05 15:45 GMT+02:00 Peter Crighton <[email protected]>:
> > Does anybody have more ideas for this (see below)? How can I move the
> > beginning and end of OttavaBrackets horizontally, or rather change their
> > alignment to the note head?
>
>
> Maybe try the code below.
Thanks for your help, but that is not what I need anymore. Vertical
placement was fixed for me by Pierre a few emails before. (Maybe I confused
you with what I quoted.)
I now have this code:
\version "2.19.13"
ottavaLineUp = {
\override Staff.OttavaBracket.stencil = #ly:line-spanner::print
\override Staff.OttavaBracket.bound-details = #`((left . ((Y . 0)
(stencil-align-dir-y . ,UP)))
(right . ((Y . 0)
(text .
,(make-draw-dashed-line-markup (cons 0 -1.2))))))
\override Staff.OttavaBracket.left-bound-info =
#ly:line-spanner::calc-left-bound-info-and-text
\override Staff.OttavaBracket.right-bound-info =
#ly:line-spanner::calc-right-bound-info
\override Staff.OttavaBracket.minimum-length = ##f
}
ottavaLineDown = {
\override Staff.OttavaBracket.stencil = #ly:line-spanner::print
\override Staff.OttavaBracket.bound-details = #`((left . ((Y . 0)
(stencil-align-dir-y . ,DOWN)))
(right . ((Y . 0)
(text .
,(make-draw-dashed-line-markup (cons 0 1.2))))))
\override Staff.OttavaBracket.left-bound-info =
#ly:line-spanner::calc-left-bound-info-and-text
\override Staff.OttavaBracket.right-bound-info =
#ly:line-spanner::calc-right-bound-info
}
#(define-markup-command (topAlign layout props arg)
(markup?)
(let* ((mol (interpret-markup layout props arg)))
(ly:stencil-aligned-to mol Y 1)))
ottavava = {
\ottavaLineUp
\ottava #1
\set Staff.ottavation = \markup \concat \bold \topAlign { "8" \tiny "va" }
}
ottavavb = {
\ottavaLineDown
\ottava #-1
\set Staff.ottavation = \markup \concat \bold { "8" \tiny "vb" }
}
\relative c'' {
c1
\ottava #1 c c
\ottava #-1 c c
\ottava #0 c
\ottava #1 c
\ottava #-1 c
\break
\ottava #0 c
\ottavava c c
\ottavavb c c
\ottava #0 c
\ottavava c
\ottavavb c
}
This works great for the vertical placement, but horizontal alignment is
different than with default \ottava. This leads to a faulty display of the
ottavaBracket concerning only one single note.
I’ll attach an image of the problem.
What I am looking for is a way to alter horizontal alignment of the
ottavaBracket to the NoteHeads(, which works with the above overrides). So
that the 8 begins not at the center of the first note head, but a bit left
of it, and the bracket ends not at the center of the last note head, but a
bit right of it.
--
Peter Crighton | Musician & Music Engraver based in Mainz, Germany
http://www.petercrighton.de
_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user