[Top][All Lists]

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

More issues with vertical dynamics placement (to conserve vertical space

From: Reinhold Kainhofer
Subject: More issues with vertical dynamics placement (to conserve vertical space)
Date: Wed, 29 Apr 2009 18:55:13 +0200
User-agent: KMail/1.11.2 (Linux/2.6.27-14-generic; KDE/4.2.2; i686; ; )

Thanks to the nice solution by Neil, I was able to move the dynamic signs 
inside the staff, but I'm still running into several problems, mainly in 
connection with hairpins... Attached is a sample file with all the issues and 
some sample code to highlight my problems.

Do you know of any solutions to these problems?

1) Here, the hairpin is way too high due to the up-stem of the first note and 
the fact that the bounding box is a rectangle:
Setting the y-offset of the DynamicLineSpanner moves the hairpin, but
it only works if I set the y-extent to an invalid value, which removes
the hairpin from the skyline and the collision detection, too!!!

\relative c'' { \key g \major \dynamicUp
  \stemUp b2\< \stemNeutral e,4 b | c2 e4 e | e2 d | e2\!\f d

hairpinOffset = #(define-music-function (parser location posY) (number?)
  \once \override DynamicLineSpanner #'Y-offset = $posY
  \once \override DynamicLineSpanner #'Y-extent = #(cons +0 -0.01)
\relative c'' { \key g \major \dynamicUp
  \hairpinOffset #3.5
  \stemUp b2\< \stemNeutral e,4 b | c2 e4 e | e2 d | e2\!\f d

2) A cross-measure hairpin ends at the measure-end, but it is so long that the
bar number will be moved up very high -> UGLY!!!

\relative c'' { \dynamicUp 
  \override Score.BarNumber #'break-visibility = #'#(#f #t #t)
  \stemUp b2\< \stemNeutral e,4 b | e2\!\f d

3) A line-broken hairpin collides with the accidentals of the key signature 
and will be shown way too high:

\relative c'' { \key g \major \dynamicUp
  b2\< \stemNeutral e,4 b | c2 e4 e |\break e2 d | e2\!\f d

4) The dynamicsAllInside function makes it possible to move dynamic signs 
inside the staff, but how can I move a hairpin up/down? I only manage to do it 
by also setting the Y-extent to an invalid value, which will completely ignore 
the hairpin for the vertical layout -> possible collisions, since the hairpin 
will be outside the skyline:

\relative c'' { \dynamicUp 
  c2\pp\< a4 b | e2\!\f d
\relative c'' { \dynamicUp 
  \dynamicsAllInside #-2 #3 
  \once \override DynamicLineSpanner #'Y-offset = #4.4
  c2\pp\< a4 b-.-> | e2\!\f d

5) The dynamicsAllInside function completely removes the dynamic sign
from the skyline, so that collisins will occur. I'm now looking for a way to 
move the dynamic sign inside the staff, but let it count towards the skyline 
and also use the part above the staff for collision prevention. In particular, 
the tempo mark is aligned as if the \dynamic ff is not there at all!

\relative c'' { \dynamicUp \tempo "Langsam" 4=60
  \dynamicsAllInside #-1 #1.5 b2\ff c4 c | e2 d

Thanks a lot for the help,
Reinhold Kainhofer, address@hidden,
 * Financial & Actuarial Math., Vienna Univ. of Technology, Austria
 *, DVR: 0005886
 * LilyPond, Music typesetting,

Description: Text Data

Attachment: dyn.pdf
Description: Adobe PDF document

reply via email to

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