I'm sorry, I can't figure out MWE for this, because it seems specific for my score now. I tried replicating it by having empty dynamics/piano material, but in the new score it doesn't seem to generate extra space... So first, the issue: by adding two dynamics contexts (one between the piano staffs, one below, for pedaling), the hidden staffs seem to generate extra vertical space. First page:
http://i.imgur.com/goOiYCW.png ; Second page:
http://i.imgur.com/KDX4IQF.png . When I disable both dynamics lines, it looks like this:
http://i.imgur.com/0QSUDE8.png . Note how just having dynamics makes the gap betweeen trumpet so huge.. one not really good workaround I found is to use \override VerticalAxisGroup.nonstaff-relatedstaff-spacing.padding = #-0.2 on the middle dynamics, but it applies to the whole score, can't be set temporarily, and dynamics are not spaced correctly later on. So, here is the code for those two pages (again sorry, couldn't replicate it by having piano staff+dynamics with multi rests; also uncomment %\override VerticalAxisGroup.nonstaff-relatedstaff-spacing.padding = #-0.2 to see the 'workaround' difference).
\version "2.19.51"
%\include "mtf-cadence.ily"
\language "deutsch"
\paper {
%system-system-spacing.basic-distance = #8
%systems-per-page = 5
%bottom-margin = 0
indent = 22
print-first-page-number = ##t
first-page-number = ##t
print-page-number = ##t
}
\header {
title = \markup { \vspace #6 "PREMIERE PIECE" }
subtitle = \markup { \vspace #2 \tiny "POUR TROMPETTE ET PIANO" }
composer = \markup { \vspace #1 "J. Deprez" }
tagline = ##f
}
global = {
\key b \major
\numericTimeSignature
\time 3/4
}
trumpetBb = \relative c'' {
\transposition b
% Music follows here.
\once \override Score.MetronomeMark.font-size = #-2
\tempo 4=108
c4~ c8 g16 g c8 d |
g f16 g e4 \tuplet 3/2 { d8 e c } |
g'2 r4 |
c,4~\p c8 g16 g c8 d |
g f16 g e4 \tuplet 3/2 { d8 e c } |
fis(->-\markup { \italic "cresc." } g~ g4) r8 c, |
dis->( e~ e4) r8 h |
c--([ dis)] e--([ fis)] g--([ e)] |
c4\f\<~ c8 g16 g c8 g |
c4\ff\<~ c8 g16 g c8 g |
\once \override Staff.TimeSignature.break-visibility = ##(#f #f #t)
\time 3/4
c2.*2/20 \fff \stopStaff
s1*3/4*10
s1*3/4*3
s1*3/32
s1*3/4*5
s2.*18/20 |
\startStaff
\once \override Score.MetronomeMark.font-size = #-2
\tempo "Tempo" 4=108
c4\f~ c8 g16 g c8[ d] |
g f16( g) e4 r8 c |
f e16( f) d8[( c] h c) |
d2 g,4 |
c4~ c8 g16 g c8[ d] |
g f16( g) e4 c |
a f' a,8( c) |
h--( c d2) |
}
up = \relative c'' {
% Music follows here.
\once \override Score.KeySignature.X-offset = #-4
\global
R1*3/4*10
\cadenzaOn
\small
\autochange
\relative {
\stemDown
\shape #'((0 . 3) (10 . 3) (-10 . 3) (0 . 3)) PhrasingSlur
des,32\([ es ges as b!]
\stemUp des[ es ges as b]
\stemDown des[ es ges as b]
\stemUp des[ es ges as b]
\stemDown \ottava #1 des[ es ges as b]
\stemUp <des es>
\stemDown b[ as ges es des]
\stemUp \ottava #0 b[ as ges es des]
\stemDown b[ as ges es des]
\stemUp b[ as ges es des]
\stemDown b[ as ges es des]\) |
\bar "|" \break |
\cadenzaOff }
\cadenzaOn
\autochange es'
\relative {
\set Score.currentBarNumber = #12
\override Score.Accidental.transparent = ##t
\shape #'((0 . -4) (0 . 1) (-1 . 1) (0 . 0)) Slur
b,,([ f' b] \stemUp f'[ <a d> g])
\shape #'((0 . -2) (2 . 0) (-2 . 0) (0 . 0)) Slur
\stemDown f([ b d] \stemUp f[ <a d> g])
\shape #'((0 . -4) (1 . 1) (-2 . 1) (0 . -1)) Slur
\stemDown f([ b d] \stemUp f[ <a d> g])
\ottava #1
\stemDown f([ b d] f[ <a d> g])
\cadenzaOff }
\slurNeutral
\tieNeutral
\bar "|" \break
\ottava #0
\stemNeutral
\normalsize
\set Score.currentBarNumber = #13
b'4~ \stemUp b8 f16 f \stemUp \once \slurUp b8( c) |
\override Score.Accidental.transparent = ##f
\stemNeutral f e16( f) d4~ \stemUp d8 b |
\stemDown es d16( es) c4~ \stemUp c8 b |
\stemDown
\shape #'((0 . -1) (0 . 0) (0 . 0) (0 . 0)) Slur
a4(~ \stemUp a8 b16 h c4) |
\stemNeutral
b4~ \stemUp b8 f16 f \stemUp \once \slurUp b8( c) |
\slurNeutral
\tieUp
\slurUp
f2~f8. e32( f) |
f2~ f8( e16 f) |
f2.\fermata |
\tempo "Marcato" 4=108
\stemNeutral
\tieNeutral
\slurNeutral
<b,, d f b>4. <f f'>16 q <b b'>8 <c c'> |
<f a f'> <e a e'>16 <f a f'> <d a' d>4. <f a f'>8 |
<es g es'> <d g d'>16 <es g es'> <c g' c>4. \once \stemUp<b b'>8 |
\tuplet 3/2 4 {
<a a'>8 <b b'> <h h'> <c c'> <d d'> <es es'> <f f'> <g g'> <a a'> } |
<b d f b>4. <f, f'>16 q <b b'>8 <c c'> |
<f as des f>4. <e as des e>16 <f as des f> q8 <e as des e>16 <f as des f> |
<f a f'>4. <e a e'>16 <f a f'> q8 <e a e'>16 <f a f'> |
<f a f'>4. <e a e'>16 <f a f'> q8 <e a e'>16 <f a f'> | \break
<b f d b>2 <f, b d f>4 |
<a d f a>2 <f a d f>4 |
<g c es g>2 <b es g b>4 |
\tuplet 3/2 4 {
<a a'>8 <b b'> <h h'> <c c'> <d d'> <es es'> <f, f'> <g g'> <a a'>} |
\ottava #1 <b'' f d b>2-> \ottava #0 <f,, b d f> 4 |
<a d f a>2 <f a d f>4 |
<es' g es'>8 <d g d'>16 <es g es'> <c g' c>8 <b b'> <g es' g>4 |
<a es' a>4 q8 <b es b'> <c es c'>4 | \break
}
down = \relative c' {
\global
R1*3/4*10
R1*3/4*3
R1*3/32
\tuplet 3/2 4 {
\stemDown
\shape #'((0 . 2) (0 . 5) (-1 . 0) (-0.2 . -0.5)) Slur
b,,8( f' b d f b \stemDown \change Staff = "up" d f b) |
\shape #'((0 . 1.5) (1 . 5) (-4 . 0) (-0.4 . -0.6)) Slur
\change Staff = "down" d,,,( a' d f a d \change Staff = "up" f a d) |
\shape #'((0 . 2) (0 . 5) (-2 . 1) (0 . -0.2)) Slur
\change Staff = "down" c,,,( g' es' g c es \change Staff = "up" g c es) |
\shape #'((0 . -1) (1 . 2) (-1 . 1) (0 . 0.2)) Slur
\change Staff = "down" f,,,( c' a' \change Staff = "up" c es g a d c) | \break
}
\override Score.Accidental.transparent = ##f
\change Staff = "down"
\tuplet 3/2 4 {
\stemDown
\shape #'((0 . 2) (0 . 5) (-1 . 0) (-0.2 . -0.5)) Slur
\override Score.TupletNumber.transparent = ##t
\override Score.TupletBracket.transparent =##t
b,,,8( f' b d f b \stemDown \change Staff = "up" d f b) |
\shape #'((0 . -1) (0 . -1) (-3 . 0) (-0.4 . -0.6)) Slur
\change Staff = "down" des,,,( as' f' as des f \change Staff = "up" as des f) |
\shape #'((0 . -2) (-0.5 . 2.5) (-1 . -0.5) (-0.3 . -0.5)) Slur
\change Staff = "down" f,,,( c' a' \change Staff = "up" c es g b d f) |
\change Staff = "down"
r c,, a' \change Staff = "up" es' a c f a c |
}
\change Staff = "down"
<b,,,, b'>8( <b' d f> <d f b>2) |
<d, d'>4( <d' f a>8 <f a d> <a d f>4) |
\once \slurDown
\shape #'((0 . 0) (0 . 0) (-0 . 0) (3 . 2)) Slur
<c,, c'>4.( \autoBeamOff <es' g c>8
<<
\crossStaff {
\stemDown
\change Staff = "up"
%\override Stem.length = #20
%\override Stem.cross-staff = ##t
<c' es>
}
\new Voice {
\stemDown
\change Staff = "down"
g8[ \change Staff = "up" <c es g>]
}
{
s8)
}
>>
\autoBeamOn
\change Staff = "down"
\slurDown
<f,, f'>2( \stemNeutral <f' a es'>8 <f,, f'>) |
\stemDown \slurNeutral
<b b'>8( <b' d f> <d f b>2) |
<des, des'>8( <des' f as> <f as des>4 <as des f>) |
\slurDown
\shape #'((0 . 0) (0 . 0) (-0 . 0) (0 . -0.2)) Slur
<f, f'>8( <f' a c> <f a es'>4 <a c es a>) |
\shape #'((0 . 0) (0 . 0) (-0 . 0) (0 . -0.2)) Slur
<f, f'>8( <f' a c> <f a es'>4 <a c es a>) |
\stemNeutral
<b,, b'>4( <f'' b d>2) |
<d, d'>4( <f' a d>2) |
<c, c'>4( <g'' c es>2) |
<f, f'>4( <f' a es'> <f,, f'>) | \break
<b f' b> <f'' b d>2 |
<d, d'>4 <f' a d>2 |
<c, c'>4 <g'' c es> <c,, c'> |
<f, f'> <f'' a es'>4. <f,, f'>8 | \break
}
pedal = {
\stopStaff
R1*3/4*9
R1*3/4
\startStaff
s1\sustainOn
s2 s16 s32
s1\sustainOn
}
dynamics = {
\stopStaff
R1*3/4*10
\startStaff
\once \override DynamicText.Y-offset = #-5
R1\fff
R1 r16 r32
r16
\once \override TextScript.Y-offset = #-2.5
s8_\markup { \italic "rall." } s16 |
s2.\mf
s1*3/4*6
s4. s4\>-\markup { \halign #-1 \italic "rall." } s16 s32 s32\!
s2.\ff
s1*3/4*3
s2.\ff s2.
\override TextScript.Y-offset = #0
s2.-\markup { \italic "cresc." }
s4 \once \override TextScript.X-offset = #2 s4-\markup { \italic "rall." } s4
s2.\mf s2.*2
\once \override TextScript.Y-offset = #-0.5
s2.-\markup { \italic "cresc." }
s4\ff
\once \override DynamicText.Y-offset = #0.3
s2\mf
s2.
s2.\f
}
trumpetBbPart = \new Staff \with {
instrumentName = "Trumpet in Bb"
midiInstrument = "trumpet"
\magnifyStaff #3/4
}
\trumpetBb
pianoPart = \new PianoStaff \with {
instrumentName = "Piano"
} <<
\new Staff = "up" \with {
midiInstrument = "acoustic grand"
} \up
\new Dynamics = "dynamics" \with {
%\override VerticalAxisGroup.nonstaff-relatedstaff-spacing.padding = #-0.2
%
}
\dynamics
\new Staff = "down" \with {
midiInstrument = "acoustic grand"
} { \clef bass \down }
\new Dynamics = "pedal" \pedal
>>
\score {
<<
\trumpetBbPart
\pianoPart
>>
\layout {
\context {
\PianoStaff
\consists #Span_stem_engraver
}
\context {
\Staff \RemoveEmptyStaves
}
\context {
\Dynamics
\RemoveEmptyStaves
}
\context {
\Score
\override VerticalAxisGroup.remove-first = ##t
}
}
\midi { }
}
Pozdrawiam,