This is how I deal with it. Not exactly automatic, but works well for me :-)


\version "2.19.15"

dynPadYOn =
#(define-music-function (parser location padding)(number?)
   #{
     \override DynamicLineSpanner.staff-padding = $padding
   #})

dynPadYOff =
#(define-music-function (parser location)()
   #{
     \revert DynamicLineSpanner.staff-padding
   #})

testMusic = {
  c'4 g c'\< a'\f | c'4\> g c' a'\p
}

{
  \testMusic | \break
  \dynPadYOn #4
  \testMusic | \break
  \dynPadYOff
  \testMusic
}

On 13 February 2015 at 21:53, Peter Gentry <peter.gen...@sunscales.co.uk>
wrote:

>
>
> This is too well known to need an example, indeed one is given in the
> documentation
>
>
> *http://www.lilypond.org/doc/v2.18/Documentation/notation/expressive-marks-attached-to-notes#dynamics*
> <http://www.lilypond.org/doc/v2.18/Documentation/notation/expressive-marks-attached-to-notes>
>
> where the solution is discussed
>
> A Dynamics context is available to engrave dynamics on their own
> horizontal line. Use spacer rests to indicate timing. (Notes in a Dynamics
> context will also take up musical time, but will not be
>
> engraved.) The Dynamics context can usefully contain some other items such
> as text scripts, text spanners, and piano pedal marks.
>
> Richard
>
> >
>
> This is very true but the dynamics context is very cumbersome for this
> purpose alone.
>
> Surely there must be a simpler way to align hairpins.
>
> regards
> Peter Gentry
>
>
> _______________________________________________
> lilypond-user mailing list
> lilypond-user@gnu.org
> https://lists.gnu.org/mailman/listinfo/lilypond-user
>
>


-- 
David Stephen Grant
da...@davidgrant.no
www.davidgrant.no
Phone: (+47) 918 14 276
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to