hi all,

when i compile the attached file with lily-1.5.66, the dynamics are
printed over the notes that appear below the staff (anything below
middle c).

i split the dynamics and the voice for the main reason of keeping the
voice part legible, and because the dynamics are the same for three or
four voices.

i tried changing the padding for Score.DynamicLineSpanner, but that just
looks plain ugly, even though it prevents the hairpins and dynamics from
colliding with the notes.

thanx for any help,

simon.
-- 
Confucius say, man who live in glass house shower in basement.
% Print file for trumpetIV

\include "paper16.ly"

% --------------------------------------------------------------------
% FUNCTION FOR BOXING GROBS (shamelessly copied from the example files)
#(define (make-molecule-boxer callback)
  (define (molecule-boxer grob)
  (let*
   (
    (mol    (callback grob))
    (box-padding 0.5)
    (x-ext (widen-interval (ly-get-molecule-extent mol 0) box-padding))
    (y-ext (widen-interval (ly-get-molecule-extent mol 1) box-padding))
    (rule-thick 0.1)
    (x-rule (box-molecule (widen-interval x-ext rule-thick)
                              (cons 0 rule-thick)))
    (y-rule (box-molecule (cons 0 rule-thick) y-ext))
    )
    
    (set! mol (ly-combine-molecule-at-edge mol 0 1 y-rule (* 1 box-padding)))
    (set! mol (ly-combine-molecule-at-edge mol 0 -1  y-rule (* 1 box-padding)))
    (set! mol (ly-combine-molecule-at-edge mol 1 1  x-rule 0.0))  
    (set! mol (ly-combine-molecule-at-edge mol 1 -1 x-rule 0.0))
    
    mol
 ))
 molecule-boxer
 )
% --------------------------------------------------------------------

global = {
                \property Score.TextScript \override #'padding = #2                    
 
                \property Score.RehearsalMark \override #'padding = #3
                \property Score.RehearsalMark \override #'molecule-callback =
                #(make-molecule-boxer Text_item::brew_molecule)

                \skip 2 * 26

                \mark "A"
                \skip 2 * 24

                \mark "B"
                \skip 2 * 16

                \mark "C"
                \skip 2 * 8

                \mark "D"
                \skip 2 * 8

                \mark "E"
                \skip 2 * 18
                \bar "||"

                \mark "F"
                \skip 2 * 16

                \mark "G"
                \skip 2 * 22
                \bar "||"

                \mark "H"
                \skip 2 * 11

                \mark "I"
                \skip 2 * 24

                \mark "J"
                \skip 2 * 10

                \mark "K"
                \skip 2 * 30

                \mark "L"
                \skip 2 * 10
                \bar "||"

                \mark "M"
                \skip 2 * 19
                \bar "||"

                \mark "N"
                \skip 2 * 36
                \bar "|."
}

% -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

trumpetIV = \notes \relative c'' {
                \time 2/4
                \key c \major
                
                c,2
                R2
                R2 * 8                                        % 3 - 10
                R2 * 16                                       % 11 - 26
                % MARK A
                R2 * 8                                        % 27 - 34
                R2 * 16                                       % 35 - 50
                % MARK B
                R2 * 8                                        % 51 - 58
                R2 * 8                                        % 59 - 66
                % MARK C
                R2 * 8                                        % 67 - 74

                % MARK D
                \break
                a4 r e'' r e r a,, r a r r e'' R2 e4 r

                % MARK E
                e r R2 e4 r a,, r a r e'' a,, e'' e8 e a,,4 r
                e'' r R2\break e4 r a,, r a r e'' a,, e'' e8 e a,,4 r
                R2 * 2

                % MARK F
                \key a \major
                R2 * 9
                \break
                r4 a ~ a2 ~ a2 ~ a2 ~ a2
                R2 * 2

                % MARK G
                R2 * 22

                % MARK H
                \key c \major
                R2
                g''4 r4 R2 g4 r
                R2 * 6
                e8-. e-. r4

                % MARK I
                \break
                R2 * 24

                % MARK J
                a,4 r r a8 a
                a4 r r a8 a
                a r a a   a r a a   a r a a 
                a a r4 a8 a r4 a8 a r4

                % MARK K
                \break
                R2 * 29
                r8 e'4.

                % MARK L
                e4 e8-. e-. e4---. e---.
                e4 e8-. e-. e4---. e---.
                e4 e8-. e-. e4---. e---.
                e4 e8-. e-. g,4-- r4
                R2 * 2

                % MARK M
                \break
                \key a \major
                R2 * 9
                r4 a, ~ a2 ~ a2 ~ a2 ~ a2
                R2 * 5

                % MARK N
                \break
                \key c \major
                R2
                a4 a8-. a-. a4 r a a8-. a-.
                R2
                e''8 r r4
                R2 * 3
                e8 r r4
                R2 * 26
}

% -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

trumpetIIIDynamics = \notes {
                s8\f\> s4 \! s8
                \skip 2 * 73
                % mark d
                s4\ff s4
                \skip 2 * 15
                s4\> s4
                \skip 2 * 4
                \! s4\p s4
                \skip 2 * 1
                s4\p s4
                \skip 2 * 2

                % mark f
                \skip 2 * 9
                s4 s\p\<
                \skip 2 * 2
                s4 \! s4
                s8\> s4 \! s8
                \skip 2 * 24

                % mark h
                \skip 2 * 1
                s4\pp s4
                s2
                s4\pp s4
                \skip 2 * 6
                s4\ff s4

                % mark i
                \skip 2 * 24

                % mark j
                s4\p s4
                \skip 2 * 3
                s4\< s4 
                s2
                s4 s8 \! s8
                s2
                s8\> s8 s4 \! s8\pp s8 s4

                % mark k
                \skip 2 * 29
                s8 s4.\<

                % mark L
                \! s4\ff s4
                \skip 2 * 9

                % mark m
                \skip 2 * 9
                s4 s4\p\<
                \skip 2 * 2
                \! s4 s8 s8\>
                s4. \! s8
                \skip 2 * 5

                % mark n
                s2
                s4\pp s4
                \skip 2 * 3
                s8\f s8 s4
                \skip 2 * 3
                s8\f s8 s4
                \skip 2 * 26
}

% -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+


\score {
                \context Staff <
                                \property Score.skipBars = ##t
%                               \property Score.DynamicLineSpanner \override #'padding 
= #3
                                \global
                                \trumpetIV
                                \trumpetIIIDynamics
                >
                \header {
                                title = "7. Symphonie, Opus 92"
                                subtitle = "2. Satz"
                                composer = "Ludwig van Beethoven"
                                arranger = "Arr.: Simon G. P. Bailey"
                                meter = "\\Large \\textbf{\\textit{Allegretto}}"
                                copyright = "\\copyright  2002, Simon G. P. Bailey, 
A-6020 Innsbruck"
                                footer = "L. v. Beethoven, 7. Symphonie, 2. Satz"
                                tagline = ""
                                instrument = "Trompete IV in B \\break \\break"
                                head = "Trompete IV"
                }
}

Reply via email to