lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Moving dynamics (with \dynamicsUp) to the left of the note


From: Risto Vääräniemi
Subject: Re: Moving dynamics (with \dynamicsUp) to the left of the note
Date: Mon, 26 May 2008 16:09:23 +0300

2008/5/26 Reinhold Kainhofer :

> So, how can I shift the \f to the left of the note, have if "fall down" (as
> the LSR snippet 232 indicated) and not take up any space above the note? I
> tried several different grob property settings, but for all of them the
> layouting seems to happen before the property moves the \f (some don't even
> move the \f ...). Attached are my attempts with some comments.

I've faced the same problem and I noticed that you have to tackle with
DynamicLineSpanner. To make things easier I created two functions.

%%%
\version "2.11.45"

dynamicsX = #(define-music-function (parser location offset) (number?)
#{
    \once \override DynamicText #'X-offset = $offset
    \once \override DynamicLineSpanner #'Y-offset = #0
#})

dynamicsXY = #(define-music-function (parser location offsetX offsetY)
(number? number?)
#{
    \once \override DynamicText #'X-offset = $offsetX
    \once \override DynamicLineSpanner #'Y-offset = $offsetY
#})

{
    b'2\f \dynamicsX #-3 b'2\f \dynamicsXY #-3 #-6 b'2\f
}
%%%%

The first one moves the dynamics horizontally and drops / raises it
closer to the staff if there's room. With the second one you can move
the dynamics also vertically.

-Risto




reply via email to

[Prev in Thread] Current Thread [Next in Thread]