Just great! Thank you very much Harm for this smart solution and the detailed answer.
Cheers, Pierre 2015-03-06 0:10 GMT+01:00 Thomas Morley <thomasmorle...@gmail.com>: > 2015-03-05 18:46 GMT+01:00 Pierre Perol-Schneider > <pierre.schneider.pa...@gmail.com>: > > Hi, > > > > In a tablature, full notation, I need to get the stem length at the same > > level as the predefined beam position. > > Today I use a workaround that gives a bunch of warnings: > > > > \version "2.18.2" > > > > myMusic = \transpose c c, { > > \key ees\major > > \tag myStaff { ees8 ees16 f f f aes8~ aes4 aes8 g16 f } > > % => here's a workaround, using brackets, but gives warnings: > > \tag myTab { ees8 ees16 f f[ f aes8~ aes4 aes8 g16 f] } > > } > > > > \score { > > \new StaffGroup << > > \new Staff \keepWithTag myStaff \myMusic > > \new TabStaff \keepWithTag myTab \myMusic > > >> > > \layout { > > \context { > > \Staff > > \clef "F_8" > > \numericTimeSignature > > } > > \context { > > \TabStaff > > stringTunings = #bass-tuning > > \clef "moderntab" > > \tabFullNotation > > \stemDown > > \override Beam.positions = #'(-3.5 . -3.5) > > \omit TimeSignature > > \omit TextScript > > } > > } > > } > > > > Has anyone a brilliant idea to fix that ? > > > > TIA, > > Pierre > > > > Hi Pierre, > > how about: > > \version "2.18.2" > > equal-tab-staff-stems = > #(define-music-function (parser location val)(number?) > #{ > \override Stem.direction = > #(lambda (grob) > (if (negative? val) > DOWN > UP)) > > \override Stem.after-line-breaking = > #(lambda (grob) > (let* ((stem-begin-position (ly:grob-property grob > 'stem-begin-position))) > ;; the override for Beam.positions counts from staff-position 0 > ;; thus we need to go there for the (unbeamed) stem-length as well > ;; beam-thickness is taken from engraver-init.ly: > (ly:grob-set-property! grob > 'length > (+ (if (negative? val) > stem-begin-position > (- stem-begin-position)) > (* (abs val) 2) > ;; beam-thickness: > 0.32)))) > > \override Beam.positions = #(cons val val) > #}) > > myMusic = \transpose c c, { > \key ees\major > ees8 ees16 f f f aes8~ aes4 f c f, aes8 g16 f > } > > \score { > \new StaffGroup << > \new Staff \myMusic > \new TabStaff \myMusic > >> > \layout { > \context { > \Staff > \clef "F_8" > \numericTimeSignature > } > \context { > \TabStaff > stringTunings = #bass-tuning > \clef "moderntab" > \tabFullNotation > \equal-tab-staff-stems -3.5 > \omit TimeSignature > \omit TextScript > } > } > } > > > HTH, > Harm >
_______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user