Hi Marc,
On Fri, Jul 4, 2014 at 2:46 AM, Marc Hohl <[email protected]> wrote:
> Hi list,
>
> in the following example, I want to align the FretBoards to the
> bar lines. Now they are centered over the first beat in each measure.
>
>
You can use a simple Scheme engraver to reset the X-parents of the
FretBoard grobs. (See attached.) Of course, the alignment at the
beginning of the line looks weird--will see if I can come up with something.
HTH,
David
\version "2.19.0"
\paper {
indent = 0
ragged-right = ##f
}
fretDiagramToBarLine =
#(make-engraver
(acknowledgers
((fret-diagram-interface engraver grob source)
(let* ((context (ly:translator-context engraver))
(col (ly:context-property context 'currentCommandColumn)))
(set! (ly:grob-parent grob X) col)))))
frets = {
< d'\3 g'\2 b'\1 >1 | < g\4 cis'\3 e'\2 > | < cis'\3 fis'\2 a'\1 > | < fis\4 b\3 d'\2 > |
< b\3 e'\2 g'\1 > | < e\4 ais\3 cis'\2 > | < a\3 d'\2 fis'\1 > | < a\4 dis'\3 fis'\2 >
}
chordnames = \chordmode {
e1:m7 | a:7 | d:maj7 | g:maj7 |
cis:m7.5- | fis:7 | b:m7 | b:7 |
}
\layout {
\context {
\FretBoards
\override FretBoard.align-dir = #-1
\override FretBoard.fret-diagram-details.fret-count = #8
\override FretBoard.size = #1.5
}
}
\score {
<<
\new FretBoards \with { \consists \fretDiagramToBarLine } { \frets }
\new ChordNames { \chordnames }
\new Staff \with { \omit Stem } { \improvisationOn \repeat unfold 32 b'4 \bar ":|." }
>>
}
_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user