Autor Thema: RemoveEmptyStaffContext und PianoStaff mit extra Dynamics  (Gelesen 2332 mal)

maceT

  • Member
RemoveEmptyStaffContext und PianoStaff mit extra Dynamics
« am: Donnerstag, 18. September 2008, 22:56 »
Guten Tag

seit ein paar Tagen versuche ich ein Lied mit Lilypond zu notieren, jetzt ist folgendes Problem aufgetreten:

Wenn ich wie in nachfolgendem Beispiel Dynamikangaben extra in ein PianoStaff einfüge, funktioniert RemoveEmptyStaffContext nicht mehr richtig. Es scheint mir, als bleibt in den ersten Zeilen die Dynamik angaben für das Klavier erhalten obwohl nichts drin steht.

Woran liegt das und wie kann man das beheben ?

\paper {
  #(set-paper-size "a4")
}

\header{
title = "Testdatei"
composer = "Test"
}

\layout {
% \context { \AncientRemoveEmptyStaffContext }
\context {}
}



flute = \relative c' {
\set Staff.instrumentName = "Flute"
\set Staff.shortInstrumentName ="Fl."
\set Staff.midiInstrument = "flute"
\clef treble
\key ees \minor \override Staff.TimeSignature #'style = #'() \time 4/4
% XXXXXXXXXXXXXXXXXXXXXX   INTRO
\set Score.skipBars = ##t \override MultiMeasureRest #'expand-limit = 1 R1*7
r2 bes4\p\< ees |
ges2 f4 ees |
ges2 ees4 f |
ges2 ees4 bes |
ges2 bes4 des |
f2\!\mf des4 ees |
f2 ees4 des |
f2 des4 bes |
ges2 bes4 des |
ges2 ges4 ges |
ees2 bes4 ees |
ges2 ees4 bes |
ges'2 f4 ees |
des2 ees4 f |
ges aes bes aes |
ees2 bes4 des |
ees2 bes4 des |
\time 2/4 ees2 |
\time 4/4 ges2
% XXXXXXXXXXXXXXXXXXXXXX   PIANOEINSATZ
ges4 ges |
ees2 ees4 ees |
}

voice = \relative e {
\set Staff.instrumentName = "Vocal"
\set Staff.shortInstrumentName ="Vo."
\set Staff.midiInstrument = "voice oohs"
\clef bass
\key ees \minor \override Staff.TimeSignature #'style = #'() \time 4/4
% XXXXXXXXXXXXXXXXXXXXXX   INTRO
R1*24 R2 R1*16
% s2*50
% XXXXXXXXXXXXXXXXXXXXXX   PIANOEINSATZ
% s2*32
}

text = \lyricmode {
% XXXXXXXXXXXXXXXXXXXXXX   INTRO
% XXXXXXXXXXXXXXXXXXXXXX   PIANOEINSATZ
}

guitar = \relative c' {
\set Staff.instrumentName = "Guitar"
\set Staff.shortInstrumentName ="Gt."
\set Staff.midiInstrument = "acoustic guitar (steel)"
\clef treble
\key ees \minor
\override Staff.TimeSignature #'style = #'() \time 4/4
% XXXXXXXXXXXXXXXXXXXXXX   INTRO
R1*24 R2 R1*16 << {R1} \\ {s2 \key gis \minor s2} >> R1*18 R2 R1*3 R2 R1*3
% s2*50
% XXXXXXXXXXXXXXXXXXXXXX   PIANOEINSATZ
% s2*32
}

pianoup = \relative c' {
\set Staff.midiInstrument = "acoustic grand"
\clef treble
\key ees \minor
\override Staff.TimeSignature #'style = #'() \time 4/4
% XXXXXXXXXXXXXXXXXXXXXX   INTRO
R1*24 R2 r2
% XXXXXXXXXXXXXXXXXXXXXX   PIANOEINSATZ
bes4 ees4 |
<<bes2 ees2 ges2>> f4 ees |
}

pianodown = \relative c {
\set Staff.midiInstrument = "acoustic grand"
\clef bass
\key ees \minor
\override Staff.TimeSignature #'style = #'() \time 4/4
% XXXXXXXXXXXXXXXXXXXXXX   INTRO
R1*24 R2
% XXXXXXXXXXXXXXXXXXXXXX   PIANOEINSATZ
r1 |
r2 bes4 ees4 |
}

