Re: FretBoards aligned to bar lines

2014-07-06 Thread Marc Hohl

Am 04.07.2014 15:54, schrieb David Nalesnik:

Hi Marc,


On Fri, Jul 4, 2014 at 2:46 AM, Marc Hohl m...@hohlart.de
mailto:m...@hohlart.de 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.


Hey, thanks a lot – the engraver solution looks quite elegant to me but 
I would have never come up with something like this myself.


I solved the misplaced first system by

\grace s8 \bar .|:
 d'\3 g'\2 h'\1 1 |  g\4 cis'\3 e'\2  |  cis'\3 fis'\2 a'\1  |  
fis\4 h\3 d'\2  |
 h\3 e'\2 g'\1  |  e\4 ais\3 cis'\2  |  a\3 d'\2 fis'\1  |  a\4 
dis'\3 fis'\2  |

\bar :|.

Now it's ok.

Thanks a lot!

Marc


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


FretBoards aligned to bar lines

2014-07-04 Thread Marc Hohl

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.

TIA,

Marc

---

\version 2.19.0

\paper {
  indent = 0
  ragged-right = ##f
}

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.fret-diagram-details.fret-count = #8
\override FretBoard.size = #1.5
  }
}

\score {
  
\new FretBoards { \frets }
\new ChordNames { \chordnames }
\new Staff \with { \omit Stem } { \improvisationOn \repeat unfold 
32 b'4 \bar :|. }

  
}



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


Re: FretBoards aligned to bar lines

2014-07-04 Thread David Nalesnik
Hi Marc,


On Fri, Jul 4, 2014 at 2:46 AM, Marc Hohl m...@hohlart.de 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
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: FretBoards aligned to bar lines

2014-07-04 Thread David Nalesnik
On Fri, Jul 4, 2014 at 8:54 AM, David Nalesnik david.nales...@gmail.com
wrote:



  (See attached.)


In case of line breaks, add

 \override FretBoard.break-visibility = #end-of-line-invisible

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


Re: FretBoards aligned to bar lines

2014-07-04 Thread Janek Warchoł
Hi David,

2014-07-04 15:54 GMT+02:00 David Nalesnik david.nales...@gmail.com:
 Hi Marc,


 On Fri, Jul 4, 2014 at 2:46 AM, Marc Hohl m...@hohlart.de 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.

This looks very interesting!  Is it possible to write that function in
a way that would allow setting arbitrarily chosen parent?  For
example, to be able to write \set-x-parent Fretboard Flag (to align
Fretboard on the Flag)?

best,
Janek

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