Hi Simon,
thank you for your snippet! In my case, I will use the extra-offset
variant, but I'll take yours for future use :-)
As there is a whole orchestra between flute and voice, I use this as
acceptable tweak:
\once \override NoteHead.extra-offset = #'(-1.5 . 0)
\once \override Stem.extra-offset = #'(-1.5 . 0)
\once \override Flag.extra-offset = #'(-1.5 . 0)
\once \shape #'((-1.5 . 0) (-1.1 . -0.3) (-.7 . -0.3) (-0.3 . 0)) Slur
If one is interested, I attached a file, where I use the
edition-engraver to apply this tweak.
Cheers
Jan-Peter
Am 22.03.2016 um 19:35 schrieb Simon Albrecht:
Hi Jan-Peter,
On 22.03.2016 15:10, Jan-Peter Voigt wrote:
Hi all,
I have a problem spacing grace notes under a series of triplets. In
the example, the grace notes produce a big gap between the tuplets or
collide with the accidentals.
It’s an annoying bug that this isn’t handled nicely, and there is no
nice workaround either. I could only concoct the following hack:
%%%%%%%%%%%
\version "2.19.38"
pseudograce =
#(define-music-function (parser location music) (ly:music?)
#{
\tiny
\temporary\stemUp
\temporary\offset length -1 Stem
$music
\normalsize
\revert Stem.direction
\revert Stem.length
#})
% triplets played by the flute
flute = \new Staff \with {
\tupletSpan 8
beamExceptions = #'((end .
(
((1 . 24) . (3 3 3 3 3 3 3 3))
)))
} \tuplet 3/2 {
gis'16( f'' e'') d''( c'' b') a'( gis' fis')
}
% sung words with grace notes
melody = \new Staff \new Voice {
\autoBeamOff
d''8*6/10 \pseudograce { c''16*4/5( } bis'8*6/10) \pseudograce
{a'16(} gis'8)
} \addlyrics { Je -- su, ach! }
% in this score, the grace notes produce gaps between the tuplets
\score {
<<
\flute
\melody
>>
}
%%%%%%%%%%%
v2.19.25 is needed because offsetting Stem length only became possible
through issue 4516. Thanks David!
HTH, Simon
\version "2.19.38"
% include path to openlilylib and openlilylib/oll-core is needed!
\include "edition-engraver/edition-engraver.ily"
% I only use the edition-engraver in the Staff context
\consistEE Staff
\addEdition grace
\editionModList grace grace.spacing.Staff.B {
\once \override NoteHead.extra-offset = #'(-1.5 . 0)
\once \override Stem.extra-offset = #'(-1.5 . 0)
\once \override Flag.extra-offset = #'(-1.5 . 0)
\once \shape #'((-1.5 . 0) (-1.1 . -0.3) (-.7 . -0.3) (-0.3 . 0)) Slur
} #`((1 . ,(ly:make-moment 1/8 -1/16))(1 . ,(ly:make-moment 2/8 -1/16)))
% triplets played by the flute
flute = \new Staff \with {
\tupletSpan 8
beamExceptions = #'((end .
(
((1 . 24) . (3 3 3 3 3 3 3 3))
)))
} \tuplet 3/2 {
gis'16( f'' e'') d''( c'' b') a'( gis' fis')
}
% sung words with grace notes
melody = \new Staff \new Voice {
\autoBeamOff
d''8 \grace {c''16(} bis'8) \grace {a'16(} gis'8)
} \addlyrics { Je -- su, ach! }
% in this score, the grace notes produce gaps between the tuplets
\score {
<<
\flute
\melody
>>
}
% in this score the grace note-collision with accidentals is avoided with the tweak above
\score {
<<
\flute
\melody
>>
\layout {
\context {
\Score
proportionalNotationDuration = #(ly:make-moment 1/24)
\override SpacingSpanner.strict-note-spacing = ##t
\editionID grace.spacing
}
}
}
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user