pianodyn = {
R1*24 s2 s2
% XXXXXXXXXXXXXXXXXXXXXX   PIANOEINSATZ
s4\<\p s s1*3 s2\!\mf
}

bass = \relative e,, {
\set Staff.instrumentName = "Bass"
\set Staff.shortInstrumentName ="Bs."
\set Staff.midiInstrument = "contrabass"
\clef "bass_8"
\key ees \minor
\override Staff.TimeSignature #'style = #'() \time 4/4
% XXXXXXXXXXXXXXXXXXXXXX   INTRO
R1*24 R2 r2
% s2*50
% XXXXXXXXXXXXXXXXXXXXXX   PIANOEINSATZ
ges4 bes4 |
ees2 bes4 ges4 |
}

sil = \markup{\small \bold \italic {silent}}

wind = {
\set PianoStaff.instrumentName = \markup {
      \column { "Wind"
            \line { "Noise"} } }
\set PianoStaff.shortInstrumentName = "Wn."
\tempo 4=160
s4\pp\< s2. s1 s2. s4\!\mp s1 s1 s8\< s2. s4\!\f\> s2. s8\!
s1*2 s4\> s2. s1*5 s2. s4\!\pp
}

\score {
<<
\override Score.VerticalAxisGroup #'remove-first = ##t
\new Dynamics = "wind" \wind
\new Staff = "flute" \flute
\new Staff = "guitar" \guitar
\new Voice = "voice" \voice
      \new Lyrics \lyricsto voice \text
\new PianoStaff <<
\set PianoStaff.instrumentName = "Piano"
\set PianoStaff.shortInstrumentName = "Pi."
\new Staff = "upper" \pianoup
\new Dynamics = "pianodyn" \pianodyn
\new Staff = "lower" \pianodown
>>
\new Staff = "bass" \bass
>>

\layout {
\context { \RemoveEmptyStaffContext }
\context {
\type "Engraver_group"
\name Dynamics
\alias Voice % So that \cresc works, for example.
\consists "Output_property_engraver"
     
\override VerticalAxisGroup #'minimum-Y-extent = #'(-1 . 1)
pedalSustainStrings = #'("Ped." "*Ped." "*")
pedalUnaCordaStrings = #'("una corda" "" "tre corde")
     
\consists "Piano_pedal_engraver"
\consists "Script_engraver"
\consists "Dynamic_engraver"
\consists "Text_engraver"
     
\consists "Hara_kiri_engraver"

\override TextScript #'font-size = #2
\override TextScript #'font-shape = #'italic
\override DynamicText #'extra-offset = #'(0 . 2.5)
\override Hairpin #'extra-offset = #'(0 . 2.5)
     
\consists "Skip_event_swallow_translator"
     
\consists "Axis_group_engraver"
}
\context {
\PianoStaff
\accepts Dynamics
\override VerticalAlignment #'forced-distance = #7
}
}
\midi {
\context {
\Score
tempoWholesPerMinute = #(ly:make-moment 160 4)
}
}
}

Vielen Dank für Tips

Mace

comper

  • Member
Re: RemoveEmptyStaffContext und PianoStaff mit extra Dynamics
« Antwort #1 am: Freitag, 19. September 2008, 22:16 »
\override VerticalAxisGroup #'minimum-Y-extent = #'(-1 . 1)ausser Betrieb setzen.

Offenbar wird minimum-Y-extent ernst genommen.
Der Wert (-1 . 1) verhindert beliebiges Schrumpfen zwecks Auflösung.
Den Wert zu ( 0 . 0 ) abändern geht auch.

Es ist ein komplizierter Fall, weil die Grösse in X-Richtung
eine Rolle spielen könnte.
Aber, es lohnt sich nicht den Kopf darüber zu zerbrechen:
> By the way, the whole problem would be avoided if it weren't for the
> hacky treatment of minimum-Y-extent (we no longer space systems using
> extents, but minimum-Y-extent gets special treatment for backwards
> compatibility). But I think that's a problem for 2.13...


Und noch was:
Hara_kiri_engraver ist für Axis_group_engraver ein Ersatz.
Lilypond reklamiert heftig, weil Dynamics beide hat.